Layout général avec colone à gauche
This commit is contained in:
parent
df5645c0ae
commit
1dd4356bc7
|
@ -1,124 +1,142 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
|
||||||
<title>EvoBal</title>
|
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
||||||
<%= csrf_meta_tags %>
|
|
||||||
<%= csp_meta_tag %>
|
|
||||||
|
|
||||||
<%= stylesheet_link_tag "application", "data-turbolinks-track": "reload" %>
|
<head>
|
||||||
<%= javascript_pack_tag "application", "data-turbolinks-track": "reload" %>
|
<title>EvoBal</title>
|
||||||
<%= stylesheet_pack_tag "application", "data-turbo-track": "reload" %>
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
</head>
|
<%= csrf_meta_tags %>
|
||||||
|
<%= csp_meta_tag %>
|
||||||
|
|
||||||
<body class="bg-gray-100">
|
<%= stylesheet_link_tag "application", "data-turbolinks-track": "reload" %>
|
||||||
<div>
|
<%= javascript_pack_tag "application", "data-turbolinks-track": "reload" %>
|
||||||
<nav class="bg-gray-800" data-controller="main-nav">
|
<%= stylesheet_pack_tag "application", "data-turbo-track": "reload" %>
|
||||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
</head>
|
||||||
<div class="flex items-center justify-between h-16">
|
|
||||||
<div class="flex items-center">
|
|
||||||
<div class="flex-shrink-0">
|
|
||||||
<img class="h-8 w-8" src="https://tailwindui.com/img/logos/workflow-mark-indigo-500.svg" alt="Workflow">
|
|
||||||
</div>
|
|
||||||
<div class="hidden md:block">
|
|
||||||
<div class="ml-10 flex items-baseline space-x-4">
|
|
||||||
<!-- Current: "bg-gray-900 text-white", Default: "text-gray-300 hover:bg-gray-700 hover:text-white" -->
|
|
||||||
<%= link_to "Emails", emails_path, class: (controller_name == "emails" ? "nav-tab--current" : "nav-tab") %>
|
|
||||||
<%= link_to "Filters", filters_path, class: (controller_name == "filters" ? "nav-tab--current" : "nav-tab") %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="hidden md:block">
|
|
||||||
<div class="ml-4 flex items-center md:ml-6">
|
|
||||||
|
|
||||||
<!-- Profile dropdown -->
|
|
||||||
<div class="ml-3 relative">
|
|
||||||
<div>
|
|
||||||
<button id="user-menu-button" data-action="main-nav#toggle_user_menu focusout->main-nav#toggle_user_menu" data-main-nav-target="userButton" class="max-w-xs bg-gray-800 rounded-full flex items-center text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white" aria-haspopup="true" aria-expanded="false" aria-controls="user-menu">
|
|
||||||
<span class="sr-only">Open user menu</span>
|
|
||||||
<img class="h-8 w-8 rounded-full" src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="">
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
<!--
|
|
||||||
Profile dropdown panel, show/hide based on dropdown state.
|
|
||||||
|
|
||||||
Entering: "transition ease-out duration-100"
|
|
||||||
From: "transform opacity-0 scale-95"
|
|
||||||
To: "transform opacity-100 scale-100"
|
|
||||||
Leaving: "transition ease-in duration-75"
|
|
||||||
From: "transform opacity-100 scale-100"
|
|
||||||
To: "transform opacity-0 scale-95"
|
|
||||||
-->
|
|
||||||
<div data-main-nav-target="userMenu" id="user-menu" class="hidden origin-top-right absolute right-0 mt-2 w-32 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5" role="menu" aria-orientation="vertical" aria-labelledby="user-menu-button">
|
|
||||||
<%= button_to "Sign out", destroy_user_session_path, class: "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100", role: "menuitem", method: :delete, data: { confirm: 'Are you sure?', "turbo-frame": "_top" } %>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="-mr-2 flex md:hidden">
|
|
||||||
<!-- Mobile menu button -->
|
|
||||||
<button data-action="main-nav#toggle_user_menu" class="bg-gray-800 inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-white hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white">
|
|
||||||
<span class="sr-only">Open main menu</span>
|
|
||||||
<!--
|
|
||||||
Heroicon name: outline/menu
|
|
||||||
|
|
||||||
Menu open: "hidden", Menu closed: "block"
|
|
||||||
-->
|
|
||||||
<svg class="block h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
|
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
|
|
||||||
</svg>
|
|
||||||
<!--
|
|
||||||
Heroicon name: outline/x
|
|
||||||
|
|
||||||
Menu open: "block", Menu closed: "hidden"
|
|
||||||
-->
|
|
||||||
<svg class="hidden h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
|
|
||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<div class="h-screen flex overflow-hidden bg-gray-100">
|
||||||
|
<!-- Off-canvas menu for mobile, show/hide based on off-canvas menu state. -->
|
||||||
|
<div class="md:hidden">
|
||||||
|
<div class="fixed inset-0 flex z-40">
|
||||||
<!--
|
<!--
|
||||||
Mobile menu, toggle classes based on menu state.
|
Off-canvas menu overlay, show/hide based on off-canvas menu state.
|
||||||
|
|
||||||
Open: "block", closed: "hidden"
|
Entering: "transition-opacity ease-linear duration-300"
|
||||||
-->
|
From: "opacity-0"
|
||||||
<div data-main-nav-target="userMenu" class="hidden md:hidden">
|
To: "opacity-100"
|
||||||
<div class="px-2 pt-2 pb-3 space-y-1 sm:px-3">
|
Leaving: "transition-opacity ease-linear duration-300"
|
||||||
<!-- Current: "bg-gray-900 text-white", Default: "text-gray-300 hover:bg-gray-700 hover:text-whites" -->
|
From: "opacity-100"
|
||||||
<%= link_to "Emails", emails_path, class: (controller_name == "emails" ? "nav-tab--current" : "nav-tab") %>
|
To: "opacity-0"
|
||||||
<%= link_to "Filters", filters_path, class: (controller_name == "filters" ? "nav-tab--current" : "nav-tab") %>
|
-->
|
||||||
|
<div class="fixed inset-0">
|
||||||
|
<div class="absolute inset-0 bg-gray-600 opacity-75"></div>
|
||||||
|
</div>
|
||||||
|
<!--
|
||||||
|
Off-canvas menu, show/hide based on off-canvas menu state.
|
||||||
|
|
||||||
|
Entering: "transition ease-in-out duration-300 transform"
|
||||||
|
From: "-translate-x-full"
|
||||||
|
To: "translate-x-0"
|
||||||
|
Leaving: "transition ease-in-out duration-300 transform"
|
||||||
|
From: "translate-x-0"
|
||||||
|
To: "-translate-x-full"
|
||||||
|
-->
|
||||||
|
<div class="relative flex-1 flex flex-col max-w-xs w-full bg-gray-800">
|
||||||
|
<div class="absolute top-0 right-0 -mr-12 pt-2">
|
||||||
|
<button
|
||||||
|
class="ml-1 flex items-center justify-center h-10 w-10 rounded-full focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white">
|
||||||
|
<span class="sr-only">Close sidebar</span>
|
||||||
|
<%= heroicon "x", variant: :outline, options: { class: "h-6 w-6 text-white" } %>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="pt-4 pb-3 border-t border-gray-700">
|
<div class="flex-1 h-0 pt-5 pb-4 overflow-y-auto">
|
||||||
<div class="flex items-center px-5">
|
<div class="flex-shrink-0 flex items-center px-4 text-white text-3xl font-black">
|
||||||
<div class="flex-shrink-0">
|
EvoBal
|
||||||
<img class="h-10 w-10 rounded-full" src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="">
|
|
||||||
</div>
|
|
||||||
<div class="ml-3">
|
|
||||||
<div class="text-base font-medium leading-none text-white">Tom Cook</div>
|
|
||||||
<div class="text-sm font-medium leading-none text-gray-400">tom@example.com</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="mt-3 px-2 space-y-1">
|
|
||||||
<%= button_to "Sign out", destroy_user_session_path, class: "block px-3 py-2 rounded-md text-base font-medium text-gray-400 hover:text-white hover:bg-gray-700", role: "menuitem", method: :delete, data: { confirm: 'Are you sure?', "turbo-frame": "_top" } %>
|
|
||||||
</div>
|
</div>
|
||||||
|
<nav class="mt-5 px-2 space-y-1">
|
||||||
|
<%= render partial: "shared/main_nav" %>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
<div class="flex-shrink-0 flex bg-gray-700 p-4">
|
||||||
|
<a href="#" class="flex-shrink-0 group block">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<div>
|
||||||
|
<img class="inline-block h-10 w-10 rounded-full"
|
||||||
|
src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixqx=bWqFzH45hk&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80"
|
||||||
|
alt="">
|
||||||
|
</div>
|
||||||
|
<div class="ml-3">
|
||||||
|
<p class="text-base font-medium text-white">
|
||||||
|
Tom Cook
|
||||||
|
</p>
|
||||||
|
<p class="text-sm font-medium text-gray-400 group-hover:text-gray-300">
|
||||||
|
View profile
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
<div class="flex-shrink-0 w-14">
|
||||||
|
<!-- Force sidebar to shrink to fit close icon -->
|
||||||
<header class="bg-white shadow">
|
|
||||||
<div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
|
|
||||||
<%= yield :main_header %>
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</div>
|
||||||
<main>
|
|
||||||
<div class="max-w-7xl my-6 mx-auto py-6 sm:px-6 lg:px-8 bg-white shadow">
|
|
||||||
<%= yield %>
|
|
||||||
</div>
|
|
||||||
</main>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</body>
|
<!-- Static sidebar for desktop -->
|
||||||
</html>
|
<div class="hidden md:flex md:flex-shrink-0">
|
||||||
|
<div class="flex flex-col w-64">
|
||||||
|
<!-- Sidebar component, swap this element with another sidebar if you like -->
|
||||||
|
<div class="flex flex-col h-0 flex-1 bg-gray-800">
|
||||||
|
<div class="flex-1 flex flex-col pt-5 pb-4 overflow-y-auto">
|
||||||
|
<div class="flex items-center flex-shrink-0 px-4 text-white text-3xl font-black">
|
||||||
|
EvoBal
|
||||||
|
</div>
|
||||||
|
<nav class="mt-5 flex-1 px-2 bg-gray-800 space-y-1">
|
||||||
|
<%= render partial: "shared/main_nav" %>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
<div class="flex-shrink-0 flex bg-gray-700 p-4">
|
||||||
|
<a href="#" class="flex-shrink-0 w-full group block">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<div>
|
||||||
|
<img class="inline-block h-9 w-9 rounded-full"
|
||||||
|
src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixqx=bWqFzH45hk&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80"
|
||||||
|
alt="">
|
||||||
|
</div>
|
||||||
|
<div class="ml-3">
|
||||||
|
<p class="text-sm font-medium text-white">
|
||||||
|
Tom Cook
|
||||||
|
</p>
|
||||||
|
<p class="text-xs font-medium text-gray-300 group-hover:text-gray-200">
|
||||||
|
View profile
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-col w-0 flex-1 overflow-hidden">
|
||||||
|
<div class="md:hidden pl-1 pt-1 sm:pl-3 sm:pt-3">
|
||||||
|
<button
|
||||||
|
class="-ml-0.5 -mt-0.5 h-12 w-12 inline-flex items-center justify-center rounded-md text-gray-500 hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-indigo-500">
|
||||||
|
<span class="sr-only">Open sidebar</span>
|
||||||
|
<%= heroicon "menu", variant: :outline, options: { class: "h-6 w-6" } %>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<main class="flex-1 relative z-0 overflow-y-auto focus:outline-none" tabindex="0">
|
||||||
|
<div class="p-6 mx-auto bg-white shadow">
|
||||||
|
<%= yield :main_header %>
|
||||||
|
</div>
|
||||||
|
<div class="p-6 mx-auto">
|
||||||
|
<%= yield %>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
124
app/views/layouts/application.old.html.erb
Normal file
124
app/views/layouts/application.old.html.erb
Normal file
|
@ -0,0 +1,124 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>EvoBal</title>
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
|
<%= csrf_meta_tags %>
|
||||||
|
<%= csp_meta_tag %>
|
||||||
|
|
||||||
|
<%= stylesheet_link_tag "application", "data-turbolinks-track": "reload" %>
|
||||||
|
<%= javascript_pack_tag "application", "data-turbolinks-track": "reload" %>
|
||||||
|
<%= stylesheet_pack_tag "application", "data-turbo-track": "reload" %>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="bg-gray-100">
|
||||||
|
<div>
|
||||||
|
<nav class="bg-gray-800" data-controller="main-nav">
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
|
<div class="flex items-center justify-between h-16">
|
||||||
|
<div class="flex items-center">
|
||||||
|
<div class="flex-shrink-0">
|
||||||
|
<img class="h-8 w-8" src="https://tailwindui.com/img/logos/workflow-mark-indigo-500.svg" alt="Workflow">
|
||||||
|
</div>
|
||||||
|
<div class="hidden md:block">
|
||||||
|
<div class="ml-10 flex items-baseline space-x-4">
|
||||||
|
<!-- Current: "bg-gray-900 text-white", Default: "text-gray-300 hover:bg-gray-700 hover:text-white" -->
|
||||||
|
<%= link_to "Emails", emails_path, class: (controller_name == "emails" ? "nav-tab--current" : "nav-tab") %>
|
||||||
|
<%= link_to "Filters", filters_path, class: (controller_name == "filters" ? "nav-tab--current" : "nav-tab") %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="hidden md:block">
|
||||||
|
<div class="ml-4 flex items-center md:ml-6">
|
||||||
|
|
||||||
|
<!-- Profile dropdown -->
|
||||||
|
<div class="ml-3 relative">
|
||||||
|
<div>
|
||||||
|
<button id="user-menu-button" data-action="main-nav#toggle_user_menu focusout->main-nav#toggle_user_menu" data-main-nav-target="userButton" class="max-w-xs bg-gray-800 rounded-full flex items-center text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white" aria-haspopup="true" aria-expanded="false" aria-controls="user-menu">
|
||||||
|
<span class="sr-only">Open user menu</span>
|
||||||
|
<img class="h-8 w-8 rounded-full" src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="">
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<!--
|
||||||
|
Profile dropdown panel, show/hide based on dropdown state.
|
||||||
|
|
||||||
|
Entering: "transition ease-out duration-100"
|
||||||
|
From: "transform opacity-0 scale-95"
|
||||||
|
To: "transform opacity-100 scale-100"
|
||||||
|
Leaving: "transition ease-in duration-75"
|
||||||
|
From: "transform opacity-100 scale-100"
|
||||||
|
To: "transform opacity-0 scale-95"
|
||||||
|
-->
|
||||||
|
<div data-main-nav-target="userMenu" id="user-menu" class="hidden origin-top-right absolute right-0 mt-2 w-32 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5" role="menu" aria-orientation="vertical" aria-labelledby="user-menu-button">
|
||||||
|
<%= button_to "Sign out", destroy_user_session_path, class: "block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100", role: "menuitem", method: :delete, data: { confirm: 'Are you sure?', "turbo-frame": "_top" } %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="-mr-2 flex md:hidden">
|
||||||
|
<!-- Mobile menu button -->
|
||||||
|
<button data-action="main-nav#toggle_user_menu" class="bg-gray-800 inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-white hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white">
|
||||||
|
<span class="sr-only">Open main menu</span>
|
||||||
|
<!--
|
||||||
|
Heroicon name: outline/menu
|
||||||
|
|
||||||
|
Menu open: "hidden", Menu closed: "block"
|
||||||
|
-->
|
||||||
|
<svg class="block h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
|
||||||
|
</svg>
|
||||||
|
<!--
|
||||||
|
Heroicon name: outline/x
|
||||||
|
|
||||||
|
Menu open: "block", Menu closed: "hidden"
|
||||||
|
-->
|
||||||
|
<svg class="hidden h-6 w-6" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
|
||||||
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
||||||
|
</svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
Mobile menu, toggle classes based on menu state.
|
||||||
|
|
||||||
|
Open: "block", closed: "hidden"
|
||||||
|
-->
|
||||||
|
<div data-main-nav-target="userMenu" class="hidden md:hidden">
|
||||||
|
<div class="px-2 pt-2 pb-3 space-y-1 sm:px-3">
|
||||||
|
<!-- Current: "bg-gray-900 text-white", Default: "text-gray-300 hover:bg-gray-700 hover:text-whites" -->
|
||||||
|
<%= link_to "Emails", emails_path, class: (controller_name == "emails" ? "nav-tab--current" : "nav-tab") %>
|
||||||
|
<%= link_to "Filters", filters_path, class: (controller_name == "filters" ? "nav-tab--current" : "nav-tab") %>
|
||||||
|
</div>
|
||||||
|
<div class="pt-4 pb-3 border-t border-gray-700">
|
||||||
|
<div class="flex items-center px-5">
|
||||||
|
<div class="flex-shrink-0">
|
||||||
|
<img class="h-10 w-10 rounded-full" src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="">
|
||||||
|
</div>
|
||||||
|
<div class="ml-3">
|
||||||
|
<div class="text-base font-medium leading-none text-white">Tom Cook</div>
|
||||||
|
<div class="text-sm font-medium leading-none text-gray-400">tom@example.com</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="mt-3 px-2 space-y-1">
|
||||||
|
<%= button_to "Sign out", destroy_user_session_path, class: "block px-3 py-2 rounded-md text-base font-medium text-gray-400 hover:text-white hover:bg-gray-700", role: "menuitem", method: :delete, data: { confirm: 'Are you sure?', "turbo-frame": "_top" } %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<header class="bg-white shadow">
|
||||||
|
<div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
|
||||||
|
<%= yield :main_header %>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
<div class="max-w-7xl my-6 mx-auto py-6 sm:px-6 lg:px-8 bg-white shadow">
|
||||||
|
<%= yield %>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
23
app/views/shared/_main_nav.html.erb
Normal file
23
app/views/shared/_main_nav.html.erb
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
<% if controller_name == "emails" %>
|
||||||
|
<%= link_to emails_path, class: "bg-gray-900 text-white group flex items-center px-2 py-2 text-sm font-medium rounded-md" do %>
|
||||||
|
<%= heroicon "home", options: { class: "text-gray-300 mr-3 h-6 w-6" } %>
|
||||||
|
Emails
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to emails_path, class: "text-gray-300 hover:bg-gray-700 hover:text-white group flex items-center px-2 py-2 text-sm font-medium rounded-md" do %>
|
||||||
|
<%= heroicon "home", options: { class: "text-gray-400 group-hover:text-gray-300 mr-3 h-6 w-6" } %>
|
||||||
|
Emails
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<% if controller_name == "filters" %>
|
||||||
|
<%= link_to filters_path, class: "bg-gray-900 text-white group flex items-center px-2 py-2 text-sm font-medium rounded-md" do %>
|
||||||
|
<%= heroicon "filter", options: { class: "text-gray-300 mr-3 h-6 w-6" } %>
|
||||||
|
Filters
|
||||||
|
<% end %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to filters_path, class: "text-gray-300 hover:bg-gray-700 hover:text-white group flex items-center px-2 py-2 text-sm font-medium rounded-md" do %>
|
||||||
|
<%= heroicon "filter", options: { class: "text-gray-400 group-hover:text-gray-300 mr-3 h-6 w-6" } %>
|
||||||
|
Filters
|
||||||
|
<% end %>
|
||||||
|
<% end %>
|
Loading…
Reference in a new issue