Skip to content

Commit bdebde5

Browse files
committed
Extract main header to partial
1 parent a5f8adb commit bdebde5

File tree

2 files changed

+21
-20
lines changed

2 files changed

+21
-20
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<header class="bg-gray-900 text-white">
2+
<section class="container flex flex-row items-center">
3+
<a href="/" class="block py-4 text-base font-bold text-red-100 tracking-wide">
4+
<span class="py-1 border-b-4 border-red-400">Components.Guide</span>
5+
</a>
6+
<nav role="navigation" class="flex-grow px-16 text-lg">
7+
<ul class="flex flex-row justify-around">
8+
<li><a href="/learn-by-building" class="block py-4 font-bold"><%= "Learn by Building" %></a></li>
9+
<li><a href="/links" class="block py-4 font-bold"><%= "Recommended Links" %></a></li>
10+
<li><a href="/about" class="block py-4 font-bold"><%= "Who?" %></a></li>
11+
<% if false do %>
12+
<li><a href="/swiftui" class="block py-4 font-bold"><%= "SwiftUI + Combine" %></a></li>
13+
<li><a href="/rxjs" class="block py-4 font-bold"><%= "React + TS + RxJS" %></a></li>
14+
<% if false do %><li><a href="/react+typescript" class="block py-4 font-bold"><%= "React + TypeScript" %></a></li><% end %>
15+
<li><a href="/css+typescript" class="block py-4 font-bold"><%= "CSS + TypeScript" %></a></li>
16+
<% end %>
17+
</ul>
18+
</nav>
19+
</section>
20+
</header>

apps/components_guide_web/lib/components_guide_web/templates/layout/app.html.eex

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,7 @@
88
<link rel="stylesheet" href="<%= Routes.static_path(@conn, "/css/app.css") %>"/>
99
</head>
1010
<body>
11-
<header class="bg-gray-900 text-white">
12-
<section class="container flex flex-row items-center">
13-
<a href="/" class="block py-4 text-base font-bold text-red-100 tracking-wide">
14-
<span class="py-1 border-b-4 border-red-400">Components.Guide</span>
15-
</a>
16-
<nav role="navigation" class="flex-grow px-16 text-lg">
17-
<ul class="flex flex-row justify-around">
18-
<li><a href="/learn-by-building" class="block py-4 font-bold"><%= "Learn by Building" %></a></li>
19-
<li><a href="/links" class="block py-4 font-bold"><%= "Recommended Links" %></a></li>
20-
<li><a href="/about" class="block py-4 font-bold"><%= "Who?" %></a></li>
21-
<% if false do %>
22-
<li><a href="/swiftui" class="block py-4 font-bold"><%= "SwiftUI + Combine" %></a></li>
23-
<li><a href="/rxjs" class="block py-4 font-bold"><%= "React + TS + RxJS" %></a></li>
24-
<% if false do %><li><a href="/react+typescript" class="block py-4 font-bold"><%= "React + TypeScript" %></a></li><% end %>
25-
<li><a href="/css+typescript" class="block py-4 font-bold"><%= "CSS + TypeScript" %></a></li>
26-
<% end %>
27-
</ul>
28-
</nav>
29-
</section>
30-
</header>
11+
<%= render ComponentsGuideWeb.LayoutView, "_header.html" %>
3112
<main role="main">
3213
<p class="alert alert-info" role="alert"><%= get_flash(@conn, :info) %></p>
3314
<p class="alert alert-danger" role="alert"><%= get_flash(@conn, :error) %></p>

0 commit comments

Comments
 (0)