bay_jekyll_theme 1.0.20 → 1.1.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
  SHA256:
3
- metadata.gz: c1ed8c0f2d2b0050ef99c19f1e4f4c0af5b21a6f768ef4a6eac3e3de4e0ca695
4
- data.tar.gz: fa6fd30dc5a7170ecf78eb58168b41e86368a25e9e13d34ce419653de9cc5f7d
3
+ metadata.gz: 5056d8aabe2a128b9b47d211c0fcb7b170735b08db7773347c5a9c88df1cc884
4
+ data.tar.gz: 21300a88c8c746e894f581eebd92a26a398b3aae44b03485a2b8d30c1682bfaa
5
5
  SHA512:
6
- metadata.gz: c1c594c55a9ea7480bf94191712593cffe9dbc47899181b67e5e647712bff8c4a775ca9d3f7c3c6022711213ad1c5a2f9ecce93e7163e2f869ab3562297802fc
7
- data.tar.gz: b26beaad31010ec2b3c4d506f1d7892709756a2f17f7044de3795f6443e7379d175dfa6ecca8f779f83391bd438cefa5f55b8e8a6388a14e74a8092a9889a483
6
+ metadata.gz: dc71fbfb943e9749a1f377be508da3409e347d82a9aa1dd990c4132d942ca797a325da3bc2321b860cdaf0e44c000e40314d13e9449f45796df0a6d36984e5d8
7
+ data.tar.gz: be008019531be1d454ad4d97071240417068f319ea6534b10cc26c78895f2d22d6f1245d696f165214d884b84216a89bd66ea7da41b40206fcf1af0fa57953db
data/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
+ ### [1.1.0](https://github.com/eliottvincent/bay/compare/v1.0.21...v1.1.0) (2024-05-23)
6
+
7
+ ### Features
8
+
9
+ - Email address is now cloaked by default (prevents spam)
10
+
11
+ ### [1.0.21](https://github.com/eliottvincent/bay/compare/v1.0.20...v1.0.21) (2024-05-23)
12
+
13
+ ### Features
14
+
15
+ - Year displayed in footer is now truly dynamic (no need to re-deploy)
16
+
5
17
  ### [1.0.20](https://github.com/eliottvincent/bay/compare/v1.0.19...v1.0.20) (2023-10-19)
6
18
 
7
19
  ### Features
data/README.md CHANGED
@@ -13,7 +13,7 @@ Inspired by [dangrover.com](http://dangrover.com/). Current theme used at [eliot
13
13
 
14
14
 
15
15
  The easiest solution is to [fork this repo](https://github.com/eliottvincent/bay/fork).
16
- If you want to start from a clean website, follow the steps bellow:
16
+ If you want to start from a clean website, follow the steps below:
17
17
 
18
18
  Create a new Jekyll website:
19
19
  ```
@@ -13,13 +13,41 @@
13
13
  src="{{ contact_icon_path }}"
14
14
  alt="{{ contact.name | downcase }}"
15
15
  />
16
- <a href="{{ contact.link }}" id="{{ contact.name | downcase }}-link">
17
- {% if contact.value and contact.value != "" and contact.value != nil %}
18
- {{ contact.value }}
16
+
17
+ {% if contact.type == "email" %}
18
+ {% if contact.cloak == true %}
19
+ {% assign email_parts = contact.value | split: "@" %}
20
+ {% assign user = email_parts[0] %}
21
+ {% assign domain = email_parts[1] | split: "." %}
22
+ {% assign domain_name = domain[0] %}
23
+ {% assign domain_tld = domain[1] %}
24
+
25
+ {% assign reversed_user = user | split: "" | reverse | join: "" %}
26
+ {% assign reversed_domain_name = domain_name | split: "" | reverse | join: "" %}
27
+ {% assign reversed_domain_tld = domain_tld | split: "" | reverse | join: "" %}
28
+ <span
29
+ data-resu="{{ reversed_user }}"
30
+ data-eman-niamod="{{ reversed_domain_name }}"
31
+ data-dlt-niamod="{{ reversed_domain_tld }}"
32
+ id="{{ contact.name | downcase }}-link"
33
+ class="link email-link-cloaked"
34
+ >
35
+ {{ contact.name }}
36
+ </span>
19
37
  {% else %}
20
- {{ contact.name }}
38
+ <a href="mailto:{{ contact.value }}" id="{{ contact.name | downcase }}-link">
39
+ {{ contact.value }}
40
+ </a>
21
41
  {% endif %}
22
- </a>
42
+ {% else %}
43
+ <a href="{{ contact.link }}" id="{{ contact.name | downcase }}-link">
44
+ {% if contact.value and contact.value != "" and contact.value != nil %}
45
+ {{ contact.value }}
46
+ {% else %}
47
+ {{ contact.name }}
48
+ {% endif %}
49
+ </a>
50
+ {% endif %}
23
51
  </div>
24
52
 
25
53
  {% endfor %}
@@ -56,7 +84,7 @@
56
84
  {% if site.footer.show_powered_by == true %}
57
85
  <div class="footer-col footer-col-3 powered-by">
58
86
  <p>
59
- powered by <a href="https://github.com/eliottvincent/bay">Bay</a> | {{ 'now' | date: "%Y" }}
87
+ powered by <a href="https://github.com/eliottvincent/bay">Bay</a> | <span id="year"></span>
60
88
  </p>
61
89
  </div>
62
90
  {% endif %}
data/_includes/head.html CHANGED
@@ -30,7 +30,7 @@
30
30
  {% endif %}
31
31
 
32
32
  {% for follow in site.footer.follow %}
33
- {% if follow.name == 'Twitter' %}
33
+ {% if follow.type == 'twitter' %}
34
34
  {% assign twitter_username = follow.username %}
35
35
  {% break %}
36
36
  {% endif %}
@@ -1,5 +1,5 @@
1
1
  {% for contact in site.footer.contact %}
2
- {% if contact.name == 'WeChat' %}
2
+ {% if contact.type == 'wechat' %}
3
3
  {% assign wechat_username = contact.value %}
4
4
  {% break %}
5
5
  {% endif %}
data/_sass/_base.scss CHANGED
@@ -113,10 +113,17 @@ h4 {
113
113
  a {
114
114
  color: $brand-color;
115
115
  text-decoration: none;
116
- //
117
- // &:visited {
118
- // color: darken($brand-color, 15%);
119
- // }
116
+
117
+ &:hover {
118
+ color: $text-color;
119
+ text-decoration: underline;
120
+ }
121
+ }
122
+
123
+ span.link {
124
+ cursor: pointer;
125
+ color: $brand-color;
126
+ text-decoration: none;
120
127
 
121
128
  &:hover {
122
129
  color: $text-color;
data/_sass/_site.scss CHANGED
@@ -37,6 +37,7 @@
37
37
  height: 16px;
38
38
  }
39
39
 
40
+ span,
40
41
  a {
41
42
  margin-left: 6px;
42
43
  word-break: break-all;
data/assets/js/site.js CHANGED
@@ -1,18 +1,47 @@
1
1
  /**
2
2
  * Menu
3
3
  */
4
- $("a.menu-icon").on("click", function(event) {
5
- var w = $(".menu");
4
+ $("a.menu-icon").on("click", function(event) {
5
+ var w = $(".menu");
6
6
 
7
- w.css({
8
- display: w.css("display") === "none"
7
+ w.css({
8
+ display: (w.css("display") === "none")
9
9
  ? "block"
10
10
  : "none"
11
- });
12
- });
11
+ });
12
+ });
13
+
14
+ /**
15
+ * Footer year
16
+ */
17
+ $(document).ready(function() {
18
+ $("#year").text(new Date().getFullYear());
19
+ });
13
20
 
14
21
  /**
15
- * Wechat widget
22
+ * Footer email
23
+ */
24
+ $(document).ready(function() {
25
+ $(".email-link-cloaked").on("click", function(event) {
26
+ const _link = event.target;
27
+
28
+ const _user = reverseString(_link.getAttribute("data-resu"));
29
+ const _domain = reverseString(_link.getAttribute("data-eman-niamod"));
30
+ const _tld = reverseString(_link.getAttribute("data-dlt-niamod"));
31
+
32
+ window.location.href = `mailto:${_user}@${_domain}.${_tld}`;
33
+ });
34
+ });
35
+
36
+ /**
37
+ * Reverses a string
38
+ */
39
+ function reverseString(str) {
40
+ return str.split("").reverse().join("");
41
+ }
42
+
43
+ /**
44
+ * Moves WeChat widget
16
45
  */
17
46
  function moveWidget(event) {
18
47
  var w = $("#wechat-widget");
@@ -25,6 +54,7 @@ function moveWidget(event) {
25
54
 
26
55
  $("a#wechat-link").on("mouseenter", function(event) {
27
56
  $("#wechat-widget").css({ display: "block" });
57
+
28
58
  moveWidget(event);
29
59
  });
30
60
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bay_jekyll_theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.20
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eliott Vincent
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-19 00:00:00.000000000 Z
11
+ date: 2024-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll