minimal-categorized 0.0.9 → 0.0.14

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
  SHA256:
3
- metadata.gz: 2762d3812ac32b52b4d337aad712ed6a22aa0a52664efc96cbbffd41ba41907e
4
- data.tar.gz: 3173b0082fdf37a21e672387dad00d87bef144914b37f5b82e6126093352efb2
3
+ metadata.gz: 91dcd1021101ae6e6af2c48e027e14225460eca63d23bb44a56d74f9d67f31aa
4
+ data.tar.gz: 1b5bae713c662e65cd3b5d08cc5425e0acaec5ab0a1abcbc6f2b3ef783894573
5
5
  SHA512:
6
- metadata.gz: 27fe24c24ed97436b4a1857941437a84211e1c9722cbd0c9675590dcc0983bf8301cf1d0cb2eb714e0d465f792410b50a5f7d2deb0a47574fba60bb41a82a5b2
7
- data.tar.gz: e909c87aeeb0e3fac77c9a81e3f09b8255984f6649aa9610e4ef9b3dff61d3e4a170c32517cd15daacf4aff1a7ea82e7f2cf86b6e632dc14b9501deef314401d
6
+ metadata.gz: 553cc24c77e897bbffb09c7e69c7ca98cde3a9657e6626247e49143db97e726e1b8313fedc5e1e016715c55d61515823a4e361777d4980b9c3f9dd3e3e43a8ce
7
+ data.tar.gz: c2a833c592d1faf4cae5ce6d431ff6aa8c7cd296a78fdd37b0662f5f71cedd9800a391f20439c53ec7640d80e8285d170254b23bb368407fc75a31c960e1d5fa
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![LICENSE](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://raw.githubusercontent.com/mmistakes/minimal-mistakes/master/LICENSE)
4
4
  [![Jekyll](https://img.shields.io/badge/jekyll-%3E%3D%203.9-blue.svg)](https://jekyllrb.com/)
5
- [![Ruby gem](https://img.shields.io/gem/v/minimal-mistakes-jekyll.svg)](https://rubygems.org/gems/minimal-mistakes-jekyll)
5
+ [![Gem Version](https://badge.fury.io/rb/minimal-categorized.svg)](https://badge.fury.io/rb/minimal-categorized)
6
6
 
7
7
  minimal-categorized is a flexible Jekyll theme, designed for sites with content easily aggregated into categories. Demo is available [here](https://itsmeaga1n.github.io/minimal-categorized/).
8
8
 
@@ -40,7 +40,7 @@ Structure of `_data/menu.yml`:
40
40
  * menu_title: Displayed on menu (only for normal menu)
41
41
  * menu_headline: Displayed in menu (only for normal menu) and in about page
42
42
  * menu_intro: Displayed in menu (only for normal menu) and in about page
43
- * show_menu_on_category_select: Boolean value determining if menu should be visible on category selection page
43
+ * show_menu_on_gate_page: Boolean value determining if menu should be visible on category selection page
44
44
  * minimal_menu: Boolean value determining the style of menu bar
45
45
  * menu_logo: Path to logo displayed on menu (only for normal menu)
46
46
  * menu_pages: a list of items in menu. Each item contains information:
@@ -55,6 +55,10 @@ Structure of `_data/menu.yml`:
55
55
  * faicon: FavIcon to be displayed in menu
56
56
  * url: URL for href
57
57
  * target: target value of \<a> tag
58
+ * cookies: customize information about site cookies
59
+ * enabled: determine if should show cookies pop-up
60
+ * message: text on cookie pop-up
61
+ * agreeButtonText: text on agree button
58
62
 
59
63
  Structure of `_data/metaData.yml`:
60
64
  author: Site Author name
@@ -1,11 +1,17 @@
1
1
  menu_title: Example menu title
2
2
  menu_headline: example menu headline
3
3
  menu_intro: Hi! This is an example of intro that you could write for your jekyll minimal-categorized theme!
4
- show_menu_on_category_select: False
4
+ show_menu_on_gate_page: False
5
5
  minimal_menu: True
6
6
  menu_logo: assets/img/avatar.png
7
7
 
8
8
  menu_pages:
9
+ - title: Home
10
+ url: /
11
+ show_on_home: False
12
+ icon_name: fas fa-home
13
+ category: home
14
+
9
15
  - title: Category 1
10
16
  url: /category-1.html
11
17
  show_on_home: True
@@ -13,6 +19,7 @@ menu_pages:
13
19
  icon_name: fas fa-dice
14
20
  category: category-1
15
21
  tooltip: This is category 1
22
+ description: Category 1 description, which is written in menu.yml file under :description property
16
23
 
17
24
  - title: Category 2
18
25
  url: /category-2.html
@@ -21,8 +28,9 @@ menu_pages:
21
28
  icon_name: fas fa-cogs
22
29
  category: category-2
23
30
  tooltip: This is category 2
31
+ description: Category 2 description, which is written in menu.yml file under :description property
24
32
 
25
- - title: ABOUT
33
+ - title: About
26
34
  url: about.html
27
35
  show_on_home: False
28
36
  icon_name: fas fa-address-card
@@ -1,2 +1,8 @@
1
1
  author: Site Author
2
- avatar_url: assets/img/avatar.png
2
+ avatar_url: assets/img/avatar.png
3
+ lightTheme: False
4
+ show_menu_logo_on_home_page: True
5
+ cookies:
6
+ enabled: True
7
+ message: This site might be using cookies! Customize your message or disable cookies in metaData.yml!
8
+ agreeButtonText: Agree
@@ -0,0 +1,5 @@
1
+ <div class="avatar_container">
2
+ <div class="avatar" >
3
+ <img src="{{ site.data.metaData.avatar_url }}" alt="avatar" onerror="this.style.display='none'">
4
+ </div>
5
+ </div>
@@ -0,0 +1,29 @@
1
+ (function() {
2
+ const consentPropName = "cookies_consent";
3
+ const storageType = localStorage;
4
+
5
+ shouldShowCookieConsent = () => !storageType.getItem(consentPropName);
6
+ acceptCookieConsent = () => storageType.setItem(consentPropName, true);
7
+ window.addEventListener("load", () => {
8
+ if(!shouldShowCookieConsent()) {
9
+ return;
10
+ }
11
+ const cookieContainer = document.createElement("div");
12
+ cookieContainer.classList.add("hidden");
13
+ const cookieParagraph = document.createElement("p");
14
+ const cookieContent = document.createTextNode("{{ site.data.metaData.cookies.message }}");
15
+ const cookieAgreeButton = document.createElement("button");
16
+ const cookieButtonContent = document.createTextNode("{{ site.data.metaData.cookies.agreeButtonText }}");
17
+ cookieAgreeButton.appendChild(cookieButtonContent);
18
+ cookieAgreeButton.onclick = () => {
19
+ acceptCookieConsent();
20
+ cookieContainer.classList.add("hidden");
21
+ window.setTimeout(cookieContainer.remove.bind(cookieContainer), 1000);
22
+ }
23
+ cookieParagraph.append(cookieContent);
24
+ cookieContainer.append(cookieParagraph, cookieAgreeButton);
25
+ cookieContainer.classList.add("cookie-container")
26
+ document.body.appendChild(cookieContainer);
27
+ window.setTimeout(() => cookieContainer.classList.remove("hidden"));
28
+ });
29
+ })();
@@ -27,5 +27,5 @@
27
27
 
28
28
  attachEvents(category1, category2);
29
29
  attachEvents(category2, category1);
30
- })
31
- })()
30
+ });
31
+ })();
@@ -1,62 +1,61 @@
1
1
  {% if site.data.menu.minimal_menu %}
2
- <aside class="menu">
3
- <div class="menu-top">
2
+ <aside class="menu">
3
+ <div class="menu-top">
4
4
 
5
- <ul class="navigation">
6
- {% for menu_item in site.data.menu.menu_pages %}
7
- <li>
8
- <a href="{{ menu_item.url | relative_url }}" category="{{ menu_item.category }}" title="{{ menu_item.tooltip }}">
9
- <i class="{{ menu_item.icon_name }}"> </i>
5
+ <ul class="navigation">
6
+ {% for menu_item in site.data.menu.menu_pages %}
7
+ <li>
8
+ <a href="{{ menu_item.url | relative_url }}" category="{{ menu_item.category }}" title="{{ menu_item.tooltip }}">
9
+ <i class="{{ menu_item.icon_name }}"> </i>
10
+ </a>
11
+ </li>
12
+ {% endfor %}
13
+ </ul>
14
+ </div>
15
+ <div class="menu-contact">
16
+ {% for contact in site.data.menu.menu_contacts %}
17
+ <a href="{{ contact.url | relative_url }}" target="{{ contact.target }}">
18
+ <i class="{{ contact.faicon }}"></i>
10
19
  </a>
11
- </li>
12
20
  {% endfor %}
13
- </ul>
14
- </div>
15
- <div class="menu-contact">
16
- {% for contact in site.data.menu.menu_contacts %}
17
-
18
- <a href="{{ contact.url | relative_url }}" target="{{ contact.target }}">
19
- <i class="{{ contact.faicon }}"></i>
20
- </a>
21
- {% endfor %}
22
- </div>
23
- </aside>
21
+ </div>
22
+ </aside>
24
23
 
25
24
  {% else %}
26
25
 
27
- <aside class="menu">
28
- <div class="menu-top">
29
- <div class="profile">
30
- <div class="avatar">
31
- <a href="{{ '/about.html' | relative_url }}" alt="avatar">
32
- <img src="{{ site.data.menu.menu_logo | relative_url }}" alt="avatar" onerror="this.style.display='none'">
33
- </a>
26
+ <aside class="menu">
27
+ <div class="menu-top">
28
+ <div class="profile">
29
+ <div class="avatar">
30
+ <a href="{{ '/about.html' | relative_url }}" alt="avatar">
31
+ <img src="{{ site.data.menu.menu_logo | relative_url }}" alt="avatar" onerror="this.style.display='none'">
32
+ </a>
33
+ </div>
34
+ <h1>{{ site.data.menu.menu_title }}</h1>
35
+ <h2>{{ site.data.menu.menu_headline }}</h2>
36
+ <p>{{ site.data.menu.menu_intro }}</p>
34
37
  </div>
35
- <h1>{{ site.data.menu.menu_title }}</h1>
36
- <h2>{{ site.data.menu.menu_headline }}</h2>
37
- <p>{{ site.data.menu.menu_intro }}</p>
38
+
39
+ <ul class="navigation">
40
+ {% for menu_item in site.data.menu.menu_pages %}
41
+ <li>
42
+ <a href="{{ menu_item.url | relative_url }}" category="{{ menu_item.category }}" title="{{ menu_item.tooltip }}">
43
+ <i class="{{ menu_item.icon_name }}"> </i>
44
+ <span>{{ menu_item.title }}</span>
45
+ </a>
46
+ </li>
47
+ {% endfor %}
48
+ </ul>
38
49
  </div>
50
+ <div class="menu-contact">
51
+ {% for contact in site.data.menu.menu_contacts %}
39
52
 
40
- <ul class="navigation">
41
- {% for menu_item in site.data.menu.menu_pages %}
42
- <li>
43
- <a href="{{ menu_item.url | relative_url }}" category="{{ menu_item.category }}" title="{{ menu_item.tooltip }}">
44
- <i class="{{ menu_item.icon_name }}"> </i>
45
- <span>{{ menu_item.title }}</span>
46
- </a>
47
- </li>
53
+ <a href="{{ contact.url | relative_url }}" target="{{ contact.target }}">
54
+ <i class="{{ contact.faicon }}"></i>
55
+ </a>
48
56
  {% endfor %}
49
- </ul>
50
- </div>
51
- <div class="menu-contact">
52
- {% for contact in site.data.menu.menu_contacts %}
53
-
54
- <a href="{{ contact.url | relative_url }}" target="{{ contact.target }}">
55
- <i class="{{ contact.faicon }}"></i>
56
- </a>
57
- {% endfor %}
58
- </div>
59
- </aside>
57
+ </div>
58
+ </aside>
60
59
  {% endif %}
61
60
 
62
61
  <script>
@@ -1,6 +1,11 @@
1
1
  <!doctype html>
2
2
  <html>
3
3
  <head>
4
+ {% if site.data.metaData.cookies.enabled %}
5
+ <script>
6
+ {% include cookies.js %}
7
+ </script>
8
+ {% endif %}
4
9
  {% include common-head.html %}
5
10
  </head>
6
11
  {% if site.data.menu.minimal_menu %}
@@ -0,0 +1,35 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ {% include common-head.html %}
5
+ <script>
6
+ {% include gate.js %}
7
+ </script>
8
+ </head>
9
+ {% if site.data.menu.minimal_menu and site.data.menu.show_menu_on_gate_page %}
10
+ <body class="is-minimal-menu" >
11
+ {% else %}
12
+ <body>
13
+ {% endif %}
14
+ {% if site.data.menu.show_menu_on_gate_page %}
15
+ {% include menu.html %}
16
+ <main class="content-layout">
17
+ {% else %}
18
+ <main class="content-layout no-menu">
19
+ {% endif %}
20
+ <div class="gate">
21
+ {% for menu_item in site.data.menu.menu_pages %}
22
+ {% if menu_item.show_on_home %}
23
+ <a href="{{ menu_item.url | relative_url }}" class="category-container">
24
+ <div class="category" style="background-image: url('{{ menu_item.image_url | relative_url}}')"></div>
25
+ <p>
26
+ {{ menu_item.title }}
27
+ </p>
28
+ </a>
29
+ {% endif %}
30
+ {% endfor %}
31
+ </div>
32
+ </main>
33
+ </body>
34
+ </html>
35
+
@@ -1,35 +1,35 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- {% include common-head.html %}
5
- <script>
6
- {% include home.js %}
7
- </script>
8
- </head>
9
- {% if site.data.menu.minimal_menu and site.data.menu.show_menu_on_category_select %}
10
- <body class="is-minimal-menu" >
11
- {% else %}
12
- <body>
13
- {% endif %}
14
- {% if site.data.menu.show_menu_on_category_select %}
15
- {% include menu.html %}
16
- <main class="content-layout">
17
- {% else %}
18
- <main class="content-layout no-menu">
1
+ ---
2
+ layout: default
3
+ category: home
4
+ ---
5
+ <div class="content-container home">
6
+
7
+ <h1>
8
+ {% if site.data.metaData.show_menu_logo_on_home_page %}
9
+ {% include avatar.html %}
19
10
  {% endif %}
20
- <div class="home">
21
- {% for menu_item in site.data.menu.menu_pages %}
22
- {% if menu_item.show_on_home %}
23
- <a href="{{ menu_item.url | relative_url }}" class="category-container">
24
- <div class="category" style="background-image: url('{{ menu_item.image_url | relative_url}}')"></div>
25
- <p>
26
- {{ menu_item.title }}
27
- </p>
11
+ {{ page.title }}
12
+ </h1>
13
+ <p class="page-summary">{{ page.summary }}</p>
14
+ <div class="category_wrapper">
15
+ {% for menu_item in site.data.menu.menu_pages %}
16
+ {% if menu_item.show_on_home %}
17
+ <div class="category_container">
18
+ <div class="category_image">
19
+ <a href="{{ menu_item.url | relative_url }}">
20
+ <img class="category" src="{{ menu_item.image_url | relative_url}}">
28
21
  </a>
29
- {% endif %}
30
- {% endfor %}
31
- </div>
32
- </main>
33
- </body>
34
- </html>
35
-
22
+ </div>
23
+ <div class="category_description">
24
+ <a href="{{ menu_item.url | relative_url }}">
25
+ <h2> {{ menu_item.title }} </h2>
26
+ </a>
27
+ <p>
28
+ {{ menu_item.description }}
29
+ </p>
30
+ </div>
31
+ </div>
32
+ {% endif %}
33
+ {% endfor %}
34
+ </div>
35
+ </div>
@@ -9,6 +9,8 @@ layout: default
9
9
  {% endif %}
10
10
  <div class="content-container {{ page.category }}">
11
11
  <h1>{{ page.title }}</h1>
12
- {{content}}
12
+ <div class="post-content">
13
+ {{content}}
14
+ </div>
13
15
  </div>
14
16
  </div>
@@ -0,0 +1,16 @@
1
+ .avatar {
2
+ &_container {
3
+ justify-content: center!important;
4
+ display: flex;
5
+ }
6
+ display: block;
7
+ width: $avatar-dim;
8
+ height: $avatar-dim;
9
+ border-radius: 50%;
10
+ border: 2px solid $p_light;
11
+ overflow: hidden;
12
+ img {
13
+ height: $avatar-dim;
14
+ width: $avatar-dim;
15
+ }
16
+ }
@@ -1,16 +1,16 @@
1
1
  .category-aggregator {
2
- color: $p_dark;
2
+ color: $p_text;
3
3
  a {
4
- color: $secondary;
4
+ color: $p_text;
5
5
  &:hover {
6
- color: darken($secondary, 10%);
6
+ color: $primary;
7
7
  }
8
8
  }
9
9
  hr {
10
10
  border: 0;
11
11
  height: 0;
12
12
  border-top: 1px solid rgba(0, 0, 0, 0.1);
13
- border-bottom: 1px solid rgba(255, 255, 255, 0.3);
13
+ border-bottom: 1px solid $p_text_dimmed;
14
14
  margin: $gap auto $gap * 0.5 auto;
15
15
  }
16
16
  article {
@@ -20,7 +20,7 @@
20
20
  padding-left: 18px;
21
21
  font-style: italic;
22
22
  margin-top: -0.6em;
23
- color: rgba(0, 0, 0, 0.4);
23
+ color: $p_text_dimmed;
24
24
  font-size: 0.9em;
25
25
  }
26
26
  .article-read {
@@ -0,0 +1,53 @@
1
+ .cookie-container {
2
+ position: fixed;
3
+ padding: 20px 15px;
4
+ z-index: $pop-ups-z-1;
5
+ background-image: radial-gradient(farthest-corner at 25% 0, $p_darkest, $dark);
6
+ box-shadow: 0 0 6px 0 $dark;
7
+ text-align: center;
8
+ opacity: 0.95;
9
+ -webkit-transition: opacity 800ms, visibility 800ms;
10
+ transition: opacity 800ms, visibility 800ms;
11
+ bottom: 30px;
12
+ left: 40px;
13
+ max-width: 300px;
14
+ border-radius: 3px;
15
+ border: 3px solid $dark;
16
+
17
+ p {
18
+ color: $p_text;
19
+ line-height: 1.6em;
20
+ margin-bottom: 10px;
21
+ }
22
+ &.hidden {
23
+ opacity: 0;
24
+ visibility: hidden;
25
+ }
26
+ button {
27
+ line-height: 1.4;
28
+ font-weight: 700;
29
+ display: inline-block;
30
+ padding: 10px 20px;
31
+ background-color: $p_dark;
32
+ color: $p_text;
33
+ border: none;
34
+ border-radius: 3px;
35
+ text-decoration: none;
36
+ cursor: pointer;
37
+ -webkit-transition: background-color 200ms;
38
+ transition: background-color 200ms;
39
+ &:hover {
40
+ background-color: $primary;
41
+ }
42
+ }
43
+ @include mobile {
44
+ bottom: 0;
45
+ left: 0;
46
+ width: 100%;
47
+ max-width: 100%;
48
+ padding: 12px 10px;
49
+ border-left: 0;
50
+ border-right: 0;
51
+ border-bottom: 0;
52
+ }
53
+ }