Skip to content

Commit b16bd3b

Browse files
committed
simpler pagination buttons
1 parent aeef501 commit b16bd3b

File tree

9 files changed

+239
-239
lines changed

9 files changed

+239
-239
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
I"�{"source"=>"/home/bobby/Documents/websites/code", "destination"=>"/home/bobby/Documents/websites/code/_site", "collections_dir"=>"collections", "cache_dir"=>".jekyll-cache", "plugins_dir"=>"_plugins", "layouts_dir"=>"_layouts", "data_dir"=>"_data", "includes_dir"=>"_includes", "collections"=>{"posts"=>{"output"=>true, "permalink"=>"/:categories/:year/:month/:day/:title:output_ext"}, "projects"=>{"output"=>true}, "blog"=>{"output"=>true}}, "safe"=>false, "include"=>[".htaccess"], "exclude"=>[".sass-cache", ".jekyll-cache", "gemfiles", "Gemfile", "Gemfile.lock", "node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"], "keep_files"=>[".git", ".svn"], "encoding"=>"utf-8", "markdown_ext"=>"markdown,mkdown,mkdn,mkd,md", "strict_front_matter"=>false, "show_drafts"=>nil, "limit_posts"=>0, "future"=>false, "unpublished"=>false, "whitelist"=>[], "plugins"=>["jekyll-feed", "jekyll-seo-tag"], "markdown"=>"kramdown", "highlighter"=>"rouge", "lsi"=>false, "excerpt_separator"=>"\n\n", "incremental"=>false, "detach"=>false, "port"=>"4000", "host"=>"127.0.0.1", "baseurl"=>nil, "show_dir_listing"=>false, "permalink"=>"date", "paginate_path"=>"/page:num/", "timezone"=>nil, "quiet"=>false, "verbose"=>false, "defaults"=>[], "liquid"=>{"error_mode"=>"warn", "strict_filters"=>false, "strict_variables"=>false}, "kramdown"=>{"auto_ids"=>true, "toc_levels"=>[1, 2, 3, 4, 5, 6], "entity_output"=>"as_char", "smart_quotes"=>"lsquo,rsquo,ldquo,rdquo", "input"=>"GFM", "hard_wrap"=>false, "guess_lang"=>true, "footnote_nr"=>1, "show_warnings"=>false}, "title"=>"RCmags", "author"=>"random-internet-guy", "email"=>"memoryofatrufestival@gmail.com", "description"=>"blog n' stuff", "paginate"=>6, "github_username"=>"RCmags", "youtube_username"=>"XXXmags", "rcgroups_username_id"=>"189488", "show_excerpts"=>false, "minima"=>{"date_format"=>"%-d %b, %Y"}, "livereload_port"=>35729, "serving"=>true, "watch"=>true, "url"=>"http://localhost:4000"}:ET
1+
I"�{"source"=>"/home/bobby/Documents/github-website/code", "destination"=>"/home/bobby/Documents/github-website/code/_site", "collections_dir"=>"collections", "cache_dir"=>".jekyll-cache", "plugins_dir"=>"_plugins", "layouts_dir"=>"_layouts", "data_dir"=>"_data", "includes_dir"=>"_includes", "collections"=>{"posts"=>{"output"=>true, "permalink"=>"/:categories/:year/:month/:day/:title:output_ext"}, "projects"=>{"output"=>true}, "blog"=>{"output"=>true}}, "safe"=>false, "include"=>[".htaccess"], "exclude"=>[".sass-cache", ".jekyll-cache", "gemfiles", "Gemfile", "Gemfile.lock", "node_modules", "vendor/bundle/", "vendor/cache/", "vendor/gems/", "vendor/ruby/"], "keep_files"=>[".git", ".svn"], "encoding"=>"utf-8", "markdown_ext"=>"markdown,mkdown,mkdn,mkd,md", "strict_front_matter"=>false, "show_drafts"=>nil, "limit_posts"=>0, "future"=>false, "unpublished"=>false, "whitelist"=>[], "plugins"=>["jekyll-feed", "jekyll-seo-tag"], "markdown"=>"kramdown", "highlighter"=>"rouge", "lsi"=>false, "excerpt_separator"=>"\n\n", "incremental"=>false, "detach"=>false, "port"=>"4000", "host"=>"127.0.0.1", "baseurl"=>nil, "show_dir_listing"=>false, "permalink"=>"date", "paginate_path"=>"/page:num/", "timezone"=>nil, "quiet"=>false, "verbose"=>false, "defaults"=>[], "liquid"=>{"error_mode"=>"warn", "strict_filters"=>false, "strict_variables"=>false}, "kramdown"=>{"auto_ids"=>true, "toc_levels"=>[1, 2, 3, 4, 5, 6], "entity_output"=>"as_char", "smart_quotes"=>"lsquo,rsquo,ldquo,rdquo", "input"=>"GFM", "hard_wrap"=>false, "guess_lang"=>true, "footnote_nr"=>1, "show_warnings"=>false}, "title"=>"RCmags", "author"=>"random-internet-guy", "email"=>"memoryofatrufestival@gmail.com", "description"=>"Projects and other things", "paginate"=>6, "github_username"=>"RCmags", "youtube_username"=>"XXXmags", "rcgroups_username_id"=>"189488", "google_analytics"=>true, "minima"=>{"date_format"=>"%-d %b, %Y"}, "livereload_port"=>35729, "serving"=>true, "watch"=>true, "url"=>"http://localhost:4000"}:ET

_config.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
title: RCmags
22
author: random-internet-guy
33
email: memoryofatrufestival@gmail.com
4-
description: blog n' stuff
4+
description: Projects and other things
55

66
# index pagination
77
plugins:
@@ -24,7 +24,8 @@ github_username: RCmags
2424
youtube_username: XXXmags
2525
rcgroups_username_id: "189488"
2626

27-
show_excerpts: false # set to true to show excerpts on the homepage
27+
# toggled
28+
google_analytics: true
2829

2930
# Minima date format
3031
# refer to http://shopify.github.io/liquid/filters/date/ if you want to customize this

_includes/head.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<head>
22
<!-- auto-generated tag -->
3-
{% include google-analytics.html %}
3+
{% if site.google_analytics %}
4+
{% include google-analytics.html %}
5+
{% endif %}
46

57
<!-- default -->
68
<meta charset="utf-8">

_includes/paginator-buttons.html

Lines changed: 44 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,47 @@
1-
<div class="pagination">
2-
<!-- Previous button -->
3-
{% if paginator.previous_page %}
4-
<a class="button_link" href="{{ paginator.previous_page_path }}">
5-
&#9664;
6-
</a>
7-
{% else %}
8-
<span class="button_null"> &#9664; </span>
9-
{% endif %}
1+
{% assign npages = paginator.total_pages %}
2+
3+
<div class="paginator-buttons">
4+
<details>
5+
<!-- button menu -->
6+
<summary>
107

11-
<!-- Next button -->
12-
{% if paginator.next_page %}
13-
<a class="button_link" href="{{ paginator.next_page_path }}">
14-
&#9654;
15-
</a>
16-
{% else %}
17-
<span class="button_null"> &#9654; </span>
18-
{% endif %}
19-
</div>
8+
<!-- Previous button -->
9+
{% if paginator.previous_page %}
10+
<a class="button_link" href="{{ paginator.previous_page_path }}">
11+
{% else %}
12+
<a class="button_null">
13+
{% endif %}
14+
<svg style="height: 20px; width: 20px">
15+
<polygon points="0,10 20,20 20,0">
16+
</svg></a>
17+
18+
<!-- Goto button -->
19+
{% if npages > 1 %}
20+
<span class="label">{{ paginator.page }}/{{ paginator.total_pages }}</span>
21+
{% endif %}
2022

21-
<!-- Pages -->
22-
{% include paginator-goto.html %}
2323

24+
<!-- Next button -->
25+
{% if paginator.next_page %}
26+
<a class="button_link" href="{{ paginator.next_page_path }}">
27+
{% else %}
28+
<a class="button_null">
29+
{% endif %}
30+
<svg style="height: 20px; width: 20px">
31+
<polygon points="20,10 0,20 0,0">
32+
</svg></a>
33+
34+
</summary>
35+
36+
<!-- list -->
37+
{% if npages > 1 %}
38+
<div class="grid-container">
39+
<a class="grid-item" href="{{ site.baseurl }}/">1</a>
40+
{% for index in (2..npages) %}
41+
<a class="grid-item" href="{{ site.baseurl }}/page{{ index }}">{{index}}</a>
42+
{% endfor %}
43+
</nav>
44+
{% endif %}
45+
46+
</details>
47+
</div>

_includes/paginator-goto.html

Lines changed: 0 additions & 18 deletions
This file was deleted.

_sass/minima.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ $max-image-size: 650px;
5757
"minima/syntax-highlighting",
5858
"youtube",
5959
"search-lunr",
60-
"pagination",
60+
"paginator-list",
61+
"paginator-buttons",
6162
"image-slider",
6263
"projects",
6364
"icons"

_sass/pagination.scss

Lines changed: 0 additions & 196 deletions
This file was deleted.

0 commit comments

Comments
 (0)