-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change: Refactor project category pages
- Loading branch information
Showing
8 changed files
with
65 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
--- | ||
layout: base | ||
active: projects | ||
title: Projects | ||
--- | ||
|
||
<header> | ||
<h1> | ||
Projects | ||
<a href="/projects/feed.xml" class="rss-link"> | ||
<span class="link-text">Subscribe via RSS</span> | ||
{% include rss_logo.svg %} | ||
</a> | ||
</h1> | ||
</header> | ||
|
||
<section class="projects-nav"> | ||
<ul> | ||
<li><a href="/projects"{% if page.active_category == 'all' %} class="active"{% endif %}>All projects</a></li> | ||
<li><a href="/projects/bookdesign"{% if page.active_category == 'bookdesign' %} class="active"{% endif %}>Book design</a></li> | ||
<li><a href="/projects/photography"{% if page.active_category == 'photography' %} class="active"{% endif %}>Photography</a></li> | ||
<li><a href="/projects/publishing"{% if page.active_category == 'publishing' %} class="active"{% endif %}>Publishing</a></li> | ||
<li><a href="/projects/software"{% if page.active_category == 'software' %} class="active"{% endif %}>Software</a></li> | ||
<li><a href="/projects/writing"{% if page.active_category == 'writing' %} class="active"{% endif %}>Writing</a></li> | ||
</ul> | ||
</section> | ||
|
||
<section class="projects-grid"> | ||
{% if page.active_category == 'bookdesign' %} | ||
{% assign filtered_projects = site.projects | where_exp: "project", "project.categories contains 'Book design'" %} | ||
{% elsif page.active_category == 'photography' %} | ||
{% assign filtered_projects = site.projects | where_exp: "project", "project.categories contains 'Photography'" %} | ||
{% elsif page.active_category == 'publishing' %} | ||
{% assign filtered_projects = site.projects | where_exp: "project", "project.categories contains 'Publishing'" %} | ||
{% elsif page.active_category == 'software' %} | ||
{% assign filtered_projects = site.projects | where_exp: "project", "project.categories contains 'Software'" %} | ||
{% elsif page.active_category == 'writing' %} | ||
{% assign filtered_projects = site.projects | where_exp: "project", "project.categories contains 'Writing'" %} | ||
{% else %} | ||
{% assign filtered_projects = site.projects %} | ||
{% endif %} | ||
|
||
{% assign sorted_projects = filtered_projects | sort: 'date' | reverse %} | ||
{% for project in sorted_projects %} | ||
<a class="project-card" style="background-image: url('{{ project.featured_image }}')" href="{{ project.url }}"> | ||
<header> | ||
<h3>{{ project.title }}</h3> | ||
<p class="meta">{{ project.timespan }}</p> | ||
</header> | ||
</a> | ||
{% endfor %} | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ | |
position: absolute; | ||
right: 0; | ||
bottom: 0.3rem; | ||
color: var(--color-text); | ||
} | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,6 @@ | ||
--- | ||
layout: base | ||
layout: project_list | ||
active: projects | ||
title: Projects | ||
active_category: all | ||
--- | ||
|
||
<header> | ||
<h1> | ||
Projects | ||
<a href="/projects/feed.xml" class="rss-link"> | ||
<span class="link-text">Subscribe via RSS</span> | ||
{% include rss_logo.svg %} | ||
</a> | ||
</h1> | ||
</header> | ||
|
||
<section class="projects-nav"> | ||
<ul> | ||
<li><a href="/projects" class="active">All projects</a></li> | ||
<li><a href="/projects/bookdesign">Book design</a></li> | ||
<li><a href="/projects/photography">Photography</a></li> | ||
<li><a href="/projects/publishing">Publishing</a></li> | ||
<li><a href="/projects/software">Software</a></li> | ||
<li><a href="/projects/writing">Writing</a></li> | ||
</ul> | ||
</section> | ||
|
||
<section class="projects-grid"> | ||
{% assign sorted_projects = site.projects | sort: 'date' | reverse %} | ||
{% for project in sorted_projects %} | ||
<a class="project-card" style="background-image: url('{{ project.featured_image }}')" href="{{ project.url }}"> | ||
<header> | ||
<h3>{{ project.title }}</h3> | ||
<p class="meta">{{ project.timespan }}</p> | ||
</header> | ||
</a> | ||
{% endfor %} | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,6 @@ | ||
--- | ||
layout: base | ||
layout: project_list | ||
active: projects | ||
title: Book design projects | ||
active_category: bookdesign | ||
--- | ||
|
||
<header> | ||
<h1> | ||
Projects | ||
<a href="/projects/feed.xml" class="rss-link"> | ||
<span class="link-text">Subscribe via RSS</span> | ||
{% include rss_logo.svg %} | ||
</a> | ||
</h1> | ||
</header> | ||
|
||
<section class="projects-nav"> | ||
<ul> | ||
<li><a href="/projects">All projects</a></li> | ||
<li><a href="/projects/bookdesign" class="active">Book design</a></li> | ||
<li><a href="/projects/photography">Photography</a></li> | ||
<li><a href="/projects/publishing">Publishing</a></li> | ||
<li><a href="/projects/software">Software</a></li> | ||
<li><a href="/projects/writing">Writing</a></li> | ||
</ul> | ||
</section> | ||
|
||
<section class="projects-grid"> | ||
{% assign filtered_projects = site.projects | where_exp: "project", "project.categories contains 'Book design'" %} | ||
{% assign sorted_projects = filtered_projects | sort: 'date' | reverse %} | ||
{% for project in sorted_projects %} | ||
<a class="project-card" style="background-image: url('{{ project.featured_image }}')" href="{{ project.url }}"> | ||
<header> | ||
<h3>{{ project.title }}</h3> | ||
<p class="meta">{{ project.timespan }}</p> | ||
</header> | ||
</a> | ||
{% endfor %} | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,6 @@ | ||
--- | ||
layout: base | ||
layout: project_list | ||
active: projects | ||
title: Photography projects | ||
active_category: photography | ||
--- | ||
|
||
<header> | ||
<h1> | ||
Projects | ||
<a href="/projects/feed.xml" class="rss-link"> | ||
<span class="link-text">Subscribe via RSS</span> | ||
{% include rss_logo.svg %} | ||
</a> | ||
</h1> | ||
</header> | ||
|
||
<section class="projects-nav"> | ||
<ul> | ||
<li><a href="/projects">All projects</a></li> | ||
<li><a href="/projects/bookdesign">Book design</a></li> | ||
<li><a href="/projects/photography" class="active">Photography</a></li> | ||
<li><a href="/projects/publishing">Publishing</a></li> | ||
<li><a href="/projects/software">Software</a></li> | ||
<li><a href="/projects/writing">Writing</a></li> | ||
</ul> | ||
</section> | ||
|
||
<section class="projects-grid"> | ||
{% assign filtered_projects = site.projects | where_exp: "project", "project.categories contains 'Photography'" %} | ||
{% assign sorted_projects = filtered_projects | sort: 'date' | reverse %} | ||
{% for project in sorted_projects %} | ||
<a class="project-card" style="background-image: url('{{ project.featured_image }}')" href="{{ project.url }}"> | ||
<header> | ||
<h3>{{ project.title }}</h3> | ||
<p class="meta">{{ project.timespan }}</p> | ||
</header> | ||
</a> | ||
{% endfor %} | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,6 @@ | ||
--- | ||
layout: base | ||
layout: project_list | ||
active: projects | ||
title: Publishing projects | ||
active_category: publishing | ||
--- | ||
|
||
<header> | ||
<h1> | ||
Projects | ||
<a href="/projects/feed.xml" class="rss-link"> | ||
<span class="link-text">Subscribe via RSS</span> | ||
{% include rss_logo.svg %} | ||
</a> | ||
</h1> | ||
</header> | ||
|
||
<section class="projects-nav"> | ||
<ul> | ||
<li><a href="/projects">All projects</a></li> | ||
<li><a href="/projects/bookdesign">Book design</a></li> | ||
<li><a href="/projects/photography">Photography</a></li> | ||
<li><a href="/projects/publishing" class="active">Publishing</a></li> | ||
<li><a href="/projects/software">Software</a></li> | ||
<li><a href="/projects/writing">Writing</a></li> | ||
</ul> | ||
</section> | ||
|
||
<section class="projects-grid"> | ||
{% assign filtered_projects = site.projects | where_exp: "project", "project.categories contains 'Publishing'" %} | ||
{% assign sorted_projects = filtered_projects | sort: 'date' | reverse %} | ||
{% for project in sorted_projects %} | ||
<a class="project-card" style="background-image: url('{{ project.featured_image }}')" href="{{ project.url }}"> | ||
<header> | ||
<h3>{{ project.title }}</h3> | ||
<p class="meta">{{ project.timespan }}</p> | ||
</header> | ||
</a> | ||
{% endfor %} | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,6 @@ | ||
--- | ||
layout: base | ||
layout: project_list | ||
active: projects | ||
title: Software projects | ||
active_category: software | ||
--- | ||
|
||
<header> | ||
<h1> | ||
Projects | ||
<a href="/projects/feed.xml" class="rss-link"> | ||
<span class="link-text">Subscribe via RSS</span> | ||
{% include rss_logo.svg %} | ||
</a> | ||
</h1> | ||
</header> | ||
|
||
<section class="projects-nav"> | ||
<ul> | ||
<li><a href="/projects">All projects</a></li> | ||
<li><a href="/projects/bookdesign">Book design</a></li> | ||
<li><a href="/projects/photography">Photography</a></li> | ||
<li><a href="/projects/publishing">Publishing</a></li> | ||
<li><a href="/projects/software" class="active">Software</a></li> | ||
<li><a href="/projects/writing">Writing</a></li> | ||
</ul> | ||
</section> | ||
|
||
<section class="projects-grid"> | ||
{% assign filtered_projects = site.projects | where_exp: "project", "project.categories contains 'Software'" %} | ||
{% assign sorted_projects = filtered_projects | sort: 'date' | reverse %} | ||
{% for project in sorted_projects %} | ||
<a class="project-card" style="background-image: url('{{ project.featured_image }}')" href="{{ project.url }}"> | ||
<header> | ||
<h3>{{ project.title }}</h3> | ||
<p class="meta">{{ project.timespan }}</p> | ||
</header> | ||
</a> | ||
{% endfor %} | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,6 @@ | ||
--- | ||
layout: base | ||
layout: project_list | ||
active: projects | ||
title: Writing projects | ||
active_category: writing | ||
--- | ||
|
||
<header> | ||
<h1> | ||
Projects | ||
<a href="/projects/feed.xml" class="rss-link"> | ||
<span class="link-text">Subscribe via RSS</span> | ||
{% include rss_logo.svg %} | ||
</a> | ||
</h1> | ||
</header> | ||
|
||
<section class="projects-nav"> | ||
<ul> | ||
<li><a href="/projects">All projects</a></li> | ||
<li><a href="/projects/bookdesign">Book design</a></li> | ||
<li><a href="/projects/photography">Photography</a></li> | ||
<li><a href="/projects/publishing">Publishing</a></li> | ||
<li><a href="/projects/software">Software</a></li> | ||
<li><a href="/projects/writing" class="active">Writing</a></li> | ||
</ul> | ||
</section> | ||
|
||
<section class="projects-grid"> | ||
{% assign filtered_projects = site.projects | where_exp: "project", "project.categories contains 'Writing'" %} | ||
{% assign sorted_projects = filtered_projects | sort: 'date' | reverse %} | ||
{% for project in sorted_projects %} | ||
<a class="project-card" style="background-image: url('{{ project.featured_image }}')" href="{{ project.url }}"> | ||
<header> | ||
<h3>{{ project.title }}</h3> | ||
<p class="meta">{{ project.timespan }}</p> | ||
</header> | ||
</a> | ||
{% endfor %} | ||
</section> |