fundamental 0.3.3 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1d8ecc1d96d2da0bed0e1db40da08d17c5cdebd0
4
- data.tar.gz: d33bd863fb68eca9503d2e9b2cef50e6def5a02a
3
+ metadata.gz: 4a3283436839eefdb05a48f8dee6af4a09c01145
4
+ data.tar.gz: 99d7dffd8c05588d4dcd24b7b998dd873c4fc7ff
5
5
  SHA512:
6
- metadata.gz: b31c7a4dd161f76d38c97013874f975454223b3a3da04e165978ce6249799ff0c8bb97b3237bd97bf99e138e0416dcd24d178b173ff9b8e01b4775be89afe43c
7
- data.tar.gz: 8de12fe553c089fdec8a08cd95262e079608e0bff9d91e27367192f4f486d76eac9a93509cbbcba8ee2ae46b386cd4bc49cd313e535250f3efabab4e20288942
6
+ metadata.gz: 3cdfc448f9588081d21b087c11b588cab683972967ab400cd880a2d94607bc2c4aa3d6c080f6fc55f0311e9aa582ca19f9a3693399f296c9db32c5edbdfbb49a
7
+ data.tar.gz: 9785181310367b4cdbba4465211f302fff787e82d21ad25bbc7d06d09c91f1718eceee6ccd6ac5ceb1c10ef16236e3328efb5007ae301b9ce46e1754b40cba25
data/README.md CHANGED
@@ -18,7 +18,7 @@ View the [demo here](https://blog.theomjones.com).
18
18
  - Syntax highlighting
19
19
  - Social Buttons
20
20
  - Bio Section
21
-
21
+ - Pagination ***new** (please rename index.md to index.html, see [changelog.md](https://github.com/theomjones/fundamental/blob/master/changelog.md)) for more information.
22
22
 
23
23
  ![Screen Cap](http://i.imgur.com/jTFtqri.png)
24
24
 
@@ -27,7 +27,7 @@ View the [demo here](https://blog.theomjones.com).
27
27
 
28
28
  ##### Via Direct Download:
29
29
 
30
- [Download](https://github.com/theomjones/fundamental-blank/archive/master.zip) or [clone](https://github.com/theomjones/fundamental-blank/archive) the `fundamental-blank` repository. All you have to do from here is run `bundle install` and then `bundle update`. You're good to go!
30
+ [Download](https://github.com/theomjones/fundamental-blank/archive/master.zip) or [clone](https://github.com/theomjones/fundamental-blank/) the `fundamental-blank` repository. All you have to do from here is run `bundle install` and then `bundle update`. You're good to go!
31
31
 
32
32
  **Or...**
33
33
 
@@ -58,12 +58,11 @@ Or install it yourself as:
58
58
  After installing you should have a `config.yml` file in your base directory. Copy the contents of the repo [config.yml](https://github.com/theomjones/fundamental/blob/master/_config.yml) into your own config file. This will supply you with all the required configurations. You can edit them from here.
59
59
 
60
60
  Jekyll gives you an `index.md` file as your homepage. Copy this into it to get started, the front matter will be explained below: **!! Something to note**, Fundamental does not currently support categories (they're coming!). The default page Jekyll produces will break breadcrumbs (for now).
61
+ > !! Change the index.md extension to `.html` to allow pagination to work.
61
62
 
62
63
  ---
63
64
  layout: home
64
65
  title: Home
65
- menu: true
66
- order: 1
67
66
  ---
68
67
 
69
68
  If you want to add the 'Archive' file you see in the demo. Create an `/archive` directory in your base directory. Then create an `index.md` inside it. Ensure it has the `layout: site-archive`. This layout displays all the posts in the site.
@@ -74,12 +73,15 @@ Fundamemtal uses these plugins. When you have installed the Fundamental gem, run
74
73
  1. [jekyll-feed](https://github.com/jekyll/jekyll-feed)
75
74
  2. [jekyll-archives](https://github.com/jekyll/jekyll-archives)
76
75
  3. [jekyll-seo-tag](https://github.com/jekyll/jekyll-seo-tag)
76
+ 3. [jekyll-paginate](https://jekyllrb.com/docs/pagination/)
77
77
 
78
78
  #### Navigation
79
79
  The top navigation loops through the sites pages that have `menu: true` in the front matter. This makes it easy to add new pages to your site. You can also order the pages by setting the value of `order`.
80
80
 
81
81
  For instance: `order: 2` will place this item second (to the right of the first item).
82
82
 
83
+ The homepage is linked in the naviagtion statically by default. It can't be removed.
84
+
83
85
  #### Config
84
86
  The usual configuration settings can be found at the top of `config.yml`.
85
87
 
data/_includes/head.html CHANGED
@@ -8,4 +8,6 @@
8
8
  <link rel="icon" href="{{site.baseurl}}/favicon.ico" type="image/x-icon">
9
9
  {% endif %}
10
10
  {% seo %}
11
+
12
+ {% include header-style.html %}
11
13
  </head>
@@ -0,0 +1,44 @@
1
+ {% assign i = 0 %}
2
+ {% for pg in site.pages %}
3
+ {% if pg.menu == true %}
4
+ {% assign i = i | plus: 1 %}
5
+ {% endif %}
6
+ {% endfor %}
7
+
8
+ {% assign i = i | times: 70 | plus: 420 %}
9
+
10
+ <style>
11
+ @media screen and (max-width: {{i}}px){
12
+ header {
13
+ justify-content: flex-start;
14
+ margin-bottom: -20px;
15
+ }
16
+ nav {
17
+ overflow-y: hidden;
18
+ overflow-x: auto;
19
+ max-height: 50px;
20
+ -webkit-overflow-scrolling: touch;
21
+ border-bottom: 2px solid {{site.socialBtnsColor}};
22
+ width: 100%;
23
+ }
24
+ nav a {
25
+ text-decoration: none;
26
+ }
27
+ nav ul {
28
+ margin-right: 0;
29
+ overflow-x: auto;
30
+ margin: 10px 0 0 40px;
31
+ display: flex;
32
+ overflow-x: auto;
33
+ padding-bottom: 30px;
34
+ margin-left: 10px;
35
+ margin-top: 5px;
36
+ }
37
+ header .title {
38
+ margin-left: 20px;
39
+ margin-top: 5px;
40
+ margin-bottom: 5px;
41
+ font-size: 120%;
42
+ }
43
+ }
44
+ </style>
@@ -4,6 +4,7 @@
4
4
  <nav>
5
5
  <ul>
6
6
  {% assign menu_items = site.pages | sort: 'order' %}
7
+ <li><a href="{% link index.html %}"{% if page.url == "/" %}class="active"{% endif %}>Home</a></li>
7
8
  {% for p in menu_items %}
8
9
  {% if p.menu == true %}
9
10
  <li><a href="{{ p.url | relative_url }}"{% if p.url == page.url %}class="active"{% endif %}>{{ p.title }}</a></li>
@@ -0,0 +1,26 @@
1
+ {% if paginator.total_pages > 1 %}
2
+ <div class="pagination">
3
+ {% if paginator.previous_page %}
4
+ <a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">&laquo;</a>
5
+ {% else %}
6
+ <span>&laquo;</span>
7
+ {% endif %}
8
+
9
+ {% for page in (1..paginator.total_pages) limit: 10 %}
10
+ {% if page == paginator.page %}
11
+ <span class="paginator-active">{{ page }}</span>
12
+ {% elsif page == 1 %}
13
+ <a href="{{ paginator.previous_page_path | prepend: site.baseurl | replace: '//', '/' }}">{{ page }}</a>
14
+ {% else %}
15
+ <a href="{{ site.paginate_path | prepend: site.baseurl | replace: '//', '/' | replace: ':num', page }}">{{ page }}</a>
16
+ {% endif %}
17
+ {% endfor %}
18
+
19
+ {% if paginator.next_page %}
20
+ <a href="{{ paginator.next_page_path | prepend: site.baseurl | replace: '//', '/' }}">&raquo;</a>
21
+ {% else %}
22
+ <span> &raquo;</span>
23
+ {% endif %}
24
+ </div>
25
+ {% endif %}
26
+
@@ -1,5 +1,6 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
3
+
3
4
  {% include head.html %}
4
5
  <body>
5
6
  {% include header.html %}
data/_layouts/home.html CHANGED
@@ -6,9 +6,12 @@ layout: default
6
6
  <div class="flex">
7
7
  {% include tag-cloud.html %}
8
8
  <!-- Post Loop -->
9
- <ul class="post-loop">
10
- {% for p in site.posts %}
11
- {% include item.html %}
12
- {% endfor %}
13
- </ul>
9
+ <div>
10
+ <ul class="post-loop">
11
+ {% for p in paginator.posts %}
12
+ {% include item.html %}
13
+ {% endfor %}
14
+ </ul>
15
+ {% include pagination.html %}
16
+ </div>
14
17
  </div>
data/_sass/_blog.scss CHANGED
@@ -23,3 +23,25 @@
23
23
  padding-bottom: 0;
24
24
  }
25
25
  }
26
+
27
+ .pagination {
28
+ margin-top: auto;
29
+ max-width: 100vw;
30
+ overflow-x: auto;
31
+ display: flex;
32
+ justify-content: center;
33
+ a, span {
34
+ padding: 5px 10px;
35
+ }
36
+ span:first-child {
37
+ padding-left: 0;
38
+ }
39
+ span:last-child {
40
+ padding-right: 0;
41
+ }
42
+ }
43
+
44
+ .paginator-active {
45
+ background: $accent;
46
+ color: $base;
47
+ }
data/_sass/_header.scss CHANGED
@@ -5,38 +5,11 @@ header {
5
5
  display: flex;
6
6
  align-content: center;
7
7
  flex-wrap: wrap;
8
- @media screen and (max-width: $break) {
9
- justify-content: flex-start;
10
- margin-bottom: -20px;
11
- nav {
12
- overflow-y: hidden;
13
- overflow-x: auto;
14
- max-height: 50px;
15
- -webkit-overflow-scrolling: touch;
16
- border-bottom: 2px solid $tertiary;
17
- width: 100%;
18
- }
19
- a {
20
- text-decoration: none;
21
- }
22
- }
23
8
  ul {
24
9
  list-style: none;
25
10
  padding-left: 0;
26
11
  margin-right: 50px;
27
12
  -webkit-overflow-scrolling: touch;
28
- @media screen and (max-width: $break) {
29
- margin-right: 0;
30
- overflow-x: auto;
31
- margin: 10px 0 0 40px;
32
- display: flex;
33
- overflow-x: auto;
34
- padding-bottom: 30px;
35
- }
36
- @media screen and (max-width: $break) {
37
- margin-left: 10px;
38
- margin-top: 5px;
39
- }
40
13
  li {
41
14
  display: inline-block;
42
15
  margin: 0 10px;
@@ -47,12 +20,6 @@ header {
47
20
  .title {
48
21
  margin: auto;
49
22
  margin-left: 50px;
50
- @media screen and (max-width: $break) {
51
- margin-left: 20px;
52
- margin-top: 5px;
53
- margin-bottom: 5px;
54
- font-size: 120%;
55
- }
56
23
  a {
57
24
  text-decoration: none;
58
25
  color: $textColor;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fundamental
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Theo M Jones
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.5'
19
+ version: 3.5.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '3.5'
26
+ version: 3.5.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: jekyll-archives
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: jekyll-paginate
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: bundler
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -96,10 +110,12 @@ files:
96
110
  - _includes/facebook.svg
97
111
  - _includes/footer.html
98
112
  - _includes/head.html
113
+ - _includes/header-style.html
99
114
  - _includes/header.html
100
115
  - _includes/info.html
101
116
  - _includes/item.html
102
117
  - _includes/messenger.svg
118
+ - _includes/pagination.html
103
119
  - _includes/share.html
104
120
  - _includes/tag-cloud.html
105
121
  - _includes/twitter.svg