88 < title > Branch Metrics Web SDK Example App</ title >
99 < link rel ="stylesheet " href ="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css ">
1010 < style type ="text/css ">
11- .lineBreak {
12- opacity : 0.5 ;
13- background-color : lightgray;
11+ .split-container {
12+ display : flex;
13+ align-items : stretch;
14+ justify-content : center;
15+ width : 90% ;
16+ margin : auto;
1417 }
1518
16- .horizontalLine {
17- height : 0.5px ;
18- width : 100% ;
19+ .container {
20+ width : 45% ;
21+ margin : 10px ;
22+ padding : 15px ;
23+ background : # fff ;
24+ border-radius : 5px ;
25+ box-sizing : border-box;
1926 }
2027
2128 .verticalLine {
2229 width : 0.5px ;
30+ background-color : lightgray;
2331 }
2432
25- body {
26- font-family : Arial, sans-serif;
27- background-color : # f4f4f9 ;
28- color : # 333 ;
33+ .api-info {
34+ order : 1 ;
2935 }
3036
31- label {
32- display : block;
33- font-size : 14px ;
34- margin-bottom : 6px ;
35- font-weight : bold;
37+ .api-methods {
38+ order : -1 ;
3639 }
3740
3841 .apiInput {
4750 transition : border-color 0.3s ease, box-shadow 0.3s ease;
4851 }
4952
50- input : focus {
51- border-color : # 007bff ;
52- box-shadow : 0 0 5 px rgba ( 0 , 123 , 255 , 0.5 ) ;
53- }
53+ @media ( max-width : 768 px ) {
54+ . split-container {
55+ flex-direction : column ;
56+ }
5457
55- .row {
56- margin-bottom : 30px ;
57- }
58+ .container {
59+ width : 100% ;
60+ margin : 10px 0 ;
61+ }
5862
59- # configButtons {
60- display : flex;
61- flex-wrap : wrap;
62- gap : 3px ;
63- margin-bottom : 10px ;
63+ .verticalLine {
64+ display : none;
65+ }
66+
67+ .api-info {
68+ order : -1 ;
69+ }
70+
71+ .api-methods {
72+ order : 1 ;
73+ }
6474 }
6575
6676 </ style >
189199 < div style ="display: flex; flex-direction: column; align-items: center; width: 100% ">
190200 < h2 > Branch Metrics Web SDK Example</ h2 >
191201 < hr class ="lineBreak horizontalLine ">
192- < div style =" display: flex; align-items: stretch; justify-content: center; width: 90%; ">
193- < div class ="container ">
202+ < div class =" split-container ">
203+ < div class ="container api-info ">
194204 < section >
195- < div class ="row col-lg-8 col-lg-offset-2 ">
205+ < div class ="row ">
206+ < h3 > Api Requests</ h3 >
207+ < hr class ="lineBreak horizontalLine ">
208+
209+ < h4 > Session Info
210+ < button class ="btn btn-info " onclick ="copySessionInfo() " style ="margin-left: 10px; font-size: 12px; padding: 2px 8px; cursor: pointer; ">
211+ Copy
212+ </ button >
213+ </ h4 >
214+ < pre id ="session-info "> Reading session from .init()...</ pre >
215+
216+ < h4 > Request</ h4 >
217+ < pre id ="request "> Click a button!</ pre >
218+
219+ < h4 > Response</ h4 >
220+ < pre id ="response "> Click a button!</ pre >
221+ </ div >
222+ </ section >
223+ </ div >
224+
225+ < div class ="lineBreak verticalLine "> </ div >
226+
227+ < div class ="container api-methods ">
228+ < section >
229+ < div class ="row ">
196230 < h3 > Methods</ h3 >
197- < a > https://help.branch.io/developers-hub/docs/web-full-reference</ a >
231+ < a href =" https://help.branch.io/developers-hub/docs/web-full-reference " target =" _blank " > https://help.branch.io/developers-hub/docs/web-full-reference</ a >
198232 < hr class ="lineBreak horizontalLine ">
233+
199234 < h4 > Session</ h4 >
200235 < div class ="group ">
201236 < button class ="btn btn-info " onclick ="callData() "> .data()</ button >
202237 < button class ="btn btn-info " onclick ="callLogout() "> Logout</ button >
203238 < button class ="btn btn-info " onclick ="callFirst() "> .first()</ button >
204239 </ div >
240+
205241 < h4 > Identity</ h4 >
206242 < div class ="group ">
207243 < input class ="
example-input "
type ="
text "
id ="
identityID "
placeholder ="
[email protected] "
> 208244 < button id ="setIdentity " class ="btn btn-info " onclick ="callSetIdentity() "> Set Identity</ button >
209245 </ div >
246+
210247 < h4 > Events</ h4 >
211248 < div class ="group ">
212249 < button class ="btn btn-info " onclick ="callLogEvent('PURCHASE') "> Create Standard Event</ button >
213250 < button class ="btn btn-info " onclick ="callLogEvent('testedCustomEvent') "> Create Custom Event</ button >
214251 </ div >
252+
215253 < h4 > Sharing</ h4 >
216254 < div class ="group ">
217255 < button class ="btn btn-info " onclick ="callLink() "> Create Link</ button >
218256 < button class ="btn btn-info " onclick ="callQrCode() "> Create QrCode</ button >
219257 < button class ="btn btn-info " onclick ="callBanner() "> .banner()</ button >
220258 </ div >
259+
221260 < h4 > Tracking</ h4 >
222261 < div class ="group ">
223262 < button class ="btn btn-info " onclick ="callDisableTracking() "> Disable Tracking</ button >
224263 < button class ="btn btn-info " onclick ="callEnableTracking() "> Enable Tracking</ button >
225264 </ div >
226- </ div >
227- < div class ="row col-lg-8 col-lg-offset-2 ">
228265 < h3 > Api Settings</ h3 >
229266 < hr class ="lineBreak horizontalLine ">
230267 < div class ="group " id ="configButtons "> </ div >
@@ -241,27 +278,7 @@ <h3>Api Settings</h3>
241278 </ div >
242279 </ section >
243280 </ div >
244- < div class ="lineBreak verticalLine "> </ div >
245- < div class ="container ">
246- < section >
247- < div class ="row col-lg-8 col-lg-offset-2 ">
248- < h3 > Api Requests</ h3 >
249- < hr class ="lineBreak horizontalLine ">
250- < h4 > Session Info
251- < button class ="btn btn-info " onclick ="copySessionInfo() " style ="margin-left: 10px; font-size: 12px; padding: 2px 8px; cursor: pointer; ">
252- Copy
253- </ button >
254- </ h4 >
255- < pre id ="session-info "> Reading session from .init()...</ pre >
256- < h4 > Request</ h4 >
257- < pre id ="request "> Click a button!</ pre >
258- < h4 > Response</ h4 >
259- < pre id ="response "> Click a button!</ pre >
260- </ div >
261- </ section >
262- </ div >
263281 </ div >
264-
265282 </ div >
266283 < script src ="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js "> </ script >
267284 < script src ="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js "> </ script >
0 commit comments