Skip to content
This repository has been archived by the owner on Oct 13, 2019. It is now read-only.

Commit

Permalink
working on pagination
Browse files Browse the repository at this point in the history
  • Loading branch information
brettinternet committed Aug 19, 2017
1 parent 47fb743 commit 4b51c8f
Show file tree
Hide file tree
Showing 21 changed files with 160 additions and 57 deletions.
14 changes: 13 additions & 1 deletion CHANGELOG.md
Expand Up @@ -4,6 +4,19 @@ All notable changes to this project will be documented here.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).


## 0.0.8 // 2017-08-19
### Changed
- Changed front page back to blog, and /about/ to the landing page
- Allow user to set page title case

### Added
- Added splash page and links page

### Fixed
- Fixed keybase icon hover
- Fixed `header_pages` settings specification in config

## 0.0.7 // 2017-08-06
### Added
- Created splash page for single page sites or immersive intro without header/footer
Expand Down Expand Up @@ -36,7 +49,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Made site logo and gpg key paths relative
- Corrected logo logic to show sitename is `logo.*` doesn't exist in `/assets/`


## 0.0.1 // 2017-07-30
### Added
- Initial fork from Minima
Expand Down
3 changes: 3 additions & 0 deletions Gemfile
Expand Up @@ -3,3 +3,6 @@ gemspec
gem 'jekyll-feed'
gem 'jekyll-sitemap'
gem 'jekyll-gist'
gem 'jekyll-redirect-from'
gem 'jekyll-archives'
gem 'jekyll-paginate'
15 changes: 12 additions & 3 deletions _config.yml
Expand Up @@ -40,17 +40,26 @@ links:
# refer to http://shopify.github.io/liquid/filters/date/ if you want to customize this
minimaless:
date_format: "%b %-d, %Y"
permalink: /blog/:year/:title
permalink: /:year/:title
paginate: 2
paginate_path: "/page:num/"

# If you want to link only specific pages in your header, uncomment
# this and add the path to the pages in order as they should show up
#header_pages:
# - about.html
header_pages:
- _pages/blog.md
- _pages/about.md
- _pages/contact.md
- _pages/setup.md
- _pages/github.md

plugins:
- jekyll-feed
- jekyll-gist
- jekyll-sitemap
- jekyll-redirect-from
- jekyll-archives
- jekyll-paginate

markdown: kramdown
theme: minimaless
Expand Down
7 changes: 4 additions & 3 deletions _includes/contact-icons.html
Expand Up @@ -65,9 +65,10 @@

{% for page in site.pages %}
{% if page.layout == 'blog' %}
<li>
<a href="{{ "/feed.xml" | relative_url }}"><i class="icon fa fa-rss"></i></a>
</li>
<li>
<a href="{{ "/feed.xml" | relative_url }}"><i class="icon fa fa-rss"></i></a>
</li>
{% break %}
{% endif %}
{% endfor %}

Expand Down
12 changes: 1 addition & 11 deletions _includes/header.html
Expand Up @@ -4,16 +4,7 @@
{% assign default_paths = site.pages | map: "path" %}
{% assign page_paths = site.header_pages | default: default_paths %}

<!-- If not using blog, make home link go to root page -->
<!-- {% for page in site.pages %} -->
<!-- {% if site.home_page != blank and page.title == site.home_page %} -->
<!-- <a class="site-title"href="{{ page.url | relative_url }}"> -->
<!-- {% elsif forloop.last == true %} -->
<!-- <a class="site-title"href="{{ "/" | relative_url }}"> -->
<!-- {% endif %} -->
<!-- {% endfor %} -->

<a class="site-title"href="{{ "/blog/" | relative_url }}">
<a class="site-title"href="{{ "/" | relative_url }}">
{% for file in site.static_files %}
{% if file.basename == 'logo' %}
<img class="site-logo" src="{{ file.path | relative_url }}" alt="site logo" />
Expand All @@ -38,7 +29,6 @@
</label>

<div class="trigger">
<a class="page-link" href="{{ "/" | relative_url }}">about</a>
{% for path in page_paths %}
{% assign my_page = site.pages | where: "path", path | first %}
{% if my_page.title %}
Expand Down
10 changes: 5 additions & 5 deletions _includes/site-links.html
@@ -1,15 +1,15 @@
<ul class="site-links">
<div class="site-links">
{% for link in site.links %}
<li>
<p>
<a href="{{ link.url }}" target="_blank">
{% if link.icon != false %}
<i class="icon fa fa-{% if link.icon %}{{ link.icon }}{% else %}globe{% endif %}"></i>
{% endif %}
{% if link.title %}
<p>{{ link.title }}</p>
<span>{{ link.title }}</span>
{% endif %}
</a>
</li>
</p>
{% endfor %}
</ul>
</div>

14 changes: 14 additions & 0 deletions _layouts/blog.html
Expand Up @@ -19,5 +19,19 @@ <h2>
{% endfor %}
</ul>

<div class="pagination">
{% if paginator.previous_page %}
<a href="{{ paginator.previous_page_path }}" class="previous">Previous</a>
{% else %}
<span class="previous">Previous</span>
{% endif %}
<span class="page_number ">Page: {{ paginator.page }} of {{ paginator.total_pages }}</span>
{% if paginator.next_page %}
<a href="{{ paginator.next_page_path }}" class="next">Next</a>
{% else %}
<span class="next ">Next</span>
{% endif %}
</div>


</div>
9 changes: 9 additions & 0 deletions _layouts/post.html
Expand Up @@ -19,6 +19,15 @@ <h1 class="post-title" itemprop="name headline">{{ page.title | escape }}</h1>
{{ content }}
</div>

{% if page.tags != '' %}
<div class="tags">
{% for tag in page.tags %}
{% assign count = site.tags[tag].size %}
<a href="#{{ tag }}"><span class="tag">{{ tag | escape }}{% if count != 1 %}<span class="tag-count">({{ count }})</span>{% endif %}</span></a>
{% endfor %}
</div>
{% endif %}

{% if site.disqus.shortname %}
{% include disqus_comments.html %}
{% endif %}
Expand Down
15 changes: 15 additions & 0 deletions _layouts/tags.html
@@ -0,0 +1,15 @@
---
layout: default
permalink: /archive/
---

<h1>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>
13 changes: 13 additions & 0 deletions _pages/about.md
@@ -0,0 +1,13 @@
---
layout: about
title: About
permalink: /about/
---

This is a Jekyll theme called Minimaless. It's forked from the popular theme Minima. It's like Minima, but there's less noise.

This is a good theme for portfolios and blogs. It's not a good theme for meeting hot singles in your area. Check out the source code for this Jekyll theme at:
[brettinternet](https://github.com/brettinternet){:target="_blank"}<i class="fa fa-external-link"></i> /
[minimaless](https://github.com/brettinternet/minimaless){:target="_blank"}<i class="fa fa-external-link"></i>.

Visit the [blog](blog/) or you can [contact](contact/) the creator.
2 changes: 1 addition & 1 deletion _pages/blog.md
@@ -1,5 +1,5 @@
---
layout: blog
title: Blog
permalink: /blog/
permalink: /
---
File renamed without changes.
5 changes: 5 additions & 0 deletions _pages/github.md
@@ -0,0 +1,5 @@
---
title: Github
permalink: /github/
redirect_to: https://github.com/brettinternet/minimaless
---
25 changes: 20 additions & 5 deletions _pages/setup.md
@@ -1,9 +1,24 @@
---
layout: page
title: Setup
title: Features & Setup
permalink: /setup/
---

# Features

- Blog in markdown using [Jekyll](jekyllrb.com)!
- Include any Font Awesome icon <i class="fa fa-check-square"></i>
```html
<i class="fa fa-check-square"></i>
```
- You can [display links](/links/) for users to checkout
- Use a [splash page](/splash/) with no header or footer


---

# Setup

This setup guide is for deploying to Github-pages. This is a very specific method, and if you're looking for a more general setup guide, check out [this guide](https://mmistakes.github.io/minimal-mistakes/docs/quick-start-guide/).

The easiest method is to simply [fork this repo](https://github.com/brettinternet/minimaless#fork-destination-box){:target="_blank"}<i class="fa fa-external-link"></i>.
Expand All @@ -24,29 +39,29 @@ gem "minimaless"
```
4. Run `bundle install` to install minimaless
5. Add the following files to app's root-level folder:
1. Add an `index.md` file with the following header:
- Add an `index.md` file with the following header:
```yml
---
layout: about
---
```
2. Add `blog.md`:
- Add `blog.md`:
```yml
---
layout: blog
title: Blog
permalink: /blog/
---
```
3. Add `contact.md`:
- Add `contact.md`:
```yml
---
layout: contact
title: Contact
permalink: /contact/
---
```
6. [Copy the project's](https://github.com/brettinternet/minimaless/blob/master/_config.yml) `_config.yml` and paste it over the existing config file. Replace the variable definitions to customize your site.
6. [Copy](https://github.com/brettinternet/minimaless/blob/master/_config.yml) the project's `_config.yml` and paste it over the existing config file. Replace the variable definitions to customize your site.
7. Include a description of yourself or the site in the `index.md`.
8. Create a directory called `assets/` and add a `logo.svg` (or any vector/image file extension you prefer) and a `favicon.png` for your site.
9. You may consider using something like [prose.io](http://prose.io) to manage your blog posts from the web.
Expand Down
4 changes: 2 additions & 2 deletions _pages/splash.md
Expand Up @@ -4,6 +4,6 @@ title: Splash
permalink: /splash/
---

I'm [brettinternet](http://www.brettgardiner.net).
I'm [brettinternet](http://www.brettgardiner.net/about/).

Read my tech [blog](http://www.brettgardiner.net/blog/) or find me on social media.
Read my tech [blog](http://www.brettgardiner.net) or find me on social media.
Expand Up @@ -4,6 +4,7 @@ title: "This post demonstrates post content styles"
categories: junk
author: "Bart Simpson"
meta: "Springfield"
tags: examples
---

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce bibendum neque eget nunc mattis eu sollicitudin enim tincidunt. Vestibulum lacus tortor, ultricies id dignissim ac, bibendum in velit.
Expand Down
1 change: 1 addition & 0 deletions _posts/2016-05-20-welcome-to-jekyll.md
@@ -1,5 +1,6 @@
---
layout: post
tags: welcome examples
---
You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated.

Expand Down
14 changes: 13 additions & 1 deletion _sass/minimaless/_base.scss
Expand Up @@ -10,12 +10,20 @@
// }

body, h1, h2, h3, h4, h5, h6,
p, blockquote, pre, hr,
p, blockquote, pre,
dl, dd, ol, ul, figure {
margin: 0;
padding: 0;
}

hr {
border-width: .5px;
border-color: #EFEFEF;
color: #FFF;
margin: $spacing-unit 0;
padding: 0;
}



/**
Expand Down Expand Up @@ -45,6 +53,10 @@ ul, ol, dl, figure,
margin-bottom: $spacing-unit / 2;
}

pre {
margin-top: $spacing-unit / 6;
}



/**
Expand Down
39 changes: 24 additions & 15 deletions _sass/minimaless/_layout.scss
Expand Up @@ -44,7 +44,6 @@
color: $text-color;
line-height: $base-line-height;
font-weight: bold;
text-transform: lowercase;

// Gaps between nav items, but not on the last one
&:not(:last-child) {
Expand Down Expand Up @@ -304,24 +303,19 @@


.site-links {
margin: 0 auto;
margin: 20px auto;
max-width: 310px;
a { color: inherit; }

li {
display: inline-block;
min-width: 100px;
min-height: 100px;
}

li a {
height:100px;
width:100px;
display:table-cell;
vertical-align : middle;
p {
text-align: center;
.icon { font-size: 1.5em; }
p { margin: 0; }
list-style: none;
width: 100%;
margin: 5px 0;
.icon {
font-size: 1.5em;
margin-right: 5px;
}
}
}

Expand Down Expand Up @@ -379,3 +373,18 @@
margin-right: 2px;
color: lighten($grey-color-dark, 10%);
}

.tag {
@include relative-font-size(.8);
color: #FFF;
background-color: $grey-color;
font-weight: normal;
padding: 4px 7px;
&:hover {
background-color: $grey-color-dark;
text-decoration: underline;
}
}
.tag-count {
margin-left: 3px;
}
12 changes: 3 additions & 9 deletions index.md
Expand Up @@ -4,13 +4,7 @@
# Edit the theme's home layout instead if you wanna make some changes
# See: https://jekyllrb.com/docs/themes/#overriding-theme-defaults
#
layout: about
layout: blog
redirect_from:
- /blog/
---

This is a Jekyll theme called Minimaless. It's forked from the popular theme Minima. It's like Minima, but there's less noise.

This is a good theme for portfolios and blogs. It's not a good theme for meeting hot singles in your area. Check out the source code for this Jekyll theme at:
[brettinternet](https://github.com/brettinternet){:target="_blank"}<i class="fa fa-external-link"></i> /
[minimaless](https://github.com/brettinternet/minimaless){:target="_blank"}<i class="fa fa-external-link"></i>.

Visit the [blog](blog/) or you can [contact](contact/) the creator.

0 comments on commit 4b51c8f

Please sign in to comment.