index.html 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  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. <!-- General tags -->
  54. <meta
  55. name="description"
  56. content="Excalidraw is a virtual collaborative whiteboard tool that lets you easily sketch diagrams that have a hand-drawn feel to them."
  57. />
  58. <!------------------------------------------------------------------------->
  59. <!-- to minimize white flash on load when user has dark mode enabled -->
  60. <script>
  61. try {
  62. function setTheme(theme) {
  63. if (theme === "dark") {
  64. document.documentElement.classList.add("dark");
  65. } else {
  66. document.documentElement.classList.remove("dark");
  67. }
  68. }
  69. function getTheme() {
  70. const theme = window.localStorage.getItem("excalidraw-theme");
  71. if (theme && theme === "system") {
  72. return window.matchMedia("(prefers-color-scheme: dark)").matches
  73. ? "dark"
  74. : "light";
  75. } else {
  76. return theme || "light";
  77. }
  78. }
  79. setTheme(getTheme());
  80. } catch (e) {
  81. console.error("Error setting dark mode", e);
  82. }
  83. </script>
  84. <style>
  85. html.dark {
  86. background-color: #121212;
  87. color: #fff;
  88. }
  89. </style>
  90. <!-- Warmup the connection for Google fonts -->
  91. <link rel="preconnect" href="https://fonts.googleapis.com" />
  92. <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
  93. <!------------------------------------------------------------------------->
  94. <% if (typeof PROD != 'undefined' && PROD == true) { %>
  95. <script>
  96. // Redirect Excalidraw+ users which have auto-redirect enabled.
  97. //
  98. // Redirect only the bare root path, so link/room/library urls are not
  99. // redirected.
  100. //
  101. // Putting into index.html for best performance (can't redirect on server
  102. // due to location.hash checks).
  103. if (
  104. window.location.pathname === "/" &&
  105. !window.location.hash &&
  106. !window.location.search &&
  107. // if its present redirect
  108. document.cookie.includes("excplus-autoredirect=true")
  109. ) {
  110. window.location.href = "https://app.excalidraw.com";
  111. }
  112. </script>
  113. <!-- Following placeholder is replaced during the build step -->
  114. <!-- PLACEHOLDER:EXCALIDRAW_APP_FONTS -->
  115. <% } else { %>
  116. <script>
  117. window.EXCALIDRAW_ASSET_PATH = window.origin;
  118. </script>
  119. <!-- in DEV we need to preload from the local server and without the hash -->
  120. <link
  121. rel="preload"
  122. href="../packages/excalidraw/fonts/assets/Excalifont-Regular.woff2"
  123. as="font"
  124. type="font/woff2"
  125. crossorigin="anonymous"
  126. />
  127. <link
  128. rel="preload"
  129. href="../packages/excalidraw/fonts/assets/Virgil-Regular.woff2"
  130. as="font"
  131. type="font/woff2"
  132. crossorigin="anonymous"
  133. />
  134. <link
  135. rel="preload"
  136. href="../packages/excalidraw/fonts/assets/ComicShanns-Regular.woff2"
  137. as="font"
  138. type="font/woff2"
  139. crossorigin="anonymous"
  140. />
  141. <% } %>
  142. <!-- For Nunito only preload the latin range, which should be good enough for now -->
  143. <link
  144. rel="preload"
  145. href="https://fonts.gstatic.com/s/nunito/v26/XRXI3I6Li01BKofiOc5wtlZ2di8HDIkhdTQ3j6zbXWjgeg.woff2"
  146. as="font"
  147. type="font/woff2"
  148. crossorigin="anonymous"
  149. />
  150. <!-- Register Assistant as the UI font, before the scene inits -->
  151. <link
  152. rel="stylesheet"
  153. href="../packages/excalidraw/fonts/assets/fonts.css"
  154. type="text/css"
  155. />
  156. <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
  157. <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
  158. <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
  159. <!-- Excalidraw version -->
  160. <meta name="version" content="{version}" />
  161. <% if (typeof VITE_APP_DEV_DISABLE_LIVE_RELOAD != 'undefined' &&
  162. VITE_APP_DEV_DISABLE_LIVE_RELOAD == true) { %>
  163. <script>
  164. {
  165. const _WebSocket = window.WebSocket;
  166. window.WebSocket = function (url) {
  167. if (/ws:\/\/localhost:.+?\/sockjs-node/.test(url)) {
  168. console.info(
  169. "[!!!] Live reload is disabled via VITE_APP_DEV_DISABLE_LIVE_RELOAD [!!!]",
  170. );
  171. } else {
  172. return new _WebSocket(url);
  173. }
  174. };
  175. }
  176. </script>
  177. <% } %>
  178. <script>
  179. // setting this so that libraries installation reuses this window tab.
  180. window.name = "_excalidraw";
  181. </script>
  182. <!-- FIXME: remove this when we update CRA (fix SW caching) -->
  183. <style>
  184. body,
  185. html {
  186. margin: 0;
  187. -webkit-text-size-adjust: 100%;
  188. width: 100%;
  189. height: 100%;
  190. overflow: hidden;
  191. }
  192. .visually-hidden {
  193. position: absolute !important;
  194. height: 1px;
  195. width: 1px;
  196. overflow: hidden;
  197. clip: rect(1px, 1px, 1px, 1px);
  198. white-space: nowrap;
  199. user-select: none;
  200. }
  201. #root {
  202. height: 100%;
  203. -webkit-touch-callout: none;
  204. -webkit-user-select: none;
  205. -khtml-user-select: none;
  206. -moz-user-select: none;
  207. -ms-user-select: none;
  208. user-select: none;
  209. }
  210. @media screen and (min-width: 1200px) {
  211. #root {
  212. -webkit-touch-callout: default;
  213. -webkit-user-select: auto;
  214. -khtml-user-select: auto;
  215. -moz-user-select: auto;
  216. -ms-user-select: auto;
  217. user-select: auto;
  218. }
  219. }
  220. </style>
  221. </head>
  222. <body>
  223. <noscript> You need to enable JavaScript to run this app. </noscript>
  224. <header>
  225. <h1 class="visually-hidden">Excalidraw</h1>
  226. </header>
  227. <div id="root"></div>
  228. <script type="module" src="index.tsx"></script>
  229. <!-- 100% privacy friendly analytics -->
  230. <script>
  231. // need to load this script dynamically bcs. of iframe embed tracking
  232. var scriptEle = document.createElement("script");
  233. scriptEle.setAttribute(
  234. "src",
  235. "https://scripts.simpleanalyticscdn.com/latest.js",
  236. );
  237. scriptEle.setAttribute("type", "text/javascript");
  238. scriptEle.setAttribute("defer", true);
  239. scriptEle.setAttribute("async", true);
  240. // if iframe
  241. if (window.self !== window.top) {
  242. scriptEle.setAttribute("data-auto-collect", true);
  243. }
  244. document.body.appendChild(scriptEle);
  245. // if iframe
  246. if (window.self !== window.top) {
  247. scriptEle.addEventListener("load", () => {
  248. if (window.sa_pageview) {
  249. window.window.sa_event(action, {
  250. category: "iframe",
  251. label: "embed",
  252. value: window.location.pathname,
  253. });
  254. }
  255. });
  256. }
  257. </script>
  258. <!-- end LEGACY GOOGLE ANALYTICS -->
  259. </body>
  260. </html>