hello.tmpl.html 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
  6. <title>Hello from Tailscale</title>
  7. <style>
  8. html,
  9. body {
  10. margin: 0;
  11. padding: 0;
  12. }
  13. body {
  14. font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  15. font-size: 100%;
  16. -webkit-font-smoothing: antialiased;
  17. -moz-osx-font-smoothing: grayscale;
  18. }
  19. html,
  20. body,
  21. main {
  22. height: 100%;
  23. }
  24. *,
  25. ::before,
  26. ::after {
  27. box-sizing: border-box;
  28. border-width: 0;
  29. border-style: solid;
  30. border-color: #dad6d5;
  31. }
  32. h1,
  33. h2,
  34. h3,
  35. h4,
  36. h5,
  37. h6 {
  38. margin: 0;
  39. font-size: 1rem;
  40. font-weight: inherit;
  41. }
  42. a {
  43. color: inherit;
  44. }
  45. p {
  46. margin: 0;
  47. }
  48. main {
  49. display: flex;
  50. flex-direction: column;
  51. justify-content: center;
  52. align-items: center;
  53. max-width: 24rem;
  54. width: 95%;
  55. margin-left: auto;
  56. margin-right: auto;
  57. }
  58. .p-2 {
  59. padding: 0.5rem;
  60. }
  61. .p-4 {
  62. padding: 1rem;
  63. }
  64. .px-2 {
  65. padding-left: 0.5rem;
  66. padding-right: 0.5rem;
  67. }
  68. .pl-3 {
  69. padding-left: 0.75rem;
  70. }
  71. .pr-3 {
  72. padding-right: 0.75rem;
  73. }
  74. .pt-4 {
  75. padding-top: 1rem;
  76. }
  77. .mr-2 {
  78. margin-right: 0.5rem;
  79. ;
  80. }
  81. .mb-1 {
  82. margin-bottom: 0.25rem;
  83. }
  84. .mb-2 {
  85. margin-bottom: 0.5rem;
  86. }
  87. .mb-4 {
  88. margin-bottom: 1rem;
  89. }
  90. .mb-6 {
  91. margin-bottom: 1.5rem;
  92. }
  93. .mb-8 {
  94. margin-bottom: 2rem;
  95. }
  96. .mb-12 {
  97. margin-bottom: 3rem;
  98. }
  99. .width-full {
  100. width: 100%;
  101. }
  102. .min-width-0 {
  103. min-width: 0;
  104. }
  105. .rounded-lg {
  106. border-radius: 0.5rem;
  107. }
  108. .relative {
  109. position: relative;
  110. }
  111. .flex {
  112. display: flex;
  113. }
  114. .justify-between {
  115. justify-content: space-between;
  116. }
  117. .items-center {
  118. align-items: center;
  119. }
  120. .border {
  121. border-width: 1px;
  122. }
  123. .border-t-1 {
  124. border-top-width: 1px;
  125. }
  126. .border-gray-100 {
  127. border-color: #f7f5f4;
  128. }
  129. .border-gray-200 {
  130. border-color: #eeebea;
  131. }
  132. .border-gray-300 {
  133. border-color: #dad6d5;
  134. }
  135. .bg-white {
  136. background-color: white;
  137. }
  138. .bg-gray-0 {
  139. background-color: #faf9f8;
  140. }
  141. .bg-gray-100 {
  142. background-color: #f7f5f4;
  143. }
  144. .text-green-600 {
  145. color: #0d4b3b;
  146. }
  147. .text-blue-600 {
  148. color: #3f5db3;
  149. }
  150. .hover\:text-blue-800:hover {
  151. color: #253570;
  152. }
  153. .text-gray-600 {
  154. color: #444342;
  155. }
  156. .text-gray-700 {
  157. color: #2e2d2d;
  158. }
  159. .text-gray-800 {
  160. color: #232222;
  161. }
  162. .text-center {
  163. text-align: center;
  164. }
  165. .text-sm {
  166. font-size: 0.875rem;
  167. }
  168. .font-title {
  169. font-size: 1.25rem;
  170. letter-spacing: -0.025em;
  171. }
  172. .font-semibold {
  173. font-weight: 600;
  174. }
  175. .font-medium {
  176. font-weight: 500;
  177. }
  178. .font-regular {
  179. font-weight: 400;
  180. }
  181. .truncate {
  182. overflow: hidden;
  183. text-overflow: ellipsis;
  184. white-space: nowrap;
  185. }
  186. .overflow-hidden {
  187. overflow: hidden;
  188. }
  189. .profile-pic {
  190. width: 2.5rem;
  191. height: 2.5rem;
  192. border-radius: 9999px;
  193. background-size: cover;
  194. margin-right: 0.5rem;
  195. flex-shrink: 0;
  196. }
  197. .panel {
  198. box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  199. }
  200. .animate .panel {
  201. transform: translateY(10%);
  202. box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.0), 0 10px 10px -5px rgba(0, 0, 0, 0.0);
  203. transition: transform 1200ms ease, opacity 1200ms ease, box-shadow 1200ms ease;
  204. }
  205. .animate .panel-interior {
  206. opacity: 0.0;
  207. transition: opacity 1200ms ease;
  208. }
  209. .animate .logo {
  210. transform: translateY(2rem);
  211. opacity: 0.0;
  212. transition: transform 1200ms ease, opacity 1200ms ease;
  213. }
  214. .animate .header-title {
  215. transform: translateY(1.6rem);
  216. opacity: 0.0;
  217. transition: transform 1200ms ease, opacity 1200ms ease;
  218. }
  219. .animate .header-text {
  220. transform: translateY(1.2rem);
  221. opacity: 0.0;
  222. transition: transform 1200ms ease, opacity 1200ms ease;
  223. }
  224. .animate .footer {
  225. transform: translateY(-0.5rem);
  226. opacity: 0.0;
  227. transition: transform 1200ms ease, opacity 1200ms ease;
  228. }
  229. .animating .panel {
  230. transform: translateY(0);
  231. opacity: 1.0;
  232. box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  233. }
  234. .animating .panel-interior {
  235. opacity: 1.0;
  236. }
  237. .animating .spinner {
  238. opacity: 0.0;
  239. }
  240. .animating .logo,
  241. .animating .header-title,
  242. .animating .header-text,
  243. .animating .footer {
  244. transform: translateY(0);
  245. opacity: 1.0;
  246. }
  247. .spinner {
  248. display: inline-flex;
  249. position: absolute;
  250. top: 50%;
  251. left: 50%;
  252. transform: translate(-50%, -50%);
  253. align-items: center;
  254. transition: opacity 200ms ease;
  255. }
  256. .spinner span {
  257. display: inline-block;
  258. background-color: currentColor;
  259. border-radius: 9999px;
  260. animation-name: loading-dots-blink;
  261. animation-duration: 1.4s;
  262. animation-iteration-count: infinite;
  263. animation-fill-mode: both;
  264. width: 0.35em;
  265. height: 0.35em;
  266. margin: 0 0.15em;
  267. }
  268. .spinner span:nth-child(2) {
  269. animation-delay: 200ms;
  270. }
  271. .spinner span:nth-child(3) {
  272. animation-delay: 400ms;
  273. }
  274. .spinner {
  275. display: none;
  276. }
  277. .animate .spinner {
  278. display: inline-flex;
  279. }
  280. @keyframes loading-dots-blink {
  281. 0% {
  282. opacity: 0.2;
  283. }
  284. 20% {
  285. opacity: 1;
  286. }
  287. 100% {
  288. opacity: 0.2;
  289. }
  290. }
  291. @media (prefers-reduced-motion) {
  292. * {
  293. animation-duration: 0ms !important;
  294. transition-duration: 0ms !important;
  295. transition-delay: 0ms !important;
  296. }
  297. }
  298. </style>
  299. </head>
  300. <body class="bg-gray-100">
  301. <script>
  302. (function() {
  303. var lastSeen = localStorage.getItem("lastSeen");
  304. if (!lastSeen) {
  305. document.body.classList.add("animate");
  306. window.addEventListener("load", function () {
  307. setTimeout(function () {
  308. document.body.classList.add("animating");
  309. localStorage.setItem("lastSeen", Date.now());
  310. }, 100);
  311. });
  312. }
  313. })();
  314. </script>
  315. <main class="text-gray-800">
  316. <svg class="logo mb-6" width="28" height="28" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
  317. <circle opacity="0.2" cx="3.4" cy="3.25" r="2.7" fill="currentColor" />
  318. <circle cx="3.4" cy="11.3" r="2.7" fill="currentColor" />
  319. <circle opacity="0.2" cx="3.4" cy="19.5" r="2.7" fill="currentColor" />
  320. <circle cx="11.5" cy="11.3" r="2.7" fill="currentColor" />
  321. <circle cx="11.5" cy="19.5" r="2.7" fill="currentColor" />
  322. <circle opacity="0.2" cx="11.5" cy="3.25" r="2.7" fill="currentColor" />
  323. <circle opacity="0.2" cx="19.5" cy="3.25" r="2.7" fill="currentColor" />
  324. <circle cx="19.5" cy="11.3" r="2.7" fill="currentColor" />
  325. <circle opacity="0.2" cx="19.5" cy="19.5" r="2.7" fill="currentColor" />
  326. </svg>
  327. <header class="mb-8 text-center">
  328. <h1 class="header-title font-title font-semibold mb-2">You're connected over Tailscale!</h1>
  329. <p class="header-text">This device is signed in as…</p>
  330. </header>
  331. <div class="panel relative bg-white rounded-lg width-full shadow-xl mb-8 p-4">
  332. <div class="spinner text-gray-600">
  333. <span></span>
  334. <span></span>
  335. <span></span>
  336. </div>
  337. <div class="panel-interior flex items-center width-full min-width-0 p-2 mb-4">
  338. <div class="profile-pic bg-gray-100" style="background-image: url({{.ProfilePicURL}});"></div>
  339. <div class="overflow-hidden">
  340. {{ with .DisplayName }}
  341. <h4 class="font-semibold truncate">{{.}}</h4>
  342. {{ end }}
  343. <h5 class="text-gray-600 truncate">{{.LoginName}}</h5>
  344. </div>
  345. </div>
  346. <div
  347. class="panel-interior border border-gray-200 bg-gray-0 rounded-lg p-2 pl-3 pr-3 mb-2 width-full flex justify-between items-center">
  348. <div class="flex items-center min-width-0">
  349. <svg class="text-gray-600 mr-2" xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none"
  350. stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  351. <rect x="2" y="2" width="20" height="8" rx="2" ry="2"></rect>
  352. <rect x="2" y="14" width="20" height="8" rx="2" ry="2"></rect>
  353. <line x1="6" y1="6" x2="6.01" y2="6"></line>
  354. <line x1="6" y1="18" x2="6.01" y2="18"></line>
  355. </svg>
  356. <h4 class="font-semibold truncate mr-2">{{.MachineName}}</h4>
  357. </div>
  358. <h5>{{.IP}}</h5>
  359. </div>
  360. </div>
  361. <footer class="footer text-gray-600 text-center mb-12">
  362. <p>Read about <a href="https://tailscale.com/kb/1017/install#advanced-features" class="text-blue-600 hover:text-blue-800"
  363. target="_blank">what you can do next &rarr;</a></p>
  364. <p>Read about <a href="https://tailscale.com/kb/1073/hello" class="text-blue-600 hover:text-blue-800"
  365. target="_blank">the Hello service &rarr;</a></p>
  366. </footer>
  367. </main>
  368. </body>
  369. </html>