Skip to content

Commit 6c925dd

Browse files
committed
Improve layout of react+typescript pages
1 parent 087b654 commit 6c925dd

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

lib/components_guide_web/templates/react_typescript/_nav.html.heex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<nav class="">
2+
<p class="px-2 pb-6 text-xl italic"><%= "React & TypeScript Guide" %></p>
23
<ul class="text-xl" data-links="block p-2 current-page-bold">
34
<li><%= link(@conn, "Fundamentals", to: "/react+typescript") %></li>
45
<li><%= link(@conn, "Testing", to: "/react+typescript/testing") %></li>

lib/components_guide_web/templates/react_typescript/index.html.eex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
</header>
44

55
<navigable-article class="flex flex-col">
6-
<div class="mx-auto grid-flow-col grid grid-cols-[20rem_minmax(0,var(--max-width))_18rem] gap-8" style="--max-width: 46em">
7-
<div class="sticky top-0 h-screen pt-16 text-white">
6+
<div class="mx-auto grid-flow-col md:grid md:grid-cols-[20rem_minmax(0,var(--max-width))] xl:grid-cols-[20rem_minmax(0,var(--max-width))_18rem] gap-8" style="--max-width: 46em">
7+
<div class="md:sticky top-0 md:h-screen pl-4 pt-16 text-white">
88
<%= render view_module(@conn), "_nav.html", conn: @conn %>
99
</div>
10-
<article class="text-white bg-gray-900">
10+
<article class="text-white bg-gray-900 px-4 md:px-0">
1111
<div class="<%= view_module(@conn).article_content_class(@article) %>">
1212
<%= render(view_module(@conn), @article <> ".html", conn: @conn) %>
1313
</div>
1414
</article>
15-
<aside class="sticky top-0 h-screen" hidden>
15+
<aside class="sticky top-0 h-screen hidden xl:block" hidden>
1616
<nav class="pt-16 text-gray-200">
1717
<div class="pl-5 pb-2 font-bold uppercase text-white">On this page</div>
1818
<slot name="nav-items">

0 commit comments

Comments
 (0)