home.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta
  6. name="viewport"
  7. content="width=device-width, initial-scale=1.0, maximum-scale=5.0"
  8. />
  9. <title>Simo Search</title>
  10. <link rel="stylesheet" href="/static/main.css" />
  11. <link rel="icon" type="image/x-icon" href="/static/favicon.gif" />
  12. <link
  13. rel="search"
  14. type="application/opensearchdescription+xml"
  15. title="Simo Search"
  16. href="/opensearch.xml"
  17. />
  18. <script>
  19. (function () {
  20. function syncEmbedClassFromHash() {
  21. const isEmbed =
  22. (window.location.hash || "").indexOf("#embed") !== -1;
  23. // Toggle a class on <body>. CSS handles the layout changes.
  24. document.body.classList.toggle("embed", isEmbed);
  25. }
  26. if (document.readyState === "loading") {
  27. document.addEventListener(
  28. "DOMContentLoaded",
  29. syncEmbedClassFromHash,
  30. );
  31. } else {
  32. syncEmbedClassFromHash();
  33. }
  34. window.addEventListener("hashchange", syncEmbedClassFromHash);
  35. })();
  36. </script>
  37. </head>
  38. <body>
  39. <div class="view-home">
  40. <div class="container" id="container">
  41. <h1 class="hero-logo">Simo <span>Search</span></h1>
  42. <form action="/search" class="home-search-form">
  43. <div class="search-input-wrapper">
  44. <input
  45. name="q"
  46. type="text"
  47. class="search-box"
  48. placeholder="Search the web..."
  49. autofocus
  50. autocomplete="off"
  51. />
  52. </div>
  53. <div class="buttons">
  54. <button type="submit" class="btn-primary">
  55. Search
  56. </button>
  57. </div>
  58. </form>
  59. </div>
  60. </div>
  61. </body>
  62. </html>