Skip to content

Commit

Permalink
Merge branch 'main' into large-storage-custom-nas
Browse files Browse the repository at this point in the history
  • Loading branch information
engineershamrock authored Jul 3, 2024
2 parents e8d1e17 + 3be9843 commit 858240c
Show file tree
Hide file tree
Showing 73 changed files with 1,073 additions and 61 deletions.
5 changes: 4 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
* @leigh-hackspace/infra

# Website content is managed by the Web Editors team
content/* @leigh-hackspace/web-editors
/content/ @leigh-hackspace/web-editors

# Membership data is managed by the directors
/data/memberships.yaml @leigh-hackspace/directors
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
4 changes: 2 additions & 2 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.122.0
HUGO_VERSION: 0.124.1
steps:
- name: Install Hugo CLI
run: |
Expand All @@ -46,7 +46,7 @@ jobs:
fetch-depth: 0
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
uses: actions/configure-pages@v5
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Build with Hugo
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Run tests on the website build
name: Test
name: Test - Run a test build

on:
push:
Expand All @@ -17,7 +17,7 @@ jobs:
build:
runs-on: ubuntu-latest
env:
HUGO_VERSION: 0.122.0
HUGO_VERSION: 0.124.1
steps:
- name: Install Hugo CLI
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
public
resources
.hugo_build.lock
.DS_Store
11 changes: 6 additions & 5 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"version": "2.0.0",
"tasks": [
{
"type": "hugo",
"task": "server draft",
"group": "build",
"problemMatcher": [],
"label": "hugo: Serve draft site"
"label": "Test Site Locally",
"command": "make",
"args": [
"serve"
],
"problemMatcher": []
}
]
}
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Leigh Hackspace

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
76 changes: 61 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,86 @@
# Leigh Hackspace Website - Hugo Edition

Hugo version: 0.122
Hugo version: 0.124.1

## Dev Mode
## Contributing

To run the site locally you can do the following:
Looking for something to contribute to the website? Check out the ["Good First Issues"](https://github.com/leigh-hackspace/website-hugo/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) tag in the Issues section for tasks that are simple, but need doing.

All changes to the website must be done on a branch and pushed through the GitHub pull requests workflow. If you have any questions about this process then contact the [Tech Infrastructure](https://wiki.leighhack.org/membership/useful_contacts/#tech-infrastructure) people.

### Build the site locally

To build the site locally you can do the following:

* Download [Hugo extended edition](https://github.com/gohugoio/hugo/releases/) (named hugo_extended).
* Check out repo
* Check out repo (`git clone https://github.com/leigh-hackspace/website-hugo`)
* Run `hugo serve -D --gc -w -F` (add -F to show content with future dates) or `make serve` (if you have `make` installed)
* Go to `http://localhost:1313/` to view the local instance.

The site will be updated in real time with any changes made to the site.

## Making Changes

All changes to the website must be done on a branch and pushed through the GitHub pull requests workflow. If you have any questions about this process then contact the [Tech Infrastructure](https://wiki.leighhack.org/membership/useful_contacts/#tech-infrastructure) people.
The site will be updated in real-time with any changes made to the site files.

## Deployment

Branches are automatically deployed to [https://web-test.leighhack.org](https://web-test.leighhack.org) with subfolders for each of the branches in the repository. Once merged into `main` it'll be deployed out to the live website.

## Common Tasks

### New Blog Post
### How do I add images to posts / What custom shortcodes are available?

We have a few shortcodes that you can use:

#### `image`

`image` adds a image and manages the sizing and formatting.

```
{{< image src="netatalk.png" width="400x" class="is-pulled-right" title="The Netatalk logo.">}}
```

* `src` - The name of the image file, this can be a PNG, JPEG, or WEBP, the path is relevant to the file you're adding it into.
* `class` - Is a CSS class that'll be applied to the `figure` created to show this image, common ones are `is-pulled-left` and `is-pulled-right`, more can be found in the [Bulma helpers](https://bulma.io/documentation/helpers).
* `title` - This is the title and alt text used for the image.
* `width` - The maximum dimensions of the image, this can be used in a few ways, either defining just the width (`400`), defining scaling to a width `400x`, or a specific width and height (`400x600`). Ideally try to use `400x` to keep image scaling working as expected.

#### `gallery`

`gallery` surrounds a group of image tags and makes a rotating gallery of the images:

```
{{< gallery >}}
{{< image src="network-browser.jpg" title="Mac OS 9.2.2 'Network Browser' showing the 'nas-afp' service available via AFP over AppleTalk.">}}
{{< image src="osx-finder.png" title="Mac OS X 10.4 Finder showing the 'nas-afp' service available via AFP over TCP/IP.">}}
{{< image src="sonoma-finder.png" title="macOS Sonoma Finder showing the 'nas-afp' service available via AFP over TCP/IP.">}}
{{< /gallery >}}
```

#### `rawhtml`

`rawhtml` can be used to inject HTML from your Markdown post into the finished page. **It is really not advised to do this, the retro theme will ignore any HTML in these tags**.

For example, this is used on the map page to inject the `div` required to render to OpenLayers map:

```
{{< rawhtml >}}
<div id="map" class="map"></div>
{{</ rawhtml >}}
```

### How to create a new blog post

* Download and install Hugo
* Run `hugo new blog/<year>/name-of-post/index.md`, and a new file will be created in the right folder.
* Download and install [Hugo](https://github.com/gohugoio/hugo/releases/) (the extended edition)
* Run `hugo new blog/<year>/name-of-post`, and a new folder will be created in the year folder with a `index.md` with the post.
* Update the `author` and `author_email` values
* Add a `subtitle`
* If you've posted the blog elsewhere, add the `original_url` value to link to your original post URL.
* Place any images in the folder that was created for your post.
* Set `listing_image` to the image you'll want on the blog listing page ([https://www.leighhack.org/blog/](https://www.leighhack.org/blog/))
* Run Dev Mode (above), or `make serve` and view your post.

### Updating Membership Plans
### How to update the membership plans

The membership plan data is held in a YAML file, this is used by the Hackspace API and other tools as well.

* Edit [data/memberships.yaml](data/memberships.yaml), follow the format of existing entries.
* Edit [data/memberships.yaml](data/memberships.yaml), following the format of existing entries.
* Links are standard URIs and can support any of the normal formats (mailto:, etc).


1 change: 1 addition & 0 deletions assets/js/calendar.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@

var events = [];
$(document).ready(function () {
$('div#calendar p#nojs').hide(); // Hide the NoJS message
$.getJSON('https://api.leighhack.org/events', function (data) {
data.forEach(function (event) {
events.push({
Expand Down
1 change: 1 addition & 0 deletions assets/js/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ $(document).ready(function () {
} else {
$('span#hackspace-status').html('<b>Closed</b>');
}
$('div#hackspace-open').fadeIn('slow');
}

// 'printers' shortcode
Expand Down
6 changes: 6 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ name = "Events"
pageRef = "events"
weight = 6

[[menu.main]]
name = "Donate"
pageRef = "Donate"
URL = "https://www.paypal.com/donate/?hosted_button_id=G9AJ2HR3SDQ3J"
weight = 7

[[menu.policies]]
name = "Code of Conduct"
pageRef = "policies/code_of_conduct"
Expand Down
12 changes: 7 additions & 5 deletions content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@
title: Welcome!
subtitle: Leigh Hackspace is a social enterprise created for the benefit of our members and the wider Leigh community.
layout: home
hero_image: rose_logo.svg
hero_image: long_logo_solo_whitebg.svg
---

{{< eventbrite >}}

{{< openstatus >}}

| Day | Opening Times |
| --------- | ------------- |
| Monday | Closed |
| Tuesday | 14:00 - 20:00 |
| Wednesday | 14:00 - 20:00 |
| Monday | 18:30 - 21:00 |
| Tuesday | 14:00 - 21:00 |
| Wednesday | 14:00 - 21:00 |
| Thursday | Closed |
| Friday | Closed |
| Saturday | 12:00 - 17:00 |
| Sunday | Closed |

We currently operate reduced opening hours due to member availability. The hackspace can be open outside of these hours and a banner above will appear when it is open, otherwise please check on [Slack](https://join.slack.com/t/leighhack/shared_invite/enQtNDYzMjEyMDMxNDExLTE1MWY5N2IwMzdhMzQ0ZWFiNDkyNzJmMGM1ZmFkODcwMGM5ODFmYmI4MjhmM2JiMWEyY2E3NTRjMTQzMzljZWU).
We currently operate reduced opening hours due to member availability. The hackspace can be open outside of these hours and a banner above will appear when it is open, otherwise please check on [Slack](https://join.slack.com/t/leighhack/shared_invite/enQtNDYzMjEyMDMxNDExLTE1MWY5N2IwMzdhMzQ0ZWFiNDkyNzJmMGM1ZmFkODcwMGM5ODFmYmI4MjhmM2JiMWEyY2E3NTRjMTQzMzljZWU).
1 change: 1 addition & 0 deletions content/blog/2023/old-webcam-on-modern-linux/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ tags:
author: Andrew Williams
author_email: [email protected]
listing_image: camera.png
original_url: https://nikdoof.com/posts/2023/old-webcam-on-modern-linux/
---

{{< image src="camera.png" width="400x" class="is-pulled-right" title="The Trust WB-1200P, a webcam from the early days of USB devices.">}}
Expand Down
1 change: 1 addition & 0 deletions content/blog/2023/powerbook-g4-disk-replacement/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ draft: false
author: Andrew Williams
author_email: [email protected]
listing_image: open.jpg
original_url: https://nikdoof.com/posts/2023/powerbook-g4-disk-replacement/
---

In October 2003, I made my first leap into using an Apple device. For quite some time I'd been trying to find a reasonable and portable machine for daily use, and I had slowly gotten frustrated with the current offerings by Dell, HP, and other major laptop manufacturers. In the hunt for something new, I picked a Powerbook G4 12". This machine was my daily workhorse for several years and at the end of its life, it was stuffed into a draw and forgotten about. Sometime around 2014 when I was purchasing a new Macbook Pro I decided to grab my old laptop out of storage and get it booted to hopefully pull a few files from the system. I had lost the power adapter and (obviously) the battery had given up. I purchased a new power adapter on eBay and ended up throwing everything back in the drawer to sort out another day.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 858240c

Please sign in to comment.