diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml new file mode 100644 index 0000000..0a63c22 --- /dev/null +++ b/.github/workflows/hugo.yml @@ -0,0 +1,121 @@ +name: Build and deploy +on: + push: + branches: + - main + workflow_dispatch: +permissions: + contents: read + pages: write + id-token: write +concurrency: + group: pages + cancel-in-progress: false +defaults: + run: + shell: bash +jobs: + build: + runs-on: ubuntu-latest + env: + GO_VERSION: 1.25.1 + HUGO_VERSION: 0.151.0 + NODE_VERSION: 24.10.0 + TZ: Europe/London + steps: + - name: Checkout + uses: actions/checkout@v5 + with: + submodules: recursive + fetch-depth: 0 + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + cache: false + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + - name: Setup Pages + id: pages + uses: actions/configure-pages@v5 + - name: Create directory for user-specific executable files + run: | + mkdir -p "${HOME}/.local" + - name: Install Hugo + run: | + curl -sLJO "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz" + mkdir "${HOME}/.local/hugo" + tar -C "${HOME}/.local/hugo" -xf "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz" + rm "hugo_extended_${HUGO_VERSION}_linux-amd64.tar.gz" + echo "${HOME}/.local/hugo" >> "${GITHUB_PATH}" + - name: Verify installations + run: | + echo "Go: $(go version)" + echo "Hugo: $(hugo version)" + echo "Node.js: $(node --version)" + - name: Install Node.js dependencies + run: | + [[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true + - name: Configure Git + run: | + git config core.quotepath false + - name: Authenticate to Google Cloud + uses: google-github-actions/auth@v2 + with: + credentials_json: ${{ secrets.GCP_SA_KEY }} + - name: Setup Google Cloud SDK + uses: google-github-actions/setup-gcloud@v2 + - name: Restore assets cache + id: cache-restore-assets + uses: actions/cache/restore@v4 + with: + path: ./assets + key: assets-${{ github.run_id }} + restore-keys: + assets- + - name: Restore build cache + id: cache-restore-build + uses: actions/cache/restore@v4 + with: + path: ${{ runner.temp }}/hugo_cache + key: hugo-${{ github.run_id }} + restore-keys: + hugo- + - name: Sync assets from GCS + run: gsutil -m rsync -r gs://makespace-photos assets + - name: Build the site + run: | + hugo \ + --gc \ + --minify \ + --baseURL "${{ steps.pages.outputs.base_url }}/" \ + --cacheDir "${{ runner.temp }}/hugo_cache" + - name: Save assets cache + id: cache-save-assets + uses: actions/cache/save@v4 + with: + path: ${{ runner.temp }}/hugo_cache + key: ${{ steps.cache-restore-assets.outputs.cache-primary-key }} + - name: Save build cache + id: cache-save-build + uses: actions/cache/save@v4 + with: + path: ./assets + key: ${{ steps.cache-restore-build.outputs.cache-primary-key }} + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./public + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 + diff --git a/.gitignore b/.gitignore index ca26866..2bb984e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .hugo_build.lock /public/ +/assets/ diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..88d9010 --- /dev/null +++ b/TODO.md @@ -0,0 +1,24 @@ +# TODO +- Web share +- PR from members app + +- Search + +- Rename more to ? (help?) +- Footer info +- Mark external links more pretty +- lint / formatter +- More mobile styling + +# TODONE +- More example content +- Deploy +- Github build +- Mark external links somehow +- Photos + - Image quilts of a bunch of pages + - Attach images to pages + - Where to store images +- Menu expand/hide + + diff --git a/assets/byte.png b/assets/byte.png new file mode 100644 index 0000000..8e44b6c Binary files /dev/null and b/assets/byte.png differ diff --git a/content/_index.md b/content/_index.md index 637371e..69e02c4 100644 --- a/content/_index.md +++ b/content/_index.md @@ -3,3 +3,5 @@ date: "2024-02-02T04:14:54-08:00" draft: false title: Makespace --- + +Cambridge's 24/7 365 Makespace diff --git a/content/makes/3d-printed-components.md b/content/makes/3d-printed-components.md new file mode 100644 index 0000000..fa592d4 --- /dev/null +++ b/content/makes/3d-printed-components.md @@ -0,0 +1,12 @@ +--- +title: '3D Printed Components' +date: '2025-10-12T12:14:56+01:00' +draft: false +members: + - Riley P +params: + images: + - "15680933235.jpg" +--- + +Collection of bright green 3D printed parts including springs, discs, and connecting components laid out for assembly. diff --git a/content/makes/acrylic-laser-art.md b/content/makes/acrylic-laser-art.md new file mode 100644 index 0000000..168fea1 --- /dev/null +++ b/content/makes/acrylic-laser-art.md @@ -0,0 +1,12 @@ +--- +title: 'Acrylic Laser Art' +date: '2025-10-12T12:14:56+01:00' +draft: false +members: + - Morgan C +params: + images: + - "15496142500.jpg" +--- + +Orange acrylic sheet with intricate laser-etched design displayed alongside mechanical testing equipment in a workshop setting. \ No newline at end of file diff --git a/content/makes/byte.md b/content/makes/byte.md new file mode 100644 index 0000000..b45fb95 --- /dev/null +++ b/content/makes/byte.md @@ -0,0 +1,17 @@ +--- +date: "2024-03-10T16:45:00Z" +draft: false +members: +- Hector D +title: Byte +params: + images: + - "byte.png" + - "byte.png" +--- + +Something about byte. + +{{< image name="byte.png" >}} + + diff --git a/content/makes/decorative-pendant.md b/content/makes/decorative-pendant.md new file mode 100644 index 0000000..2c9eb90 --- /dev/null +++ b/content/makes/decorative-pendant.md @@ -0,0 +1,12 @@ +--- +title: 'Decorative Pendant' +date: '2025-10-12T12:14:56+01:00' +draft: false +members: + - Casey L +params: + images: + - "15679016131.jpg" +--- + +Elegant silver-chain necklace with ornate square pendant and circular mirror charm displayed in a presentation box. \ No newline at end of file diff --git a/content/makes/digital-photo-frame.md b/content/makes/digital-photo-frame.md new file mode 100644 index 0000000..3b89c17 --- /dev/null +++ b/content/makes/digital-photo-frame.md @@ -0,0 +1,12 @@ +--- +title: 'Digital Photo Frame' +date: '2025-10-12T12:14:56+01:00' +draft: false +members: + - Alex M +params: + images: + - "15682547822.jpg" +--- + +Yellow acrylic case housing a small LCD display showing cat photos, with a Raspberry Pi visible in the background. \ No newline at end of file diff --git a/content/makes/illuminated-head.md b/content/makes/illuminated-head.md new file mode 100644 index 0000000..2ba5483 --- /dev/null +++ b/content/makes/illuminated-head.md @@ -0,0 +1,12 @@ +--- +title: 'Illuminated Head' +date: '2025-10-12T12:14:56+01:00' +draft: false +members: + - Sam T +params: + images: + - "15680933885.jpg" +--- + +3D printed translucent head sculpture with internal red LED lighting and control buttons, creating an eerie interactive art piece. \ No newline at end of file diff --git a/content/makes/kinetic-model-kits.md b/content/makes/kinetic-model-kits.md new file mode 100644 index 0000000..b944b1d --- /dev/null +++ b/content/makes/kinetic-model-kits.md @@ -0,0 +1,12 @@ +--- +title: 'Kinetic Model Kits' +date: '2025-10-12T12:14:56+01:00' +draft: false +members: + - Taylor F +params: + images: + - "15496138500.jpg" +--- + +Wooden kinetic model featuring propellers and mechanical linkages alongside various laser-cut project pieces and electronic components. \ No newline at end of file diff --git a/content/makes/laser-cut-wooden-projects.md b/content/makes/laser-cut-wooden-projects.md new file mode 100644 index 0000000..67c6292 --- /dev/null +++ b/content/makes/laser-cut-wooden-projects.md @@ -0,0 +1,12 @@ +--- +title: 'Laser-Cut Wooden Projects' +date: '2025-10-12T12:14:56+01:00' +draft: false +members: + - Jordan K +params: + images: + - "15679020481.jpg" +--- + +Various laser-cut wooden pieces including puzzle boxes, decorative patterns, and interlocking components arranged on a workbench with Arduino projects nearby. \ No newline at end of file diff --git a/content/makes/names.md b/content/makes/names.md new file mode 100644 index 0000000..3090bfb --- /dev/null +++ b/content/makes/names.md @@ -0,0 +1,13 @@ +--- +title: 'Names' +date: '2025-10-12T12:14:56+01:00' +draft: false +members: + - Rain R +params: + images: + - "8748039701.jpg" + - "8748041107.jpg" +--- + +Routed wood name plates. diff --git a/content/make/byte.md b/content/makes/sad.md similarity index 66% rename from content/make/byte.md rename to content/makes/sad.md index d5585c7..e30e65c 100644 --- a/content/make/byte.md +++ b/content/makes/sad.md @@ -1,10 +1,8 @@ --- date: "2024-03-10T16:45:00Z" draft: false +title: sad members: - Hector D -title: Byte --- - -Something about byte. - +sad \ No newline at end of file diff --git a/content/case/dogtooth.md b/content/studies/dogtooth.md similarity index 100% rename from content/case/dogtooth.md rename to content/studies/dogtooth.md diff --git a/hugo.toml b/hugo.toml index ee2451d..98f4df2 100644 --- a/hugo.toml +++ b/hugo.toml @@ -3,5 +3,9 @@ languageCode = "en-uk" title = "Makespace" theme = "makespace" +[caches] + [caches.images] + dir = ':cacheDir/images' + [taxonomies] member = "members" diff --git a/resources/_gen/images/byte_hu_5ba880a48fea1036.png b/resources/_gen/images/byte_hu_5ba880a48fea1036.png new file mode 100644 index 0000000..fd3146b Binary files /dev/null and b/resources/_gen/images/byte_hu_5ba880a48fea1036.png differ diff --git a/resources/_gen/images/byte_hu_6bb5b0f031b6f49.png b/resources/_gen/images/byte_hu_6bb5b0f031b6f49.png new file mode 100644 index 0000000..2bf8007 Binary files /dev/null and b/resources/_gen/images/byte_hu_6bb5b0f031b6f49.png differ diff --git a/themes/makespace/archetypes/case.md b/themes/makespace/archetypes/case.md deleted file mode 100644 index ab7f4d3..0000000 --- a/themes/makespace/archetypes/case.md +++ /dev/null @@ -1,54 +0,0 @@ -+++ -title = '{{ replace .File.ContentBaseName "-" " " | title }}' -date = '{{ .Date }}' -draft = true - -# Project details -author = "" # Member name -project_type = "" # e.g., "Personal Project", "Community Project", "Commercial" -duration = "" # How long the project took -completion_date = "" - -# Equipment and skills -equipment_used = [] -skills_learned = [] -materials = [] - -# Project outcomes -challenges = "" -lessons_learned = "" -cost_estimate = "" - -# Media -featured_image = "" -gallery = [] -video_url = "" - -# Community engagement -collaboration = false # Was this a collaborative project? -teaching_opportunity = false # Did this lead to teaching others? - -# Tags for categorization -tags = [] -categories = [] -+++ - -## Project Overview - -Brief description of the project, its goals, and what was accomplished. - -## Process - -Describe the steps taken, challenges encountered, and how they were overcome. - -## Skills and Learning - -What new skills were developed or existing ones improved during this project. - -## Community Impact - -How this project benefited the Makespace community or inspired others. - -## Lessons Learned - -Key takeaways and advice for others attempting similar projects. diff --git a/themes/makespace/archetypes/make.md b/themes/makespace/archetypes/makes.md similarity index 100% rename from themes/makespace/archetypes/make.md rename to themes/makespace/archetypes/makes.md diff --git a/themes/makespace/archetypes/studies.md b/themes/makespace/archetypes/studies.md new file mode 100644 index 0000000..749acd1 --- /dev/null +++ b/themes/makespace/archetypes/studies.md @@ -0,0 +1,7 @@ +--- +title: {{ replace .File.ContentBaseName "-" " " | title }} +date: {{ .Date }} +draft: false +--- + + diff --git a/themes/makespace/assets/css/main.css b/themes/makespace/assets/css/main.css index 8d9d1ce..568c163 100644 --- a/themes/makespace/assets/css/main.css +++ b/themes/makespace/assets/css/main.css @@ -28,6 +28,49 @@ nav ul { margin-left: 1rem; } +nav details { + margin-bottom: 1rem; +} + +nav summary { + cursor: pointer; + font-weight: bold; + font-size: 1rem; + margin-bottom: 0.3rem; + padding: 0.5rem; + background-color: var(--color-background); + border-radius: 4px; + transition: background-color 0.2s ease; +} + +nav summary:hover { + background-color: rgba(232, 110, 44, 0.1); +} + +nav details[open] summary { +} + +nav details ul { + background-color: var(--color-background); + padding: 0.5rem 0; +} + +nav details ul li { + padding: 0.25rem 1rem; +} + +nav details ul li:hover { +} + +.is-current-anchor { + font-weight: bold; + color: var(--color-accent); + background-color: rgba(232, 110, 44, 0.1); + padding: 0.25rem 0.5rem; + margin-left: -0.5rem; + border-radius: 4px; + text-decoration: none; +} h1 { font-size: 2rem @@ -63,6 +106,11 @@ a { color: var(--color-accent); } +a[rel~="external"]::after { + content: " [ext]"; + font-size: smaller; +} + blockquote, q { border-left: solid 4px #bbb; font-style: italic; @@ -110,10 +158,99 @@ footer::before { repeating-linear-gradient(var(--color-accent), var(--color-foreground) ); } +.quilt { + display: grid +; + grid-auto-rows: auto; + grid-template-columns: repeat(6, auto); + justify-content: flex-start; + gap: 0; +} +.quilt > * { + display: block; +} + +.quilt img { + max-width: 100%; + height: 100%; +} + +.make-photos { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); + gap: 1rem; + margin-top: 1rem; +} + +.make-photo { + position: relative; + background: var(--color-background); + border-radius: 2px; + overflow: hidden; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); + transition: transform 0.2s ease, box-shadow 0.2s ease; + max-width: 50vw; +} + +.make-photo:hover { + transform: translateY(-2px); + box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15); +} + +.make-photo img { + width: 100%; + height: auto; + display: block; +} + +.share-button { + background: var(--color-accent); + color: var(--color-background); + border: none; + padding: 0.75rem 2rem; + font-size: 1rem; + font-weight: bold; + border-radius: 25px; + cursor: pointer; + transition: all 0.2s ease; + text-transform: uppercase; + letter-spacing: 0.5px; +} + +.share-button:hover { + background: rgba(232, 110, 44, 0.9); + transform: translateY(-1px); + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); +} + +.share-button:active { + transform: translateY(0); +} + +ul.byline { + list-style: none; + padding: 0; + margin: 0; +} + +ul.byline > li { + display: inline-block; + padding: 0; + margin: 0; + padding-right: 0.5rem; +} + +ul.byline > li:not(:first-child)::before { + content: "–"; + padding-right: 0.5rem; +} + + + @media (min-width: 768px) { body { display: grid; - grid-template-columns: 1fr 2fr; + grid-template-columns: auto 2fr; grid-template-rows: 1fr auto; grid-template-areas: "header main" diff --git a/themes/makespace/layouts/_markup/render-link.html b/themes/makespace/layouts/_markup/render-link.html new file mode 100644 index 0000000..b8730f1 --- /dev/null +++ b/themes/makespace/layouts/_markup/render-link.html @@ -0,0 +1,8 @@ +{{- $u := urls.Parse .Destination -}} + + {{- with .Text }}{{ . }}{{ end -}} + +{{- /* remove trailing newline */ -}} diff --git a/themes/makespace/layouts/_partials/head.html b/themes/makespace/layouts/_partials/head.html index 6312251..f48a6ec 100644 --- a/themes/makespace/layouts/_partials/head.html +++ b/themes/makespace/layouts/_partials/head.html @@ -2,3 +2,9 @@ {{ if .IsHome }}{{ site.Title }}{{ else }}{{ printf "%s | %s" .Title site.Title }}{{ end }} {{ partialCached "head/css.html" . }} + + diff --git a/themes/makespace/layouts/_partials/header.html b/themes/makespace/layouts/_partials/header.html index f17675f..6351ed8 100644 --- a/themes/makespace/layouts/_partials/header.html +++ b/themes/makespace/layouts/_partials/header.html @@ -1,2 +1,2 @@ -Makespace +Makespace {{ partial "menu.html" (dict "menuID" "main" "page" .) }} diff --git a/themes/makespace/layouts/_partials/menu.html b/themes/makespace/layouts/_partials/menu.html index daa7085..761a20b 100644 --- a/themes/makespace/layouts/_partials/menu.html +++ b/themes/makespace/layouts/_partials/menu.html @@ -1,7 +1,7 @@ {{- /* Renders a menu for the given menu ID. -@context {page} page The current page. +@context {page} page The is-current-anchor page. @context {string} menuID The menu ID. @example: {{ partial "menu.html" (dict "menuID" "main" "page" .) }} @@ -10,30 +10,48 @@ {{- $page := .page }} {{- $menuID := .menuID }} -{{- $makeSection := site.GetPage "section" "make" }} -{{- $caseSection := site.GetPage "section" "case" }} +{{- $makesSection := site.GetPage "section" "makes" }} +{{- $studiesSection := site.GetPage "section" "studies" }} {{- $equipmentSection := site.GetPage "section" "equipment" }} +{{- $moreSection := site.GetPage "section" "more" }} {{- with index site.Menus $menuID }} {{- end }} diff --git a/themes/makespace/layouts/home.html b/themes/makespace/layouts/home.html index 0df6597..6e88a12 100644 --- a/themes/makespace/layouts/home.html +++ b/themes/makespace/layouts/home.html @@ -1,7 +1,17 @@ {{ define "main" }} {{ .Content }} - {{ range site.RegularPages }} -

{{ .LinkTitle }}

- {{ .Summary }} + {{- $makesSection := site.GetPage "section" "makes" }} + +

Makes ({{ $makesSection.Pages.Len }})

+
+ {{ range $makesSection.Pages }} + {{- $name := index (.Params.images) 0 }} + {{- $image := resources.Get $name }} + {{- $small := $image.Resize "300x" }} + {{ end }} +
{{ end }} diff --git a/themes/makespace/layouts/makes/single.html b/themes/makespace/layouts/makes/single.html new file mode 100644 index 0000000..ee999e0 --- /dev/null +++ b/themes/makespace/layouts/makes/single.html @@ -0,0 +1,56 @@ +{{ define "main" }} +

{{ .Title }}

+ + {{ $dateMachine := .Date | time.Format "2006-01-02T15:04:05-07:00" }} + {{ $dateHuman := .Date | time.Format ":date_long" }} + + +
+ {{ range .Params.images }} + {{ $name := . }} + {{ with resources.Get $name }} + {{ $new := .Resize "1000x" }} +
+ 3D printed components +
+ {{ end }} + {{ end }} +
+ + {{ .Content }} + +
+ +
+ + + + {{ partial "terms.html" (dict "taxonomy" "tags" "page" .) }} +{{ end }} + diff --git a/themes/makespace/layouts/shortcodes/image.html b/themes/makespace/layouts/shortcodes/image.html new file mode 100644 index 0000000..c5bd503 --- /dev/null +++ b/themes/makespace/layouts/shortcodes/image.html @@ -0,0 +1,6 @@ +{{ $name := .Get "name" }} +{{ with resources.Get $name }} +{{ $new := .Resize "100x" }} + +{{ end }} +hello!