From 85b66d9d91788c73f88cf7d160a1e2e9ca1f81ad Mon Sep 17 00:00:00 2001 From: Jan Kaiser Date: Tue, 20 Aug 2024 10:48:44 +0200 Subject: [PATCH] Get different subpages working --- .gitignore | 3 +- .prettierrc | 15 +++++++ {static => assets}/banner.jpg | Bin static/main.css => assets/styles.css | 0 content/_index.md | 2 + content/directions.md | 5 +++ content/flyer.md | 5 +++ content/program.md | 7 ++++ content/registration.md | 7 ++++ hugo.toml | 3 -- hugo.yaml | 21 ++++++++++ layouts/_default/baseof.html | 26 ++++++++++++ layouts/_default/single.html | 1 + layouts/index.html | 59 +-------------------------- layouts/partials/banner.html | 13 ++++++ layouts/partials/footer.html | 4 ++ layouts/partials/navigation.html | 22 ++++++++++ package-lock.json | 59 +++++++++++++++++++++++++++ package.json | 14 +++++++ 19 files changed, 204 insertions(+), 62 deletions(-) create mode 100644 .prettierrc rename {static => assets}/banner.jpg (100%) rename static/main.css => assets/styles.css (100%) create mode 100644 content/directions.md create mode 100644 content/flyer.md create mode 100644 content/program.md create mode 100644 content/registration.md delete mode 100644 hugo.toml create mode 100644 hugo.yaml create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_default/single.html create mode 100644 layouts/partials/banner.html create mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/navigation.html create mode 100644 package-lock.json create mode 100644 package.json diff --git a/.gitignore b/.gitignore index 60b2f55..eadb547 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ public -.hugo_build.lock \ No newline at end of file +.hugo_build.lock +node_modules diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..4b212a1 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,15 @@ +{ + "plugins": [ + "prettier-plugin-go-template" + ], + "overrides": [ + { + "files": [ + "*.html" + ], + "options": { + "parser": "go-template" + } + } + ] +} \ No newline at end of file diff --git a/static/banner.jpg b/assets/banner.jpg similarity index 100% rename from static/banner.jpg rename to assets/banner.jpg diff --git a/static/main.css b/assets/styles.css similarity index 100% rename from static/main.css rename to assets/styles.css diff --git a/content/_index.md b/content/_index.md index 4fe0108..07cf1a8 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,5 +1,7 @@ ## What is this website? +Alfa Romeo 1300 GT Junior + This website is a template that you could use for a (small) academic conference. It’s got a page for registration, where you can embed a Google Form or some other way for participants to register. It’s got a program page to list the schedule for the conference. It’s got a directions page to add a bunch of instructions how to get to the conference. It’s got a page to put up the flyers and other promotional materials for folks to download. You can use this template by cloning all the files from this GitHub repo here. This template was created from a website I made for MathConnections 2019, in case you want to see an example of this template being used in the wild. [Here’s the link to that website](https://www.desy.de/). diff --git a/content/directions.md b/content/directions.md new file mode 100644 index 0000000..12462ba --- /dev/null +++ b/content/directions.md @@ -0,0 +1,5 @@ ++++ +title = 'Directions' ++++ + +Put a map here and stuff. diff --git a/content/flyer.md b/content/flyer.md new file mode 100644 index 0000000..b9a50ef --- /dev/null +++ b/content/flyer.md @@ -0,0 +1,5 @@ ++++ +title = 'Flyer' ++++ + +Paste the flyer here. diff --git a/content/program.md b/content/program.md new file mode 100644 index 0000000..79a906b --- /dev/null +++ b/content/program.md @@ -0,0 +1,7 @@ ++++ +title = 'Program' ++++ + +## Conference Program + +TBA diff --git a/content/registration.md b/content/registration.md new file mode 100644 index 0000000..346d856 --- /dev/null +++ b/content/registration.md @@ -0,0 +1,7 @@ ++++ +title = 'Registration' ++++ + +Here’s where you provide instructions how to register for your conference. We used a Google Form and embedded it into an iframe (it’s commented out in the html here). + +Here’s another paragraph of filler text: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum dignissim et est et euismod. Fusce et metus tempus, pellentesque ex at, convallis nulla. Ut fringilla commodo tincidunt. Fusce sed est eu massa placerat iaculis eu at mauris. Nullam ut mollis nisi, quis malesuada risus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nam ipsum tortor, suscipit non tincidunt vel, bibendum in libero. Nulla facilisi. Pellentesque vitae neque metus. Cras quis est pharetra, vestibulum nisl et, viverra ipsum. Etiam porta dignissim purus, quis tempor metus volutpat eu. Praesent pulvinar libero eget purus tincidunt finibus. diff --git a/hugo.toml b/hugo.toml deleted file mode 100644 index ee37b38..0000000 --- a/hugo.toml +++ /dev/null @@ -1,3 +0,0 @@ -baseURL = "https://rl4aa.github.io/RL4AA25/" -languageCode = "en-uk" -title = "RL4AA'25" diff --git a/hugo.yaml b/hugo.yaml new file mode 100644 index 0000000..9cfc973 --- /dev/null +++ b/hugo.yaml @@ -0,0 +1,21 @@ +baseURL: https://rl4aa.github.io/RL4AA25/ +languageCode: en-uk +title: RL4AA'25 + +menus: + main: + - name: Home + pageRef: / + weight: 10 + - name: Registration + pageRef: /registration/ + weight: 20 + - name: Program + pageRef: /program/ + weight: 30 + - name: Directions + pageRef: /directions/ + weight: 40 + - name: Flyer + pageRef: /flyer/ + weight: 50 diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..9ff65d5 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,26 @@ + + + + + + {{ with resources.Get "styles.css" }} + + {{ end }} + + + + + {{ .Site.Title }} + + + + {{ partial "banner.html" . }} + {{ partial "navigation.html" . }} + + {{ block "main" . }} + + {{ end }} + + {{ partial "footer.html" . }} + + diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..d975ecb --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1 @@ +{{ define "main" }} {{ .Content }} {{ end }} diff --git a/layouts/index.html b/layouts/index.html index 566512d..d975ecb 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,58 +1 @@ - - - - - - - - - - - Conference Template - - - - - - - - - - - - - - - - {{.Content}} - - - - +{{ define "main" }} {{ .Content }} {{ end }} diff --git a/layouts/partials/banner.html b/layouts/partials/banner.html new file mode 100644 index 0000000..d4097bc --- /dev/null +++ b/layouts/partials/banner.html @@ -0,0 +1,13 @@ + diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..0338b2c --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,4 @@ + diff --git a/layouts/partials/navigation.html b/layouts/partials/navigation.html new file mode 100644 index 0000000..95eb46b --- /dev/null +++ b/layouts/partials/navigation.html @@ -0,0 +1,22 @@ +{{ $page := . }} + + + + + {{ with index .Site.Menus "main" }} + {{ range . }} + {{ $isCurrent := $page.IsMenuCurrent "main" . }} + + {{ end }} + {{ end }} + + diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..a311999 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,59 @@ +{ + "name": "rl4aa25", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "rl4aa25", + "version": "1.0.0", + "license": "ISC", + "devDependencies": { + "prettier-plugin-go-template": "^0.0.15" + } + }, + "node_modules/prettier": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "dev": true, + "license": "MIT", + "peer": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-plugin-go-template": { + "version": "0.0.15", + "resolved": "https://registry.npmjs.org/prettier-plugin-go-template/-/prettier-plugin-go-template-0.0.15.tgz", + "integrity": "sha512-WqU92E1NokWYNZ9mLE6ijoRg6LtIGdLMePt2C7UBDjXeDH9okcRI3zRqtnWR4s5AloiqyvZ66jNBAa9tmRY5EQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ulid": "^2.3.0" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "prettier": "^3.0.0" + } + }, + "node_modules/ulid": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/ulid/-/ulid-2.3.0.tgz", + "integrity": "sha512-keqHubrlpvT6G2wH0OEfSW4mquYRcbe/J8NMmveoQOjUqmo+hXtO+ORCpWhdbZ7k72UtY61BL7haGxW6enBnjw==", + "dev": true, + "license": "MIT", + "bin": { + "ulid": "bin/cli.js" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..fd489ca --- /dev/null +++ b/package.json @@ -0,0 +1,14 @@ +{ + "name": "rl4aa25", + "version": "1.0.0", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "description": "", + "devDependencies": { + "prettier-plugin-go-template": "^0.0.15" + } +}