index.html 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  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-2.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-2.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-twitter-v2.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. //
  63. const theme = window.localStorage.getItem("excalidraw-theme");
  64. if (theme === "dark") {
  65. document.documentElement.classList.add("dark");
  66. }
  67. } catch {}
  68. </script>
  69. <style>
  70. html.dark {
  71. background-color: #121212;
  72. color: #fff;
  73. }
  74. </style>
  75. <!------------------------------------------------------------------------->
  76. <% if ("%PROD%" === "true") { %>
  77. <script>
  78. // Redirect Excalidraw+ users which have auto-redirect enabled.
  79. //
  80. // Redirect only the bare root path, so link/room/library urls are not
  81. // redirected.
  82. //
  83. // Putting into index.html for best performance (can't redirect on server
  84. // due to location.hash checks).
  85. if (
  86. window.location.pathname === "/" &&
  87. !window.location.hash &&
  88. !window.location.search &&
  89. // if its present redirect
  90. document.cookie.includes("excplus-autoredirect=true")
  91. ) {
  92. window.location.href = "https://app.excalidraw.com";
  93. }
  94. </script>
  95. <% } %>
  96. <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
  97. <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
  98. <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
  99. <!-- Excalidraw version -->
  100. <meta name="version" content="{version}" />
  101. <link
  102. rel="preload"
  103. href="/Virgil.woff2"
  104. as="font"
  105. type="font/woff2"
  106. crossorigin="anonymous"
  107. />
  108. <link
  109. rel="preload"
  110. href="/Cascadia.woff2"
  111. as="font"
  112. type="font/woff2"
  113. crossorigin="anonymous"
  114. />
  115. <link rel="stylesheet" href="/fonts.css" type="text/css" />
  116. <% if ("%VITE_APP_DEV_DISABLE_LIVE_RELOAD%"==="true" ) { %>
  117. <script>
  118. {
  119. const _WebSocket = window.WebSocket;
  120. window.WebSocket = function (url) {
  121. if (/ws:\/\/localhost:.+?\/sockjs-node/.test(url)) {
  122. console.info(
  123. "[!!!] Live reload is disabled via VITE_APP_DEV_DISABLE_LIVE_RELOAD [!!!]",
  124. );
  125. } else {
  126. return new _WebSocket(url);
  127. }
  128. };
  129. }
  130. </script>
  131. <% } %>
  132. <script>
  133. window.EXCALIDRAW_ASSET_PATH = "/";
  134. // setting this so that libraries installation reuses this window tab.
  135. window.name = "_excalidraw";
  136. </script>
  137. <!-- FIXME: remove this when we update CRA (fix SW caching) -->
  138. <style>
  139. body,
  140. html {
  141. margin: 0;
  142. -webkit-text-size-adjust: 100%;
  143. width: 100%;
  144. height: 100%;
  145. overflow: hidden;
  146. }
  147. .visually-hidden {
  148. position: absolute !important;
  149. height: 1px;
  150. width: 1px;
  151. overflow: hidden;
  152. clip: rect(1px, 1px, 1px, 1px);
  153. white-space: nowrap;
  154. user-select: none;
  155. }
  156. #root {
  157. height: 100%;
  158. -webkit-touch-callout: none;
  159. -webkit-user-select: none;
  160. -khtml-user-select: none;
  161. -moz-user-select: none;
  162. -ms-user-select: none;
  163. user-select: none;
  164. }
  165. @media screen and (min-width: 1200px) {
  166. #root {
  167. -webkit-touch-callout: default;
  168. -webkit-user-select: auto;
  169. -khtml-user-select: auto;
  170. -moz-user-select: auto;
  171. -ms-user-select: auto;
  172. user-select: auto;
  173. }
  174. }
  175. </style>
  176. </head>
  177. <body>
  178. <noscript> You need to enable JavaScript to run this app. </noscript>
  179. <header>
  180. <h1 class="visually-hidden">Excalidraw</h1>
  181. </header>
  182. <div id="root"></div>
  183. <script type="module" src="/src/index.tsx"></script>
  184. <% if ("%VITE_APP_DEV_DISABLE_LIVE_RELOAD%" !== 'true') { %>
  185. <!-- 100% privacy friendly analytics -->
  186. <script>
  187. // need to load this script dynamically bcs. of iframe embed tracking
  188. var scriptEle = document.createElement("script");
  189. scriptEle.setAttribute(
  190. "src",
  191. "https://scripts.simpleanalyticscdn.com/latest.js",
  192. );
  193. scriptEle.setAttribute("type", "text/javascript");
  194. scriptEle.setAttribute("defer", true);
  195. scriptEle.setAttribute("async", true);
  196. // if iframe
  197. if (window.self !== window.top) {
  198. scriptEle.setAttribute("data-auto-collect", true);
  199. }
  200. document.body.appendChild(scriptEle);
  201. // if iframe
  202. if (window.self !== window.top) {
  203. scriptEle.addEventListener("load", () => {
  204. if (window.sa_pageview) {
  205. window.window.sa_event(action, {
  206. category: "iframe",
  207. label: "embed",
  208. value: window.location.pathname,
  209. });
  210. }
  211. });
  212. }
  213. </script>
  214. <!-- end LEGACY GOOGLE ANALYTICS -->
  215. <% } %>
  216. </body>
  217. </html>