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"> {% 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="wrapper">
<div class="hero-content"> <div class="hero-content">
<h1>
{% if heroTitle %} {% if heroTitle %}
<h1>
{{ heroTitle }} {{ heroTitle }}
{% else %}
{{ title }}
{% endif %}
</h1> </h1>
{% endif %}
{% if description %} {% if description %}
<p>{{ description }}</p> <p>{{ description }}</p>
{% endif %} {% endif %}
</div> </div>
</div> </div>
</header> </header>
{% endif %}

View file

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