rawfeed 0.2.7 → 0.2.9

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: 58ea1ee548b33fcc82f993045e60125b21d5ce10584952115b1fbc358c334e88
4
- data.tar.gz: 591deb40da8b6e0b9524e8dafb63b85df42101f293792f20a4655fbbb315bcbe
3
+ metadata.gz: b9d0e278593d02831f20f510933d14e867299ab53508f83d221952bb398bf8d5
4
+ data.tar.gz: 013f28a29fdb4e5b3bb4c83049df64fdc67ac4b418b2290543786559af36721c
5
5
  SHA512:
6
- metadata.gz: 5a1b265ef5ad239c733ce6df889b5770f269f548c2ca0ec49c190bff3edf42b2dbc48ee89af0d5b1bf36d8977f5b7fe10ef0e325af24e911dc876b8fbb0a2cbb
7
- data.tar.gz: b18ae0c6053706dd4f7bb6e4a3f6f7a519b7cb7ff5724516ebdbd130f589bc0ba4d814ad6b59ddcd998277c066769d7573f80e4cbf11a456a8293781e090c343
6
+ metadata.gz: 449f20ddede0b61e148a0bf7164ddb9f14c4a252583f62327b3a91558258f26c3c7fd38cc9b2a07a51403523b46aa8f16ecb65d62ad4c0c8549489d65c5784a3
7
+ data.tar.gz: 3c0ce969077f1cb55623992d53efc4a77d4b24024a7c4fd0ce77cf1c527a0c7cbd9325f3eda741dafce72f6913b79c4782471ec0ad33596dc584a61a910578c3
@@ -6,17 +6,14 @@ See: https://rawfeed.github.io/rawfeed-jekyll/license/
6
6
 
7
7
  {%- include layout/data.liquid -%}
8
8
 
9
- <footer class="fixed-bottom footer">
10
9
 
11
- <!-- line top button -->
12
- {%- if footer_.top_button.enable -%}
13
- <div class="row top">
14
- <div class="col-md d-flex justify-content-end">
15
- <a id="top-link" class="top-link" href="#top">{{ footer_.top_button.icon }}</a>
16
- </div>
17
- </div>
18
- {%- endif -%}
19
- <!-- line top button -->
10
+ {%- if footer_.top_button.enable -%}
11
+ <a id="top-link" href="#top" class="top-link" aria-label="back to top">
12
+ {{ footer_.top_button.icon }}
13
+ </a>
14
+ {%- endif -%}
15
+
16
+ <footer class="fixed-bottom footer">
20
17
 
21
18
  <!-- line footer content -->
22
19
  <div class="row footer-wrapper">
@@ -21,10 +21,36 @@
21
21
  <meta property="og:site_name" content="{{ site_title }}">
22
22
  <meta property="og:type" content="website">
23
23
  <meta name="twitter:card" content="summary">
24
- <meta property="twitter:title" content="{{ site_title }}">
24
+ <meta name="twitter:title" content="{{ site_title }}">
25
+ {% for item in socials_.links %}
26
+ {% if item.url contains "x.com" %}
27
+ {% assign username = item.url | remove: "https://x.com/" %}
28
+ {% if username != blank %}
29
+ <meta name="twitter:site" content="@{{ username }}"/>
30
+ <meta name="twitter:creator" content="@{{ username }}">
31
+ {% endif %}
32
+ {% endif %}
33
+ {% endfor %}
25
34
  <meta name="robots" content="index, follow">
26
35
  <script type="application/ld+json">
27
- {"@context":"https://schema.org","@type":"WebSite","description":"{{ page.description | capitalize | default: header_.description | strip_html | truncate: 50 }}","headline":"{{ site_title }}","name":"{{ site_title }}","url":"{{ page.url | prepend: site.url }}"}</script>
36
+ {
37
+ "@context": "https://schema.org",
38
+ {% if page.url == "/blog/" %}
39
+ "@type": "BlogPosting",
40
+ "datePublished": "{{ page.date | date_to_xmlschema }}",
41
+ "author": {
42
+ "@type": "Person",
43
+ "name": "{{ author_.name }}"
44
+ },
45
+ {% else %}
46
+ "@type": "WebSite",
47
+ {% endif %}
48
+ "description": "{{ page.description | default: header_.description | strip_html | truncate: 160 | escape }}",
49
+ "headline": "{{ page.title | default: site_title | escape }}",
50
+ "name": "{{ site_title }}",
51
+ "url": "{{ page.url | prepend: site.url }}"
52
+ }
53
+ </script>
28
54
  <!-- SEO -->
29
55
 
30
56
  {% comment %} Security {% endcomment %}
@@ -36,7 +62,7 @@
36
62
  content="
37
63
  default-src 'self';
38
64
  img-src 'self' data: {{ head_.csp.img-src | join: ' ' }};
39
- script-src 'self' {{ head_.csp.script-src | join: ' ' }};
65
+ script-src 'self' 'unsafe-inline' {{ head_.csp.script-src | join: ' ' }};
40
66
  style-src 'self' 'unsafe-inline' {{ head_.csp.style-src | join: ' ' }};
41
67
  font-src 'self' {{ head_.csp.font-src | join: ' ' }} data:;
42
68
  connect-src 'self' {{ head_.csp.connect-src | join: ' ' }};
@@ -99,7 +125,14 @@
99
125
 
100
126
  {%- if jekyll.environment == 'production' and head_.google.analytics.enable == true and head_.google.analytics.id != "" -%}
101
127
  <!-- Google Analytics -->
102
- <script src="{{ '/assets/js/google_analytics.js' | relative_url }}"></script>
128
+ <script async src="https://www.googletagmanager.com/gtag/js?id={{ head_.google.analytics.id }}"></script>
129
+ <script>
130
+ window.dataLayer = window.dataLayer || [];
131
+ function gtag(){dataLayer.push(arguments);}
132
+ gtag('js', new Date());
133
+
134
+ gtag('config', '{{ head_.google.analytics.id }}');
135
+ </script>
103
136
  <!-- Google Analytics -->
104
137
  {%- endif -%}
105
138
  </head>
@@ -1,9 +1,37 @@
1
+ .top-link {
2
+ position: fixed;
3
+ color: var(--primary-color);
4
+ text-decoration: none !important;
5
+ bottom: var(--margin-bottom);
6
+ right: 1.2rem;
7
+ width: 45px;
8
+ height: 45px;
9
+ display: none;
10
+ align-items: center;
11
+ justify-content: center;
12
+ font-size: 3.5rem;
13
+ line-height: 1;
14
+ z-index: 1050; /* acima do conteúdo, abaixo de modals bootstrap */
15
+ pointer-events: auto; /* permite clique apenas nele */
16
+ transition: opacity .3s ease, transform .3s ease;
17
+ opacity: 0;
18
+ &:hover {
19
+ color: var(--text-color);
20
+ }
21
+ }
22
+
23
+ .top-link.show {
24
+ display: flex;
25
+ opacity: 1;
26
+ transform: translateY(0);
27
+ }
28
+
1
29
  .footer {
2
30
  font: 16.34px monospace !important;
3
31
  font-size: .75rem !important;
4
32
  letter-spacing: normal !important;
5
33
  color: var(--text-color);
6
- padding: 0px 10px;
34
+ padding: 0px 15px;
7
35
 
8
36
  &-wrapper {
9
37
  height: 24px;
@@ -12,23 +40,6 @@
12
40
  background-color: var(--footer-bg-color);
13
41
  }
14
42
 
15
- .top {
16
- background-color: transparent;
17
- margin-bottom: 5px;
18
- margin-right: 2px;
19
-
20
- @media (max-width: 1040px) {
21
- display: none;
22
- }
23
-
24
- &-link {
25
- font-size: 3rem;
26
- display: none;
27
- text-decoration: none !important;
28
- z-index: 99;
29
- }
30
- }
31
-
32
43
  &-copyright-wrap {
33
44
  text-align: left;
34
45
 
data/_sass/main.scss CHANGED
@@ -18,7 +18,7 @@ layout:
18
18
  */
19
19
  :root[data-theme="light"] {
20
20
  // margins
21
- --margin-bottom: 85px !important; // note: This is the height of the footer.
21
+ --margin-bottom: 35px !important; // note: This is the height of the footer.
22
22
 
23
23
  // colors
24
24
  --bg-color: #{theme.theme-color(bg, light)};
@@ -86,7 +86,7 @@ layout:
86
86
 
87
87
  :root[data-theme="dark"] {
88
88
  // margins
89
- --margin-bottom: 85px !important; // note: This is the height of the footer.
89
+ --margin-bottom: 35px !important; // note: This is the height of the footer.
90
90
 
91
91
  // colors
92
92
  --bg-color: #{theme.theme-color(bg, dark)};
@@ -57,26 +57,21 @@ document.addEventListener("DOMContentLoaded", () => {
57
57
  /* Show/disappear top button
58
58
  --------------------------------------------------------------------------------------------------
59
59
  */
60
- let topButton = document.getElementById("top-link");
60
+ const topButton = document.getElementById("top-link");
61
61
  const scrollThreshold = 700;
62
- window.onscroll = function () { scrollFunction() };
63
62
 
64
- function scrollFunction() {
65
- if (document.body.scrollTop > scrollThreshold || document.documentElement.scrollTop > scrollThreshold) {
66
- topButton.style.display = "block";
63
+ window.addEventListener("scroll", () => {
64
+ if (window.scrollY > scrollThreshold) {
65
+ topButton.classList.add("show");
67
66
  } else {
68
- topButton.style.display = "none";
67
+ topButton.classList.remove("show");
69
68
  }
70
- }
71
-
72
- topButton.addEventListener("click", topFunction);
69
+ });
73
70
 
74
- function topFunction() {
75
- window.scrollTo({
76
- top: 0,
77
- behavior: 'smooth'
78
- });
79
- }
71
+ topButton.addEventListener("click", (e) => {
72
+ e.preventDefault();
73
+ window.scrollTo({ top: 0, behavior: "smooth" });
74
+ });
80
75
 
81
76
  /* function Giscus
82
77
  --------------------------------------------------------------------------------------------------
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rawfeed
4
- VERSION = "0.2.7"
4
+ VERSION = "0.2.9"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rawfeed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - William C. Canin
@@ -231,7 +231,6 @@ files:
231
231
  - assets/js/fallback/resume.js
232
232
  - assets/js/fallback/tags.js
233
233
  - assets/js/fallback/theme_load.js
234
- - assets/js/google_analytics.coffee
235
234
  - assets/js/home.coffee
236
235
  - assets/js/no_inframe.coffee
237
236
  - assets/js/page.coffee
@@ -1,24 +0,0 @@
1
- ---
2
- ---
3
-
4
- {%- include layout/data.liquid -%}
5
-
6
- is_dnt_active = window.doNotTrack is "1" or navigator.doNotTrack is "1" or navigator.doNotTrack is "yes" or navigator.msDoNotTrack is "1"
7
-
8
- unless is_dnt_active
9
- gaLoader = (i,s,o,g,r,a,m) ->
10
- i[r] = i[r] or ->
11
- (i[r].q = i[r].q or []).push arguments
12
- i['GoogleAnalyticsObject'] = r
13
- i[r].l = 1 * new Date()
14
- a = s.createElement o
15
- m = s.getElementsByTagName(o)[0]
16
- a.async = 1
17
- a.src = g
18
- m.parentNode.insertBefore a, m
19
-
20
- gaLoader window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga'
21
-
22
- # envio dos comandos de rastreamento
23
- ga 'create', '{{ head_.google.analytics.id }}', 'auto'
24
- ga 'send', 'pageview'