index.html 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8" />
  5. <title>Excalidraw | Hand-drawn look & feel • Collaborative • Secure</title>
  6. <meta
  7. name="viewport"
  8. content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, viewport-fit=cover, shrink-to-fit=no"
  9. />
  10. <meta name="referrer" content="origin" />
  11. <meta name="mobile-web-app-capable" content="yes" />
  12. <meta name="theme-color" content="#121212" />
  13. <!-- Primary Meta Tags -->
  14. <meta
  15. name="title"
  16. content="Excalidraw — Collaborative whiteboarding made easy"
  17. />
  18. <meta
  19. name="description"
  20. content="Excalidraw is a virtual collaborative whiteboard tool that lets you easily sketch diagrams that have a hand-drawn feel to them."
  21. />
  22. <meta name="image" content="https://excalidraw.com/og-image-3.png" />
  23. <!-- Open Graph / Facebook -->
  24. <meta property="og:site_name" content="Excalidraw" />
  25. <meta property="og:type" content="website" />
  26. <meta property="og:url" content="https://excalidraw.com" />
  27. <meta
  28. property="og:title"
  29. content="Excalidraw — Collaborative whiteboarding made easy"
  30. />
  31. <meta property="og:image:alt" content="Excalidraw logo" />
  32. <meta
  33. property="og:description"
  34. content="Excalidraw is a virtual collaborative whiteboard tool that lets you easily sketch diagrams that have a hand-drawn feel to them."
  35. />
  36. <meta property="og:image" content="https://excalidraw.com/og-image-3.png" />
  37. <!-- Twitter -->
  38. <meta property="twitter:card" content="summary_large_image" />
  39. <meta property="twitter:site" content="@excalidraw" />
  40. <meta property="twitter:url" content="https://excalidraw.com" />
  41. <meta
  42. property="twitter:title"
  43. content="Excalidraw — Collaborative whiteboarding made easy"
  44. />
  45. <meta
  46. property="twitter:description"
  47. content="Excalidraw is a virtual collaborative whiteboard tool that lets you easily sketch diagrams that have a hand-drawn feel to them."
  48. />
  49. <meta
  50. property="twitter:image"
  51. content="https://excalidraw.com/og-image-3.png"
  52. />
  53. <!------------------------------------------------------------------------->
  54. <!-- to minimize white flash on load when user has dark mode enabled -->
  55. <script>
  56. try {
  57. function setTheme(theme) {
  58. if (theme === "dark") {
  59. document.documentElement.classList.add("dark");
  60. } else {
  61. document.documentElement.classList.remove("dark");
  62. }
  63. }
  64. function getTheme() {
  65. const theme = window.localStorage.getItem("excalidraw-theme");
  66. if (theme && theme === "system") {
  67. return window.matchMedia("(prefers-color-scheme: dark)").matches
  68. ? "dark"
  69. : "light";
  70. } else {
  71. return theme || "light";
  72. }
  73. }
  74. setTheme(getTheme());
  75. } catch (e) {
  76. console.error("Error setting dark mode", e);
  77. }
  78. </script>
  79. <style>
  80. html.dark {
  81. background-color: #121212;
  82. color: #fff;
  83. }
  84. </style>
  85. <!-- Warmup the connection for Google fonts -->
  86. <link rel="preconnect" href="https://fonts.googleapis.com" />
  87. <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
  88. <!------------------------------------------------------------------------->
  89. <% if (typeof PROD != 'undefined' && PROD == true) { %>
  90. <script>
  91. // Redirect Excalidraw+ users which have auto-redirect enabled.
  92. //
  93. // Redirect only the bare root path, so link/room/library urls are not
  94. // redirected.
  95. //
  96. // Putting into index.html for best performance (can't redirect on server
  97. // due to location.hash checks).
  98. if (
  99. window.location.pathname === "/" &&
  100. !window.location.hash &&
  101. !window.location.search &&
  102. // if its present redirect
  103. document.cookie.includes("excplus-autoredirect=true")
  104. ) {
  105. window.location.href = "https://app.excalidraw.com";
  106. }
  107. </script>
  108. <!-- Following placeholder is replaced during the build step -->
  109. <!-- PLACEHOLDER:EXCALIDRAW_APP_FONTS -->
  110. <!-- Register Assistant as the UI font, before the scene inits -->
  111. <link
  112. rel="stylesheet"
  113. href="../packages/excalidraw/fonts/fonts.css"
  114. type="text/css"
  115. />
  116. <% } else { %>
  117. <script>
  118. window.EXCALIDRAW_ASSET_PATH = window.origin;
  119. </script>
  120. <% } %>
  121. <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
  122. <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
  123. <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
  124. <!-- Excalidraw version -->
  125. <meta name="version" content="{version}" />
  126. <% if (typeof VITE_APP_DEV_DISABLE_LIVE_RELOAD != 'undefined' &&
  127. VITE_APP_DEV_DISABLE_LIVE_RELOAD == true) { %>
  128. <script>
  129. {
  130. const _WebSocket = window.WebSocket;
  131. window.WebSocket = function (url) {
  132. if (/ws:\/\/localhost:.+?\/sockjs-node/.test(url)) {
  133. console.info(
  134. "[!!!] Live reload is disabled via VITE_APP_DEV_DISABLE_LIVE_RELOAD [!!!]",
  135. );
  136. } else {
  137. return new _WebSocket(url);
  138. }
  139. };
  140. }
  141. </script>
  142. <% } %>
  143. <script>
  144. // setting this so that libraries installation reuses this window tab.
  145. window.name = "_excalidraw";
  146. </script>
  147. <!-- FIXME: remove this when we update CRA (fix SW caching) -->
  148. <style>
  149. body,
  150. html {
  151. margin: 0;
  152. -webkit-text-size-adjust: 100%;
  153. width: 100%;
  154. height: 100%;
  155. overflow: hidden;
  156. }
  157. .visually-hidden {
  158. position: absolute !important;
  159. height: 1px;
  160. width: 1px;
  161. overflow: hidden;
  162. clip: rect(1px, 1px, 1px, 1px);
  163. white-space: nowrap;
  164. user-select: none;
  165. }
  166. #root {
  167. height: 100%;
  168. -webkit-touch-callout: none;
  169. -webkit-user-select: none;
  170. -khtml-user-select: none;
  171. -moz-user-select: none;
  172. -ms-user-select: none;
  173. user-select: none;
  174. }
  175. @media screen and (min-width: 1200px) {
  176. #root {
  177. -webkit-touch-callout: default;
  178. -webkit-user-select: auto;
  179. -khtml-user-select: auto;
  180. -moz-user-select: auto;
  181. -ms-user-select: auto;
  182. user-select: auto;
  183. }
  184. }
  185. </style>
  186. </head>
  187. <body>
  188. <noscript> You need to enable JavaScript to run this app. </noscript>
  189. <header>
  190. <h1 class="visually-hidden">Excalidraw</h1>
  191. </header>
  192. <div id="root"></div>
  193. <script type="module" src="index.tsx"></script>
  194. <% if (typeof PROD != 'undefined' && PROD == true) { %>
  195. <!-- 100% privacy friendly analytics -->
  196. <script>
  197. // need to load this script dynamically bcs. of iframe embed tracking
  198. var scriptEle = document.createElement("script");
  199. scriptEle.setAttribute(
  200. "src",
  201. "https://scripts.simpleanalyticscdn.com/latest.js",
  202. );
  203. scriptEle.setAttribute("type", "text/javascript");
  204. scriptEle.setAttribute("defer", true);
  205. scriptEle.setAttribute("async", true);
  206. // if iframe
  207. if (window.self !== window.top) {
  208. scriptEle.setAttribute("data-auto-collect", true);
  209. }
  210. document.body.appendChild(scriptEle);
  211. // if iframe
  212. if (window.self !== window.top) {
  213. scriptEle.addEventListener("load", () => {
  214. if (window.sa_pageview) {
  215. window.window.sa_event(action, {
  216. category: "iframe",
  217. label: "embed",
  218. value: window.location.pathname,
  219. });
  220. }
  221. });
  222. }
  223. </script>
  224. <!-- end LEGACY GOOGLE ANALYTICS -->
  225. <% } %>
  226. </body>
  227. </html>