app/views/layouts/shared/_header.html.erb in shadcn-ui-0.0.1 vs app/views/layouts/shared/_header.html.erb in shadcn-ui-0.0.2
- old
+ new
@@ -1,5 +1,15 @@
+<%= render_sheet id: "sidebar_sheet", direction: "left", width: "w-auto" do %>
+ <div class=" h-full">
+ <%= sheet_content do %>
+ <div class=" h-full">
+ <%= render 'layouts/shared/components' %>
+ </div>
+ <% end %>
+ </div>
+<% end %>
+
<header
class="supports-backdrop-blur:bg-background/60 sticky top-0 z-40 w-full border-b bg-background/95 backdrop-blur">
<div class="container flex h-14 items-center">
<div class="mr-4 hidden md:flex">
<a
@@ -35,36 +45,28 @@
stroke-width="16"></line>
</svg>
<span class="hidden font-bold sm:inline-block">shadcn/ui on Rails</span>
</a>
<nav class="flex items-center space-x-6 text-sm font-medium">
+ <%= link_to "Home", root_path, class: "transition-colors hover:text-foreground/80 #{params[:controller] == 'application' ? "text-foreground" : "text-foreground/60"}" %>
+ <%= link_to "Documentation", documentation_index_path, class: "transition-colors hover:text-foreground/80 text-foreground/60 #{params[:controller] == 'documentation' ? "text-foreground" : "text-foreground/60"}" %>
+ <%= link_to "Components", component_path("accordion"), class: "transition-colors hover:text-foreground/80 text-foreground/60 #{params[:controller] == 'components' ? "text-foreground" : "text-foreground/60"}" %>
<a
- class="transition-colors hover:text-foreground/80 text-foreground/60"
- href="/docs"
- >Documentation</a
- ><a
- class="transition-colors hover:text-foreground/80 text-foreground"
- href="/docs/components"
- >Components</a
- ><a
- class="transition-colors hover:text-foreground/80 text-foreground/60"
- href="/examples"
- >Examples</a
- ><a
class="hidden text-foreground/60 transition-colors hover:text-foreground/80 lg:block"
- href="https://github.com/shadcn/ui"
- >GitHub</a
- >
+ href="https://github.com/aviflombaum/shadcn-rails">GitHub</a>
</nav>
</div>
+
<button
class="inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:text-accent-foreground h-9 py-2 mr-2 px-0 text-base hover:bg-transparent focus-visible:bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0 md:hidden"
type="button"
aria-haspopup="dialog"
aria-expanded="false"
- aria-controls="radix-:R15hja:"
- data-state="closed">
+ data-state="closed"
+ data-controller="ui--sheet"
+ data-action="click->ui--sheet#toggleOutlet"
+ data--ui-sheet-outlet="#sidebar_sheet">
<svg
width="15"
height="15"
viewBox="0 0 15 15"
fill="none"
@@ -77,27 +79,16 @@
clip-rule="evenodd"></path>
</svg>
<span class="sr-only">Toggle Menu</span>
</button>
<div class="flex flex-1 items-center justify-between space-x-2 md:justify-end">
- <div class="w-full flex-1 md:w-auto md:flex-none">
- <button
- class="inline-flex items-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground h-9 px-4 py-2 relative w-full justify-start text-sm text-muted-foreground sm:pr-12 md:w-40 lg:w-64">
- <span class="hidden lg:inline-flex">Search documentation...</span
- ><span class="inline-flex lg:hidden">Search...</span
- ><kbd
- class="pointer-events-none absolute right-1.5 top-1.5 hidden h-5 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 sm:flex"
- ><span class="text-xs">⌘</span>K</kbd
- >
- </button>
- </div>
+
<nav class="flex items-center">
<a
target="_blank"
rel="noreferrer"
- href="https://github.com/shadcn/ui"
- ><div
+ href="https://github.com/aviflombaum/shadcn-rails"><div
class="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-9 py-2 w-9 px-0">
<svg
viewBox="0 0 438.549 438.549"
class="h-4 w-4">
<path
@@ -108,12 +99,11 @@
</div>
</a>
<a
target="_blank"
rel="noreferrer"
- href="https://twitter.com/shadcn"
- ><div
+ href="https://twitter.com/aviflombaum"><div
class="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-9 py-2 w-9 px-0">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
class="h-4 w-4 fill-current">
@@ -127,10 +117,12 @@
class="inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:bg-accent hover:text-accent-foreground h-9 py-2 w-9 px-0"
type="button"
id="radix-:Rtlhja:"
aria-haspopup="menu"
aria-expanded="false"
- data-state="closed">
+ data-state="closed"
+ data-controller="theme"
+ data-action="theme#toggle">
<svg
width="15"
height="15"
viewBox="0 0 15 15"
fill="none"