Improve the image shortcode

This commit is contained in:
2023-11-07 11:32:09 +00:00
parent 60219ca8b9
commit 926dd3ad51
7 changed files with 22 additions and 36 deletions

View File

@@ -16,7 +16,7 @@ Visit Leigh Hackspace and solve all of these problems we provide workspace,
The first meetings of Leigh Hackspace took place in late 2014 at Cadence Cafe, Tyldesley, Greater Manchester, following the creation of a Facebook Group 'Leigh Virtual Hackspace'. After two such 'hacking' meetings, the founders were offered the temporary share of a derelict shop at 25 Market Street by the Leigh Building Preservation Trust as part of a wider empty shop scheme. The first meetings of Leigh Hackspace took place in late 2014 at Cadence Cafe, Tyldesley, Greater Manchester, following the creation of a Facebook Group 'Leigh Virtual Hackspace'. After two such 'hacking' meetings, the founders were offered the temporary share of a derelict shop at 25 Market Street by the Leigh Building Preservation Trust as part of a wider empty shop scheme.
{{< image "shop.jpg" >}} {{< image src="shop.jpg" >}}
The joint official opening was held on 13 February 2015. The shop allowed us to spread the word and the space grew quickly, ending with us taking full use of the store during the year. After some time we started to outgrow the space, and started to search for new premises. The joint official opening was held on 13 February 2015. The shop allowed us to spread the word and the space grew quickly, ending with us taking full use of the store during the year. After some time we started to outgrow the space, and started to search for new premises.
@@ -24,7 +24,7 @@ The joint official opening was held on 13 February 2015. The shop allowed us to
In early 2016, the hackspace moved from the shop to a 4000sqft dedicated space in [The Cotton Mill](https://en.wikipedia.org/wiki/Mather_Lane_Mill). The official opening was on Friday 12th February and was celebrated with an Open Hack evening and other events. In early 2016, the hackspace moved from the shop to a 4000sqft dedicated space in [The Cotton Mill](https://en.wikipedia.org/wiki/Mather_Lane_Mill). The official opening was on Friday 12th February and was celebrated with an Open Hack evening and other events.
{{< image "cottonmill.jpg" >}} {{< image src="cottonmill.jpg" >}}
The Cotton Mill was large enough to have dedicated areas for the darkroom and wood work. Over the years we ran several events, including Raspberry Jam days, Maker Markets, hack days, quizzes, and even a film screening in association with Leigh Film Society. The Cotton Mill was large enough to have dedicated areas for the darkroom and wood work. Over the years we ran several events, including Raspberry Jam days, Maker Markets, hack days, quizzes, and even a film screening in association with Leigh Film Society.
@@ -36,7 +36,7 @@ The mill was a great home for the hackspace until 2019, when again we outgrew th
The initial build-out happened during November 2019, but was paused early 2020 due to the global pandemic. Only during the latter part of 2022 was the hackspace able to return to fitting out the space, due to several building issues that prevented people working in the mill. The initial build-out happened during November 2019, but was paused early 2020 due to the global pandemic. Only during the latter part of 2022 was the hackspace able to return to fitting out the space, due to several building issues that prevented people working in the mill.
{{< image "buildout_1.jpg" >}} {{< image src="buildout_1.jpg" >}}
### Leigh Hackspace '3.0' ### Leigh Hackspace '3.0'

View File

@@ -8,7 +8,7 @@ author: Andrew Williams
author_email: andy@tensixtyone.com author_email: andy@tensixtyone.com
--- ---
{{< figure src="outside.jpg" width="400" class="is-pulled-right">}} {{< image src="outside.jpg" width="400x" class="is-pulled-right" title="My Powerbook G4 12 inch, fresh out of storage.">}}
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 to use daily, and i'd slowly got frustrated with the current offerings by Dell, HP, and other major laptop manufactures. In the hunt for something new and I picked an 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. 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 to use daily, and i'd slowly got frustrated with the current offerings by Dell, HP, and other major laptop manufactures. In the hunt for something new and I picked an 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.
@@ -18,7 +18,7 @@ Roll on to 2023, in the Leigh Hackspace [Slack](https://join.slack.com/t/leighha
Only to be confronted with the sound of screeching metal and clicking. The internal disk had given up. This model of Powerbook runs on a 2.5" IDE disk, usually manufactured by Toshiba, not one of the usual brands that would fail. After a few moments of poking it did seem that either the bearings or motor was damaged. If I wanted a working system then i'd need to replace it. Only to be confronted with the sound of screeching metal and clicking. The internal disk had given up. This model of Powerbook runs on a 2.5" IDE disk, usually manufactured by Toshiba, not one of the usual brands that would fail. After a few moments of poking it did seem that either the bearings or motor was damaged. If I wanted a working system then i'd need to replace it.
{{< figure src="open.jpg" width="400" title="The Powerbook torn apart." class="is-pulled-left">}} {{< image src="open.jpg" width="400x" class="is-pulled-right" title="Disassembled down to the hard drive.">}}
iFixIt [rates the hard-drive replacement](https://www.ifixit.com/Guide/PowerBook+G4+Aluminum+12-Inch+1-1.5+GHz+Hard+Drive+Replacement/548) as 'Difficult', and I walked into this thinking it wouldn't be that hard. You can really respect the modern repairability of most systems after looking at this, even just having a standard set to screws alone would be a huge improvement! iFixIt [rates the hard-drive replacement](https://www.ifixit.com/Guide/PowerBook+G4+Aluminum+12-Inch+1-1.5+GHz+Hard+Drive+Replacement/548) as 'Difficult', and I walked into this thinking it wouldn't be that hard. You can really respect the modern repairability of most systems after looking at this, even just having a standard set to screws alone would be a huge improvement!

View File

@@ -3,4 +3,4 @@ title: Electronics Bay
subtitle: Tools and components to create circuits and projects. subtitle: Tools and components to create circuits and projects.
--- ---
{{< image "electronics.jpg" >}} {{< image src="electronics.jpg" >}}

View File

@@ -3,4 +3,4 @@ title: Fabrication
subtitle: Use 3D printers and laser cutters to bring your creations to life. subtitle: Use 3D printers and laser cutters to bring your creations to life.
--- ---
{{< image "fabrication.png" >}} {{< image src="fabrication.png" >}}

View File

@@ -5,7 +5,7 @@ subtitle: Hand tools and machinery to work with wood and metal.
Our woodwork shop is the home of everything loud and dusty, along with a stock of tools, parts, and materials you'll need to make a quick repair, build a chair from scratch, or create some decorative treen for the house. Our woodwork shop is the home of everything loud and dusty, along with a stock of tools, parts, and materials you'll need to make a quick repair, build a chair from scratch, or create some decorative treen for the house.
{{< image "workshop.jpg" >}} {{< image src="workshop.jpg" >}}
## Hand Tools ## Hand Tools

View File

@@ -1,5 +1,15 @@
{{ $img := .Page.Resources.GetMatch (printf "*%s*" (.Get 0)) }} {{ $img := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) }}
{{ $img = $img.Resize "1256x jpg" }} {{ $width := .Get "width" }}
<figure class="image"> {{ $img = $img.Resize (print (default "1256x" $width) " jpg") }}
<img src="{{ $img.RelPermalink }}" width="{{ $img.Width }}" height="{{ $img.Height }}">` {{ $title := .Get "title" }}
{{ $class := .Get "class" }}
<figure class="image{{ if $class }} {{ $class }}{{ end }}">
<img src="{{ $img.RelPermalink }}" width="{{ $img.Width }}" height="{{ $img.Height }}"{{ if $title }} alt="{{ $title }}"{{ end }}>
{{ if $title }}
<figcaption class="is-size-6">
<small>
{{ $title }}
</small>
</figcaption>
{{ end }}
</figure> </figure>

View File

@@ -1,24 +0,0 @@
{{ $img := .Page.Resources.GetMatch (printf "*%s*" (.Get 0)) }}
{{ $command := .Get 1 }}
{{ $options := .Get 2 }}
{{ if eq $command "Fit"}}
{{ $img = $img.Fit $options }}
{{ else if eq $command "Resize"}}
{{ $img = $img.Resize $options }}
{{ else if eq $command "Fill"}}
{{ $img = $img.Fill $options }}
{{ else if eq $command "Crop"}}
{{ $img = $img.Crop $options }}
{{ else }}
{{ errorf "Invalid image processing command: Must be one of Crop, Fit, Fill or Resize."}}
{{ end }}
<figure class="image">
<img src="{{ $img.RelPermalink }}" width="{{ $img.Width }}" height="{{ $img.Height }}">
<figcaption>
<small>
{{ with .Inner }}
{{ . }}
{{ end }}
</small>
</figcaption>
</figure>