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 %}
<div class="wrapper"> {% if heroBackground or heroColor %}
<div class="hero-content"> <style>
<h1> .hero {
{% if heroTitle %} {% if heroBackground %}
{{ heroTitle }} --hero-background: {{ heroBackground }};
{% else %}
{{ title }}
{% endif %}
</h1>
{% if description %}
<p>{{ description }}</p>
{% endif %} {% 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>
</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" %}