Desktop markdown wiki app. Built with node, Electron Framework and AngularJS.

index.html 8.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. <!DOCTYPE html>
  2. <html class="no-js">
  3. <head>
  4. <title>Codex</title>
  5. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  6. <!-- Stylesheets -->
  7. <link rel="stylesheet" href="../css/tomorrow-night-eighties.css">
  8. <link rel="stylesheet" href="../css/photon.min.css">
  9. <link rel="stylesheet" href="../css/codex.css">
  10. <!-- Javascript -->
  11. <script src="../bower_components/jquery/dist/jquery.js"></script>
  12. <script src="../bower_components/ace-builds/src-min-noconflict/ace.js"></script>
  13. <script src="../bower_components/angular/angular.js"></script>
  14. <script src="../bower_components/angular-ui-router/release/angular-ui-router.js"></script>
  15. <script src="../bower_components/angular-sanitize/angular-sanitize.js"></script>
  16. <script src="../bower_components/angular-ui-ace/ui-ace.js"></script>
  17. <script src="../bower_components/angular-highlightjs/src/angular-highlightjs.js"></script>
  18. <script src="scripts/highlight.pack.js"></script>
  19. <script src="scripts/codex-app.js"></script>
  20. <script src="scripts/controllers/app-ctrl.js"></script>
  21. <script src="scripts/controllers/header-ctrl.js"></script>
  22. <script src="scripts/controllers/footer-ctrl.js"></script>
  23. <script src="scripts/controllers/sidebar-ctrl.js"></script>
  24. <script src="scripts/controllers/note-view-ctrl.js"></script>
  25. <script src="scripts/controllers/note-edit-ctrl.js"></script>
  26. <script src="scripts/services/file-service.js"></script>
  27. <script src="scripts/services/search-service.js"></script>
  28. <script src="scripts/services/thumbnail-service.js"></script>
  29. <script src="scripts/services/prefs-service.js"></script>
  30. <script src="scripts/services/date-formatter.js" charset="utf-8"></script>
  31. <script src="scripts/directives/right-click-directive.js"></script>
  32. <script src="scripts/directives/ng-enter.js"></script>
  33. <script>
  34. var remote = require('remote');
  35. var ipc = require('ipc');
  36. var dialog = remote.require('dialog');
  37. var Menu = remote.require('menu');
  38. var template = [
  39. {
  40. label: 'Codex',
  41. submenu: [
  42. {
  43. label: 'About Codex',
  44. selector: 'orderFrontStandardAboutPanel:'
  45. },
  46. {
  47. type: 'separator'
  48. },
  49. {
  50. label: 'Preferences',
  51. accelerator: 'CommandOrControl+,',
  52. click: function () {
  53. ipc.send('show-preferences-window')
  54. }
  55. },
  56. {
  57. type: 'separator'
  58. },
  59. {
  60. label: 'Services',
  61. submenu: []
  62. },
  63. {
  64. type: 'separator'
  65. },
  66. {
  67. label: 'Hide Codex',
  68. accelerator: 'Command+H',
  69. selector: 'hide:'
  70. },
  71. {
  72. label: 'Hide Others',
  73. accelerator: 'Command+Shift+H',
  74. selector: 'hideOtherApplications:'
  75. },
  76. {
  77. label: 'Show All',
  78. selector: 'unhideAllApplications:'
  79. },
  80. {
  81. type: 'separator'
  82. },
  83. {
  84. label: 'Quit',
  85. accelerator: 'Command+Q',
  86. selector: 'terminate:'
  87. },
  88. ]
  89. },
  90. {
  91. label: 'Edit',
  92. submenu: [
  93. {
  94. label: 'Undo',
  95. accelerator: 'Command+Z',
  96. selector: 'undo:'
  97. },
  98. {
  99. label: 'Redo',
  100. accelerator: 'Shift+Command+Z',
  101. selector: 'redo:'
  102. },
  103. {
  104. type: 'separator'
  105. },
  106. {
  107. label: 'Cut',
  108. accelerator: 'Command+X',
  109. selector: 'cut:'
  110. },
  111. {
  112. label: 'Copy',
  113. accelerator: 'Command+C',
  114. selector: 'copy:'
  115. },
  116. {
  117. label: 'Paste',
  118. accelerator: 'Command+V',
  119. selector: 'paste:'
  120. },
  121. {
  122. label: 'Select All',
  123. accelerator: 'Command+A',
  124. selector: 'selectAll:'
  125. }
  126. ]
  127. },
  128. {
  129. label: 'View',
  130. submenu: [
  131. {
  132. label: 'Reload',
  133. accelerator: 'Command+R',
  134. click: function() { remote.getCurrentWindow().reload(); }
  135. },
  136. {
  137. label: 'Toggle DevTools',
  138. accelerator: 'Alt+Command+I',
  139. click: function() { remote.getCurrentWindow().toggleDevTools(); }
  140. },
  141. ]
  142. },
  143. {
  144. label: 'Window',
  145. submenu: [
  146. {
  147. label: 'Minimize',
  148. accelerator: 'Command+M',
  149. selector: 'performMiniaturize:'
  150. },
  151. {
  152. label: 'Close',
  153. accelerator: 'Command+W',
  154. selector: 'performClose:'
  155. },
  156. {
  157. type: 'separator'
  158. },
  159. {
  160. label: 'Bring All to Front',
  161. selector: 'arrangeInFront:'
  162. }
  163. ]
  164. },
  165. {
  166. label: 'Help',
  167. submenu: []
  168. }
  169. ];
  170. menu = Menu.buildFromTemplate(template);
  171. Menu.setApplicationMenu(menu);
  172. </script>
  173. </head>
  174. <body ng-app="codexApp">
  175. <div class="window">
  176. <header class="toolbar toolbar-header" ng-controller="HeaderCtrl">
  177. <h1 class="title">Codex</h1>
  178. <div class="toolbar-actions">
  179. <button class="btn btn-default" ng-click="goToHome()">
  180. <span class="icon icon-home"></span>
  181. </button>
  182. <div class="btn-group">
  183. <button class="btn btn-default" ng-click="goBack()">
  184. <span class="icon icon-left"></span>
  185. </button>
  186. <button class="btn btn-default" ng-click="goForward()">
  187. <span class="icon icon-right"></span>
  188. </button>
  189. </div>
  190. <button class="btn btn-default" ng-click="createNewNote()">
  191. <span class="icon icon-plus"></span>
  192. </button>
  193. <button class="btn btn-default" ng-click="toogleSidebar()">
  194. <span class="icon icon-list"></span>
  195. </button>
  196. <div class="btn-group pull-right">
  197. <button class="btn btn-default" ng-class="noteEditBtnClass" ng-click="activateNoteEdit()">
  198. <span class="icon icon-pencil"></span>
  199. </button>
  200. <button class="btn btn-default" ng-class="noteViewBtnClass" ng-click="activateNoteView()">
  201. <span class="icon icon-eye"></span>
  202. </button>
  203. </div>
  204. <div class="btn-group pull-right">
  205. <form>
  206. <div class="form-group">
  207. <input type="text" ng-model="search_text" ng-enter="fileSearch()" class="form-control" placeholder="Search" style="height: 24px;">
  208. </div>
  209. </form>
  210. </div>
  211. </div>
  212. </header>
  213. <!-- Your app's content goes inside .window-content -->
  214. <div class="window-content" id="holder">
  215. <div class="pane-group">
  216. <div class="pane pane-sm sidebar" ng-controller="SidebarCtrl" ng-show="showSidebar">
  217. <nav class="nav-group">
  218. <h5 class="nav-group-title">My Notes</h5>
  219. <span class="nav-group-item" ng-class="sidebar[0].active" ng-click="goToAllNotes()">
  220. <span class="icon icon-folder"></span>
  221. All Notes
  222. </span>
  223. <span class="nav-group-item" ng-class="sidebar[1].active" ng-click="goToAllFiles()">
  224. <span class="icon icon-archive"></span>
  225. All Files
  226. </span>
  227. <span class="nav-group-item" ng-class="sidebar[2].active" ng-click="goToNotebooks()">
  228. <span class="icon icon-book"></span>
  229. Notebooks
  230. </span>
  231. <h5 class="nav-group-title">Favorites</h5>
  232. <span class="nav-group-item">
  233. <span class="icon icon-star"></span>
  234. Starred
  235. </span>
  236. </nav>
  237. </div>
  238. <div class="pane" ui-view ></div>
  239. </div>
  240. </div>
  241. <footer class="toolbar toolbar-footer" ng-controller="FooterCtrl">
  242. <h1 class="title">{{footer_info}}</h1>
  243. </footer>
  244. </div>
  245. </body>
  246. </html>