Changed homepage

This commit is contained in:
TheThomaas 2023-06-23 21:10:22 +02:00
parent 2576fecd4f
commit f3f60f8c8c
2 changed files with 29 additions and 18 deletions

View file

@ -1,16 +1,28 @@
<header class="hero">
<div class="wrapper">
<div class="hero-content">
<h1>
{% if heroTitle %}
{{ heroTitle }}
{% else %}
{{ title }}
{% endif %}
</h1>
{% if description %}
<p>{{ description }}</p>
{% if heroTitle or description %}
{% if heroBackground or heroColor %}
<style>
.hero {
{% if heroBackground %}
--hero-background: {{ heroBackground }};
{% endif %}
{% if heroColor %}
--hero-color: {{ heroColor }};
{% endif %}
}
</style>
{% endif %}
<header class="hero">
<div class="wrapper">
<div class="hero-content">
{% if heroTitle %}
<h1>
{{ heroTitle }}
</h1>
{% endif %}
{% if description %}
<p>{{ description }}</p>
{% endif %}
</div>
</div>
</div>
</header>
</header>
{% endif %}

View file

@ -1,11 +1,10 @@
---
title: 'Home'
description: 'A website made with Eleventy'
heroTitle: 'Welcome'
heroTitle: 'Welcome to my website'
heroBackground: var(--surface1)
heroColor: var(--text1)
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" %}