index.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>ArozOS Office</title>
  7. <link rel="icon" type="image/svg+xml" href="../img/docs.svg">
  8. <link rel="stylesheet" href="../home/home.css">
  9. </head>
  10. <!--
  11. The home page of the ArozOS Office suite.
  12. data-office-base is how every path in home.js is built. This page is
  13. served from two places with different depths - Office/home/index.html in
  14. the ArozOS tree, and the site root in the generated web edition - and the
  15. generator rewrites the attribute (and the literal ../ links below) when
  16. it copies this file out. Relative fetch()es resolve against the document,
  17. not the script, so home.js must not hardcode either depth.
  18. No framework and no icon font: everything below is vanilla JS over the
  19. sprite in this file, which keeps the first page a visitor sees down to a
  20. few tens of KB.
  21. -->
  22. <body data-office-base="../">
  23. <!-- Icon sprite. Drawn here rather than pulled from an icon font: the rest
  24. of the suite loads Semantic UI, but the home page needs ~16 glyphs and
  25. not 600 KB of CSS to get them. -->
  26. <svg class="hm-sprite" aria-hidden="true" focusable="false">
  27. <symbol id="i-home" viewBox="0 0 24 24"><path d="M3 10.5 12 3l9 7.5"/><path d="M5.5 9.5V20h13V9.5"/><path d="M9.5 20v-6h5v6"/></symbol>
  28. <symbol id="i-doc" viewBox="0 0 24 24"><path d="M14 3H7a1.5 1.5 0 0 0-1.5 1.5v15A1.5 1.5 0 0 0 7 21h10a1.5 1.5 0 0 0 1.5-1.5V7.5z"/><path d="M14 3v4.5h4.5"/><path d="M8.5 12.5h7M8.5 16h7"/></symbol>
  29. <symbol id="i-sheet" viewBox="0 0 24 24"><rect x="3.5" y="4" width="17" height="16" rx="1.5"/><path d="M3.5 9h17M3.5 14.5h17M9.5 4v16M15 4v16"/></symbol>
  30. <symbol id="i-slides" viewBox="0 0 24 24"><rect x="3.5" y="4.5" width="17" height="13" rx="1.5"/><path d="M9 21h6"/><path d="M12 17.5V21"/></symbol>
  31. <symbol id="i-grid" viewBox="0 0 24 24"><rect x="3.5" y="3.5" width="7" height="7" rx="1.5"/><rect x="13.5" y="3.5" width="7" height="7" rx="1.5"/><rect x="3.5" y="13.5" width="7" height="7" rx="1.5"/><rect x="13.5" y="13.5" width="7" height="7" rx="1.5"/></symbol>
  32. <symbol id="i-folder" viewBox="0 0 24 24"><path d="M3.5 6.5A1.5 1.5 0 0 1 5 5h4l2 2.5h8a1.5 1.5 0 0 1 1.5 1.5v8.5A1.5 1.5 0 0 1 19 19H5a1.5 1.5 0 0 1-1.5-1.5z"/></symbol>
  33. <symbol id="i-search" viewBox="0 0 24 24"><circle cx="11" cy="11" r="6.5"/><path d="M16 16l4.5 4.5"/></symbol>
  34. <symbol id="i-upload" viewBox="0 0 24 24"><path d="M12 15.5V4"/><path d="M8 8l4-4 4 4"/><path d="M4.5 15v3.5A1.5 1.5 0 0 0 6 20h12a1.5 1.5 0 0 0 1.5-1.5V15"/></symbol>
  35. <symbol id="i-download" viewBox="0 0 24 24"><path d="M12 4v11.5"/><path d="M8 11.5l4 4 4-4"/><path d="M4.5 15v3.5A1.5 1.5 0 0 0 6 20h12a1.5 1.5 0 0 0 1.5-1.5V15"/></symbol>
  36. <symbol id="i-chev-down" viewBox="0 0 24 24"><path d="M6.5 9.5l5.5 5.5 5.5-5.5"/></symbol>
  37. <symbol id="i-chev-left" viewBox="0 0 24 24"><path d="M14.5 6.5L9 12l5.5 5.5"/></symbol>
  38. <symbol id="i-chev-right" viewBox="0 0 24 24"><path d="M9.5 6.5L15 12l-5.5 5.5"/></symbol>
  39. <symbol id="i-arrow-right" viewBox="0 0 24 24"><path d="M4.5 12h14"/><path d="M13 6.5l5.5 5.5-5.5 5.5"/></symbol>
  40. <symbol id="i-more" viewBox="0 0 24 24"><circle cx="12" cy="5.5" r="1.4" fill="currentColor" stroke="none"/><circle cx="12" cy="12" r="1.4" fill="currentColor" stroke="none"/><circle cx="12" cy="18.5" r="1.4" fill="currentColor" stroke="none"/></symbol>
  41. <symbol id="i-trash" viewBox="0 0 24 24"><path d="M4.5 6.5h15"/><path d="M9.5 6.5V4.5h5v2"/><path d="M6.5 6.5l1 13h9l1-13"/></symbol>
  42. <symbol id="i-bulb" viewBox="0 0 24 24"><path d="M9.5 17.5h5"/><path d="M10 20.5h4"/><path d="M12 3.5a5.5 5.5 0 0 0-3.2 10c.5.4.7.9.7 1.4v.6h5v-.6c0-.5.2-1 .7-1.4A5.5 5.5 0 0 0 12 3.5z"/></symbol>
  43. <symbol id="i-spark" viewBox="0 0 24 24"><path d="M12 3.5l1.8 4.7 4.7 1.8-4.7 1.8L12 16.5l-1.8-4.7L5.5 10l4.7-1.8z"/><path d="M18.5 15.5l.8 2 2 .8-2 .8-.8 2-.8-2-2-.8 2-.8z"/></symbol>
  44. <symbol id="i-open" viewBox="0 0 24 24"><path d="M3.5 6.5A1.5 1.5 0 0 1 5 5h4l2 2.5h8A1.5 1.5 0 0 1 20.5 9v1.5"/><path d="M3.5 9.5h17l-2 8.5a1.5 1.5 0 0 1-1.5 1.2H5.5A1.5 1.5 0 0 1 4 17.9z"/></symbol>
  45. </svg>
  46. <div class="hm">
  47. <!-- ============ sidebar ============ -->
  48. <aside class="hm-side">
  49. <a class="hm-brand" href="../home/index.html">
  50. <span class="hm-brand-text">
  51. <b>ArozOS Office</b>
  52. <span>Web Edition</span>
  53. </span>
  54. </a>
  55. <nav class="hm-nav" id="hmNav">
  56. <button type="button" class="hm-navitem is-active" data-filter="">
  57. <svg class="ic"><use href="#i-home"></use></svg><span>Home</span>
  58. </button>
  59. <button type="button" class="hm-navitem" data-filter="document">
  60. <svg class="ic"><use href="#i-doc"></use></svg><span>Documents</span>
  61. </button>
  62. <button type="button" class="hm-navitem" data-filter="spreadsheet">
  63. <svg class="ic"><use href="#i-sheet"></use></svg><span>Spreadsheets</span>
  64. </button>
  65. <button type="button" class="hm-navitem" data-filter="presentation">
  66. <svg class="ic"><use href="#i-slides"></use></svg><span>Presentations</span>
  67. </button>
  68. <div class="hm-navsep"></div>
  69. <button type="button" class="hm-navitem" data-goto="templates">
  70. <svg class="ic"><use href="#i-grid"></use></svg><span>Templates</span>
  71. </button>
  72. <button type="button" class="hm-navitem" data-action="open-device">
  73. <svg class="ic"><use href="#i-folder"></use></svg><span>Open from device</span>
  74. </button>
  75. </nav>
  76. <div class="hm-side-foot">
  77. <div class="hm-privacy">
  78. <div class="hm-privacy-head">
  79. <svg class="ic"><use href="#i-spark"></use></svg>
  80. <b>All in your browser</b>
  81. </div>
  82. <p>Your files never leave this device. No account required.</p>
  83. </div>
  84. <div class="hm-version">
  85. <div>ArozOS Office Web Edition</div>
  86. <div><span id="hmVersion">v1.0.0</span> &nbsp;&middot;&nbsp; GPLv3</div>
  87. </div>
  88. </div>
  89. </aside>
  90. <!-- ============ main ============ -->
  91. <main class="hm-main">
  92. <div class="hm-top">
  93. <div class="hm-searchwrap">
  94. <svg class="ic hm-searchic"><use href="#i-search"></use></svg>
  95. <input type="search" id="hmSearch" class="hm-search" placeholder="Search documents..."
  96. autocomplete="off" spellcheck="false">
  97. </div>
  98. <button type="button" class="hm-btn" data-action="open-device">
  99. <svg class="ic"><use href="#i-upload"></use></svg> Import file
  100. </button>
  101. <div class="hm-createwrap">
  102. <button type="button" class="hm-btn hm-btn-primary" id="hmCreate">
  103. Create new <svg class="ic"><use href="#i-chev-down"></use></svg>
  104. </button>
  105. <div class="hm-menu" id="hmCreateMenu" hidden></div>
  106. </div>
  107. </div>
  108. <section class="hm-hero">
  109. <div class="hm-hero-text">
  110. <h1>Welcome to ArozOS Office</h1>
  111. <p>Create, edit and collaborate on documents, spreadsheets and
  112. presentations &mdash; right in your browser.</p>
  113. </div>
  114. <!-- Decorative: a document window with the three app icons
  115. drifting out of it. Inline so it themes with the page and
  116. costs no extra request. -->
  117. <svg class="hm-hero-art" viewBox="0 0 520 260" aria-hidden="true" focusable="false">
  118. <circle cx="60" cy="180" r="5" fill="#c7dbfb"/>
  119. <circle cx="497" cy="150" r="6" fill="#c7dbfb"/>
  120. <circle cx="196" cy="24" r="4" fill="#c7dbfb"/>
  121. <circle cx="176" cy="34" r="6" fill="#a9c9f7"/>
  122. <path d="M96 168C120 196 168 196 196 168" stroke="#c7dbfb" stroke-width="2"
  123. stroke-dasharray="4 6" fill="none"/>
  124. <path d="M104 108C132 74 168 66 196 74" stroke="#c7dbfb" stroke-width="2"
  125. stroke-dasharray="4 6" fill="none"/>
  126. <!-- back card -->
  127. <rect x="238" y="30" width="252" height="176" rx="12" fill="#eef4fe"/>
  128. <!-- main window -->
  129. <rect x="212" y="46" width="266" height="182" rx="12" fill="#ffffff"
  130. stroke="#dbe6f8" stroke-width="1.5"/>
  131. <path d="M212 58a12 12 0 0 1 12-12h242a12 12 0 0 1 12 12v12H212z" fill="#3b82f6"/>
  132. <circle cx="228" cy="58" r="3.2" fill="#ffffff" opacity=".85"/>
  133. <circle cx="240" cy="58" r="3.2" fill="#ffffff" opacity=".6"/>
  134. <circle cx="252" cy="58" r="3.2" fill="#ffffff" opacity=".4"/>
  135. <rect x="228" y="86" width="118" height="8" rx="4" fill="#dce7f8"/>
  136. <rect x="228" y="104" width="86" height="8" rx="4" fill="#eaf0fa"/>
  137. <rect x="228" y="126" width="234" height="76" rx="8" fill="#eaf2fe"/>
  138. <circle cx="262" cy="152" r="11" fill="#bcd6fa"/>
  139. <path d="M240 190l30-28 22 20 26-30 32 38z" fill="#9dc4f7"/>
  140. <rect x="360" y="86" width="102" height="8" rx="4" fill="#eaf0fa"/>
  141. <rect x="360" y="104" width="72" height="8" rx="4" fill="#eaf0fa"/>
  142. <!-- floating app tiles -->
  143. <g>
  144. <rect x="96" y="72" width="62" height="62" rx="14" fill="#ffffff"
  145. stroke="#e3ecfa" stroke-width="1.5"/>
  146. <rect x="112" y="86" width="30" height="34" rx="4" fill="#3b82f6"/>
  147. <path d="M119 96h16M119 103h16M119 110h10" stroke="#ffffff" stroke-width="2.4"
  148. stroke-linecap="round"/>
  149. </g>
  150. <g>
  151. <rect x="118" y="150" width="62" height="62" rx="14" fill="#ffffff"
  152. stroke="#e3ecfa" stroke-width="1.5"/>
  153. <rect x="134" y="164" width="30" height="34" rx="4" fill="#16a34a"/>
  154. <path d="M134 175h30M134 186h30M144 164v34M154 164v34" stroke="#ffffff"
  155. stroke-width="2"/>
  156. </g>
  157. <g>
  158. <rect x="392" y="52" width="58" height="58" rx="14" fill="#ffffff"
  159. stroke="#f6e3d2" stroke-width="1.5"/>
  160. <rect x="406" y="66" width="30" height="30" rx="4" fill="#f97316"/>
  161. <path d="M412 75h18M412 82h18M412 89h11" stroke="#ffffff" stroke-width="2.4"
  162. stroke-linecap="round"/>
  163. </g>
  164. </svg>
  165. </section>
  166. <section class="hm-sec">
  167. <h2 class="hm-h2">Create new</h2>
  168. <div class="hm-newgrid" id="hmNewGrid"></div>
  169. </section>
  170. <div class="hm-cols">
  171. <section class="hm-sec hm-col-recent">
  172. <div class="hm-sechead">
  173. <h2 class="hm-h2">Recently opened</h2>
  174. <button type="button" class="hm-link" id="hmRecentAll">View all</button>
  175. </div>
  176. <div class="hm-card" id="hmRecentCard">
  177. <div id="hmRecentList"></div>
  178. <div class="hm-card-foot">
  179. <button type="button" class="hm-btn" data-action="open-device">
  180. <svg class="ic"><use href="#i-open"></use></svg> Open from device
  181. </button>
  182. </div>
  183. </div>
  184. </section>
  185. <section class="hm-sec hm-col-tpl" id="templates">
  186. <div class="hm-sechead">
  187. <h2 class="hm-h2">Templates</h2>
  188. <button type="button" class="hm-link" id="hmTplAll">View all</button>
  189. </div>
  190. <div class="hm-tplgrid" id="hmTplGrid"></div>
  191. <div class="hm-pager" id="hmTplPager"></div>
  192. </section>
  193. </div>
  194. <div class="hm-tip">
  195. <svg class="ic hm-tip-ic"><use href="#i-bulb"></use></svg>
  196. <span class="hm-tip-label">Tip</span>
  197. <span class="hm-tip-text">
  198. Use <kbd>Ctrl</kbd> + <kbd>O</kbd> to quickly open a file, or drag
  199. and drop any supported file onto the page.
  200. </span>
  201. <span class="hm-tip-formats">Supported formats: .doca, .xlsa, .ppta</span>
  202. </div>
  203. </main>
  204. </div>
  205. <div class="hm-drop" id="hmDrop" hidden><div>Drop the file to open it</div></div>
  206. <!-- ?request=<share link>: fetching a document from an ArozOS share -->
  207. <div class="hm-fetch" id="hmFetch" hidden role="dialog" aria-modal="true" aria-labelledby="hmFetchTitle">
  208. <div class="hm-fetch-card">
  209. <div class="hm-fetch-spin" id="hmFetchSpin" aria-hidden="true"></div>
  210. <h2 class="hm-fetch-title" id="hmFetchTitle">Opening shared document</h2>
  211. <p class="hm-fetch-msg" id="hmFetchMsg"></p>
  212. <p class="hm-fetch-src" id="hmFetchSrc"></p>
  213. <div class="hm-fetch-actions" id="hmFetchActions" hidden>
  214. <button type="button" class="hm-btn" id="hmFetchRetry">Try again</button>
  215. <button type="button" class="hm-btn hm-btn-primary" id="hmFetchClose">Go to home</button>
  216. </div>
  217. </div>
  218. </div>
  219. <input type="file" id="hmFile" hidden>
  220. <script src="../common/mode.js"></script>
  221. <script src="../common/container.js"></script>
  222. <script src="../common/share.js"></script>
  223. <script src="../common/recents.js"></script>
  224. <script src="../home/home.js"></script>
  225. </body>
  226. </html>