Initial commit

This commit is contained in:
Oliver Davies 2024-02-06 08:00:00 +00:00
commit 28391c1296
19 changed files with 5174 additions and 0 deletions

17
.editorconfig Normal file
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

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

15
.gitignore vendored Normal file
View file

@ -0,0 +1,15 @@
# Do not edit this file. It is automatically generated by https://www.oliverdavies.uk/build-configs.
/*
!/.gitignore
!/app/
!/build.yaml
!/composer.{json,lock}
!/justfile
!/source/
!/flake.{nix,lock}
!/assets/
/source/build/

View file

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

View file

@ -0,0 +1,2 @@
name: 'My New Sculpin Site'
locale: en

View file

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

14
assets/tailwind.config.ts Normal file
View 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

18
build.yaml Normal file
View file

@ -0,0 +1,18 @@
name: phpsw-sculpin-demo
type: sculpin
language: php
flake:
devshell:
packages:
- nodejs
- php81
- php81Packages.composer
git:
ignore:
- '!/assets/'
- '/source/build/'
experimental:
createInclusiveGitIgnoreFile: true

10
composer.json Normal file
View file

@ -0,0 +1,10 @@
{
"require": {
"sculpin/sculpin": "^3.0"
},
"config": {
"allow-plugins": {
"sculpin/sculpin-theme-composer-plugin": true
}
}
}

3607
composer.lock generated Normal file

File diff suppressed because it is too large Load diff

132
flake.lock generated Normal file
View file

@ -0,0 +1,132 @@
{
"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": {
"locked": {
"lastModified": 1704161960,
"narHash": "sha256-QGua89Pmq+FBAro8NriTuoO/wNaUtugt29/qqA8zeeM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "63143ac2c9186be6d9da6035fa22620018c85932",
"type": "github"
},
"original": {
"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",
"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
}

26
flake.nix Normal file
View file

@ -0,0 +1,26 @@
# 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";
};
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; [
"just"
"nodejs"
"php81"
"php81Packages.composer"
];
};
};
};
}

36
justfile Normal file
View file

@ -0,0 +1,36 @@
_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

1260
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

5
package.json Normal file
View file

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

0
source/_includes/.keep Normal file
View file

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

View file

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

5
source/index.md Normal file
View file

@ -0,0 +1,5 @@
---
layout: default
---
Hello, PHPSW!