Added hero section to homepage
This commit is contained in:
parent
f68060aed5
commit
bf2c5edf78
|
|
@ -5,7 +5,7 @@
|
|||
<head>
|
||||
{% include "partials/metas.html" %}
|
||||
</head>
|
||||
<body>
|
||||
<body class="{{ pageClass}}">
|
||||
{% include "partials/header.html" %}
|
||||
|
||||
<main tabindex="-1" id="main-content">
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
16
src/_includes/partials/hero-section.html
Normal file
16
src/_includes/partials/hero-section.html
Normal 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>
|
||||
|
|
@ -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" %}
|
||||
17
src/scss/components/_hero.scss
Normal file
17
src/scss/components/_hero.scss
Normal 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;;
|
||||
}
|
||||
}
|
||||
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue