|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="UTF-8"> |
| 5 | + <title>Data Sample | Quickblox JS SDK</title> |
| 6 | + <meta name="viewport" content="initial-scale=1.0, user-scalable=no"/> |
| 7 | + |
| 8 | + <link rel="shortcut icon" href="https://quickblox.com/favicon.ico"> |
| 9 | + |
| 10 | + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css"> |
| 11 | + <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" > |
| 12 | + |
| 13 | + <link rel="stylesheet" href="styles.css"> |
| 14 | +</head> |
| 15 | +<body> |
| 16 | + <main class="app" id="j-app"> |
| 17 | + <p class="auth">Initialize the application...</p> |
| 18 | + </main> |
| 19 | + |
| 20 | + <div class="overlay" id="j-overlay"></div> |
| 21 | + |
| 22 | + <!-- TEMPLATES --> |
| 23 | + <script id="app-tpl" type="text/x-handlebars-template"> |
| 24 | + <section id="j-header"></section> |
| 25 | + |
| 26 | + <section class="map"> |
| 27 | + <div id="j-map" class="map_gmap"></div> |
| 28 | + </section> |
| 29 | + |
| 30 | + <section id="j-panel"></section> |
| 31 | + </script> |
| 32 | + |
| 33 | + <script id="header-tpl" type="text/x-handlebars-template"> |
| 34 | + <header class="header"> |
| 35 | + <div class="header__inner"> |
| 36 | + <div class="header__body"> |
| 37 | + <div class="logo"> |
| 38 | + <svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40"> |
| 39 | + <g fill="none" fill-rule="evenodd"> |
| 40 | + <path fill="#046AD0" d="M8.4765 6.728c0 .9158-.75 1.665-1.667 1.665H1.8094c-.9167 0-1.6667-.7492-1.6667-1.665V1.7336C.1426.818.8926.069 1.8093.069h5.0003c.917 0 1.667.749 1.667 1.6646V6.728M8.4765 18.3816c0 .9155-.75 1.6646-1.667 1.6646H1.8094c-.9167 0-1.6667-.749-1.6667-1.6646V13.387c0-.9154.75-1.6646 1.6667-1.6646h5.0003c.917 0 1.667.7492 1.667 1.6647v4.9946M8.4765 30.035c0 .9154-.75 1.6646-1.667 1.6646H1.8094c-.9167 0-1.6667-.7492-1.6667-1.6647v-4.9943c0-.9158.75-1.665 1.6667-1.665h5.0003c.917 0 1.667.7492 1.667 1.665v4.9942M20.1437 6.728c0 .9158-.75 1.665-1.667 1.665h-5c-.9167 0-1.6667-.7492-1.6667-1.665V1.7336c0-.9156.75-1.6647 1.6667-1.6647h5c.917 0 1.667.749 1.667 1.6646V6.728M20.1437 30.035c0 .9154-.75 1.6646-1.667 1.6646h-5c-.9167 0-1.6667-.7492-1.6667-1.6647v-4.9943c0-.9158.75-1.665 1.6667-1.665h5c.917 0 1.667.7492 1.667 1.665v4.9942M31.811 6.728c0 .9158-.75 1.665-1.6668 1.665h-5c-.9168 0-1.667-.7492-1.667-1.665V1.7336c0-.9156.7502-1.6647 1.667-1.6647h5c.9167 0 1.667.749 1.667 1.6646V6.728M31.811 18.3816c0 .9155-.75 1.6646-1.6668 1.6646h-5c-.9168 0-1.667-.749-1.667-1.6646V13.387c0-.9154.7502-1.6646 1.667-1.6646h5c.9167 0 1.667.7492 1.667 1.6647v4.9946"/> |
| 41 | + <path fill="#4AD24D" d="M35.9778 34.197c0 .9157-.75 1.6648-1.6666 1.6648h-9.167c-.9168 0-1.667-.749-1.667-1.665v-9.156c0-.916.7502-1.665 1.667-1.665h9.167c.9166 0 1.6666.749 1.6666 1.665v9.156"/> |
| 42 | + </g> |
| 43 | + </svg> |
| 44 | + </div> |
| 45 | + |
| 46 | + <h2 class="header_title">Data Sample</h2> |
| 47 | + <p class="header_user">Logged in as {{full_name}}</p> |
| 48 | + </div> |
| 49 | + |
| 50 | + <button class="logout" id="j-logout"> |
| 51 | + <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"> |
| 52 | + <g fill="none" fill-rule="evenodd"> |
| 53 | + <path d="M-3-3h24v24H-3"/> |
| 54 | + <path fill="#778594" d="M7.09 12.59L8.5 14l5-5-5-5-1.41 1.41L9.67 8H0v2h9.67l-2.58 2.59zM16 0H2C.89 0 0 .9 0 2v4h2V2h14v14H2v-4H0v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2z" class="icon" opacity=".8"/> |
| 55 | + </g> |
| 56 | + </svg> |
| 57 | + </button> |
| 58 | + </div> |
| 59 | + </header> |
| 60 | + </script> |
| 61 | + |
| 62 | + <script id="places_preview-tpl" type="text/x-handlebars-template"> |
| 63 | + <div class="panel places"> |
| 64 | + {{#each items}} |
| 65 | + <section class="place_preview j-place" data-id="{{_id}}"> |
| 66 | + <h5 class="place_preview__title">{{title}}</h5> |
| 67 | + <p class="rate">{{rate}}</p> |
| 68 | + <p class="place_preview__description">{{description}}</p> |
| 69 | + </section> |
| 70 | + {{else}} |
| 71 | + <p class="place_preview place_preview-inactive txt-warn">No places saved, tap somewhere on the map for creating a new place.</p> |
| 72 | + {{/each}} |
| 73 | + </div> |
| 74 | + </script> |
| 75 | + |
| 76 | + <script id="new_place-tpl" type="text/x-handlebars-template"> |
| 77 | + <div class="panel place_create"> |
| 78 | + <div class="panel__top"> |
| 79 | + <button class="back" id="j-to_dashboard"></button> |
| 80 | + |
| 81 | + <h2 class="panel__title">Create a new place</h2> |
| 82 | + </div> |
| 83 | + |
| 84 | + <div class="form panel__body"> |
| 85 | + <form id="j-create" autocomplete="off"> |
| 86 | + <input id="latlng" type="hidden" value={{latLng}}> |
| 87 | + |
| 88 | + <div class="form_item"> |
| 89 | + <input id="title" class="inp" type="text" required placeholder="Place name" maxlength="40"> |
| 90 | + </div> |
| 91 | + |
| 92 | + <div class="form_item"> |
| 93 | + <input id="description" class="inp" type="text" required placeholder="Description" maxlength="150"> |
| 94 | + </div> |
| 95 | + |
| 96 | + <div class="form_item"> |
| 97 | + <label for="rate">Rate</label> |
| 98 | + <input id="rate" class="inp" type="number" min="0" max="5" step="0.1" value="0" required> |
| 99 | + </div> |
| 100 | + |
| 101 | + <div class="form_item"> |
| 102 | + <button class="btn btn-action">Create Place</button> |
| 103 | + </div> |
| 104 | + </form> |
| 105 | + </div> |
| 106 | + </div> |
| 107 | + </script> |
| 108 | + |
| 109 | + <script id="place_detailed-tpl" type="text/x-handlebars-template"> |
| 110 | + <div class="panel place"> |
| 111 | + <div class="panel__top"> |
| 112 | + <button class="back" id="j-to_dashboard"></button> |
| 113 | + <h2 class="panel__title">{{title}}</h2> |
| 114 | + </div> |
| 115 | + |
| 116 | + <div class="panel__body"> |
| 117 | + <div class="place__action"> |
| 118 | + <button class="btn btn-action" id="j-checkin">Check in</button> |
| 119 | + </div> |
| 120 | + <div class="place__section"> |
| 121 | + <h4 class="h4">Description</h4> |
| 122 | + <p>{{description}}</p> |
| 123 | + </div> |
| 124 | + |
| 125 | + <div class="place__section"> |
| 126 | + <h4 class="h4">Rate Place</h4> |
| 127 | + <p>{{rate}}</p> |
| 128 | + </div> |
| 129 | + |
| 130 | + <div class="place__section"> |
| 131 | + <h4 class="h4">Check-ins</h4> |
| 132 | + <div id="j-checkins"></div> |
| 133 | + </div> |
| 134 | + </div> |
| 135 | + </div> |
| 136 | + </script> |
| 137 | + |
| 138 | + <script id="checkins-tpl" type="text/x-handlebars-template"> |
| 139 | + {{#each items}} |
| 140 | + <div class="checkin"> |
| 141 | + <p>{{author_fullname}}</p> |
| 142 | + <p>{{comment}}</p> |
| 143 | + </div> |
| 144 | + {{else}} |
| 145 | + <p class="txt-warn">No checkins, click on button th 'CHECK IN' and leave your feedback.</p> |
| 146 | + {{/each}} |
| 147 | + </script> |
| 148 | + |
| 149 | + <script id="checkin-tpl" type="text/x-handlebars-template"> |
| 150 | + <div class="popup"> |
| 151 | + <div class="form"> |
| 152 | + <form id="checkin-submit"> |
| 153 | + <div class="form_item"> |
| 154 | + <h4 class="form__title">Check in</h4> |
| 155 | + </div> |
| 156 | + <input id="checkin_id" type="hidden" value={{id}}> |
| 157 | + |
| 158 | + <div class="form_item"> |
| 159 | + <input id="checkin_comment" class="inp" type="text" required placeholder="Enter your comment" maxlength="40" required> |
| 160 | + </div> |
| 161 | + |
| 162 | + <div class="form_item"> |
| 163 | + <label for="rate">Rate the place</label> |
| 164 | + <input id="checkin_rate" class="inp" type="number" min="0" max="5" step="0.1" value="0" required> |
| 165 | + </div> |
| 166 | + |
| 167 | + <div class="form_item"> |
| 168 | + <button type="submit" id="checkin-submit" class="btn btn-action">Check in</button> |
| 169 | + <button id="checkin-cancel" class="btn">Cancel</button> |
| 170 | + </div> |
| 171 | + </form> |
| 172 | + </div> |
| 173 | + </div> |
| 174 | + </script> |
| 175 | + |
| 176 | + <!-- Images for preload --> |
| 177 | + <div id="preload"> |
| 178 | + <img src="https://samples.quickblox.com/web/resources/marker.png" width="1" height="1" alt="Preload image" /> |
| 179 | + <img src="https://samples.quickblox.com/web/resources/marker_create.png" width="1" height="1" alt="Preload image" /> |
| 180 | + </div> |
| 181 | + |
| 182 | + <!-- Helper libraries --> |
| 183 | + <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAOlglXqBHw1T0G5x1UoVD3sP7FB3wWc6I"></script> |
| 184 | + <script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.5/handlebars.js"></script> |
| 185 | + <!-- Quickblox SDK --> |
| 186 | + <script src="../../quickblox.min.js"></script> |
| 187 | + <!-- APP --> |
| 188 | + <script src="config.js"></script> |
| 189 | + <script src="./js/user.js"></script> |
| 190 | + <script src="./js/map.js"></script> |
| 191 | + <script src="./js/places.js"></script> |
| 192 | + <script src="./js/checkin.js"></script> |
| 193 | + <script src="./js/app.js"></script> |
| 194 | +</body> |
| 195 | +</html> |
0 commit comments