Skip to content

Commit

Permalink
move components into main layout for tailwind
Browse files Browse the repository at this point in the history
  • Loading branch information
ooloth committed Jun 10, 2023
1 parent e206930 commit fb9a7bc
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 35 deletions.
Empty file.
5 changes: 0 additions & 5 deletions src/_includes/components/copyright.webc

This file was deleted.

15 changes: 0 additions & 15 deletions src/_includes/components/site-footer.webc

This file was deleted.

12 changes: 0 additions & 12 deletions src/_includes/components/site-header.webc

This file was deleted.

38 changes: 35 additions & 3 deletions src/_includes/layouts/main.webc
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,44 @@ layout: root.webc
---

<div class="flex flex-col p-3 min-h-screen">
<!-- <a href="#skip" class="visually-hidden">Skip to main content</a> -->
<site-header></site-header>
<!--- Main header --->
<header class="mb-8">
<!-- <a href="#skip" class="visually-hidden">Skip to main content</a> -->
<nav>
<h2 class="sr-only">Top level navigation menu</h2>
<!--- {% if item.url == page.url %} aria-current="page" --->
<ul class="flex flex-wrap">
<li class="w-full font-bold"><a href="/" @html="$data.site.title"></a></li>
<script webc:type="js" webc:root>
`${$data.nav.top
.map(item => `<li class="me-3 lowercase"><a href="${item.url}">${item.title}</a></li>`)
.join('')}`;
</script>
</ul>
</nav>
</header>

<!--- Main content --->
<main @raw="content" id="skip" class="flex-1"></main>

<site-footer></site-footer>
<!--- Main footer --->
<footer class="flex flex-wrap justify-between text-center">
<p>
<script webc:type="js">
`&copy; ${new Date().getFullYear()} Michael Uloth`;
</script>
</p>

<nav>
<ul class="flex flex-wrap justify-start">
<script webc:type="js" webc:root>
`${$data.nav.bottom
.map(item => `<li class="me-3"><a href="${item.url}" target="_blank">${item.title}</a></li>`)
.join('')}`;
</script>
</ul>
</nav>
</footer>
</div>

<hr />
Expand Down

0 comments on commit fb9a7bc

Please sign in to comment.