Skip to content

Commit

Permalink
add events metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleguido committed Sep 29, 2023
1 parent c9d52c5 commit a8e6776
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 3 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ date: 2020-01-01
event_start_date: 1877-10-01
event_end_date: 1877-11-30
event_human_date: October/November 1877
---
```

Expand Down
6 changes: 6 additions & 0 deletions _includes/event.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% if page.event_human_date %} {{ page.event_human_date }} {% endif %} {% if
page.event_start_date %}
<div class="text-muted"><b> Start </b> {{ page.event_start_date }}</div>
{% endif %} {% if page.event_end_date %}
<div class="text-muted"><b> End </b> {{ page.event_end_date }}</div>
{% endif %}
5 changes: 5 additions & 0 deletions _includes/menu.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<h1>Maison<br />du<br />Son</h1>
<ul>
<li><a href="/">/home</a></li>
<li><a href="">/how-to</a></li>
</ul>
27 changes: 24 additions & 3 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
}
body {
--bs-body-bg: #fcedda;
background-color: var(--bs-body-bg);
}
h1,
h2,
h3 {
font-family: 'Melodrama', serif;
/* this is a variable font */
font-weight: 700;

font-variation-settings: 'wght' 700;

font-size: 5rem;
Expand All @@ -43,7 +43,7 @@
color: inherit;
font-weight: 575;

font-variation-settings: 'wght' 5375;
font-variation-settings: 'wght' 575;
font-size: 2rem;
line-height: 1em;
padding-bottom: 1rem;
Expand All @@ -57,9 +57,30 @@
list-style: none;
padding: 0;
}
body {
display: flex;
}
body > aside {
flex-shrink: 1;
padding: 2rem;
}
body > main {
flex-grow: 1;
padding: 2rem;
}
body > aside > h1 {
font-size: 1.3em;
font-weight: 575;
margin-bottom: 2rem;
font-variation-settings: 'wght' 575;
}
body > aside > ul > li {
padding: 0 0 0.5rem;
}
</style>
</head>
<body class="{{page.layout}}">
{{content}}
<aside>{% include menu.html %}</aside>
<main>{{content}}</main>
</body>
</html>
1 change: 1 addition & 0 deletions _layouts/object.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<div class="row">
<div class="col-lg-8">
<h1>{{ page.title }}</h1>
{% include event.html %}
<section>{{ page.content }}</section>
</div>
<div class="col-lg-4">
Expand Down
4 changes: 4 additions & 0 deletions _objects/example.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
title: The Timeless Elegance of the Gramophone
authors:
- daniele-guido

event_human_date: October/November 1877
event_start_date: 1877-10-01
event_end_date: 1877-11-30
---

## A Glimpse into History
Expand Down

0 comments on commit a8e6776

Please sign in to comment.