jekyll-waterfall 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1d518b6a3f4e0052e01ee17711c9aee886b1f77a93af4990e1ae3b2f59fdf66c
4
- data.tar.gz: d6dfc23dcc7cd8569ecd91f38b3d286bb98990550fced0ec4b5ddf69d61abaf5
3
+ metadata.gz: 5a8da653095ece0b81a89f4e14eaba50097f88b745fadaf7bfc9a2fdaea5dfc9
4
+ data.tar.gz: 904d36429a74bc0ab66d6849110cc1853eae867d7d2b4288b7e6dc26d45520c2
5
5
  SHA512:
6
- metadata.gz: ae5b40b3f69f55c8e25226f5c25829badb351ac15c628cda295d04f2d46d73c008d7e37393b2c88e887767f8ea19fce71acda24c14423bdb49c183e6eb6467a4
7
- data.tar.gz: 345bd2a6aec2d1717b015814bdd9aa2c9020a26546b3c639282b2eaa374093b642a6ca65b9b9d8bf6c7c6ffa0a08b686388bfa8771cec00e4cfc4d31cd2de677
6
+ metadata.gz: 85be8cfe7b2d9bef9f49d38cc2f8267946c4dc9c7a29a3c6d7d28c766d3271232ee90d8fa691b51361ea6e9517b74330036d904b25ce328813ee03b36184b61d
7
+ data.tar.gz: 5da30fb0e17228c5b22181f7dc4b3f975b26f8b86b6a2925a3281cf3392a3ca6961c723341855581bec636348aa35a67fe6d4001b2cf6dddf50cb0b848a5d290
@@ -1,6 +1,5 @@
1
1
  title: Waterfall Theme
2
2
 
3
- enable_multi_language: true
4
3
  lang: &LANG "pt"
5
4
 
6
5
  exclude: ['front']
@@ -30,14 +29,22 @@ defaults:
30
29
 
31
30
  # Uncomment the section below to add items on your top navigation
32
31
  # header_items:
33
- # -
34
- # title: Projects
35
- # href: "/projects"
36
- # - contact.md
37
- # -
38
- # title: Resume
39
- # href: https://drive.google.com
40
- # featured: true
32
+ # *LANG:
33
+ # -
34
+ # title: Item 1
35
+ # href: "/item-1"
36
+ # -
37
+ # title: Resume
38
+ # href: https://drive.google.com
39
+ # featured: true
40
+ # en:
41
+ # -
42
+ # title: Projects
43
+ # href: "/projects"
44
+ # -
45
+ # title: Resume
46
+ # href: https://drive.google.com
47
+ # featured: true
41
48
 
42
49
  waterfall:
43
50
  author:
@@ -1,6 +1,6 @@
1
1
  {%- assign experiences = site.experiences -%}
2
2
 
3
- {%- if site.enable_multi_language == true && page.lang != null -%}
3
+ {%- if page.lang != null -%}
4
4
  {%- assign experiences = site.experiences | where: "lang", page.lang -%}
5
5
  {%- endif -%}
6
6
 
@@ -1,5 +1,5 @@
1
- <header class="z-10">
2
- <div class="py-5 border-b border-gray-200 dark:border-gray-800 fixed w-full bg-gray-50 dark:bg-gray-900 z-10">
1
+ <header class="z-10 fixed w-full bg-gray-50 transition-all duration-500" data-collapse="scroll" data-collapse-trigger-height="100">
2
+ <div class="py-5 border-b border-gray-200 dark:border-gray-800 dark:bg-gray-900 z-10">
3
3
  <div class="container mx-auto">
4
4
  <div class="flex items-center">
5
5
 
@@ -20,13 +20,13 @@
20
20
  </div>
21
21
  </div>
22
22
 
23
- <aside class="fixed h-full top-0 w-64 -right-64 bg-gray-50 z-20 flex items-center justify-center transition-all">
24
- <ul class="flex flex-col items-center justify-center">
25
- {%- include nav.html -%}
26
- </ul>
27
- </aside>
28
-
29
23
  <a href="#top-nav" class="w-1/4 md:hidden text-3xl text-primary-700 z-20 text-right fixed top-8 right-8" nav-toggler>
30
24
  {%- include svg/bars.svg -%}
31
25
  </a>
32
- </header>
26
+ </header>
27
+
28
+ <aside class="fixed h-full top-0 w-64 -right-64 bg-gray-50 z-20 flex items-center justify-center transition-all">
29
+ <ul class="flex flex-col items-center justify-center">
30
+ {%- include nav.html -%}
31
+ </ul>
32
+ </aside>
@@ -1,6 +1,6 @@
1
1
  {%- assign posts = site.posts -%}
2
2
 
3
- {%- if site.enable_multi_language == true && page.lang != null -%}
3
+ {%- if page.lang != null -%}
4
4
  {%- assign posts = site.posts | where: "lang", page.lang -%}
5
5
  {%- endif -%}
6
6
 
@@ -1,12 +1,26 @@
1
- {%- assign header_items = page.header_items | default: site.header_items -%}
1
+ {%- assign header_items = site.header_items[page.lang] | default: site.header_items[site.lang ] -%}
2
+
3
+ {%- if page.header_items -%}
4
+ {%- assign header_items = page.header_items -%}
5
+ {%- endif -%}
2
6
 
3
7
  {%- for item in header_items -%}
4
8
  {%- assign cssClass = '' -%}
5
9
  {%- assign target = '' -%}
10
+ {%- assign anchorTransition = '' -%}
11
+
6
12
  {%- if item.title -%}
7
13
  {%- assign title = item.title | escape -%}
8
14
  {%- assign href = item.href | escape -%}
9
15
  {%- assign target = item.target -%}
16
+
17
+ {%- assign aux = href | split: "#" -%}
18
+
19
+ {%- if aux.size == 2 -%}
20
+ {%- assign anchorTransition = "data-anchor-transition" -%}
21
+ {%- else -%}
22
+ {%- assign anchorTransition = "" -%}
23
+ {%- endif -%}
10
24
 
11
25
  {%- if item.featured -%}
12
26
  {%- assign cssClass = 'btn btn-primary inline-block' -%}
@@ -18,7 +32,7 @@
18
32
  {%- endif -%}
19
33
 
20
34
  <li class="pl-5">
21
- <a class="nav-link {{ cssClass }}" href="{{ href }}" target="{{ target }}">
35
+ <a class="nav-link block {{ cssClass }}" href="{{ href }}" target="{{ target }}" {{anchorTransition}}>
22
36
  <span class="text-gray-500">{{ title }}</span>
23
37
  </a>
24
38
  </li>
@@ -1,6 +1,6 @@
1
1
  {%- assign projects = site.projects -%}
2
2
 
3
- {%- if site.enable_multi_language == true && page.lang != null -%}
3
+ {%- if page.lang != null -%}
4
4
  {%- assign projects = site.projects | where: "lang", page.lang -%}
5
5
  {%- endif -%}
6
6
 
@@ -4,8 +4,14 @@
4
4
 
5
5
  {% assign collection = page.collection %}
6
6
 
7
+ {%- if page.lang -%}
8
+ {% assign items = site[collection] | where: "lang", page.lang %}
9
+ {%- else -%}
10
+ {% assign items = site[collection] %}
11
+ {%- endif -%}
12
+
7
13
  <div class="row">
8
- {% for item in site[collection] %}
14
+ {% for item in items %}
9
15
  <div class="col w-full sm:w-1/2 md:w-1/3 entries-{{ collection }}">
10
16
  <a href="{{ item.url }}" class="card p-5 bg-gray-50 dark:bg-gray-800 hover:shadow-lg rounded-md relative transition-all border-t-4 border-primary-600 block mb-3">
11
17
  <h2 class="text-gray-800 dark:text-gray-100 text-xl mb-3">{{ item.title }}</h2>
@@ -1 +1 @@
1
- (()=>{"use strict";function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var t=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.panels=[],this.init()}var n,o;return n=t,(o=[{key:"init",value:function(){var e=this;document.querySelectorAll("[nav-toggler]").forEach((function(t){t.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),document.querySelector("body").classList.toggle("nav-opened")})),e.panels.push(document.querySelector(t.getAttribute("href")))})),window.onclick=function(t){e.elementIsAPanel(t.target)||document.querySelector("body").classList.remove("nav-opened")}}},{key:"elementIsAPanel",value:function(e){var t=!1;return this.panels.forEach((function(n){n==e&&(t=!0)})),t}}])&&e(n.prototype,o),t}();function n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}var t,o;return t=e,(o=[{key:"init",value:function(){var e=this,t=document.querySelectorAll('[data-toggle="pill"]');if(console.log("Found ".concat(t.length," pills on this page")),t.forEach((function(t){t.addEventListener("click",(function(t){t.preventDefault();var n=t.target.getAttribute("href");e.deactivateAllPills(t.target),t.target.classList.add("active");var o=document.querySelector(n);e.hideAllTabs(o).then((function(){o.classList.add("active"),setTimeout((function(){o.classList.add("show")}),100)}))}))})),t.length>0){var n=document.querySelector(t[0].getAttribute("href"));n.classList.add("show"),n.classList.add("active")}}},{key:"deactivateAllPills",value:function(e){e.parentNode.querySelectorAll('[data-toggle="pill"]').forEach((function(e){e.classList.remove("show"),e.classList.remove("active")}))}},{key:"hideAllTabs",value:function(e){var t=[];return e.parentNode.querySelectorAll('[role="tabpanel"]').forEach((function(e){e.classList.remove("show"),t.push(new Promise((function(t){setTimeout((function(){e.classList.remove("active"),t()}),100)})))})),Promise.all(t)}}])&&n(t.prototype,o),e}();function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var a=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}var t,n;return t=e,(n=[{key:"init",value:function(){var e=this;this.setThemeOption(this.getThemeOption()),document.querySelectorAll("[data-night-mode-toggler]").forEach((function(t){t.addEventListener("click",(function(t){e.toggleThemeOption()}))}))}},{key:"toggleThemeOption",value:function(){var e=this.getThemeOption();document.querySelector("html").classList.add("night-mode-transitioning"),e="dark"==e?"light":"dark",this.setThemeOption(e),setTimeout((function(){document.querySelector("html").classList.remove("night-mode-transitioning")}),500)}},{key:"getDefaultThemeOption",value:function(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}},{key:"getThemeOption",value:function(){return localStorage.getItem("theme")||getDefaultThemeOption()}},{key:"setThemeOption",value:function(e){"dark"==e?document.querySelector("html").classList.add("dark"):document.querySelector("html").classList.remove("dark"),localStorage.setItem("theme",e)}}])&&i(t.prototype,n),e}();new t,new o,new a})();
1
+ (()=>{"use strict";function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var t=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.panels=[],this.init()}var n,o;return n=t,(o=[{key:"init",value:function(){var e=this;document.querySelectorAll("[nav-toggler]").forEach((function(t){t.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),document.querySelector("body").classList.toggle("nav-opened")})),e.panels.push(document.querySelector(t.getAttribute("href")))})),window.onclick=function(t){e.elementIsAPanel(t.target)||document.querySelector("body").classList.remove("nav-opened")}}},{key:"elementIsAPanel",value:function(e){var t=!1;return this.panels.forEach((function(n){n==e&&(t=!0)})),t}}])&&e(n.prototype,o),t}();function n(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}var t,o;return t=e,(o=[{key:"init",value:function(){var e=this,t=document.querySelectorAll('[data-toggle="pill"]');if(console.log("Found ".concat(t.length," pills on this page")),t.forEach((function(t){t.addEventListener("click",(function(t){t.preventDefault();var n=t.target.getAttribute("href");e.deactivateAllPills(t.target),t.target.classList.add("active");var o=document.querySelector(n);e.hideAllTabs(o).then((function(){o.classList.add("active"),setTimeout((function(){o.classList.add("show")}),100)}))}))})),t.length>0){var n=document.querySelector(t[0].getAttribute("href"));n.classList.add("show"),n.classList.add("active")}}},{key:"deactivateAllPills",value:function(e){e.parentNode.querySelectorAll('[data-toggle="pill"]').forEach((function(e){e.classList.remove("show"),e.classList.remove("active")}))}},{key:"hideAllTabs",value:function(e){var t=[];return e.parentNode.querySelectorAll('[role="tabpanel"]').forEach((function(e){e.classList.remove("show"),t.push(new Promise((function(t){setTimeout((function(){e.classList.remove("active"),t()}),100)})))})),Promise.all(t)}}])&&n(t.prototype,o),e}();function a(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var r=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}var t,n;return t=e,(n=[{key:"init",value:function(){var e=this;this.setThemeOption(this.getThemeOption()),document.querySelectorAll("[data-night-mode-toggler]").forEach((function(t){t.addEventListener("click",(function(t){e.toggleThemeOption()}))}))}},{key:"toggleThemeOption",value:function(){var e=this.getThemeOption();document.querySelector("html").classList.add("night-mode-transitioning"),e="dark"==e?"light":"dark",this.setThemeOption(e),setTimeout((function(){document.querySelector("html").classList.remove("night-mode-transitioning")}),500)}},{key:"getDefaultThemeOption",value:function(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}},{key:"getThemeOption",value:function(){return localStorage.getItem("theme")||getDefaultThemeOption()}},{key:"setThemeOption",value:function(e){"dark"==e?document.querySelector("html").classList.add("dark"):document.querySelector("html").classList.remove("dark"),localStorage.setItem("theme",e)}}])&&a(t.prototype,n),e}();function i(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var l=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.panels=[],this.lastScrollTop=0,this.init()}var t,n;return t=e,(n=[{key:"init",value:function(){var e=this;document.querySelectorAll("[data-collapse]").forEach((function(t){e.panels.push(t)})),window.addEventListener("scroll",(function(t){e.panels.forEach((function(t){var n=t.dataset.collapseTriggerHeight,o=window.pageYOffset||document.documentElement.scrollTop,a=o>e.lastScrollTop;e.lastScrollTop=o<=0?0:o,window.scrollY>n&&(t.style.transform=a?"translateY(".concat(-1*t.clientHeight,"px)"):"")}))}))}}])&&i(t.prototype,n),e}();function c(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var u=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}var t,n;return t=e,(n=[{key:"init",value:function(){document.querySelectorAll("[data-anchor-transition").forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();for(var t=e.target;t&&!(t instanceof HTMLAnchorElement);)t=t.parentNode;var n=t.getAttribute("href"),o=document.querySelector(n);return!!o&&(window.scroll({top:o.offsetTop,left:0,behavior:"smooth"}),!1)}))}))}}])&&c(t.prototype,n),e}();new t,new o,new r,new l,new u})();
@@ -934,6 +934,10 @@ video {
934
934
  transition-duration: 150ms;
935
935
  }
936
936
 
937
+ .duration-500 {
938
+ transition-duration: 500ms;
939
+ }
940
+
937
941
  @keyframes spin {
938
942
  to {
939
943
  transform: rotate(360deg);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-waterfall
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo-Vargas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-17 00:00:00.000000000 Z
11
+ date: 2020-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll