Skip to content

Commit f84fef0

Browse files
committed
No issue: Clean up privacy and social media stuff
- Disable Google Analytics: comment out `google_analytics_tracking_id` in `_config.yml`, which gates both the GA script and the consent popup. - Gate GA section in `privacy.html` with `{% if site.google_analytics_tracking_id %}`; show a fallback notice when GA is off. - Self-host Lato (400/700/400italic) and Volkhov fonts in `assets/fonts/`; add `assets/css/fonts.css` with `@font-face` rules; replace the Web Font Loader script and `fonts.googleapis.com` `<noscript>` link in `_includes/head.html` with a local stylesheet link. - Remove the `twitter:dnt` meta tag from `_includes/head.html` and the (commented-out) Twitter entry from `_data/socialmedia.yml`.
1 parent 546307a commit f84fef0

12 files changed

Lines changed: 73 additions & 33 deletions

_config.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,7 @@ sass:
205205
#
206206
# used in _includes/footer_scripts.html
207207

208-
google_analytics_tracking_id: UA-66159313-1
209-
208+
#google_analytics_tracking_id: UA-66159313-1
210209
# ______ ____ __ _
211210
# / ____/___ / / /__ _____/ /_(_)___ ____ _____
212211
# / / / __ \/ / / _ \/ ___/ __/ / __ \/ __ \/ ___/

_data/socialmedia.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,6 @@
22
# url: https://www.youtube.com/channel/UCZjW4CbnWVxh5f7FMLMToBQ/feed
33
# class: icon-youtube
44
# title: "Tutorials for DKPro on YouTube"
5-
6-
#- name: Twitter
7-
# url: https://twitter.com/dkprocore
8-
# class: icon-twitter
9-
# title: "Twitter: @dkprocore"
10-
115
#- name: Facebook
126
# url: http://www.facebook.com/phlow.media
137
# class: icon-facebook

_includes/head.html

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<head>
44
<meta charset="utf-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6-
<meta name="twitter:dnt" content="on">
76
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
87
<link rel="stylesheet" href="{{ site.url }}/assets/css/styles_feeling_responsive.css">
98
<script src="{{ site.url }}/assets/js/modernizr.min.js"></script>
@@ -16,28 +15,8 @@
1615
}
1716
</script>
1817
{% endif %}
19-
20-
<script>
21-
WebFontConfig = {
22-
google: { families: [ 'Lato:400,700,400italic:latin', 'Volkhov::latin' ] }
23-
};
24-
25-
(function() {
26-
var wf = document.createElement('script');
27-
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
28-
'://ajax.googleapis.com/ajax/libs/webfont/1.5.6/webfont.js';
29-
wf.type = 'text/javascript';
30-
wf.async = 'true';
31-
var s = document.getElementsByTagName('script')[0];
32-
s.parentNode.insertBefore(wf, s);
33-
})();
34-
</script>
35-
36-
<noscript>
37-
<link href='http://fonts.googleapis.com/css?family=Lato:400,700,400italic%7cVolkhov' rel='stylesheet' type='text/css'>
38-
</noscript>
39-
40-
{% if site.google_site_verification %}<meta name="google-site-verification" content="{{ site.google_site_verification}}" />{% endif %}
18+
<link rel="stylesheet" href="{{ site.url }}/assets/css/fonts.css">
19+
{% if site.google_site_verification %}<meta name="google-site-verification" content="{{ site.google_site_verification}}" />{% endif %}
4120
{% if site.bing_webmastertools_id %}<meta name="msvalidate.01" content="{{ site.bing_webmastertools_id }}" />{% endif %}
4221
{% if page.meta_description %}<meta name="description" content="{{ page.meta_description | strip_html | escape }}"/>{% elsif page.teaser %}<meta name="description" content="{{ page.teaser | strip_html | escape }}"/>{% elsif site.description %}<meta name="description" content="{{ site.description | strip_html | escape }}"/>{% endif %}
4322

assets/css/fonts.css

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/* Self-hosted Lato + Volkhov (SIL OFL). Sourced from Google Fonts v25 / v18. */
2+
3+
/* Lato italic 400 — latin-ext */
4+
@font-face {
5+
font-family: 'Lato';
6+
font-style: italic;
7+
font-weight: 400;
8+
font-display: swap;
9+
src: url('../fonts/lato/lato-italic-latin-ext.woff2') format('woff2');
10+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
11+
}
12+
/* Lato italic 400 — latin */
13+
@font-face {
14+
font-family: 'Lato';
15+
font-style: italic;
16+
font-weight: 400;
17+
font-display: swap;
18+
src: url('../fonts/lato/lato-italic-latin.woff2') format('woff2');
19+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
20+
}
21+
/* Lato regular 400 — latin-ext */
22+
@font-face {
23+
font-family: 'Lato';
24+
font-style: normal;
25+
font-weight: 400;
26+
font-display: swap;
27+
src: url('../fonts/lato/lato-regular-latin-ext.woff2') format('woff2');
28+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
29+
}
30+
/* Lato regular 400 — latin */
31+
@font-face {
32+
font-family: 'Lato';
33+
font-style: normal;
34+
font-weight: 400;
35+
font-display: swap;
36+
src: url('../fonts/lato/lato-regular-latin.woff2') format('woff2');
37+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
38+
}
39+
/* Lato bold 700 — latin-ext */
40+
@font-face {
41+
font-family: 'Lato';
42+
font-style: normal;
43+
font-weight: 700;
44+
font-display: swap;
45+
src: url('../fonts/lato/lato-700-latin-ext.woff2') format('woff2');
46+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
47+
}
48+
/* Lato bold 700 — latin */
49+
@font-face {
50+
font-family: 'Lato';
51+
font-style: normal;
52+
font-weight: 700;
53+
font-display: swap;
54+
src: url('../fonts/lato/lato-700-latin.woff2') format('woff2');
55+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
56+
}
57+
/* Volkhov regular 400 — latin */
58+
@font-face {
59+
font-family: 'Volkhov';
60+
font-style: normal;
61+
font-weight: 400;
62+
font-display: swap;
63+
src: url('../fonts/volkhov/volkhov-regular-latin.woff2') format('woff2');
64+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
65+
}
2.96 KB
Binary file not shown.
13.8 KB
Binary file not shown.
3 KB
Binary file not shown.
14.5 KB
Binary file not shown.
2.92 KB
Binary file not shown.
13.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)