Refactor nav
This commit is contained in:
		
							parent
							
								
									8eefcb6074
								
							
						
					
					
						commit
						a1489aec0a
					
				
					 2 changed files with 4 additions and 6 deletions
				
			
		| 
						 | 
				
			
			@ -3,7 +3,7 @@
 | 
			
		|||
{% block body %}
 | 
			
		||||
    {% include 'layout/navbar' %}
 | 
			
		||||
 | 
			
		||||
    <div class="container mt-32 flex flex-col flex-1">
 | 
			
		||||
    <div class="container flex flex-col flex-1">
 | 
			
		||||
        <main id="main-content" class="flex-1 wrap {{ page.layout == 'front' ? 'is-wide' : '' }}">
 | 
			
		||||
            {% block page_title_wrapper %}
 | 
			
		||||
                <h1 class="leading-tight mb-4">
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
<div id="nav" class="w-full fixed top-0 mb-6 z-20 bg-blue-500 border-b-3 border-blue-700">
 | 
			
		||||
<div id="nav" class="mb-6 bg-blue-500 border-b-3 border-blue-700">
 | 
			
		||||
    <div class="container">
 | 
			
		||||
            <div class="md:flex">
 | 
			
		||||
                <div class="w-full flex items-center md:w-1/3 lg:w-1/4">
 | 
			
		||||
| 
						 | 
				
			
			@ -26,15 +26,13 @@
 | 
			
		|||
                </div>
 | 
			
		||||
 | 
			
		||||
                <nav
 | 
			
		||||
                    class="w-full absolute py-4 -mx-4 mt-2px bg-blue-700 border-b md:mt-0 md:mx-0 md:relative md:flex md:flex-wrap md:flex-1 md:justify-end md:bg-blue-500 md:border-b-0"
 | 
			
		||||
                    class="mt-2px -mx-4 py-4 bg-blue-700 md:mt-0 md:mx-0 md:relative md:flex md:flex-wrap md:flex-1 md:justify-end md:bg-blue-500 md:border-b-0"
 | 
			
		||||
                    :class="[ isOpen ? 'block' : 'hidden' ]"
 | 
			
		||||
                    role="navigation"
 | 
			
		||||
                >
 | 
			
		||||
                    {% for item in site.menus.main %}
 | 
			
		||||
                        {% set currentPage = page.url matches '#' ~ item.pattern ~ '#' %}
 | 
			
		||||
                        <a
 | 
			
		||||
                            class="mx-4 mt-1 -mb-px py-3 px-4 block rounded text-sm text-white no-underline hover:underline focus:outline-none focus:underline md:py-1 md:px-2 md:mx-2 md:mt-0 md:mr-0
 | 
			
		||||
                                {{ currentPage ? 'cursor-default bg-blue-500 hover:border-blue-600 hover:no-underline md:bg-blue-700' }}"
 | 
			
		||||
                            class="mx-4 mt-1 -mb-px py-3 px-4 block rounded text-sm text-white no-underline hover:underline focus:outline-none focus:underline md:py-1 md:px-2 md:mx-2 md:mt-0 md:mr-0 {{ currentPage ? 'cursor-default bg-blue-500 hover:border-blue-600 hover:no-underline md:bg-blue-700' }}"
 | 
			
		||||
                            href="{{ item.href }}"
 | 
			
		||||
                            {% if currentPage %}aria-current="page"{% endif %}
 | 
			
		||||
                        >
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue