Skip to content

Commit

Permalink
Merge pull request #709 from naher94/development
Browse files Browse the repository at this point in the history
Multiple Date Photoset
  • Loading branch information
naher94 authored Mar 23, 2024
2 parents a1939b1 + c3241f3 commit 657174b
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 31 deletions.
Binary file modified .DS_Store
Binary file not shown.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,10 @@ thumbnail | thumbnail file name | `image` `.png` or `.jpg` when featured project
thumbnail-alt | The `alt` text for the thumbnail image | `string` eg. `Burj Al Arab Atrium`
hero-image | The image that loads into the hero section | `path` as a `string` eg. `dubai-expo/dubai-hero.jpg`; File should be an `.jpg` aspect ratio 2x1
hero-image-alt | The `alt` text for the hero image | `string` eg. `Dubai Expo Center Dome`
featured | Whether it renders in as featured (bigger tiles) | `bool`
featured | Whether it renders on `/` | `bool`
big-tile | Whether it renders as a big tile on `/photography` | `bool` eg. `true`
date | `YYYY-MM-DD` | `date`
display-date | Use in the case of multiple dates | `string` eg. `Winter 2012 & Spring 2022`


#### `_resources` Frontmatter Tags
Expand Down
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ description: > # this means to ignore newlines until "baseurl:"
baseurl: "" # the subpath of your site, e.g. /blog
url: "https://rehanbutt.com" # the base hostname & protocol for your site
version: 8.3.0
version: 8.4.0
version-naming: [Apricot, Blackcurrent, Coconut, Dragonfruit, Elderberry, Fig, Guava, Honeydew]

# Build settings
Expand Down
30 changes: 17 additions & 13 deletions _layouts/post-photo.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,23 @@

<header class="post-header post-header-hero">
<p class="date-stamp">
{%- assign photo-month = photoset.date| date: "%m" | plus:0 -%}
{%- if photo-month >= 3 and photo-month < 6 -%}
Spring
{%- elsif photo-month >= 6 and photo-month < 9 -%}
Summer
{%- elsif photo-month >= 9 and photo-month < 12 -%}
Fall
{%- elsif photo-month >= 12 -%}
Winter
{%- elsif photo-month < 3 -%}
Winter
{%- endif -%}
&nbsp;{{ page.date| date: "%Y" }}
{% if page.display-date %}
{{page.display-date}}
{% else %}
{% assign photo-month = page.date| date: "%m" | plus:0 %}
{% if photo-month >= 3 and photo-month < 6 %}
Spring
{% elsif photo-month >= 6 and photo-month < 9 %}
Summer
{% elsif photo-month >= 9 and photo-month < 12 %}
Fall
{% elsif photo-month >= 12 %}
Winter
{% elsif photo-month < 3 %}
Winter
{% endif %}
{{ page.date| date: "%Y" }}
{% endif %}
</p>
<h1 itemprop="name headline">{{ page.title }}</h1>
<p class="post-meta">{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}</p>
Expand Down
2 changes: 1 addition & 1 deletion _photography/dubai-expo.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ thumbnail-alt: Al Wasl Plaza Dome in daylight
hero-image: "dubai-expo/dubai-hero.jpg"
hero-image-alt: Al Wasl Plaza Dome in daylight
featured: true
big-tile: true
big-tile:
date: 15-03-2022
hero-background-color: "#FFFFFF"
hero-background-color-dark: "#161d27"
Expand Down
5 changes: 3 additions & 2 deletions _photography/dubai.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ thumbnail-alt: Lobby of Burj Al Arab
hero-image: "dubai/hero.jpg"
hero-image-alt: Lobby of Burj Al Arab
featured:
big-tile:
date: 15-12-2012
big-tile: true
date: 15-03-2022
display-date: Winter 2012 & Spring 2022
hero-background-color: "#FFFFFF"
hero-background-color-dark: "#161d27"
hero-accent-color: "#1F2937"
Expand Down
Binary file modified img/.DS_Store
Binary file not shown.
30 changes: 17 additions & 13 deletions photography.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,23 @@ <h1 class="visually-hidden">Photography</h1>
<div class="text-container">
<h2 class="thumbnail-text">{{ photoset.title }}</h2>
<span class="thumbnail-text-date">
{%- assign photo-month = photoset.date| date: "%m" | plus:0 -%}
{%- if photo-month >= 3 and photo-month < 6 -%}
Spring
{%- elsif photo-month >= 6 and photo-month < 9 -%}
Summer
{%- elsif photo-month >= 9 and photo-month < 12 -%}
Fall
{%- elsif photo-month >= 12 -%}
Winter
{%- elsif photo-month < 3 -%}
Winter
{%- endif -%}
&nbsp;{{ photoset.date| date: "%Y" }}
{% if photoset.display-date %}
{{photoset.display-date}}
{% else %}
{% assign photo-month = photoset.date| date: "%m" | plus:0 %}
{% if photo-month >= 3 and photo-month < 6 %}
Spring
{% elsif photo-month >= 6 and photo-month < 9 %}
Summer
{% elsif photo-month >= 9 and photo-month < 12 %}
Fall
{% elsif photo-month >= 12 %}
Winter
{% elsif photo-month < 3 %}
Winter
{% endif %}
{{ photoset.date| date: "%Y" }}
{% endif %}
</span>
</div>
{% if photoset.flag %}
Expand Down

0 comments on commit 657174b

Please sign in to comment.