Compare commits

...

No commits in common. "start" and "main" have entirely different histories.
start ... main

56 changed files with 268 additions and 1557 deletions

View file

@ -1,17 +0,0 @@
# 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

25
.gitignore vendored
View file

@ -1,15 +1,18 @@
# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs. /.phpunit.result.cache
/output_*/
/vendor/
/* /.direnv/
!/.gitignore /source/build/*
!/app/ !/source/build/.keep
!/build.yaml
!/composer.{json,lock}
!/justfile
!/source/
!/flake.{nix,lock} # Devenv
.devenv*
devenv.local.nix
!/assets/ # direnv
/source/build/ .direnv
# pre-commit
.pre-commit-config.yaml

12
.tmux-sessionizer Executable file
View file

@ -0,0 +1,12 @@
#!/usr/bin/env bash
export PATH="${PATH}:./vendor"
tmux new-window -dn shell
tmux new-window -dn server
tmux send-keys -t server "sculpin generate --server --watch" Enter
xdg-open http://localhost:8000
nvim

View file

@ -1,3 +1,7 @@
sculpin_content_types: sculpin_content_types:
posts: speakers:
enabled: false permalink: /speakers/:basename/
talks:
permalink: /talks/:basename/
posts:
enabled: false

View file

@ -1,40 +1,2 @@
name: 'PHPSW' name: 'PHP Thames Valley'
locale: en 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

View file

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

View file

@ -1,14 +0,0 @@
import type { Config } from 'tailwindcss'
export default {
content: ['./source/**/*.{html,md,twig}'],
theme: {
extend: {
fontFamily: {
sans: ['Inter', 'sans-serif'],
}
},
},
plugins: [],
} satisfies Config

View file

@ -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

117
flake.lock generated
View file

@ -1,104 +1,16 @@
{ {
"nodes": { "nodes": {
"devshell": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1705332421,
"narHash": "sha256-USpGLPme1IuqG78JNqSaRabilwkCyHmVWY0M9vYyqEA=",
"owner": "numtide",
"repo": "devshell",
"rev": "83cb93d6d063ad290beee669f4badf9914cc16ec",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1706569497,
"narHash": "sha256-oixb0IDb5eZYw6BaVr/R/1pSoMh4rfJHkVnlgeRIeZs=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "60c614008eed1d0383d21daac177a3e036192ed8",
"type": "github"
},
"original": {
"id": "flake-parts",
"type": "indirect"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1704161960, "lastModified": 1740828860,
"narHash": "sha256-QGua89Pmq+FBAro8NriTuoO/wNaUtugt29/qqA8zeeM=", "narHash": "sha256-cjbHI+zUzK5CPsQZqMhE3npTyYFt9tJ3+ohcfaOF/WM=",
"owner": "NixOS", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "63143ac2c9186be6d9da6035fa22620018c85932", "rev": "303bd8071377433a2d8f76e684ec773d70c5b642",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1703961334,
"narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1706550542,
"narHash": "sha256-UcsnCG6wx++23yeER4Hg18CXWbgNpqNXcHIo5/1Y+hc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "97b17f32362e475016f942bbdfda4a4a72a8a652",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
@ -106,24 +18,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"devshell": "devshell", "nixpkgs": "nixpkgs"
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs_2"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
} }
} }
}, },

View file

@ -1,26 +1,22 @@
# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs.
{ {
inputs = { inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
devshell.url = "github:numtide/devshell";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = inputs@{ flake-parts, ... }: outputs =
flake-parts.lib.mkFlake { inherit inputs; } { { nixpkgs, ... }:
imports = [ inputs.devshell.flakeModule ]; let
system = "x86_64-linux";
systems = [ "x86_64-linux" ]; pkgs = import nixpkgs { inherit system; };
in
perSystem = { config, self', inputs', pkgs, system, ... }: { {
devshells.default = { devShells.${system}.default =
packages = with pkgs; [ with pkgs;
"just" mkShell {
"nodejs" buildInputs = [
"php81" php83
"php81Packages.composer" php83Packages.composer
]; ];
}; };
};
formatters.${system} = pkgs.nixfmt-rfc-style;
}; };
} }

View file

@ -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

12
notes.txt Normal file
View file

@ -0,0 +1,12 @@
http://localhost:8000/speakers/rob-allen
http://localhost:8000/talks/tuis
- Enable speaker and talk content types.
- Build list of all talks.
- Sort list of talks by date.
- Show speaker name on a talk.
- Link from talk to speaker page.
- Show speaker information.
- Show other talks by the same speaker.
- Extending Sculpin with custom Twig extensions.

1260
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,5 +0,0 @@
{
"dependencies": {
"tailwindcss": "^3.4.0"
}
}

View file

@ -1,13 +0,0 @@
<!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>

View file

@ -0,0 +1,19 @@
<!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="/css/styles.css">
</head>
<body>
<div class="container">
{% block content_wrapper %}
<h1>{{ page.title }}</h1>
{% block content %}{% endblock %}
{% endblock %}
</div>
</body>
</html>

View file

@ -1,7 +0,0 @@
{% extends 'app' %}
{% block body %}
<div class="p-10 mx-auto max-w-4xl">
{% block content %}{% endblock %}
</div>
{% endblock %}

View file

@ -0,0 +1,19 @@
{% extends 'base' %}
{% block content_wrapper %}
<h1>{{ page.name }}</h1>
<img style="height: 50px; width: 50px;" src="{{ page.imageUrl }}"/>
{% block content %}{% endblock %}
<hr>
{% for talk in data.talks if talk.speakers.0 == page.name %}
<li>
<a href="{{ talk.url }}">
{{ talk.title }}
</a>
</li>
{% endfor %}
{% endblock %}

View file

@ -0,0 +1,11 @@
{% extends 'base' %}
{% block content_wrapper %}
<h1>{{ page.title }}</h1>
{{ page.date|date('jS F Y') }}
{% for speaker in page.speakers %}
{{ speaker }}
{% endfor %}
{% endblock %}

View file

@ -0,0 +1,4 @@
---
name: Ciaran McNulty
imageUrl: /images/ciaran.jpg
---

View file

@ -0,0 +1,6 @@
---
name: Dan Leech
imageUrl: /images/highres_257208698.jpeg
layout: speaker
use: [talks]
---

View 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.

View file

@ -0,0 +1,4 @@
---
name: Derick Rethans
imageUrl: /images/highres_276685584.jpeg
---

View 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.

View file

@ -0,0 +1,6 @@
---
name: Mike Karthauser
imageUrl: /images/highres_80709042.jpeg
---
Dev since '98. PHP since '03.

View file

@ -0,0 +1,4 @@
---
name: Naomi Gotts
imageUrl: /images/highres_311941362.jpeg
---

View file

@ -0,0 +1,4 @@
---
name: Nigel Dunn
imageUrl: /images/highres_131268052.jpeg
---

View file

@ -0,0 +1,6 @@
---
name: Oliver Davies
imageUrl: /images/highres_317091329.jpeg
---
Full Stack Software Consultant. Drupal and PHP expert.

View file

@ -0,0 +1,6 @@
---
name: Rob Allen
imageUrl: /images/highres_312615346.jpeg
---
PHP developer from Worcester.

View 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.

View file

@ -0,0 +1,4 @@
---
name: Ryan Lee
imageUrl: /images/highres_273691940.jpeg
---

6
source/_talks/bdd.md Normal file
View file

@ -0,0 +1,6 @@
---
title: Behaviour Driven Development (BDD) in Practice
date: 2022-09-14
speakers:
- Ciaran McNulty
---

View file

@ -0,0 +1,6 @@
---
title: Building "Build Configs"
date: 2023-11-08
speakers:
- Oliver Davies
---

6
source/_talks/ddd.md Normal file
View file

@ -0,0 +1,6 @@
---
title: Introducing Domain Driven Design
date: 2024-01-10
speakers:
- Rob Allen
---

6
source/_talks/fpga.md Normal file
View file

@ -0,0 +1,6 @@
---
title: 'FPGA^2: An open-source FPGA'
date: 2024-02-14
speakers:
- Robin Hodson
---

6
source/_talks/go.md Normal file
View file

@ -0,0 +1,6 @@
---
title: Go for PHP
date: 2023-02-08
speakers:
- Dan Leech
---

6
source/_talks/php-8.md Normal file
View file

@ -0,0 +1,6 @@
---
title: What's new in PHP 8.*
date: 2023-02-11
speakers:
- Derick Rethans
---

6
source/_talks/sculpin.md Normal file
View file

@ -0,0 +1,6 @@
---
title: Building Static Websites with PHP and Sculpin
date: 2024-02-14
speakers:
- Oliver Davies
---

6
source/_talks/tdd.md Normal file
View file

@ -0,0 +1,6 @@
---
title: What is TDD and why should I care?
date: 2023-07-12
speakers:
- Naomi Gotts
---

View file

@ -0,0 +1,6 @@
---
title: Terraform from a devs perspective
date: 2023-10-11
speakers:
- Nigel Dunn
---

View file

@ -0,0 +1,6 @@
---
title: Testing Legacy
date: 2023-11-08
speakers:
- Mike Karthauser
---

6
source/_talks/tuis.md Normal file
View file

@ -0,0 +1,6 @@
---
title: Building Better TUIs (with PHP)
date: 2023-11-08
speakers:
- Dan Leech
---

View file

@ -0,0 +1,6 @@
---
title: Thoughts on Ubiquitous Language
date: 2023-11-08
speakers:
- Rob Allen
---

5
source/css/styles.css Normal file
View file

@ -0,0 +1,5 @@
.container {
margin: 0 auto;
max-width: 768px;
padding: 0 1rem;
}

Binary file not shown.

After

(image error) Size: 9.5 KiB

Binary file not shown.

After

(image error) Size: 32 KiB

Binary file not shown.

After

(image error) Size: 1.7 MiB

Binary file not shown.

After

(image error) Size: 41 KiB

Binary file not shown.

After

(image error) Size: 758 KiB

Binary file not shown.

After

(image error) Size: 49 KiB

Binary file not shown.

After

(image error) Size: 154 KiB

Binary file not shown.

After

(image error) Size: 24 KiB

Binary file not shown.

After

(image error) Size: 794 KiB

Binary file not shown.

After

(image error) Size: 22 KiB

Binary file not shown.

After

(image error) Size: 7.2 KiB

View file

@ -1,5 +1,15 @@
--- ---
layout: default layout: base
title: Hello, PHP Thames Valley!
use: [talks]
--- ---
Hello, PHPSW! <ul>
{% for talk in data.talks %}
<li>
<a href="{{ talk.url }}">
{{ talk.title }}
</a>
</li>
{% endfor %}
</ul>