index.html 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8" />
  5. <title></title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  7. <link href="favicon.png" rel="shortcut icon" type="image/png">
  8. <!--Import Google Icon Font-->
  9. <link href="//fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  10. <!--Import materialize.css-->
  11. <link type="text/css" rel="stylesheet" href="3rdparty/css/materialize.min.css" media="screen,projection"/>
  12. <link rel="stylesheet" href="index.min.css"/>
  13. </head>
  14. <body id="application">
  15. <div v-show="mainView === 'login'" v-cloak>
  16. <div class="container" id="loginView">
  17. <div class="row">
  18. <div class="col-md-4 col-md-offset-4">
  19. <h4 class="modal-title">Login</h4>
  20. </div>
  21. </div>
  22. <form v-on:submit.prevent="doLogin">
  23. <div class="row">
  24. <div class="col-md-4 col-md-offset-4">
  25. <div class="form-group label-floating">
  26. <label class="control-label" for="inputUsername">Username</label>
  27. <input type="text" class="form-control" id="inputUsername" v-model="username" autofocus />
  28. </div>
  29. </div>
  30. <div class="col-md-4 col-md-offset-4">
  31. <div class="form-group label-floating">
  32. <label class="control-label" for="inputPassword">Password</label>
  33. <input type="password" class="form-control" id="inputPassword" v-model="password" autofocus />
  34. </div>
  35. </div>
  36. </div>
  37. <div class="row">
  38. <div class="col-md-4 col-md-offset-4">
  39. <button type="submit" class="btn btn-success pull-right">Login</button>
  40. </div>
  41. </div>
  42. </form>
  43. </div>
  44. </div>
  45. <div v-show="mainView === 'content'" v-cloak>
  46. <div class="navbar-fixed">
  47. <nav>
  48. <div class="nav-wrapper white" style="color: black;">
  49. <div class="input-field">
  50. <input id="search" v-el:searchinput type="search" v-model="search" v-on:keyup.enter="doSearch">
  51. <label for="search"><i class="material-icons" style="color: black;">search</i></label>
  52. <i class="material-icons" v-on:click="clearSearch()" style="color: black;">close</i>
  53. </div>
  54. </div>
  55. </nav>
  56. </div>
  57. <div class="modal" id="modalDel">
  58. <div class="modal-content">
  59. <h4>Really Delete this Thing?</h4>
  60. </div>
  61. <div class="modal-footer">
  62. <button type="button" class="modal-action waves-effect btn-flat" v-on:click="deleteThing()">Delete</button>
  63. <button type="button" class="modal-action modal-close waves-effect btn-flat" data-dismiss="modal">Close</button>
  64. </div>
  65. </div>
  66. <div class="container main">
  67. <div class="row">
  68. <div class="col s2 tags">
  69. <div v-show="!busyTags" class="right-align">
  70. <br/>
  71. <div v-for="tag in tags | orderBy 'usage' -1" style="text-overflow: ellipsis; overflow: hidden;">
  72. <a href="{{'/#search?#' + tag.name}}" v-on:click="tagSearch(tag)" transition="present">#{{ tag.name }}</a>
  73. </div>
  74. <br/>
  75. </div>
  76. <div v-show="busyTags">
  77. <br/>
  78. <br/>
  79. <br/>
  80. <center><i class="spinner"></i></center>
  81. </div>
  82. </div>
  83. <div class="col s8">
  84. <div class="card" v-on:click="giveAddFocus()">
  85. <div class="card-content right-align">
  86. <textarea v-el:addinput placeholder="Add something..." v-model="thingContent" v-bind:class="{ active: !!thingContent }"></textarea>
  87. <button v-el:addbutton class="waves-effect waves-teal btn-flat" v-on:click="addThing()" v-bind:class="{ hide: !thingContent }">add</button>
  88. </div>
  89. </div>
  90. <div v-show="!busyThings">
  91. <div class="card thing" v-for="thing in things">
  92. <div class="col s12 thing-title-date">
  93. {{ thing.createdAt | prettyDateOffset }}
  94. <span v-show="thing.edit">
  95. <button class="waves-effect waves-teal btn-flat" v-on:click="cancelEdit(thing)">cancel</button>
  96. <button class="waves-effect waves-teal btn green" v-on:click="saveEdit(thing)">save</button>
  97. </span>
  98. <span v-show="!thing.edit">
  99. <button class="waves-effect waves-teal btn-flat" v-on:click="showThingDel(thing)">delete</button>
  100. <button class="waves-effect waves-teal btn-flat" v-on:click="showThingEdit(thing)">edit</button>
  101. </span>
  102. </div>
  103. <div class="card-content" v-show="thing.edit"><textarea v-model="thing.content" style="height: 200px"></textarea></div>
  104. <div class="card-content" v-show="!thing.edit">{{{ thing.richContent | markdown }}}</div>
  105. </div>
  106. </div>
  107. <div v-show="busyThings">
  108. <br/>
  109. <br/>
  110. <br/>
  111. <center><i class="spinner"></i></center>
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. <div class="fixed-action-btn" style="bottom: 45px; right: 24px;">
  117. <a class="btn-floating btn-large" v-on:click="showSettings()">
  118. <i class="large material-icons">reorder</i>
  119. </a>
  120. </div>
  121. <div class="settings" id="settings" v-bind:class="{ 'open': open }">
  122. <div class="backdrop" v-bind:class="{ 'open': open }" v-on:click="hide()"></div>
  123. <div class="container" v-bind:class="{ 'open': open }">
  124. <div class="section">
  125. <h5>Interface</h5>
  126. <p>
  127. <form class="form-horizontal">
  128. <div class="form-group">
  129. <label htmlFor="inputTitle" class="col s4 control-label">Title</label>
  130. <div class="col s7">
  131. <input type="text" class="form-control" id="inputTitle" v-model="settings.title" placeholder="Title" />
  132. </div>
  133. </div>
  134. <div class="form-group">
  135. <label htmlFor="inputBackgroundImage" class="col s4 control-label">Background</label>
  136. <div class="col s7">
  137. <input type="text" class="form-control" id="inputBackgroundImage" v-model="settings.backgroundUrl" placeholder="url" />
  138. </div>
  139. </div>
  140. </form>
  141. <div class="col s12">
  142. <button class="waves-effect waves-teal btn-flat" v-on:click="toggleSettings">Cancel</button>
  143. <button class="waves-effect waves-teal btn-flat" v-on:click="saveSettings">Save</button>
  144. </div>
  145. </p>
  146. </div>
  147. <br/>
  148. <div class="section">
  149. <h5>Content</h5>
  150. <p>
  151. <div v-show="!importFile">
  152. <input id="inputImport" v-el:importfile type="file" v-on:change="importFileChanged()" class="hide">
  153. <button class="btn btn-raised" v-on:click="triggerImportInput()">Import</button>
  154. </div>
  155. <div v-show="importFile">
  156. <p>Really Import from {{importFile && importFile.name}}?</p>
  157. <button class="btn btn-flat" v-on:click="importThingsCancel()">No</button>
  158. <button class="btn btn-flat" v-on:click="importThings()">Yes</button>
  159. </div>
  160. <br/>
  161. <button class="btn btn-raised" v-on:click="exportThings">Export</button>
  162. </p>
  163. </div>
  164. <br/>
  165. <div class="section">
  166. <h5>Session</h5>
  167. <p>
  168. <button class="btn btn-raised" v-on:click="logout">Logout</button>
  169. </p>
  170. </div>
  171. </div>
  172. </div>
  173. </div>
  174. <div id="guacamoly-settings-node" class="hide"></div>
  175. <!--Import jQuery before materialize.js-->
  176. <script type="text/javascript" src="3rdparty/jquery.min.js"></script>
  177. <script type="text/javascript" src="3rdparty/js/materialize.min.js"></script>
  178. <script src="bundle.js"></script>
  179. </body>
  180. </html>