bay_jekyll_theme 1.0.21 → 1.1.1

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: d232430dcbe57d7bd932819337dcee8ae1cad47ae8edfec107d028c011d8c444
4
- data.tar.gz: a5c9f8dceae0c52994537d671ef07903563b9d40dc438ab1440ef9635b3b47c7
3
+ metadata.gz: f85fb481519a0f71ccd244f8cde138b2b2d42178d48275679ae0410536fa5b10
4
+ data.tar.gz: da84cf19c9d8078d2af1ddb10a7a7138af5751dc05e117375e98142c63993455
5
5
  SHA512:
6
- metadata.gz: 729462bd151e141b0636ff747f93746ab5e0891f38d4cf43f4b7ede681846d4f5f15c42c93cb05d4634ebe12b7725e9708f3ee3d794338c7e54891202a42a230
7
- data.tar.gz: 9d5795f8e217c12af797ecc8f4c16d62c3304ce8cf98afa50b98c9310e513d923c9a4092a4d8197aea4ae62899f119ea8c4979cc21ebbfb4ea3b2e3c6f6a5a41
6
+ metadata.gz: a0a6af407fdf56063d7191801b05a6e5caec4b63913ac7e47f2626edacf4ce03e4a8d94008b962f31e696914a93dfe24bc0bbddb6a7db398af2dfb8c2b15c642
7
+ data.tar.gz: 74adde7714c70a7250d829d50402906a2e92e6f9bb1f4b754a3dbc82a4e4d4226075415136977a25a18ec6e919a848e6d945e5c8243d4c6717393f4d854c61e4
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.1](https://github.com/eliottvincent/bay/compare/v1.1.0...v1.1.1) (2024-05-23)
6
+
7
+ ### Bug Fixes
8
+
9
+ - Fix images path
10
+
11
+ ### [1.1.0](https://github.com/eliottvincent/bay/compare/v1.0.21...v1.1.0) (2024-05-23)
12
+
13
+ ### Features
14
+
15
+ - Email address is now cloaked by default (prevents spam)
16
+
5
17
  ### [1.0.21](https://github.com/eliottvincent/bay/compare/v1.0.20...v1.0.21) (2024-05-23)
6
18
 
7
19
  ### Features
data/README.md CHANGED
@@ -73,27 +73,32 @@ Open the `_config.yml` file and add the following:
73
73
  footer:
74
74
  show_powered_by: true
75
75
  contact:
76
- - name: Email
76
+ - type: email
77
+ name: Email
77
78
  value: yourmail@domain.com
78
- link: mailto:yourmail@domain.com
79
- - name: WeChat
79
+ cloak: true
80
+ - type: wechat
80
81
  value: YourWeChatUsername
81
82
  link: "#"
82
83
  follow:
83
- - name: Twitter
84
+ - type: twitter
85
+ name: Twitter
84
86
  link: http://twitter.com/YourTwitterUsername
85
87
  username: "@YourTwitterUsername"
86
- - name: Facebook
88
+ - type: facebook
89
+ name: Facebook
87
90
  link: http://facebook.com/YourFacebookUsername
88
- - name: LinkedIn
91
+ - type: linkedin
92
+ name: LinkedIn
89
93
  link: http://linkedin.com/in/YourLinkedInUsername
90
- - name: GitHub
94
+ - type: github
95
+ name: GitHub
91
96
  link: http://github.com/YourGitHubUsername
92
- - name: Dribbble
97
+ - type: dribbble
98
+ name: Dribbble
93
99
  link: https://dribbble.com/YourDribbbleUsername
94
- - name: Weibo
95
- link: http://weibo.com/u/YourWeiboUsername
96
- - name: RSS
100
+ - type: rss
101
+ name: RSS
97
102
  link: /feed.xml
98
103
  ```
99
104
  Re-run `jekyll serve` to see the footer updated.
@@ -8,18 +8,46 @@
8
8
  {% for contact in site.footer.contact %}
9
9
  <div class="social-link contact-links">
10
10
 
11
- {% assign contact_icon_path = "/assets/img/icons/" | append: contact.name | downcase | append: ".png" | absolute_url %}
11
+ {% assign contact_icon_path = "/assets/img/icons/" | append: contact.type | downcase | append: ".png" | absolute_url %}
12
12
  <img
13
13
  src="{{ contact_icon_path }}"
14
- alt="{{ contact.name | downcase }}"
14
+ alt="{{ contact.type }}"
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.type }}-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.type }}-link">
39
+ {{ contact.value }}
40
+ </a>
21
41
  {% endif %}
22
- </a>
42
+ {% else %}
43
+ <a href="{{ contact.link }}" id="{{ contact.type }}-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 %}
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
@@ -14,12 +14,34 @@ $("a.menu-icon").on("click", function(event) {
14
14
  /**
15
15
  * Footer year
16
16
  */
17
- $().ready(function() {
17
+ $(document).ready(function() {
18
18
  $("#year").text(new Date().getFullYear());
19
19
  });
20
20
 
21
21
  /**
22
- * 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
23
45
  */
24
46
  function moveWidget(event) {
25
47
  var w = $("#wechat-widget");
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bay_jekyll_theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.21
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eliott Vincent