Experiment with a different presentation layout

This commit is contained in:
Oliver Davies 2025-03-21 00:26:41 +00:00
parent f9790b6080
commit 8b721e63fb
5 changed files with 26441 additions and 19 deletions

View file

@ -0,0 +1,44 @@
<section>
<h2>Events</h2>
<table>
<thead>
<th>Event name</th>
<th>Date</th>
<th>Location</th>
<th>Links</th>
</thead>
<tbody>
{% for event in events|sort((a, b) => b.date <=> a.date) %}
<tr>
<td>{{ event.name }}</td>
<td><time datetime="{{ event.date|date('Y-m-d') }}">{{ event.date|date('jS F Y') }}</time></td>
<td>
{% if event.online %}
Online
{% elseif event.location %}
{{ event.location }}
{% endif %}
</td>
<td>
{% if event.urls %}
<ul>
{% for key, link in event.urls %}
<li>
<a href="{{ link }}" title="{% spaceless %}
{{ key == 'code' ? 'View the example code from %s.'|format(event.name) }}
{{ key == 'slides' ? 'View the slides from %s.'|format(event.name) }}
{{ key == 'website' ? 'View the website for %s.'|format(event.name) }}
{% endspaceless %}">
{{- key|capitalize -}}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</section>

View file

@ -5,15 +5,27 @@
{% block content_wrapper %} {% block content_wrapper %}
{{ parent() }} {{ parent() }}
{% include 'presentation/slides' with { {% if block('abstract') %}
speakerdeck: page.speakerdeck, <h2>Abstract</h2>
} %}
{% include 'presentation/video' with { {% block abstract %}{% endblock %}
video: page.video, {% endif %}
} %}
{% include 'presentation/events' with { {% if page.new_events %}
events: page.events, {% include 'presentation/events-new' with {
} %} events: page.events,
} %}
{% else %}
{% include 'presentation/slides' with {
speakerdeck: page.speakerdeck,
} %}
{% include 'presentation/video' with {
video: page.video,
} %}
{% include 'presentation/events' with {
events: page.events,
} %}
{% endif %}
{% endblock %} {% endblock %}

View file

@ -1,14 +1,6 @@
--- ---
title: Building Static Websites with Sculpin title: Building Static Websites with Sculpin
description: How to use Sculpin to generate static HTML websites. description: How to use Sculpin to generate static HTML websites.
speakerdeck:
id: 6c9c4be1a1344f1291ff13a391674a66
ratio: "1.77777777777778"
url: https://speakerdeck.com/opdavies/building-static-websites-with-sculpin
code: https://github.com/opdavies/sculpin-demo
video:
type: youtube
id: axy6ltc9meA
events: events:
- name: PHP South West - name: PHP South West
location: Bristol, UK location: Bristol, UK
@ -41,13 +33,20 @@ events:
- name: PHP Berkshire - name: PHP Berkshire
date: 2024-08-28 date: 2024-08-28
location: Reading, UK location: Reading, UK
url: https://www.meetup.com/php-berkshire/events/301850284 urls:
slides: /files/presentations/sculpin/php-berkshire.pdf
website: https://www.meetup.com/php-berkshire/events/301850284
- name: PHP Thames Valley - name: PHP Thames Valley
date: 2025-03-20 date: 2025-03-20
location: Oxford, UK location: Oxford, UK
url: https://www.meetup.com/php-thames-valley/events/305915971 urls:
slides: /files/presentations/sculpin/php-thames-valley.pdf
code: https://code.oliverdavies.uk/opdavies/sculpin-demo/src/branch/php-thames-valley
website: https://www.meetup.com/php-thames-valley/events/305915971
new_events: true
--- ---
{% block abstract %}
[Sculpin][0] is a static site generator written in PHP. It converts Markdown [Sculpin][0] is a static site generator written in PHP. It converts Markdown
files, Twig templates and standard HTML into a static HTML site that can be files, Twig templates and standard HTML into a static HTML site that can be
easily deployed. easily deployed.
@ -57,3 +56,4 @@ then will move into some demonstrations of how to build a Sculpin site and what
it can do! it can do!
[0]: http://sculpin.io [0]: http://sculpin.io
{% endblock %}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long