This commit is contained in:
TheThomaas 2023-06-18 21:57:16 +02:00
commit e7adf3c0bb
6 changed files with 50 additions and 4 deletions

View file

@ -5,7 +5,7 @@
<head>
{% include "partials/metas.html" %}
</head>
<body>
<body class="{{ pageClass}}">
{% include "partials/header.html" %}
<main tabindex="-1" id="main-content">

View file

@ -1,10 +1,13 @@
---
pageClass: 'home'
---
{% extends "layouts/base.html" %}
{% block content %}
{% include "partials/article-head.html" %}
{% include "partials/hero-section.html" %}
<br>
<div class="wrapper-lg">
<div class="wrapper">
{{ content | safe }}
</div>

View file

@ -0,0 +1,16 @@
<header class="hero">
<div class="wrapper">
<div class="hero-content">
<h1>
{% if heroTitle %}
{{ heroTitle }}
{% else %}
{{ title }}
{% endif %}
</h1>
{% if description %}
<p>{{ description }}</p>
{% endif %}
</div>
</div>
</header>

View file

@ -1,8 +1,11 @@
---
title: 'Home'
description: 'A made up agency site that you build if you take Learn Eleventy From Scratch, by Piccalilli'
description: 'A website made with Eleventy'
heroTitle: 'Welcome'
metaDesc: 'A made up agency site that you build if you take Learn Eleventy From Scratch, by Piccalilli'
layout: 'home'
---
## Posts
{% include "partials/post-list.html" %}

View file

@ -0,0 +1,17 @@
.hero {
inline-size: 100%;
background-color: var(--hero-background, var(--brand-variant));
padding: 4rem var(--gutter);
color: var(--hero-color, var(--surface2));
.hero-content {
display: flex;
flex-direction: column;
align-items: center;
gap: var(--gutter);
}
h1 {
font-size: 2.5rem;;
}
}

View file

@ -5,6 +5,7 @@
@use './components/top-button';
@use './components/skip-link';
@use './components/post';
@use './components/hero';
:root {
@media screen and (prefers-reduced-motion: no-preference) {
@ -111,4 +112,10 @@ img {
.theme-toggle {
color: var(--text1);
}
.home {
h2 {
font-size: calc(1.5 * var(--font-size));
}
}