Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Archive Page - for Issue 29 #30

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@ source "https://rubygems.org"
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 3.8.4"
gem "jekyll", "~> 3.8.5"

# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.0"
gem "minima", "~> 2.5.0"

# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins

# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.6"
gem "jekyll-feed", "~> 0.11.0"
gem "jekyll-archives", "~> 2.1.1"
gem "jekyll-seo-tag", "~> 2.5.0"
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
Expand Down
14 changes: 9 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ GEM
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
jekyll-feed (0.10.0)
jekyll-archives (2.1.1)
jekyll (>= 2.4)
jekyll-feed (0.11.0)
jekyll (~> 3.3)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
Expand Down Expand Up @@ -65,10 +67,12 @@ PLATFORMS
ruby

DEPENDENCIES
jekyll (~> 3.8.4)
jekyll-feed (~> 0.6)
minima (~> 2.0)
jekyll (~> 3.8.5)
jekyll-archives (~> 2.1.1)
jekyll-feed (~> 0.11.0)
jekyll-seo-tag (~> 2.5.0)
minima (~> 2.5.0)
tzinfo-data

BUNDLED WITH
1.16.2
1.16.6
26 changes: 25 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,17 @@ logo: "/files/logo/c4l_logo/c4l_logo.RGB_400px.png"
logo_alt: "Code4Lib"
include: ['_pages']

# Minima theme's menu builder. Pages added to header_pages appear in navigation.
header_pages:
- about.md


# - music last.fm's group pages taken down
# - https://shop.spreadshirt.com/code4lib/

# external links are in _includes/header.html


# social links
twitter_username: code4lib
github_username: code4lib
youtube_username: code4lib
Expand All @@ -43,6 +45,25 @@ markdown: kramdown
theme: minima
plugins:
- jekyll-feed
- jekyll-archives
- jekyll-seo-tag

# jekyll-archives configuration
# See https://github.com/jekyll/jekyll-archives/blob/master/docs/configuration.md
jekyll-archives:
enabled: all # The string 'all', or an array of enabled archive types
layouts: # Specify layouts for each type of archive
year: year
month: month
day: day
category: archive
tag: archive
permalinks: # Specify permalinks for archive pages
year: 'archives/:year/'
month: 'archives/:year/:month/'
day: 'archives/:year/:month/:day/'
tag: '/tag/:name/'
category: '/category/:name/'

# Exclude from processing.
# The following items will not be processed, by default. Create a custom list
Expand All @@ -55,3 +76,6 @@ plugins:
# - vendor/cache/
# - vendor/gems/
# - vendor/ruby/

# keep:
# - files
81 changes: 41 additions & 40 deletions _includes/header.html
Original file line number Diff line number Diff line change
@@ -1,40 +1,41 @@
<header class="site-header" role="banner">

<div class="wrapper">
{%- assign default_paths = site.pages | map: "path" -%}
{%- assign page_paths = site.header_pages | default: default_paths -%}
<a class="site-title" rel="author" href="{{ "/" | relative_url }}"><img class="site-logo" src="{{ site.logo }}" alt="{{ site.logo_alt }}"></a>

{%- if page_paths -%}
<nav class="site-nav">
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger">
<span class="menu-icon">
<svg viewBox="0 0 18 15" width="18px" height="15px">
<path d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.032C17.335,0,18,0.665,18,1.484L18,1.484z M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.032C17.335,6.031,18,6.696,18,7.516L18,7.516z M18,13.516C18,14.335,17.335,15,16.516,15H1.484 C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.483,1.484-1.483h15.032C17.335,12.031,18,12.695,18,13.516L18,13.516z"/>
</svg>
</span>
</label>

<div class="trigger">
{%- for path in page_paths -%}
{%- assign my_page = site.pages | where: "path", path | first -%}
{%- if my_page.title -%}
<a class="page-link" href="{{ my_page.url | relative_url }}">{{ my_page.title | escape }}</a>
{%- endif -%}
{%- endfor -%}

<a class="page-link" href="/irc/">Chat</a>
<a class="page-link" href="/conference/">Conference</a>
<a class="page-link" href="http://jobs.code4lib.org">Jobs</a>
<a class="page-link" href="https://journal.code4lib.org">Journal</a>
<a class="page-link" href="/local/">Local</a>
<a class="page-link" href="https://lists.clir.org/cgi-bin/wa?A0=CODE4LIB">Mailing List</a>
<a class="page-link" href="http://planet.code4lib.org">Planet</a>
<a class="page-link" href="https://wiki.code4lib.org">Wiki</a>

</div>
</nav>
{%- endif -%}
</div>
</header>
<header class="site-header" role="banner">

<div class="wrapper">
{%- assign default_paths = site.pages | map: "path" -%}
{%- assign page_paths = site.header_pages | default: default_paths -%}
<a class="site-title" rel="author" href="{{ "/" | relative_url }}"><img class="site-logo" src="{{ site.logo }}" alt="{{ site.logo_alt }}"></a>

{%- if page_paths -%}
<nav class="site-nav">
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger">
<span class="menu-icon">
<svg viewBox="0 0 18 15" width="18px" height="15px">
<path d="M18,1.484c0,0.82-0.665,1.484-1.484,1.484H1.484C0.665,2.969,0,2.304,0,1.484l0,0C0,0.665,0.665,0,1.484,0 h15.032C17.335,0,18,0.665,18,1.484L18,1.484z M18,7.516C18,8.335,17.335,9,16.516,9H1.484C0.665,9,0,8.335,0,7.516l0,0 c0-0.82,0.665-1.484,1.484-1.484h15.032C17.335,6.031,18,6.696,18,7.516L18,7.516z M18,13.516C18,14.335,17.335,15,16.516,15H1.484 C0.665,15,0,14.335,0,13.516l0,0c0-0.82,0.665-1.483,1.484-1.483h15.032C17.335,12.031,18,12.695,18,13.516L18,13.516z"/>
</svg>
</span>
</label>

<div class="trigger">
{%- for path in page_paths -%}
{%- assign my_page = site.pages | where: "path", path | first -%}
{%- if my_page.title -%}
<a class="page-link" href="{{ my_page.url | relative_url }}">{{ my_page.title | escape }}</a>
{%- endif -%}
{%- endfor -%}

<a class="page-link" href="/about/">About</a>
<a class="page-link" href="/irc/">Chat</a>
<a class="page-link" href="/conference/">Conference</a>
<a class="page-link" href="http://jobs.code4lib.org">Jobs</a>
<a class="page-link" href="https://journal.code4lib.org">Journal</a>
<a class="page-link" href="/local/">Local</a>
<a class="page-link" href="https://lists.clir.org/cgi-bin/wa?A0=CODE4LIB">Mailing List</a>
<a class="page-link" href="http://planet.code4lib.org">Planet</a>
<a class="page-link" href="https://wiki.code4lib.org">Wiki</a>

</div>
</nav>
{%- endif -%}
</div>
</header>
15 changes: 15 additions & 0 deletions _layouts/archive.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
layout: default
---

<!-- https://github.com/jekyll/jekyll-archives/blob/master/docs/layouts.md -->
<h1>Posts with {{ page.type }} '{{ page.title }}'.</h1>

<ul class="posts">
{% for post in page.posts %}
<li>
<span class="post-date">{{ post.date | date: "%b %-d, %Y" }}</span>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</li>
{% endfor %}
</ul>
15 changes: 15 additions & 0 deletions _layouts/day.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
layout: default
---

<!-- https://github.com/jekyll/jekyll-archives/blob/master/docs/layouts.md -->
<h1>Archive of posts from {{ page.date | date: "%B %-d, %Y" }}</h1>

<ul class="posts">
{% for post in page.posts %}
<li>
<span class="post-date">{{ post.date | date: "%b %-d, %Y" }}</span>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</li>
{% endfor %}
</ul>
15 changes: 15 additions & 0 deletions _layouts/month.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
layout: default
---

<!-- https://github.com/jekyll/jekyll-archives/blob/master/docs/layouts.md -->
<h1>Archive of posts from {{ page.date | date: "%B %Y" }}</h1>

<ul class="posts">
{% for post in page.posts %}
<li>
<span class="post-date">{{ post.date | date: "%b %-d, %Y" }}</span>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</li>
{% endfor %}
</ul>
15 changes: 15 additions & 0 deletions _layouts/year.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
layout: default
---

<!-- https://github.com/jekyll/jekyll-archives/blob/master/docs/layouts.md -->
<h1>Archive of posts from {{ page.date | date: "%Y" }}</h1>

<ul class="posts">
{% for post in page.posts %}
<li>
<span class="post-date">{{ post.date | date: "%b %-d, %Y" }}</span>
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
</li>
{% endfor %}
</ul>
14 changes: 4 additions & 10 deletions _pages/about.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
---
excerpt: "code4lib isn't entirely about code or libraries. It is a volunteer-driven
collective of hackers, designers, architects, curators, catalogers, artists and
instigators from around the world, who largely work for and with libraries, archives
and museums on technology \"stuff.\" It started in the fall of 2003 as a <a href=\"https://listserv.nd.edu/cgi-bin/wa?A0=CODE4LIB\">mailing
list</a> when a group of library programmers decided to create an overarching community
agnostic towards any particular language or technology. \r\n\r\nCode4Lib is dedicated
to providing a harassment-free community experience for everyone regardless of gender,
sexual orientation, disability, physical appearance, body size, race, or religion.
For more information, please see our emerging <a href=\"https://github.com/code4lib/antiharassment-policy/blob/master/code_of_conduct.md\">CodeofConduct4Lib</a>.\r\n\r\n"
categories: []
excerpt: "code4lib isn't entirely about code or libraries. It is a volunteer-driven collective of hackers, designers, architects, curators, catalogers, artists and instigators from around the world, who largely work for and with libraries, archives and museums on technology \"stuff.\" It started in the fall of 2003 as a <a href=\"https://listserv.nd.edu/cgi-bin/wa?A0=CODE4LIB\">mailing list</a> when a group of library programmers decided to create an overarching community agnostic towards any particular language or technology. \r\n\r\nCode4Lib is dedicated to providing a harassment-free community experience for everyone regardless of gender, sexual orientation, disability, physical appearance, body size, race, or religion.

For more information, please see our emerging <a href=\"https://github.com/code4lib/antiharassment-policy/blob/master/code_of_conduct.md\">CodeofConduct4Lib</a>.\r\n\r\n"
categories:
layout: page
title: About
permalink: /about/
Expand Down
46 changes: 46 additions & 0 deletions _pages/archive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
excerpt: "Archived posts by category and date."
categories: archive, site, admin
layout: page
title: Archive
permalink: /archive/
created:
legacy-date:
---

<p><strong>Posts in a given category can be reached at:</strong></p>
<p><i>/category/[name of category]</i></p>
<p><strong>Posts in a given date range can be reach at:</strong></p>
<p><i>/archives/[year]</i><br>
<i>/archives/[year]/[month]</i><br>
<i>/archives/[year]/[month]/[day]</i></p>

<section id="category-list" class="piped-list">
<p><strong>Post categories with corresponding number of posts:</strong></p>
<ul>
{% assign categories = site.categories | sort %}
{% for category in site.categories %}
<li>
<a href="/category/{{ category | first | slugify }}/">{{ category[0] | replace:'-', ' ' }} ({{ category | last | size }})</a>
</li>
{% endfor %}
</ul>
</section>

<section id="date-list" class="piped-list">
<p><strong>Posts by year with corresponding number of posts:</strong></p>
<ul>
{% assign counter = 0 %}
{% for post in site.posts %}
{% if post.date %}
{% assign thisyear = post.date | date: "%Y" %}
{% assign prevyear = post.previous.date | date: "%Y" %}
{% endif %}
{% assign counter = counter | plus: 1 %}
{% if thisyear != prevyear %}
<li><a href="/archives/{{ post.date | date:'%Y' }}">{{ thisyear }} ({{ counter }})</a></li>
{% assign counter = 0 %}
{% endif %}
{% endfor %}
</ul>
</section>
45 changes: 36 additions & 9 deletions _sass/minima.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,17 @@ $on-laptop: 800px !default;
text-align: center;
}



// Use media queries like this:
// @include media-query($on-palm) {
// .wrapper {
// padding-right: $spacing-unit / 2;
// padding-left: $spacing-unit / 2;
// }
// }
@mixin media-query($device) {
@media screen and (max-width: $device) {
// .wrapper {
// padding-right: $spacing-unit / 2;
// padding-left: $spacing-unit / 2;
// }
// }
@mixin media-query($device) {
@media screen and (max-width: $device) {
@content;
}
}
Expand All @@ -62,7 +64,32 @@ $on-laptop: 800px !default;

// Import partials.
@import
"minima/base",
"minima/base",
"minima/layout",
"minima/syntax-highlighting"
;
;

// Custom

// Piped List
.piped-list {
position: relative;
overflow: hidden;
}
.piped-list ul {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
margin: 1em;
}
.piped-list ul li {
list-style: none;
margin: .25em 0;
padding: 0;
text-align: center;
}
.piped-list li + li::before {
content: "|";
margin: 0 .5em;
}
Loading