Compare commits
No commits in common. "start" and "main" have entirely different histories.
27
.githooks/prepare-commit-msg
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs.
|
||||
|
||||
# Load the issue ID from an `.issue-id` file within the project and replace the
|
||||
# `ISSUE_ID` placeholder within a Git commit message.
|
||||
#
|
||||
# For example, running `echo "OD-123" > .issue-id` will add `Refs: OD-123` to
|
||||
# the commit message.
|
||||
#
|
||||
# This also works with multiple issue IDs in the same string, e.g.
|
||||
# "OD-123 OD-456", or IDs on multiple lines.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
PROJECT_DIR=$(git rev-parse --show-toplevel)
|
||||
ISSUE_FILE="$PROJECT_DIR/.issue-id"
|
||||
|
||||
if [ -f "${ISSUE_FILE}" ]; then
|
||||
ISSUE_IDS=$(cat "${ISSUE_FILE}" | tr '\n' ',' | tr ' ' ',' | sed 's/,$//' | sed 's/,/, /g')
|
||||
|
||||
if [ -n "${ISSUE_IDS}" ]; then
|
||||
sed -i.bak "s/# Refs:/Refs: $ISSUE_IDS/" "$1"
|
||||
fi
|
||||
fi
|
14
.gitignore
vendored
|
@ -1,15 +1,11 @@
|
|||
# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs.
|
||||
|
||||
/*
|
||||
/.phpunit.result.cache
|
||||
/output_*/
|
||||
/vendor/
|
||||
|
||||
!/.gitignore
|
||||
!/app/
|
||||
!/build.yaml
|
||||
!/composer.{json,lock}
|
||||
!/justfile
|
||||
!/source/
|
||||
|
||||
!/flake.{nix,lock}
|
||||
/.direnv/
|
||||
|
||||
!/assets/
|
||||
/source/build/
|
||||
/node_modules/
|
||||
|
|
2
.markdownlint.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
MD013: false
|
||||
MD041: false
|
17
_finish/.editorconfig
Normal 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
|
1
_finish/.envrc
Normal file
|
@ -0,0 +1 @@
|
|||
use flake
|
27
_finish/.githooks/prepare-commit-msg
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs.
|
||||
|
||||
# Load the issue ID from an `.issue-id` file within the project and replace the
|
||||
# `ISSUE_ID` placeholder within a Git commit message.
|
||||
#
|
||||
# For example, running `echo "OD-123" > .issue-id` will add `Refs: OD-123` to
|
||||
# the commit message.
|
||||
#
|
||||
# This also works with multiple issue IDs in the same string, e.g.
|
||||
# "OD-123 OD-456", or IDs on multiple lines.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
PROJECT_DIR=$(git rev-parse --show-toplevel)
|
||||
ISSUE_FILE="$PROJECT_DIR/.issue-id"
|
||||
|
||||
if [ -f "${ISSUE_FILE}" ]; then
|
||||
ISSUE_IDS=$(cat "${ISSUE_FILE}" | tr '\n' ',' | tr ' ' ',' | sed 's/,$//' | sed 's/,/, /g')
|
||||
|
||||
if [ -n "${ISSUE_IDS}" ]; then
|
||||
sed -i.bak "s/# Refs:/Refs: $ISSUE_IDS/" "$1"
|
||||
fi
|
||||
fi
|
11
_finish/.gitignore
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs.
|
||||
|
||||
/.phpunit.result.cache
|
||||
/output_*/
|
||||
/vendor/
|
||||
|
||||
/.direnv/
|
||||
|
||||
!/assets/
|
||||
/source/build/
|
||||
/node_modules/
|
2
_finish/.markdownlint.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
MD013: false
|
||||
MD041: false
|
5
_finish/app/config/sculpin_kernel.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
sculpin_content_types:
|
||||
speakers:
|
||||
permalink: /speaker/:basename/
|
||||
posts:
|
||||
enabled: false
|
39
_finish/app/config/sculpin_site.yml
Normal file
|
@ -0,0 +1,39 @@
|
|||
name: 'PHPSW'
|
||||
locale: en
|
||||
talks:
|
||||
- title: Building Static Websites with PHP and Sculpin
|
||||
speaker: Oliver Davies
|
||||
date: 2024-02-14
|
||||
- title: 'FPGA^2: An open-source FPGA'
|
||||
speaker: Robin Hodson
|
||||
date: 2024-02-14
|
||||
- title: Introducing Domain Driven Design
|
||||
speaker: Rob Allen
|
||||
date: 2024-01-10
|
||||
- title: Building Better TUIs (with PHP)
|
||||
speaker: Dan Leech
|
||||
date: 2023-11-08
|
||||
- title: Thoughts on Ubiquitous Language
|
||||
speaker: Rob Allen
|
||||
date: 2023-11-08
|
||||
- title: Testing Legacy
|
||||
speaker: Mike Karthauser
|
||||
date: 2023-11-08
|
||||
- title: Building "Build Configs"
|
||||
speaker: Oliver Davies
|
||||
date: 2023-11-08
|
||||
- title: Terraform from a dev’s perspective
|
||||
speaker: Nigel Dunn
|
||||
date: 2023-10-11
|
||||
- title: What is TDD and why should I care?
|
||||
speaker: Naomi Gotts
|
||||
date: 2023-07-12
|
||||
- title: Go for PHP
|
||||
speaker: Dan Leech
|
||||
date: 2023-02-08
|
||||
- title: What's new in PHP 8.*
|
||||
speaker: Derick Rethans
|
||||
date: 2023-02-11
|
||||
- title: Behaviour Driven Development (BDD) in Practice
|
||||
speaker: Ciaran McNulty
|
||||
date: 2022-09-14
|
3
_finish/app/config/sculpin_site_prod.yml
Normal file
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
imports:
|
||||
- sculpin_site.yml
|
14
_finish/assets/tailwind.config.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
import type { Config } from 'tailwindcss'
|
||||
|
||||
export default {
|
||||
content: ['./source/**/*.{html,md,twig}'],
|
||||
theme: {
|
||||
extend: {
|
||||
fontFamily: {
|
||||
sans: ['Inter', 'sans-serif'],
|
||||
}
|
||||
},
|
||||
},
|
||||
plugins: [],
|
||||
} satisfies Config
|
||||
|
15
_finish/build-configs.yaml
Normal file
|
@ -0,0 +1,15 @@
|
|||
name: phpsw-sculpin-demo
|
||||
template: sculpin-site
|
||||
parameters:
|
||||
flake:
|
||||
devshell:
|
||||
packages:
|
||||
- nodejs
|
||||
- php81
|
||||
- php81Packages.composer
|
||||
git:
|
||||
ignore:
|
||||
- '!/assets/'
|
||||
- '/source/build/'
|
||||
experimental:
|
||||
createInclusiveGitIgnoreFile: true
|
10
_finish/composer.json
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"require": {
|
||||
"sculpin/sculpin": "^3.0"
|
||||
},
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
"sculpin/sculpin-theme-composer-plugin": true
|
||||
}
|
||||
}
|
||||
}
|
3607
_finish/composer.lock
generated
Normal file
23
_finish/dev.kdl
Normal file
|
@ -0,0 +1,23 @@
|
|||
layout {
|
||||
pane size=2 borderless=true {
|
||||
plugin location="zellij:tab-bar"
|
||||
}
|
||||
|
||||
pane split_direction="vertical" {
|
||||
pane name="Editor" size="60%"
|
||||
|
||||
pane split_direction="horizontal" {
|
||||
bash { args "-c" "vendor/bin/sculpin generate --server --watch"; }
|
||||
bash { args "-c" "watch -n 1 tree output_dev"; }
|
||||
}
|
||||
}
|
||||
|
||||
pane size=2 borderless=true {
|
||||
plugin location="zellij:status-bar"
|
||||
}
|
||||
|
||||
pane_template name="bash" {
|
||||
command "bash"
|
||||
start_suspended true
|
||||
}
|
||||
}
|
27
_finish/flake.lock
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1706550542,
|
||||
"narHash": "sha256-UcsnCG6wx++23yeER4Hg18CXWbgNpqNXcHIo5/1Y+hc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "97b17f32362e475016f942bbdfda4a4a72a8a652",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
19
_finish/flake.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs.
|
||||
{
|
||||
description = "A Nix Flake for phpsw-sculpin-demo";
|
||||
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
outputs = { nixpkgs, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
||||
inherit (pkgs) mkShell;
|
||||
in {
|
||||
devShells.${system}.default =
|
||||
mkShell { buildInputs = with pkgs; [ nodejs php81 php81Packages.composer ]; };
|
||||
|
||||
formatter.${system} = pkgs.nixfmt;
|
||||
};
|
||||
}
|
1260
_finish/package-lock.json
generated
Normal file
5
_finish/package.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"tailwindcss": "^3.4.0"
|
||||
}
|
||||
}
|
43
_finish/run
Executable file
|
@ -0,0 +1,43 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
PATH="${PATH}:./vendor/bin"
|
||||
|
||||
# Generate the site.
|
||||
function generate {
|
||||
local args=()
|
||||
|
||||
if [[ "${APP_ENV:-}" == "production" ]]; then
|
||||
args=(--env="prod")
|
||||
else
|
||||
args=(--server --watch)
|
||||
fi
|
||||
|
||||
sculpin generate "${args[@]}" "${@}"
|
||||
}
|
||||
|
||||
function help {
|
||||
printf "%s <task> [args]\n\nTasks:\n" "${0}"
|
||||
|
||||
compgen -A function | grep -v "^_" | cat -n
|
||||
|
||||
printf "\nExtended help:\n Each task has comments for general usage\n"
|
||||
}
|
||||
|
||||
# Start the project.
|
||||
function start {
|
||||
sculpin generate --server --watch "${@}"
|
||||
}
|
||||
|
||||
# Include any local tasks.
|
||||
[[ -e run.local ]] && source run.local
|
||||
|
||||
TIMEFORMAT="Task completed in %3lR"
|
||||
time "${@:-help}"
|
||||
|
||||
# vim: ft=bash
|
0
_finish/source/_includes/.keep
Normal file
41
_finish/source/_includes/speakers/recent-speakers.html.twig
Normal file
|
@ -0,0 +1,41 @@
|
|||
{% if speakers is not empty %}
|
||||
<section>
|
||||
<h2 class="text-3xl font-bold text-center">Speakers</h2>
|
||||
|
||||
<div class="mt-8">
|
||||
<div class="grid grid-cols-2 gap-10 px-4 mx-auto max-w-sm md:grid-cols-3 md:max-w-md lg:grid-cols-4 lg:gap-8 lg:max-w-full xl:grid-cols-6">
|
||||
{% set speakersAndDates = [] %}
|
||||
|
||||
{% for speaker in speakers %}
|
||||
{% set talksForSpeaker = talks|default([])|filter(talk => talk.speaker == speaker.name) %}
|
||||
{% set mostRecentTalk = talksForSpeaker|first %}
|
||||
|
||||
{% set speakersAndDates = speakersAndDates|merge([{
|
||||
date: mostRecentTalk.date,
|
||||
speaker,
|
||||
}]) %}
|
||||
{% endfor %}
|
||||
|
||||
{% set sortedSpeakers = speakersAndDates|sort((a, b) => b.date <=> a.date) %}
|
||||
|
||||
{% for speaker in sortedSpeakers|column('speaker') %}
|
||||
<div>
|
||||
<a href="{{ speaker.url }}" class="flex flex-col-reverse gap-3 items-center group">
|
||||
<div class="text-center">
|
||||
<p class="text-base group-hover:underline">{{ speaker.name }}</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<img
|
||||
alt="Photo of {{ speaker.name }}"
|
||||
class="object-cover flex-shrink-0 rounded-full shadow-lg size-20 lg:size-32 xl:size-24"
|
||||
src="{{ speaker.imageUrl }}"
|
||||
/>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
13
_finish/source/_layouts/app.html.twig
Normal file
|
@ -0,0 +1,13 @@
|
|||
<!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>
|
||||
<link rel="stylesheet" href="/build/tailwind.css">
|
||||
</head>
|
||||
<body class="font-sans text-lg text-gray-800">
|
||||
{% block body %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
9
_finish/source/_layouts/default.html.twig
Normal file
|
@ -0,0 +1,9 @@
|
|||
{% extends 'app' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="p-10 mx-auto max-w-4xl">
|
||||
{% block content_wrapper %}
|
||||
{% block content %}{% endblock %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
34
_finish/source/_layouts/speaker.html.twig
Normal file
|
@ -0,0 +1,34 @@
|
|||
{% extends 'default' %}
|
||||
|
||||
{% block content_wrapper %}
|
||||
<h1 class="text-3xl font-bold text-center md:text-left">{{ page.name }}</h1>
|
||||
|
||||
<div class="mt-6">
|
||||
<img
|
||||
alt="Photo of {{ page.name }}"
|
||||
class="object-cover flex-shrink-0 rounded-full shadow-lg size-40"
|
||||
src="{{ page.imageUrl }}"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="mt-10">
|
||||
<em>{{ block('content') }}</em>
|
||||
</div>
|
||||
|
||||
{% set talks = site.talks|filter(talk => talk.speaker == page.name) %}
|
||||
{% if talks is not empty %}
|
||||
<section class="mt-10">
|
||||
<h2 class="text-2xl font-bold">Talks <span class="sr-only"> by {{ page.name }}</span></h2>
|
||||
|
||||
<div class="mt-6">
|
||||
<ul class="pl-4 list-disc">
|
||||
{% for talk in talks %}
|
||||
<li>
|
||||
<a class="hover:underline" href="#0">{{ talk.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endblock %}
|
4
_finish/source/_speakers/ciaran-mcnulty.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
name: Ciaran McNulty
|
||||
imageUrl: /images/ciaran.jpg
|
||||
---
|
4
_finish/source/_speakers/dan-leech.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
name: Dan Leech
|
||||
imageUrl: /images/highres_257208698.jpeg
|
||||
---
|
6
_finish/source/_speakers/dave-liddament.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
name: Dave Liddament
|
||||
imageUrl: /images/highres_203797572.jpeg
|
||||
---
|
||||
|
||||
Director and Developer at Lamp Bristol. PHP, Java and Python software developer.
|
4
_finish/source/_speakers/derick-rethans.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
name: Derick Rethans
|
||||
imageUrl: /images/highres_276685584.jpeg
|
||||
---
|
6
_finish/source/_speakers/james-titcumb.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
name: James Titcumb
|
||||
imageUrl: /images/highres_134740252.jpeg
|
||||
---
|
||||
|
||||
James is the founder of the UK based PHP Hampshire user group, a Zend Certified Engineer and Development Manager at Protected.co.uk.
|
6
_finish/source/_speakers/mike-karthauser.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
name: Mike Karthauser
|
||||
imageUrl: /images/highres_80709042.jpeg
|
||||
---
|
||||
|
||||
Dev since '98. PHP since '03.
|
4
_finish/source/_speakers/naomi-gotts.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
name: Naomi Gotts
|
||||
imageUrl: /images/highres_311941362.jpeg
|
||||
---
|
4
_finish/source/_speakers/nigel-dunn.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
name: Nigel Dunn
|
||||
imageUrl: /images/highres_131268052.jpeg
|
||||
---
|
6
_finish/source/_speakers/oliver-davies.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
name: Oliver Davies
|
||||
imageUrl: /images/highres_317091329.jpeg
|
||||
---
|
||||
|
||||
Full Stack Software Consultant. Drupal and PHP expert.
|
6
_finish/source/_speakers/rob-allen.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
name: Rob Allen
|
||||
imageUrl: /images/highres_312615346.jpeg
|
||||
---
|
||||
|
||||
PHP developer from Worcester.
|
6
_finish/source/_speakers/robin-hodson.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
name: Robin Hodson
|
||||
imageUrl: /images/highres_243972257.jpeg
|
||||
---
|
||||
|
||||
Ready to look for coding/hardware work post-lockdown, now largely recovered from stressful experiences. Accepted work from the government in September/October; currently realigning goals plus getting things I've been working on a bit more tangible.
|
4
_finish/source/_speakers/ryan-lee.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
name: Ryan Lee
|
||||
imageUrl: /images/highres_273691940.jpeg
|
||||
---
|
BIN
_finish/source/images/ciaran.jpg
Normal file
After Width: | Height: | Size: 52 KiB |
BIN
_finish/source/images/highres_131268052.jpeg
Normal file
After Width: | Height: | Size: 9.5 KiB |
BIN
_finish/source/images/highres_134740252.jpeg
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
_finish/source/images/highres_203797572.jpeg
Normal file
After Width: | Height: | Size: 1.7 MiB |
BIN
_finish/source/images/highres_243972257.jpeg
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
_finish/source/images/highres_257208698.jpeg
Normal file
After Width: | Height: | Size: 758 KiB |
BIN
_finish/source/images/highres_273691940.jpeg
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
_finish/source/images/highres_276685584.jpeg
Normal file
After Width: | Height: | Size: 154 KiB |
BIN
_finish/source/images/highres_311941362.jpeg
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
_finish/source/images/highres_312615346.jpeg
Normal file
After Width: | Height: | Size: 794 KiB |
BIN
_finish/source/images/highres_317091329.jpeg
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
_finish/source/images/highres_80709042.jpeg
Normal file
After Width: | Height: | Size: 7.2 KiB |
9
_finish/source/index.html.twig
Normal file
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
layout: default
|
||||
use: [speakers]
|
||||
---
|
||||
|
||||
{% include 'speakers/recent-speakers' with {
|
||||
speakers: data.speakers,
|
||||
talks: site.talks,
|
||||
} %}
|
|
@ -1,3 +1,5 @@
|
|||
sculpin_content_types:
|
||||
speakers:
|
||||
permalink: /speaker/:basename/
|
||||
posts:
|
||||
enabled: false
|
||||
|
|
|
@ -1,40 +1,39 @@
|
|||
name: 'PHPSW'
|
||||
locale: en
|
||||
|
||||
speakers:
|
||||
-
|
||||
name: Oliver Davies
|
||||
imageUrl: https://secure.meetupstatic.com/photos/member/c/8/8/1/highres_317091329.jpeg
|
||||
-
|
||||
name: Robin Hodson
|
||||
imageUrl: https://secure.meetupstatic.com/photos/member/2/f/e/1/highres_243972257.jpeg
|
||||
-
|
||||
name: Rob Allen
|
||||
imageUrl: https://secure.meetupstatic.com/photos/member/3/b/f/2/highres_312615346.jpeg
|
||||
-
|
||||
name: Dan Leech
|
||||
imageUrl: https://secure.meetupstatic.com/photos/member/b/e/3/a/highres_257208698.jpeg
|
||||
-
|
||||
name: Mike Karthauser
|
||||
imageUrl: https://secure.meetupstatic.com/photos/member/2/3/5/2/highres_80709042.jpeg
|
||||
-
|
||||
name: Nigel Dunn
|
||||
imageUrl: https://secure.meetupstatic.com/photos/member/b/b/b/4/highres_131268052.jpeg
|
||||
-
|
||||
name: Naomi Gotts
|
||||
imageUrl: https://secure.meetupstatic.com/photos/member/5/5/2/highres_311941362.jpeg
|
||||
-
|
||||
name: Ryan Lee
|
||||
imageUrl: https://secure.meetupstatic.com/photos/member/7/c/c/4/highres_273691940.jpeg
|
||||
-
|
||||
name: James Titcumb
|
||||
imageUrl: https://secure.meetupstatic.com/photos/member/9/d/3/c/highres_134740252.jpeg
|
||||
-
|
||||
name: Derick Rethans
|
||||
imageUrl: https://secure.meetupstatic.com/photos/member/6/3/f/0/highres_276685584.jpeg
|
||||
-
|
||||
name: Dave Liddament
|
||||
imageUrl: https://secure.meetupstatic.com/photos/member/9/2/c/4/highres_203797572.jpeg
|
||||
-
|
||||
name: Ciaran McNulty
|
||||
imageUrl: /images/ciaran.jpg
|
||||
talks:
|
||||
- title: Building Static Websites with PHP and Sculpin
|
||||
speaker: Oliver Davies
|
||||
date: 2024-02-14
|
||||
- title: 'FPGA^2: An open-source FPGA'
|
||||
speaker: Robin Hodson
|
||||
date: 2024-02-14
|
||||
- title: Introducing Domain Driven Design
|
||||
speaker: Rob Allen
|
||||
date: 2024-01-10
|
||||
- title: Building Better TUIs (with PHP)
|
||||
speaker: Dan Leech
|
||||
date: 2023-11-08
|
||||
- title: Thoughts on Ubiquitous Language
|
||||
speaker: Rob Allen
|
||||
date: 2023-11-08
|
||||
- title: Testing Legacy
|
||||
speaker: Mike Karthauser
|
||||
date: 2023-11-08
|
||||
- title: Building "Build Configs"
|
||||
speaker: Oliver Davies
|
||||
date: 2023-11-08
|
||||
- title: Terraform from a dev’s perspective
|
||||
speaker: Nigel Dunn
|
||||
date: 2023-10-11
|
||||
- title: What is TDD and why should I care?
|
||||
speaker: Naomi Gotts
|
||||
date: 2023-07-12
|
||||
- title: Go for PHP
|
||||
speaker: Dan Leech
|
||||
date: 2023-02-08
|
||||
- title: What's new in PHP 8.*
|
||||
speaker: Derick Rethans
|
||||
date: 2023-02-11
|
||||
- title: Behaviour Driven Development (BDD) in Practice
|
||||
speaker: Ciaran McNulty
|
||||
date: 2022-09-14
|
||||
|
|
15
build-configs.yaml
Normal file
|
@ -0,0 +1,15 @@
|
|||
name: phpsw-sculpin-demo
|
||||
template: sculpin-site
|
||||
parameters:
|
||||
flake:
|
||||
devshell:
|
||||
packages:
|
||||
- nodejs
|
||||
- php81
|
||||
- php81Packages.composer
|
||||
git:
|
||||
ignore:
|
||||
- '!/assets/'
|
||||
- '/source/build/'
|
||||
experimental:
|
||||
createInclusiveGitIgnoreFile: true
|
18
build.yaml
|
@ -1,18 +0,0 @@
|
|||
name: phpsw-sculpin-demo
|
||||
type: sculpin
|
||||
language: php
|
||||
|
||||
flake:
|
||||
devshell:
|
||||
packages:
|
||||
- nodejs
|
||||
- php81
|
||||
- php81Packages.composer
|
||||
|
||||
git:
|
||||
ignore:
|
||||
- '!/assets/'
|
||||
- '/source/build/'
|
||||
|
||||
experimental:
|
||||
createInclusiveGitIgnoreFile: true
|
31
flake.nix
|
@ -1,26 +1,19 @@
|
|||
# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs.
|
||||
|
||||
{
|
||||
inputs = {
|
||||
devshell.url = "github:numtide/devshell";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
};
|
||||
description = "A Nix Flake for phpsw-sculpin-demo";
|
||||
|
||||
outputs = inputs@{ flake-parts, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
imports = [ inputs.devshell.flakeModule ];
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
systems = [ "x86_64-linux" ];
|
||||
outputs = { nixpkgs, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
||||
perSystem = { config, self', inputs', pkgs, system, ... }: {
|
||||
devshells.default = {
|
||||
packages = with pkgs; [
|
||||
"just"
|
||||
"nodejs"
|
||||
"php81"
|
||||
"php81Packages.composer"
|
||||
];
|
||||
};
|
||||
};
|
||||
inherit (pkgs) mkShell;
|
||||
in {
|
||||
devShells.${system}.default =
|
||||
mkShell { buildInputs = with pkgs; [ nodejs php81 php81Packages.composer ]; };
|
||||
|
||||
formatter.${system} = pkgs.nixfmt;
|
||||
};
|
||||
}
|
||||
|
|
36
justfile
|
@ -1,36 +0,0 @@
|
|||
_default:
|
||||
just --list
|
||||
|
||||
build-css:
|
||||
#!/usr/bin/env bash
|
||||
args=()
|
||||
|
||||
if [[ "${NODE_ENV:-}" == "production" ]]; then
|
||||
args=(--minify)
|
||||
else
|
||||
args=(--watch)
|
||||
fi
|
||||
|
||||
npx tailwindcss \
|
||||
--config assets/tailwind.config.ts \
|
||||
--output source/build/tailwind.css "${args[@]}"
|
||||
|
||||
clean:
|
||||
rm -fr output_*/ source/build/
|
||||
|
||||
generate *args:
|
||||
#!/usr/bin/env bash
|
||||
args=()
|
||||
|
||||
if [[ "${APP_ENV:-}" == "production" ]]; then
|
||||
args=(--env="prod")
|
||||
else
|
||||
args=(--server --watch)
|
||||
fi
|
||||
|
||||
./vendor/bin/sculpin generate "${args[@]}" {{ args }}
|
||||
|
||||
start *args:
|
||||
just generate {{ args }} \
|
||||
& just build-css \
|
||||
& wait
|
16
notes.txt
Normal file
|
@ -0,0 +1,16 @@
|
|||
Install dependencies:
|
||||
|
||||
composer install
|
||||
npm install
|
||||
|
||||
Build the CSS:
|
||||
|
||||
./vendor/bin/sculpin generate -e prod
|
||||
npx tailwindcss -c assets/tailwind.config.ts -o source/build/tailwind.css
|
||||
NODE_ENV=production npx tailwindcss -c assets/tailwind.config.ts -o source/build/tailwind.css
|
||||
|
||||
Generate the site:
|
||||
|
||||
./vendor/bin/sculpin generate -e prod
|
||||
|
||||
rsync -avz output_prod ssh.oliverdavies.uk:~/phpsw-sculpin-demo
|
43
run
Executable file
|
@ -0,0 +1,43 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs.
|
||||
|
||||
set -o errexit
|
||||
set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
PATH="${PATH}:./vendor/bin"
|
||||
|
||||
# Generate the site.
|
||||
function generate {
|
||||
local args=()
|
||||
|
||||
if [[ "${APP_ENV:-}" == "production" ]]; then
|
||||
args=(--env="prod")
|
||||
else
|
||||
args=(--server --watch)
|
||||
fi
|
||||
|
||||
sculpin generate "${args[@]}" "${@}"
|
||||
}
|
||||
|
||||
function help {
|
||||
printf "%s <task> [args]\n\nTasks:\n" "${0}"
|
||||
|
||||
compgen -A function | grep -v "^_" | cat -n
|
||||
|
||||
printf "\nExtended help:\n Each task has comments for general usage\n"
|
||||
}
|
||||
|
||||
# Start the project.
|
||||
function start {
|
||||
sculpin generate --server --watch "${@}"
|
||||
}
|
||||
|
||||
# Include any local tasks.
|
||||
[[ -e run.local ]] && source run.local
|
||||
|
||||
TIMEFORMAT="Task completed in %3lR"
|
||||
time "${@:-help}"
|
||||
|
||||
# vim: ft=bash
|
148
snippets.lua
Normal file
|
@ -0,0 +1,148 @@
|
|||
local fmt = require("luasnip.extras.fmt").fmt
|
||||
local ls = require "luasnip"
|
||||
|
||||
local s = ls.snippet
|
||||
local t = ls.text_node
|
||||
|
||||
ls.add_snippets("twig", {
|
||||
s(
|
||||
"sortdate",
|
||||
fmt(
|
||||
[[
|
||||
{{% set speakersAndDates = [] %}}
|
||||
|
||||
{{% for speaker in speakers %}}
|
||||
{{% set talksForSpeaker = talks|default([])|filter(talk =>> talk.speaker == speaker.name) %}}
|
||||
|
||||
{{% set mostRecentTalk = talksForSpeaker|first %}}
|
||||
|
||||
{{% set speakersAndDates = speakersAndDates|merge([{{
|
||||
date: mostRecentTalk.date,
|
||||
speaker,
|
||||
}}]) %}}
|
||||
{{% endfor %}}
|
||||
|
||||
{{% set sortedSpeakers = speakersAndDates|sort((a, b) => b.date <=> a.date) %}}
|
||||
|
||||
{{% for speaker in sortedSpeakers|column('speaker') %}}
|
||||
]],
|
||||
{}
|
||||
)
|
||||
),
|
||||
|
||||
s("sortname", { t "{% for speaker in site.speakers|sort((a, b) => a.name <=> b.name) %}" }),
|
||||
|
||||
s(
|
||||
"speakerpage",
|
||||
fmt(
|
||||
[[
|
||||
{{% block content_wrapper %}}
|
||||
<h1 class="text-3xl font-bold text-center md:text-left">{{{{ page.name }}}}</h1>
|
||||
|
||||
<div class="mt-6">
|
||||
<img
|
||||
alt="Photo of {{{{ page.name }}}}"
|
||||
class="object-cover flex-shrink-0 rounded-full shadow-lg size-40"
|
||||
src="{{{{ page.imageUrl }}}}"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="mt-10">
|
||||
<em>{{{{ block('content') }}}}</em>
|
||||
</div>
|
||||
{{% endblock %}}
|
||||
]],
|
||||
{}
|
||||
)
|
||||
),
|
||||
|
||||
s(
|
||||
"speaker",
|
||||
fmt(
|
||||
[[
|
||||
<div>
|
||||
<a href="#" class="flex flex-col-reverse gap-3 items-center group">
|
||||
<div class="text-center">
|
||||
<p class="text-base group-hover:underline">{{{{ speaker.name }}}}</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<img
|
||||
alt="Photo of {{{{ speaker.name }}}}"
|
||||
class="object-cover flex-shrink-0 rounded-full shadow-lg size-20 lg:size-32 xl:size-24"
|
||||
src="{{{{ speaker.imageUrl }}}}" /> </div>
|
||||
</a>
|
||||
</div>
|
||||
]],
|
||||
{}
|
||||
)
|
||||
),
|
||||
|
||||
s(
|
||||
"speakers",
|
||||
fmt(
|
||||
[[
|
||||
<section>
|
||||
<h2 class="text-3xl font-bold text-center">Speakers</h2>
|
||||
|
||||
<div class="mt-8">
|
||||
<div class="grid grid-cols-2 gap-10 px-4 mx-auto max-w-sm md:grid-cols-3 md:max-w-md lg:grid-cols-4 lg:gap-8 lg:max-w-full xl:grid-cols-6">
|
||||
{{% for speaker in site.speakers %}}
|
||||
|
||||
{{% endfor %}}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
]],
|
||||
{}
|
||||
)
|
||||
),
|
||||
})
|
||||
|
||||
ls.add_snippets("yaml", {
|
||||
s(
|
||||
"talks",
|
||||
fmt(
|
||||
[[
|
||||
talks:
|
||||
- title: Building Static Websites with PHP and Sculpin
|
||||
speaker: Oliver Davies
|
||||
date: 2024-02-14
|
||||
- title: 'FPGA^2: An open-source FPGA'
|
||||
speaker: Robin Hodson
|
||||
date: 2024-02-14
|
||||
- title: Introducing Domain Driven Design
|
||||
speaker: Rob Allen
|
||||
date: 2024-01-10
|
||||
- title: Building Better TUIs (with PHP)
|
||||
speaker: Dan Leech
|
||||
date: 2023-11-08
|
||||
- title: Thoughts on Ubiquitous Language
|
||||
speaker: Rob Allen
|
||||
date: 2023-11-08
|
||||
- title: Testing Legacy
|
||||
speaker: Mike Karthauser
|
||||
date: 2023-11-08
|
||||
- title: Building "Build Configs"
|
||||
speaker: Oliver Davies
|
||||
date: 2023-11-08
|
||||
- title: Terraform from a dev’s perspective
|
||||
speaker: Nigel Dunn
|
||||
date: 2023-10-11
|
||||
- title: What is TDD and why should I care?
|
||||
speaker: Naomi Gotts
|
||||
date: 2023-07-12
|
||||
- title: Go for PHP
|
||||
speaker: Dan Leech
|
||||
date: 2023-02-08
|
||||
- title: What's new in PHP 8.*
|
||||
speaker: Derick Rethans
|
||||
date: 2023-02-11
|
||||
- title: Behaviour Driven Development (BDD) in Practice
|
||||
speaker: Ciaran McNulty
|
||||
date: 2022-09-14
|
||||
]],
|
||||
{}
|
||||
)
|
||||
),
|
||||
})
|
41
source/_includes/speakers/recent-speakers.html.twig
Normal file
|
@ -0,0 +1,41 @@
|
|||
{% if speakers is not empty %}
|
||||
<section>
|
||||
<h2 class="text-3xl font-bold text-center">Speakers</h2>
|
||||
|
||||
<div class="mt-8">
|
||||
<div class="grid grid-cols-2 gap-10 px-4 mx-auto max-w-sm md:grid-cols-3 md:max-w-md lg:grid-cols-4 lg:gap-8 lg:max-w-full xl:grid-cols-6">
|
||||
{% set speakersAndDates = [] %}
|
||||
|
||||
{% for speaker in speakers %}
|
||||
{% set talksForSpeaker = talks|default([])|filter(talk => talk.speaker == speaker.name) %}
|
||||
{% set mostRecentTalk = talksForSpeaker|first %}
|
||||
|
||||
{% set speakersAndDates = speakersAndDates|merge([{
|
||||
date: mostRecentTalk.date,
|
||||
speaker,
|
||||
}]) %}
|
||||
{% endfor %}
|
||||
|
||||
{% set sortedSpeakers = speakersAndDates|sort((a, b) => b.date <=> a.date) %}
|
||||
|
||||
{% for speaker in sortedSpeakers|column('speaker') %}
|
||||
<div>
|
||||
<a href="{{ speaker.url }}" class="flex flex-col-reverse gap-3 items-center group">
|
||||
<div class="text-center">
|
||||
<p class="text-base group-hover:underline">{{ speaker.name }}</p>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<img
|
||||
alt="Photo of {{ speaker.name }}"
|
||||
class="object-cover flex-shrink-0 rounded-full shadow-lg size-20 lg:size-32 xl:size-24"
|
||||
src="{{ speaker.imageUrl }}"
|
||||
/>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
{% block body %}
|
||||
<div class="p-10 mx-auto max-w-4xl">
|
||||
{% block content_wrapper %}
|
||||
{% block content %}{% endblock %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
|
34
source/_layouts/speaker.html.twig
Normal file
|
@ -0,0 +1,34 @@
|
|||
{% extends 'default' %}
|
||||
|
||||
{% block content_wrapper %}
|
||||
<h1 class="text-3xl font-bold text-center md:text-left">{{ page.name }}</h1>
|
||||
|
||||
<div class="mt-6">
|
||||
<img
|
||||
alt="Photo of {{ page.name }}"
|
||||
class="object-cover flex-shrink-0 rounded-full shadow-lg size-40"
|
||||
src="{{ page.imageUrl }}"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="mt-10">
|
||||
<em>{{ block('content') }}</em>
|
||||
</div>
|
||||
|
||||
{% set talks = site.talks|filter(talk => talk.speaker == page.name) %}
|
||||
{% if talks is not empty %}
|
||||
<section class="mt-10">
|
||||
<h2 class="text-2xl font-bold">Talks <span class="sr-only"> by {{ page.name }}</span></h2>
|
||||
|
||||
<div class="mt-6">
|
||||
<ul class="pl-4 list-disc">
|
||||
{% for talk in talks %}
|
||||
<li>
|
||||
<a class="hover:underline" href="#0">{{ talk.title }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endblock %}
|
4
source/_speakers/ciaran-mcnulty.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
name: Ciaran McNulty
|
||||
imageUrl: /images/ciaran.jpg
|
||||
---
|
4
source/_speakers/dan-leech.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
name: Dan Leech
|
||||
imageUrl: /images/highres_257208698.jpeg
|
||||
---
|
6
source/_speakers/dave-liddament.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
name: Dave Liddament
|
||||
imageUrl: /images/highres_203797572.jpeg
|
||||
---
|
||||
|
||||
Director and Developer at Lamp Bristol. PHP, Java and Python software developer.
|
4
source/_speakers/derick-rethans.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
name: Derick Rethans
|
||||
imageUrl: /images/highres_276685584.jpeg
|
||||
---
|
6
source/_speakers/james-titcumb.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
name: James Titcumb
|
||||
imageUrl: /images/highres_134740252.jpeg
|
||||
---
|
||||
|
||||
James is the founder of the UK based PHP Hampshire user group, a Zend Certified Engineer and Development Manager at Protected.co.uk.
|
6
source/_speakers/mike-karthauser.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
name: Mike Karthauser
|
||||
imageUrl: /images/highres_80709042.jpeg
|
||||
---
|
||||
|
||||
Dev since '98. PHP since '03.
|
4
source/_speakers/naomi-gotts.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
name: Naomi Gotts
|
||||
imageUrl: /images/highres_311941362.jpeg
|
||||
---
|
4
source/_speakers/nigel-dunn.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
name: Nigel Dunn
|
||||
imageUrl: /images/highres_131268052.jpeg
|
||||
---
|
6
source/_speakers/oliver-davies.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
name: Oliver Davies
|
||||
imageUrl: /images/highres_317091329.jpeg
|
||||
---
|
||||
|
||||
Full Stack Software Consultant. Drupal and PHP expert.
|
6
source/_speakers/rob-allen.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
name: Rob Allen
|
||||
imageUrl: /images/highres_312615346.jpeg
|
||||
---
|
||||
|
||||
PHP developer from Worcester.
|
6
source/_speakers/robin-hodson.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
name: Robin Hodson
|
||||
imageUrl: /images/highres_243972257.jpeg
|
||||
---
|
||||
|
||||
Ready to look for coding/hardware work post-lockdown, now largely recovered from stressful experiences. Accepted work from the government in September/October; currently realigning goals plus getting things I've been working on a bit more tangible.
|
4
source/_speakers/ryan-lee.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
name: Ryan Lee
|
||||
imageUrl: /images/highres_273691940.jpeg
|
||||
---
|
BIN
source/images/highres_131268052.jpeg
Normal file
After Width: | Height: | Size: 9.5 KiB |
BIN
source/images/highres_134740252.jpeg
Normal file
After Width: | Height: | Size: 32 KiB |
BIN
source/images/highres_203797572.jpeg
Normal file
After Width: | Height: | Size: 1.7 MiB |
BIN
source/images/highres_243972257.jpeg
Normal file
After Width: | Height: | Size: 41 KiB |
BIN
source/images/highres_257208698.jpeg
Normal file
After Width: | Height: | Size: 758 KiB |
BIN
source/images/highres_273691940.jpeg
Normal file
After Width: | Height: | Size: 49 KiB |
BIN
source/images/highres_276685584.jpeg
Normal file
After Width: | Height: | Size: 154 KiB |
BIN
source/images/highres_311941362.jpeg
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
source/images/highres_312615346.jpeg
Normal file
After Width: | Height: | Size: 794 KiB |
BIN
source/images/highres_317091329.jpeg
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
source/images/highres_80709042.jpeg
Normal file
After Width: | Height: | Size: 7.2 KiB |
9
source/index.html.twig
Normal file
|
@ -0,0 +1,9 @@
|
|||
---
|
||||
layout: default
|
||||
use: [speakers]
|
||||
---
|
||||
|
||||
{% include 'speakers/recent-speakers' with {
|
||||
speakers: data.speakers,
|
||||
talks: site.talks,
|
||||
} %}
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
layout: default
|
||||
---
|
||||
|
||||
Hello, PHPSW!
|