1
This commit is contained in:
Evan Pratten 2024-11-26 13:19:49 -05:00
parent 8a5195eaa8
commit c263e6a8e4
34 changed files with 138 additions and 56 deletions

View File

@ -9,7 +9,6 @@ host: 0.0.0.0
port: 4000
livereload: true
# URL
baseurl: /
url: https://ewpratten.com
@ -23,6 +22,16 @@ kramdown:
plugins:
- jekyll-feed
# Per-collection settings
collections_dir: _collections
collections:
posts:
output: true
permalink: /blog/:title
photos:
output: true
permalink: /photography/:title
# Exclusions
exclude:
- .sass-cache/

View File

@ -0,0 +1,6 @@
---
layout: photo
title: "Old Quebec"
date: 2017-06-21
file: 2017-06-21-old-quebec.jpg
---

View File

@ -0,0 +1,6 @@
---
layout: photo
title: "Stormy Street in Quebec"
date: 2017-06-21
file: 2017-06-21-stormy-street-in-quebec.jpg
---

View File

@ -0,0 +1,6 @@
---
layout: photo
title: "Montmorency Falls"
date: 2017-06-22
file: 2017-06-22-montmorency-falls.jpg
---

View File

@ -0,0 +1,6 @@
---
layout: photo
title: "Halifax Port"
date: 2019-08-04
file: 2019-08-04-halifax-port.jpg
---

View File

@ -0,0 +1,6 @@
---
layout: photo
title: "Rocky Shore"
date: 2019-08-04
file: 2019-08-04-rocky-shore.jpg
---

View File

@ -0,0 +1,6 @@
---
layout: photo
title: "Jacob's Ladder"
date: 2019-08-09
file: 2019-08-09-jacobs-ladder.jpg
---

View File

@ -0,0 +1,6 @@
---
layout: photo
title: "My Desk"
date: 2020-07-19
file: 2020-07-19-my-desk.png
---

View File

@ -0,0 +1,6 @@
---
layout: photo
title: "Two Cars"
date: 2020-07-23
file: 2020-07-23-two-cars.png
---

View File

@ -0,0 +1,6 @@
---
layout: photo
title: "Above the Thames"
date: 2020-07-24
file: 2020-07-24-above-the-thames.jpg
---

View File

@ -0,0 +1,6 @@
---
layout: photo
title: "Snow Day in Space"
date: 2022-01-18
file: 2022-01-18-snow-day-in-space.jpg
---

View File

@ -0,0 +1,6 @@
---
layout: photo
title: "Icy Shore"
date: 2022-03-06
file: 2022-03-06-icy-shore.jpg
---

View File

@ -3,12 +3,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{% if page.override_title %}{{page.override_title}}{% else %}{{page.title}} | {{site.title}}{% endif %}</title>
<title>{% if page.override_title %}{{page.override_title}}{% else %}{{page.title}} | {{site.title}}{% endif %}
</title>
</head>
<body>
{{ content }}
<header>
</header>
<main>
{{ content }}
</main>
<hr>
<footer>
<p>
Copyright &copy; 2017 - {{ site.time | date: '%Y' }}
<strong>
Evan Warren Pratten
</strong>
</p>
</footer>
</body>
</html>

23
src/_layouts/photo.html Normal file
View File

@ -0,0 +1,23 @@
---
---
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>"{{page.title}}" by {{site.title}}</title>
</head>
<body>
<main>
<img src="/assets/photography/{{ page.file }}" alt="A photo titled: {{ page.title }}" style="width: 100%;">
<div style="display: flex; justify-content: space-between;">
<span>{{ page.title }}</span>
<span>{{ page.date | date: "%Y-%m-%d" }}</span>
</div>
</main>
</body>
</html>

View File

@ -1,8 +0,0 @@
---
title: Blog
sort_by: date
template: "blog-timeline.html"
---
The following is a list of articles I've written. This is also available in [RSS](/rss.xml) format.

View File

Before

Width:  |  Height:  |  Size: 3.7 MiB

After

Width:  |  Height:  |  Size: 3.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 932 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 737 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

Before

Width:  |  Height:  |  Size: 3.9 MiB

After

Width:  |  Height:  |  Size: 3.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 992 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 754 KiB

View File

Before

Width:  |  Height:  |  Size: 3.5 MiB

After

Width:  |  Height:  |  Size: 3.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 730 KiB

View File

Before

Width:  |  Height:  |  Size: 3.3 MiB

After

Width:  |  Height:  |  Size: 3.3 MiB

View File

Before

Width:  |  Height:  |  Size: 1.1 MiB

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 455 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 920 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 320 KiB

View File

@ -1,45 +0,0 @@
#! /bin/bash
set -ex
# Check if ImageMagick is installed
if ! command -v convert &> /dev/null; then
echo "ImageMagick is not installed. Please install it before running this script."
exit 1
fi
# Get the directory of this script
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
# Find all images with extension ".png", ".jpg", or ".jpeg"
# NOTE: Ignore any image containing ".preview." in the name
IMAGES=$(find $DIR -type f -name "*.png" -o -name "*.jpg" -o -name "*.jpeg" | grep -v ".preview.")
# Loop through all images
for IMAGE in $IMAGES; do
# Create the preview file name (file.preview.ext)
PREVIEW="${IMAGE%.*}.preview.${IMAGE##*.}"
# If the file already exists, skip it
if [ -f "$PREVIEW" ]; then
echo "Preview already exists for: $IMAGE"
continue
fi
# Check if the image is bigger than 1440x1440
WIDTH=$(identify -format "%w" $IMAGE)
HEIGHT=$(identify -format "%h" $IMAGE)
if [ $WIDTH -gt 1440 ] || [ $HEIGHT -gt 1440 ]; then
# Create the preview. This should be a 2 fifths resolution version of the original image
convert $IMAGE -resize 40% $PREVIEW
elif [ $WIDTH -gt 720 ] || [ $HEIGHT -gt 720 ]; then
# Create the preview. This should be a 3 quarters resolution version of the original image
convert $IMAGE -resize 75% $PREVIEW
else
# Create the preview. This should be the original image
cp $IMAGE $PREVIEW
fi
echo "Created preview for: $IMAGE"
done

19
src/photography.html Normal file
View File

@ -0,0 +1,19 @@
---
layout: default
title: Photography
---
<div class="photo-feed">
{% assign photos_sorted = site.photos | sort: "date" | reverse %}
{% for photo in photos_sorted %}
<div class="photo-feed-entry">
<a href="{{ photo.url }}">
<img src="/assets/photography/{{ photo.file }}" alt="A photo titled: {{ photo.name }}" style="width: 100%;">
</a>
<div style="display: flex; justify-content: space-between;">
<span>{{ photo.name }}</span>
<span>{{ photo.date | date: "%Y-%m-%d" }}</span>
</div>
</div>
{% endfor %}
</div>