Merge sculpin-talk-demo/main

This commit is contained in:
Oliver Davies 2025-10-02 23:45:35 +01:00
commit c1a2e361de
17 changed files with 3845 additions and 0 deletions

View file

@ -0,0 +1,17 @@
# This file is used by editors and IDEs to unify coding standards
# @see http://EditorConfig.org
# @standards PHP: http://www.php-fig.org/psr/psr-2/
root = true
# Default configuration (applies to all file types)
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_size = 4
indent_style = space
# Markdown customizations
[*.md]
trim_trailing_whitespace = false

View file

@ -0,0 +1,2 @@
/output_*/
/vendor/

View file

@ -0,0 +1,20 @@
# sculpin-talk-demo
A demonstration [Sculpin](https://sculpin.io) website, generated from my [Sculpin Skeleton](https://github.com/opdavies/sculpin-skeleton) project.
## Running locally
The easiest way to run the site locally is by using my [Sculpin Serve docker image](https://github.com/opdavies/docker-image-sculpin-serve):
docker run --rm -it \
-p 8000:8000 \
-v $(pwd):/app \
--name sculpin-demo \
opdavies/sculpin-serve
This will install the Composer dependencies, generate and serve the site at http://localhost:8000, and automatically re-generate the site if any changes are made.
## Links
* To see the generated site, go to <https://sculpin-talk-demo.netlify.app>.
* For more information, and to see the slides and video for the talk, go to <https://www.oliverdavies.uk/talks/building-static-websites-sculpin>.

View file

@ -0,0 +1,5 @@
sculpin_content_types:
posts:
enabled: false
talks:
permalink: talks/:basename/

View file

@ -0,0 +1,9 @@
name: Sculpin Demo
locale: en
main_menu:
-
title: Home
href: /
-
title: Talks
href: /talks/

View file

@ -0,0 +1,3 @@
---
imports:
- sculpin_site.yml

View file

@ -0,0 +1,21 @@
{
"name": "opdavies/sculpin-skeleton",
"description": "A skeleton Sculpin site.",
"license": "MIT",
"authors": [
{
"name": "Oliver Davies",
"email": "oliver@oliverdavies.uk",
"homepage": "https://www.oliverdavies.uk"
}
],
"require": {
"sculpin/sculpin": "^3.0"
},
"scripts": {
"dev": "composer run-script generate",
"generate": "sculpin generate --clean --no-interaction",
"prod": "composer run-script generate -- --env prod",
"watch": "composer run-script --timeout=0 generate -- --server --watch"
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,7 @@
<nav>
{% for link in links %}
<a href="{{ link.href }}">
{{ link.title }}
</a>
{% endfor %}
</nav>

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="{{ site.locale|default('en') }}">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{ site.name|default('Sculpin Skeleton') }}</title>
</head>
<body>
{% block body %}{% endblock %}
</body>
</html>

View file

@ -0,0 +1,12 @@
{% extends 'app' %}
{% block body %}
{% include 'navbar' with {
links: site.main_menu,
} only %}
<h1>{{ page.title }}</h1>
{% block content %}{% endblock %}
{% block content_bottom %}{% endblock %}
{% endblock %}

View file

@ -0,0 +1,22 @@
{% extends 'default' %}
{% block content_bottom %}
{% set events = page.events %}
{% if not events is empty %}
<h2>Events</h2>
<ul>
{% for event in events|sort((a, b) => a.date < b.date) %}
<li>
{% if event.url %}
<a href="{{ event.url }}">{{ event.name }}</a>
{% else %}
{{ event.name }}
{% endif %}
- {{ event.date|date('jS F Y') }}
</li>
{% endfor %}
</ul>
{% endif %}
{% endblock %}

View file

@ -0,0 +1,23 @@
---
title: Building Static Websites with Sculpin
events:
-
name: PHP South West
location: Bristol, UK
date: 2015-10-14
url: https://phpsw.uk/events/2015-10-lightning-talks
joindin: https://joind.in/talk/view/15486
-
name: Drupal Yorkshire
date: 2021-08-19
location: Leeds, UK
url: https://www.meetup.com/DrupalYorkshire/events/280100968
is_online: true
-
name: PHP North West (PHPNW)
date: 2021-09-07
location: Manchester, UK
url: ~
is_online: true
---

View file

@ -0,0 +1,5 @@
---
title: Taking Flight with Tailwind CSS
layout: default
---

View file

@ -0,0 +1,5 @@
---
title: TDD - Test-Driven Drupal
layout: default
---

View file

@ -0,0 +1,6 @@
---
title: Home
layout: default
---
Hello, World!

View file

@ -0,0 +1,15 @@
---
title: Talks
layout: default
use: [talks]
---
<ul>
{% for talk in data.talks %}
<li>
<a href="{{ talk.url }}">
{{ talk.title }}
</a>
</li>
{% endfor %}
</ul>