Skip to content

Commit

Permalink
Fix #59, unify sidebar elements
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Apr 2, 2022
1 parent 4362c8f commit 5b429b9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
12 changes: 2 additions & 10 deletions resources/views/components/docs/navigation.blade.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
<div class="flex flex-row items-center justify-between h-full px-4">
<span class="font-bold">
@if(Hyde::docsIndexPath() !== false)
<a href="{{ basename(Hyde::docsIndexPath()) }}">
{{ config('hyde.name') }} Docs
</a>
@else
{{ config('hyde.name') }} Docs
@endif
</span>
<div class="flex flex-row items-center justify-between h-full">
@include('hyde::components.docs.sidebar-header')

@include('hyde::components.docs.sidebar-toggle')
</div>
2 changes: 1 addition & 1 deletion resources/views/components/docs/sidebar-header.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<header class="h-16 p-4 border-b flex items-center">
<header class="h-16 p-4 flex items-center">
<h2 class="font-bold opacity-75 hover:opacity-100 w-fit">
@if(Hyde::docsIndexPath() !== false)
<a href="{{ basename(Hyde::docsIndexPath()) }}">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/docs/sidebar-toggle.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="sidebar-button-wrapper flex items-center open">
<div class="sidebar-button-wrapper flex items-center px-4 open">
<!-- Icons by Google Material Icons - Apache 2.0 -->
<button class="sidebar-toggle-button open" title="Open sidebar menu" onClick="showSidebar()">
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/docs/sidebar.blade.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@include('hyde::components.docs.sidebar-header')
<nav id="sidebar-navigation" class="p-4 overflow-y-auto" aria-label="Secondary Navigation Menu">
<nav id="sidebar-navigation" class="p-4 overflow-y-auto border-t" aria-label="Secondary Navigation Menu">
<ul>
@foreach (Hyde\Framework\Actions\GeneratesDocumentationSidebar::get($currentPage) as $item)
<li @class([
Expand Down

0 comments on commit 5b429b9

Please sign in to comment.