Create Home page

This commit is contained in:
Oliver Davies 2024-01-03 20:00:00 +00:00
commit cd59c54aa8
18 changed files with 4006 additions and 0 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
.direnv/
output_*/
vendor/

24
.tmux Executable file
View file

@ -0,0 +1,24 @@
#!/usr/bin/env bash
set -o errexit
set -o nounset
session_name="${1:-oliverdavies_sculpin}"
session_path="${2:-$(pwd)}"
if tmux has-session -t="${session_name}" 2> /dev/null; then
tmux attach -t "${session_name}"
exit
fi
tmux new-session -d -s "${session_name}" -n vim -c "${session_path}"
# 1. Main window: Vim
tmux send-keys -t "${session_name}:vim" "nvim +GoToFile" Enter
# vendor/bin/sculpin generate --server --watch
# 2. General shell use.
tmux new-window -t "${session_name}" -c "${session_path}"
tmux switch-client -t "${session_name}:vim.left" ||
tmux attach -t "${session_name}:vim.left"

4
TODO.md Normal file
View file

@ -0,0 +1,4 @@
# TODOs
- Add and configure Tailwind CSS.
- Style the Home page.

14
app/SculpinKernel.php Normal file
View file

@ -0,0 +1,14 @@
<?php
use Opdavies\Sculpin\Bundle\TwigMarkdownBundle\SculpinTwigMarkdownBundle;
use Sculpin\Bundle\SculpinBundle\HttpKernel\AbstractKernel;
class SculpinKernel extends AbstractKernel
{
protected function getAdditionalSculpinBundles(): array
{
return [
SculpinTwigMarkdownBundle::class,
];
}
}

View file

@ -0,0 +1,3 @@
sculpin_content_types:
posts:
enabled: false

View file

@ -0,0 +1,42 @@
menu_links:
-
title: About
url: /
-
title: Press Info
url: /press
-
title: Services
url: /services
-
title: Talks
url: /talks
-
title: Podcast
url: /podcast
-
title: Daily list
url: /daily
testimonials:
-
text: |-
Oliver's approach to testing is a continual reminder of his commitment to delivering high-quality, bug-free, software.
name: Mike Karthauser
title: Senior Software Engineer
image:
url: https://www.oliverdavies.uk/images/recommendations/mike-karthauser.jpg
-
text: |-
I've wanted to explore testing for a while, but as a PHP developer with 10 years of Drupal experience who'd written next to no tests, I really needed guidance. Oliver's expertise in testing and TDD motivated me to seek his help.
Before our call, I'd started writing tests for my modules but needed direction, understanding the code to a degree but needing help with approach. Oliver clarified both unit and integration testing, providing solutions for my challenges, and shared his code for inspiration and help. He also gave me ideas on how to utilise contrib code to help me further.
Consulting with an expert, I gained the clarity and confidence I needed in tackling testing with structured, maintainable practices. Oliver's adaptability and tailored services make him highly recommendable.
Thanks, Oliver - I feel empowered and know exactly what approach to take now!
name: Tawny Bartlett
title: Senior Drupal Developer
url: https://www.playingwithpixels.co.uk
image:
url: https://www.oliverdavies.uk/images/recommendations/tawny.jpg

View file

@ -0,0 +1,3 @@
imports:
- sculpin_site.yml
url: https://www.oliverdavies.uk

11
composer.json Normal file
View file

@ -0,0 +1,11 @@
{
"require": {
"sculpin/sculpin": "^3.2",
"opdavies/sculpin-twig-markdown-bundle": "^0.2.0"
},
"config": {
"allow-plugins": {
"sculpin/sculpin-theme-composer-plugin": true
}
}
}

3655
composer.lock generated Normal file

File diff suppressed because it is too large Load diff

114
flake.lock generated Normal file
View file

@ -0,0 +1,114 @@
{
"nodes": {
"devshell": {
"inputs": {
"nixpkgs": "nixpkgs",
"systems": "systems"
},
"locked": {
"lastModified": 1695195896,
"narHash": "sha256-pq9q7YsGXnQzJFkR5284TmxrLNFc0wo4NQ/a5E93CQU=",
"owner": "numtide",
"repo": "devshell",
"rev": "05d40d17bf3459606316e3e9ec683b784ff28f16",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1693611461,
"narHash": "sha256-aPODl8vAgGQ0ZYFIRisxYG5MOGSkIczvu2Cd8Gb9+1Y=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "7f53fdb7bdc5bb237da7fefef12d099e4fd611ca",
"type": "github"
},
"original": {
"id": "flake-parts",
"type": "indirect"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1677383253,
"narHash": "sha256-UfpzWfSxkfXHnb4boXZNaKsAcUrZT9Hw+tao1oZxd08=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9952d6bc395f5841262b006fbace8dd7e143b634",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1693471703,
"narHash": "sha256-0l03ZBL8P1P6z8MaSDS/MvuU8E75rVxe5eE1N6gxeTo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3e52e76b70d5508f3cec70b882a29199f4d1ee85",
"type": "github"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1703200384,
"narHash": "sha256-q5j06XOsy0qHOarsYPfZYJPWbTbc8sryRxianlEPJN0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0b3d618173114c64ab666f557504d6982665d328",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"devshell": "devshell",
"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"
}
}
},
"root": "root",
"version": 7
}

21
flake.nix Normal file
View file

@ -0,0 +1,21 @@
{
description = "oliverdavies.uk-sculpin";
inputs = {
devshell.url = "github:numtide/devshell";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
};
outputs = inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [ inputs.devshell.flakeModule ];
systems = [ "x86_64-linux" ];
perSystem = { config, self', inputs', pkgs, system, ... }: {
devshells.default = {
packages = with pkgs; [ "php81" "php81Packages.composer" ];
};
};
};
}

33
run Executable file
View file

@ -0,0 +1,33 @@
#!/usr/bin/env bash
set -o nounset
set -o pipefail
function clean {
rm -fr output_*/ vendor/
}
function generate {
rm -rf output_*/
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"
}
TIMEFORMAT="Task completed in %3lR"
time "${@:-help}"

View file

@ -0,0 +1,8 @@
<section>
<h2>About me</h2>
<div>
<img src="https://www.oliverdavies.uk/images/social-avatar.jpg" alt="Picture of Oliver">
<p>I'm an Acquia-certified Drupal Triple Expert with 16 years of experience, an open-source software maintainer and Drupal core contributor, <a href="/talks">public speaker</a>, and host of the <a href="/podcast">Beyond Blocks podcast</a>.</p>
</div>
</section>

View file

@ -0,0 +1,5 @@
<nav>
{% for link in site.menu_links %}
<a href="{{ link.url }}">{{ link.title }}</a>
{% endfor %}
</nav>

View file

@ -0,0 +1,25 @@
<section>
<h2>Testimonials</h2>
<div>
{% for testimonial in site.testimonials %}
<blockquote>
{{ testimonial.text|markdown }}
{% if testimonial.image %}
<img alt="Photo of {{ testimonial.name }}" src="{{ testimonial.image.url }}" />
{% endif %}
<footer>
{% if testimonial.url %}
<a href="{{ testimonial.url }}">
{{ testimonial.name }}, {{ testimonial.title }}
</a>
{% else %}
{{ testimonial.name }}, {{ testimonial.title }}
{% endif %}
</footer>
</blockquote>
{% endfor %}
</div>
</section>

View file

@ -0,0 +1,13 @@
<div>
<main>
<h1>{{ page.title }}</h1>
{% block content %}{% endblock %}
</main>
{% block content_bottom %}{% endblock %}
<footer>
{% include 'main-menu.html.twig' %}
</footer>
<div>

27
source/index.md Normal file
View file

@ -0,0 +1,27 @@
---
layout: default
title: Do you need a certified Drupal expert, core contributor and module maintainer?
---
{% block content %}
## What I can help you with
If you are stuck on an unsupported version of Drupal, such as 7, 8 or 9, and don't know what's involved in upgrading, [book a Drupal upgrade consultation call][call] or [roadmap for your website][roadmap].
If you need help or another pair of eyes on your code, book a 1-on-1 consultation call or an online pair programming session with me, with a 100% money-back guarantee.
If you want to learn to write better software faster, I'm available for development team coaching.
## Looking for something else?
Here are all of my products and services. If you still can't find what you need, send me an email, and I'll see what I can do.
{% endblock %}
{% block content_bottom %}
{% include 'testimonials.html.twig' %}
{% include 'about-me.html.twig' %}
{% endblock %}
[call]: {{site.url}}/call
[roadmap]: {{site.url}}/roadmap