home.html 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 applyEmbedModeFromHash() {
  21. var isEmbed =
  22. (window.location.hash || "").indexOf("#embed") !== -1;
  23. if (!isEmbed) return;
  24. var container = document.querySelector(
  25. ".view-home .container",
  26. );
  27. if (!container) return;
  28. document.body.innerHTML = "";
  29. document.body.appendChild(container);
  30. }
  31. if (document.readyState === "loading") {
  32. document.addEventListener(
  33. "DOMContentLoaded",
  34. applyEmbedModeFromHash,
  35. );
  36. } else {
  37. applyEmbedModeFromHash();
  38. }
  39. window.addEventListener("hashchange", applyEmbedModeFromHash);
  40. })();
  41. </script>
  42. </head>
  43. <body>
  44. <div class="view-home">
  45. <div class="container" id="container">
  46. <h1 class="hero-logo">Simo <span>Search</span></h1>
  47. <form action="/search" class="home-search-form">
  48. <div class="search-input-wrapper">
  49. <input
  50. name="q"
  51. type="text"
  52. class="search-box"
  53. placeholder="Search the web..."
  54. autofocus
  55. autocomplete="off"
  56. />
  57. </div>
  58. <div class="buttons">
  59. <button type="submit" class="btn-primary">
  60. Search
  61. </button>
  62. </div>
  63. </form>
  64. </div>
  65. </div>
  66. </body>
  67. </html>