|
1 | 1 | <!DOCTYPE html> |
| 2 | + |
2 | 3 | <html> |
3 | 4 | <head> |
4 | 5 | <title><%= content_for(:title) || "Flowbite Components for Rails" %></title> |
| 6 | + |
5 | 7 | <meta name="viewport" content="width=device-width,initial-scale=1"> |
6 | 8 | <meta name="apple-mobile-web-app-capable" content="yes"> |
7 | 9 | <meta name="mobile-web-app-capable" content="yes"> |
| 10 | + |
8 | 11 | <%= csrf_meta_tags %> |
9 | 12 | <%= csp_meta_tag %> |
10 | 13 |
|
11 | 14 | <%= yield :head %> |
12 | 15 |
|
13 | 16 | <%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %> |
14 | | - <%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %> |
| 17 | + <%# = tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %> |
15 | 18 |
|
16 | 19 | <link rel="icon" href="/icon.png" type="image/png"> |
17 | 20 | <link rel="icon" href="/icon.svg" type="image/svg+xml"> |
|
21 | 24 | <%= stylesheet_link_tag :app %> |
22 | 25 | </head> |
23 | 26 |
|
24 | | - <body class="bg-white text-gray-800 dark:bg-gray-900 dark:text-gray-400"> |
| 27 | + <body class="bg-neutral-primary text-body"> |
25 | 28 | <header> |
26 | | - <nav class="bg-white border-gray-200 dark:bg-gray-900"> |
27 | | - <div class="max-w-screen-xl flex flex-wrap items-center justify-between mx-auto p-4"> |
| 29 | + <nav class="bg-neutral-primary border-gray-200"> |
| 30 | + <div |
| 31 | + class=" |
| 32 | + max-w-screen-xl flex flex-wrap items-center justify-between |
| 33 | + mx-auto p-4 |
| 34 | + " |
| 35 | + > |
28 | 36 | <%= link_to(root_path, class: "flex items-center space-x-3 rtl:space-x-reverse") do %> |
29 | | - <span class="self-center text-2xl font-semibold whitespace-nowrap dark:text-white">flowbite-components</span> |
| 37 | + <span |
| 38 | + class=" |
| 39 | + self-center text-2xl font-semibold whitespace-nowrap |
| 40 | + text-heading |
| 41 | + " |
| 42 | + > |
| 43 | + flowbite-components |
| 44 | + </span> |
30 | 45 | <% end %> |
| 46 | + |
31 | 47 | <% if @menu_toggle_implemented %> |
32 | | - <button data-collapse-toggle="navbar-default" type="button" class="inline-flex items-center p-2 w-10 h-10 justify-center text-sm text-gray-500 rounded-lg md:hidden hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600" aria-controls="navbar-default" aria-expanded="false"> |
33 | | - <span class="sr-only">Open main menu</span> |
34 | | - <svg class="w-5 h-5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 17 14"> |
35 | | - <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M1 1h15M1 7h15M1 13h15"/> |
36 | | - </svg> |
| 48 | + <button |
| 49 | + data-collapse-toggle="navbar-default" |
| 50 | + type="button" |
| 51 | + class=" |
| 52 | + inline-flex items-center p-2 w-10 h-10 justify-center |
| 53 | + text-sm text-body rounded-lg md:hidden hover:bg-neutral-primary/10 |
| 54 | + focus:outline-none focus:ring-2 focus:ring-primary/50 |
| 55 | + " |
| 56 | + aria-controls="navbar-default" |
| 57 | + aria-expanded="false" |
| 58 | + > |
| 59 | + <span class="sr-only">Open main menu</span> |
| 60 | + |
| 61 | + <svg |
| 62 | + class="w-5 h-5" |
| 63 | + aria-hidden="true" |
| 64 | + xmlns="http://www.w3.org/2000/svg" |
| 65 | + fill="none" |
| 66 | + viewBox="0 0 17 14" |
| 67 | + > |
| 68 | + <path |
| 69 | + stroke="currentColor" |
| 70 | + stroke-linecap="round" |
| 71 | + stroke-linejoin="round" |
| 72 | + stroke-width="2" |
| 73 | + d="M1 1h15M1 7h15M1 13h15" |
| 74 | + /> |
| 75 | + </svg> |
37 | 76 | </button> |
38 | 77 | <% end %> |
| 78 | + |
39 | 79 | <div class="hidden w-full md:block md:w-auto" id="navbar-default"> |
40 | | - <ul class="font-medium flex flex-col p-4 md:p-0 mt-4 border border-gray-100 rounded-lg bg-gray-50 md:flex-row md:space-x-8 rtl:space-x-reverse md:mt-0 md:border-0 md:bg-white dark:bg-gray-800 md:dark:bg-gray-900 dark:border-gray-700"> |
| 80 | + <ul |
| 81 | + class=" |
| 82 | + font-medium flex flex-col p-4 md:p-0 mt-4 border |
| 83 | + border-light rounded-lg bg-neutral-secondary md:flex-row |
| 84 | + md:space-x-8 rtl:space-x-reverse md:mt-0 md:border-0 |
| 85 | + md:bg-neutral-primary |
| 86 | + " |
| 87 | + > |
41 | 88 | <li> |
42 | | - <%= link_to("Home", root_url, class: "block py-2 px-3 text-gray-900 rounded-sm hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-white md:dark:hover:text-blue-500 dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent") %> |
| 89 | + <%= link_to("Home", root_url, class: "block py-2 px-3 text-heading rounded-sm hover:bg-neutral-tertiary md:hover:bg-transparent md:border-0 md:hover:text-brand md:p-0 md:dark:hover:text-fg-brand dark:hover:text-white md:dark:hover:bg-transparent") %> |
43 | 90 | </li> |
| 91 | + |
44 | 92 | <li> |
45 | | - <%= link_to("GitHub", "https://github.com/substancelab/flowbite-components", class: "block py-2 px-3 text-gray-900 rounded-sm hover:bg-gray-100 md:hover:bg-transparent md:border-0 md:hover:text-blue-700 md:p-0 dark:text-white md:dark:hover:text-blue-500 dark:hover:bg-gray-700 dark:hover:text-white md:dark:hover:bg-transparent") %> |
| 93 | + <%= link_to("GitHub", "https://github.com/substancelab/flowbite-components", class: "block py-2 px-3 text-heading rounded-sm hover:bg-neutral-tertiary md:hover:bg-transparent md:border-0 md:hover:text-brand md:p-0 md:dark:hover:text-fg-brand dark:hover:text-white md:dark:hover:bg-transparent") %> |
46 | 94 | </li> |
| 95 | + |
47 | 96 | <li> |
48 | 97 | <button data-theme-toggle="dark" class="dark:hidden"> |
49 | | - <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-6"> |
50 | | - <path fill-rule="evenodd" d="M9.528 1.718a.75.75 0 0 1 .162.819A8.97 8.97 0 0 0 9 6a9 9 0 0 0 9 9 8.97 8.97 0 0 0 3.463-.69.75.75 0 0 1 .981.98 10.503 10.503 0 0 1-9.694 6.46c-5.799 0-10.5-4.7-10.5-10.5 0-4.368 2.667-8.112 6.46-9.694a.75.75 0 0 1 .818.162Z" clip-rule="evenodd" /> |
| 98 | + <svg |
| 99 | + xmlns="http://www.w3.org/2000/svg" |
| 100 | + viewBox="0 0 24 24" |
| 101 | + fill="currentColor" |
| 102 | + class="size-6" |
| 103 | + > |
| 104 | + <path |
| 105 | + fill-rule="evenodd" |
| 106 | + d="M9.528 1.718a.75.75 0 0 1 .162.819A8.97 8.97 0 0 0 9 6a9 9 0 0 0 9 9 8.97 8.97 0 0 0 3.463-.69.75.75 0 0 1 .981.98 10.503 10.503 0 0 1-9.694 6.46c-5.799 0-10.5-4.7-10.5-10.5 0-4.368 2.667-8.112 6.46-9.694a.75.75 0 0 1 .818.162Z" |
| 107 | + clip-rule="evenodd" |
| 108 | + /> |
51 | 109 | </svg> |
52 | 110 | </button> |
| 111 | + |
53 | 112 | <button data-theme-toggle="light" class="hidden dark:block"> |
54 | | - <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"> |
55 | | - <path stroke-linecap="round" stroke-linejoin="round" d="M12 18v-5.25m0 0a6.01 6.01 0 0 0 1.5-.189m-1.5.189a6.01 6.01 0 0 1-1.5-.189m3.75 7.478a12.06 12.06 0 0 1-4.5 0m3.75 2.383a14.406 14.406 0 0 1-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 1 0-7.517 0c.85.493 1.509 1.333 1.509 2.316V18" /> |
| 113 | + <svg |
| 114 | + xmlns="http://www.w3.org/2000/svg" |
| 115 | + fill="none" |
| 116 | + viewBox="0 0 24 24" |
| 117 | + stroke-width="1.5" |
| 118 | + stroke="currentColor" |
| 119 | + class="size-6" |
| 120 | + > |
| 121 | + <path |
| 122 | + stroke-linecap="round" |
| 123 | + stroke-linejoin="round" |
| 124 | + d="M12 18v-5.25m0 0a6.01 6.01 0 0 0 1.5-.189m-1.5.189a6.01 6.01 0 0 1-1.5-.189m3.75 7.478a12.06 12.06 0 0 1-4.5 0m3.75 2.383a14.406 14.406 0 0 1-3 0M14.25 18v-.192c0-.983.658-1.823 1.508-2.316a7.5 7.5 0 1 0-7.517 0c.85.493 1.509 1.333 1.509 2.316V18" |
| 125 | + /> |
56 | 126 | </svg> |
57 | 127 | </button> |
58 | 128 | </li> |
|
63 | 133 | </header> |
64 | 134 |
|
65 | 135 | <main class="container mx-auto mt-28 px-5 flex"> |
66 | | - <article> |
67 | | - <%= yield %> |
68 | | - </article> |
| 136 | + <article><%= yield %></article> |
69 | 137 | </main> |
70 | 138 |
|
71 | | - <footer class="mt-28 px-5 py-5 flex border-t-2 border-gray-200 dark:border-gray-700"> |
| 139 | + <footer class="mt-28 px-5 py-5 flex border-t-2 border-default"> |
72 | 140 | <div class="space-y-5"> |
73 | 141 | <div class="flex space-x-5"> |
74 | 142 | <%= link_to("GitHub", "https://github.com/substancelab/flowbite-components") %> |
|
77 | 145 | </div> |
78 | 146 |
|
79 | 147 | <div> |
80 | | - Licensed under the <%= link_to("MIT License", "https://github.com/substancelab/flowbite-components/blob/main/LICENSE") %>, except where otherwise stated |
| 148 | + Licensed under the |
| 149 | + <%= link_to("MIT License", "https://github.com/substancelab/flowbite-components/blob/main/LICENSE") %>, |
| 150 | + except where otherwise stated |
81 | 151 | </div> |
82 | 152 |
|
83 | 153 | <div> |
84 | | - The Flowbite name and logos are trademarks of <%= link_to("Bergside Inc", "https://flowbite.com/brand/") %>. |
85 | | - The Tailwind name and logos are trademarks of <%= link_to("Tailwind Labs Inc", "https://tailwindcss.com/brand") %>. |
| 154 | + The Flowbite name and logos are trademarks of |
| 155 | + <%= link_to("Bergside Inc", "https://flowbite.com/brand/") %>. The |
| 156 | + Tailwind name and logos are trademarks of |
| 157 | + <%= link_to("Tailwind Labs Inc", "https://tailwindcss.com/brand") %>. |
86 | 158 | </div> |
87 | 159 | </div> |
88 | 160 | </footer> |
89 | 161 |
|
90 | 162 | <script> |
91 | 163 | function setTheme(theme) { |
92 | | - document.documentElement.setAttribute('data-theme', theme); |
| 164 | + if (theme == "dark") { |
| 165 | + document.documentElement.classList.add('dark'); |
| 166 | + document.documentElement.classList.remove('light'); |
| 167 | + } else { |
| 168 | + document.documentElement.classList.add('light'); |
| 169 | + document.documentElement.classList.remove('dark'); |
| 170 | + } |
93 | 171 | localStorage.setItem("theme", theme); |
94 | 172 | } |
95 | 173 | setTheme(localStorage.getItem('theme') || 'light'); |
|
0 commit comments