type-on-strap 2.2.4 → 2.2.5
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 +4 -4
- data/README.md +75 -57
- data/_data/language.yml +3 -0
- data/_includes/head.html +23 -17
- data/_layouts/default.html +2 -2
- data/_layouts/search.html +3 -3
- data/_sass/{external/_syntax.scss → base/_highlight.scss} +3 -1
- data/_sass/base/_variables.scss +3 -3
- data/_sass/type-on-strap.scss +10 -10
- data/assets/data/search.json +2 -2
- data/assets/js/main.min.js +1 -1
- data/assets/js/partials/cookie_consent_init.js +57 -0
- data/assets/js/vendor/simple-jekyll-search.min.js +2 -2
- metadata +5 -6
- data/_includes/cookie-consent.html +0 -51
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ed8a97f0cd96fb6b4cb453fc664880312eb47199ffe4b2fc76eb60f2ab2db593
|
|
4
|
+
data.tar.gz: 263d45173c7dfa1fb586dd38c96edc97799155e5a36fb636ed3a10acc81a6473
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f9fcbb5d9d7332aa45c6263360ba9eda1704d0c4906fdff03d51be88897c31fe947a521ff3b80fa74e6467051534179cf051aa2a5adfd634ba92a7d765f8ceae
|
|
7
|
+
data.tar.gz: 0dd9911ebcea1dae5dda7bfb19a8e0b7f833c9373e1a59ab29118bd1d8c54192cb7c38634b482c6ec9c36d558ea2b652fe3210b6ea8f6f9152ef09015a80a4fa
|
data/README.md
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
# Type on Strap
|
|
1
|
+
# Type on Strap 🎨
|
|
2
2
|
|
|
3
3
|
[](https://travis-ci.org/sylhare/Type-on-Strap)
|
|
4
4
|
[](https://badge.fury.io/rb/type-on-strap)
|
|
5
5
|
[](https://hub.docker.com/r/sylhare/type-on-strap)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
[](https://sylhare.github.io/Type-on-Strap/)
|
|
8
|
+
|
|
9
|
+
A free and open-source [Jekyll](https://jekyllrb.com) theme. Based on Rohan Chandra [type-theme](https://github.com/rohanchandra/type-theme) packed with extra features and easily cusomizable:
|
|
8
10
|
|
|
9
|
-
* Responsive design
|
|
10
|
-
* Portfolio
|
|
11
|
-
* Tags compatibility
|
|
12
|
-
* Bootstrap : [Get Bootstrap](http://getbootstrap.com/)
|
|
13
|
-
* Search feature
|
|
11
|
+
* Responsive design on all devices (🖥, 💻, 📱, ...)
|
|
12
|
+
* Portfolio 🗂, Gallery 🖼 pages for your projects
|
|
13
|
+
* Tags compatibility 🏷
|
|
14
|
+
* Handle Bootstrap'ed pages: [Get Bootstrap](http://getbootstrap.com/)
|
|
15
|
+
* 🔎 Search feature: [Simple-Jekyll-Search](https://github.com/christian-fei/Simple-Jekyll-Search)
|
|
14
16
|
* Math Rendering : [KateX](https://github.com/Khan/KaTeX)
|
|
15
|
-
* Nice fonts
|
|
16
|
-
* Seo Tags
|
|
17
|
-
* Syntax Highlighting: Easily customisable [Base16](https://github.com/chriskempson/base16)
|
|
17
|
+
* 🖋 Nice fonts: [Font Awesome](https://fontawesome.com/), [Source Sans Pro](https://fonts.google.com/specimen/Source+Sans+Pro), [Pacifico](https://fonts.google.com/specimen/Pacifico?selection.family=Pacifico)
|
|
18
|
+
* Seo Tags: [Jekyll-seo-tag](https://github.com/jekyll/jekyll-seo-tag)
|
|
19
|
+
* 🛠 Syntax Highlighting: Easily customisable [Base16](https://github.com/chriskempson/base16)
|
|
18
20
|
* Free of rights images from [pexels](https://www.pexels.com/)
|
|
19
21
|
|
|
20
22
|
> [Demo Site](https://sylhare.github.io/Type-on-Strap/)
|
|
21
|
-
|
|
22
|
-
[](https://sylhare.github.io/Type-on-Strap/)
|
|
23
23
|
|
|
24
24
|
## Table of Contents
|
|
25
25
|
|
|
@@ -33,11 +33,11 @@ A free and open-source [Jekyll](https://jekyllrb.com) theme. Based on Rohan Chan
|
|
|
33
33
|
|
|
34
34
|
## Usage
|
|
35
35
|
|
|
36
|
-
### As a ruby gem
|
|
36
|
+
### As a ruby gem 💎
|
|
37
37
|
|
|
38
38
|
Check out this tutorial: [Use as Ruby Gem](https://github.com/Sylhare/Type-on-Strap#use-as-ruby-gem)
|
|
39
39
|
|
|
40
|
-
### As a github page
|
|
40
|
+
### As a github page 📋
|
|
41
41
|
|
|
42
42
|
1. Fork and clone the [Type on Strap repo](https://github.com/sylhare/Type-On-Strap): `git clone https://github.com/Sylhare/Type-on-Strap.git`
|
|
43
43
|
2. Install [Jekyll](https://jekyllrb.com/docs/installation/): `gem install jekyll`, check [#1](https://github.com/Sylhare/Type-on-Strap/issues/1) if you have a problem.
|
|
@@ -77,7 +77,7 @@ Type-on-Strap
|
|
|
77
77
|
└── index.html # sample home page (blog page paginated)
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
-
## Configure Type on Strap
|
|
80
|
+
## Configure Type on Strap 🛠
|
|
81
81
|
|
|
82
82
|
Open `_config.yml` in a text editor to change most of the blog's settings.
|
|
83
83
|
|
|
@@ -85,16 +85,17 @@ If a variable in this document is marked as "optional", disable the feature by r
|
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
### Site configuration
|
|
88
|
-
Configure Jekyll as your own blog or with a subpath in in `_config.yml`:
|
|
89
88
|
|
|
90
|
-
Jekyll
|
|
89
|
+
Configure Jekyll as your own blog or with a "baseurl" in in `_config.yml`:
|
|
90
|
+
|
|
91
|
+
Jekyll website *without* a "baseurl" (such as a GitHub Pages website for a given username):
|
|
91
92
|
|
|
92
93
|
```yml
|
|
93
94
|
baseurl: ""
|
|
94
95
|
url: "https://username.github.io"
|
|
95
96
|
```
|
|
96
97
|
|
|
97
|
-
Jekyll website *with*
|
|
98
|
+
Jekyll website *with* "baseurl" (like the Type on Strap [demo](https://sylhare.github.io/Type-on-Strap/) page):
|
|
98
99
|
|
|
99
100
|
```yml
|
|
100
101
|
baseurl: "/sub-directory"
|
|
@@ -117,7 +118,7 @@ description: My blog posts # Short description, primarily used by sea
|
|
|
117
118
|
favicon: assets/favicon.ico # Icon displayed in the tab
|
|
118
119
|
```
|
|
119
120
|
|
|
120
|
-
###
|
|
121
|
+
### Theme customization 🎨
|
|
121
122
|
|
|
122
123
|
#### Footer and Header's text
|
|
123
124
|
|
|
@@ -217,23 +218,26 @@ youtube: UCqECaJ8Gagnn7YCbPEzWH6g # Youtube token of your channel in the url
|
|
|
217
218
|
|
|
218
219
|
You can update the RSS settings in `_data/social` to change the default feed path (generated by [jekyll-feel](https://github.com/jekyll/jekyll-feed)).
|
|
219
220
|
|
|
220
|
-
###
|
|
221
|
+
### Personalize your Blog Posts 📝
|
|
221
222
|
|
|
222
223
|
When writing a post, be sure in jekyll to:
|
|
223
224
|
- Put it in the `_posts` folder
|
|
224
225
|
- Name it with the date first like `2019-08-21-This-is-my-blog-post.md`
|
|
225
226
|
|
|
227
|
+
Please refer to the [Jekyll docs for writing posts](https://jekyllrb.com/docs/posts/).
|
|
228
|
+
|
|
226
229
|
#### Layout: Post
|
|
227
230
|
|
|
228
231
|
This are the basic features you can use with the `post` layout.
|
|
229
232
|
|
|
230
233
|
```yml
|
|
234
|
+
|
|
231
235
|
---
|
|
232
236
|
layout: post
|
|
233
237
|
title: Hello World # Title of the page
|
|
234
238
|
hide_title: true # Hide the title when displaying the post, but shown in lists of posts
|
|
235
239
|
feature-img: "assets/img/sample.png" # Add a feature-image to the post
|
|
236
|
-
thumbnail: "assets/
|
|
240
|
+
thumbnail: "assets/thumbnails/sample-th.png" # Add a thumbnail image on blog view
|
|
237
241
|
color: rgb(80,140,22) # Add the specified color as feature image, and change link colors in post
|
|
238
242
|
bootstrap: true # Add bootstrap to the page
|
|
239
243
|
tags: [sample, markdown, html]
|
|
@@ -241,7 +245,7 @@ tags: [sample, markdown, html]
|
|
|
241
245
|
```
|
|
242
246
|
|
|
243
247
|
With `thumbnail`, you can add a smaller image than the `feature-img`.
|
|
244
|
-
If you don't have a thumbnail you can still use the same image as the feature one.
|
|
248
|
+
If you don't have a thumbnail you can still use the same image as the feature one. Or use the gulp task to create it.
|
|
245
249
|
|
|
246
250
|
The background used when `color` is set comes from `lineart.png` from [xukimseven](https://github.com/xukimseven)
|
|
247
251
|
you can edit it in the config file (`_config.yml > color_image`). If you want another one, put it in `/assets/img` as well.
|
|
@@ -263,6 +267,7 @@ excerpt: true
|
|
|
263
267
|
Then in your post, add the `excerpt separator`:
|
|
264
268
|
|
|
265
269
|
```yml
|
|
270
|
+
|
|
266
271
|
---
|
|
267
272
|
layout: post
|
|
268
273
|
title: Sample Page
|
|
@@ -298,15 +303,36 @@ Like all CSS variables in the theme, you can edit the color of the code highligh
|
|
|
298
303
|
The code highlighting works with [base16](https://github.com/chriskempson/base16-html-previews/tree/master/css) you can find existing example
|
|
299
304
|
of your favourite highlight color scheme on this format.
|
|
300
305
|
|
|
301
|
-
##
|
|
302
|
-
|
|
306
|
+
## Feature pages and layouts
|
|
307
|
+
|
|
308
|
+
All feature pages besides the "home" one are stored in the `page` folder,
|
|
309
|
+
they will appear in the navigation bar unless you set `Hide: true` in the front matter.
|
|
310
|
+
|
|
311
|
+
Here are the documentation for the other feature pages that can be added through `_config.yml`.
|
|
312
|
+
|
|
303
313
|
Non-standard features are documented below.
|
|
304
314
|
|
|
305
|
-
### Layout:
|
|
315
|
+
### Layout: Default
|
|
316
|
+
|
|
317
|
+
This layout includes the head, navigation bar and footer around your content.
|
|
318
|
+
Unless you're making a custom layout you won't need it.
|
|
319
|
+
|
|
320
|
+
### Layout: Home 🏡
|
|
321
|
+
|
|
322
|
+
This page is used as the home page of the template (in the `index.html`). It displays the list of articles in `_posts`.
|
|
323
|
+
You can use this layout in another page (adding a title to it will make it appear in the navigation bar).
|
|
324
|
+
|
|
325
|
+
The recommended width and height for the home picture is width:`2484px;` and height:`1280px`
|
|
326
|
+
which are the dimensions of the actual picture for it to be rolling down as you scroll the page.
|
|
327
|
+
|
|
328
|
+
If your posts are not displaying ensure that you have added the line `paginate: 5` to `_config.yml`.
|
|
329
|
+
|
|
330
|
+
### Layout: Page 📄
|
|
306
331
|
|
|
307
332
|
The page layout have a bit more features explained here.
|
|
308
333
|
|
|
309
334
|
```yml
|
|
335
|
+
|
|
310
336
|
---
|
|
311
337
|
layout: page
|
|
312
338
|
title: "About"
|
|
@@ -321,33 +347,14 @@ tags: [sample, markdown, html]
|
|
|
321
347
|
|
|
322
348
|
The hide only hides your page from the navigation bar, it is however still generated and can be access through its link.
|
|
323
349
|
|
|
324
|
-
###
|
|
325
|
-
|
|
326
|
-
This layout includes the head, navigation bar and footer around your content.
|
|
327
|
-
|
|
328
|
-
## Feature pages
|
|
329
|
-
|
|
330
|
-
All feature pages besides the "home" one are stored in the `page` folder,
|
|
331
|
-
they will appear in the navigation bar unless you set `Hide: true` in the front matter.
|
|
332
|
-
|
|
333
|
-
Here are the documentation for the other feature pages that can be added through `_config.yml`.
|
|
334
|
-
|
|
335
|
-
### Home
|
|
336
|
-
|
|
337
|
-
This page is used as the home page of the template (in the `index.html`). It displays the list of articles in `_posts`.
|
|
338
|
-
You can use this layout in another page (adding a title to it will make it appear in the navigation bar).
|
|
339
|
-
|
|
340
|
-
The recommended width and height for the home picture is width:`2484px;` and height:`1280px`
|
|
341
|
-
which are the dimensions of the actual picture for it to be rolling down as you scroll the page.
|
|
342
|
-
|
|
343
|
-
If your posts are not displaying ensure that you have added the line `paginate: 5` to `_config.yml`.
|
|
344
|
-
|
|
345
|
-
### Portfolio
|
|
350
|
+
### Feature: Portfolio 🗂
|
|
346
351
|
|
|
347
352
|
Portfolio is a feature page that will take all the markdown/html files in the `_portfolio` folder to create a 3-columns image portfolio matrix.
|
|
348
353
|
|
|
349
354
|
To use the portfolio, simply create a `portfolio.md` with this information inside:
|
|
355
|
+
|
|
350
356
|
```yml
|
|
357
|
+
|
|
351
358
|
---
|
|
352
359
|
layout: page
|
|
353
360
|
title : Portfolio
|
|
@@ -356,13 +363,14 @@ title : Portfolio
|
|
|
356
363
|
{% include portfolio.html %}
|
|
357
364
|
```
|
|
358
365
|
|
|
359
|
-
####
|
|
366
|
+
#### Portfolio posts
|
|
360
367
|
|
|
361
368
|
You can format the portfolio posts in the `_portfolio` folder using the `post layout`. Here are little explaination on some of the possible feature you can use and what they will do.
|
|
362
369
|
|
|
363
370
|
If you decide to use a date, please be sure to use one that can be parsed such as `yyyy-mm-dd`. You can see more format example on the demo posts that are available for the theme:
|
|
364
371
|
|
|
365
372
|
```yml
|
|
373
|
+
|
|
366
374
|
---
|
|
367
375
|
layout: post
|
|
368
376
|
title: Circus # Title of the portfolio post
|
|
@@ -377,7 +385,6 @@ date: 2019-07-25 # Not mandatory, however needs to be in date format t
|
|
|
377
385
|
Make sure your `_config.yml` contains the following if you are using the theme as a gem:
|
|
378
386
|
|
|
379
387
|
```yml
|
|
380
|
-
|
|
381
388
|
# PORTFOLIO
|
|
382
389
|
collections:
|
|
383
390
|
portfolio:
|
|
@@ -387,7 +394,7 @@ collections:
|
|
|
387
394
|
|
|
388
395
|
This creates the collection for Jekyll so it can find and display your portfolio posts.
|
|
389
396
|
|
|
390
|
-
### Gallery
|
|
397
|
+
### Feature: Gallery 🖼
|
|
391
398
|
|
|
392
399
|
You can create a gallery using [Masonry JS](https://masonry.desandro.com/) which will placing the pictures in optimal position
|
|
393
400
|
based on available vertical space.
|
|
@@ -395,6 +402,7 @@ You need to specify the `gallery_path` which will be used to find the pictures t
|
|
|
395
402
|
It will take all of the picture under that directory. Then use the `include` to add it in your page.
|
|
396
403
|
|
|
397
404
|
```yml
|
|
405
|
+
|
|
398
406
|
---
|
|
399
407
|
layout: page
|
|
400
408
|
title: Gallery
|
|
@@ -405,7 +413,7 @@ gallery: "assets/img/pexels"
|
|
|
405
413
|
```
|
|
406
414
|
|
|
407
415
|
|
|
408
|
-
### Search
|
|
416
|
+
### Feature: Search 🔍
|
|
409
417
|
|
|
410
418
|
The search feature is based on [Simple-Jekyll-search](https://github.com/christian-fei/Simple-Jekyll-Search)
|
|
411
419
|
there is a `search.json` file that will create a list of all of the site posts, pages and portfolios.
|
|
@@ -415,6 +423,7 @@ Then there's a `search.js` displaying the formatted results entered in the `sear
|
|
|
415
423
|
The search page can be hidden with the `hide` option. You can remove the icon by removing `icon`:
|
|
416
424
|
|
|
417
425
|
```yml
|
|
426
|
+
|
|
418
427
|
---
|
|
419
428
|
layout: search
|
|
420
429
|
title: Search
|
|
@@ -422,7 +431,7 @@ icon: "search"
|
|
|
422
431
|
---
|
|
423
432
|
```
|
|
424
433
|
|
|
425
|
-
### Tags
|
|
434
|
+
### Feature: Tags 🏷
|
|
426
435
|
|
|
427
436
|
Tags should be placed between `[]` in your post metadata. Separate each tag with a comma.
|
|
428
437
|
Tags are recommended for posts and portfolio items.
|
|
@@ -430,6 +439,7 @@ Tags are recommended for posts and portfolio items.
|
|
|
430
439
|
For example:
|
|
431
440
|
|
|
432
441
|
```yml
|
|
442
|
+
|
|
433
443
|
---
|
|
434
444
|
layout: post
|
|
435
445
|
title: Markdown and HTML
|
|
@@ -457,27 +467,34 @@ You can learn more about them on [shopify's doc](https://help.shopify.com/themes
|
|
|
457
467
|
|
|
458
468
|
### Minimizing and optimizing: css, js and images
|
|
459
469
|
|
|
460
|
-
Before you need to have
|
|
470
|
+
Before you need to have *node* and `npm` installed:
|
|
471
|
+
|
|
461
472
|
- Windows: https://nodejs.org/
|
|
462
473
|
- Ubuntu/Debian: `apt-get install nodejs npm libgl1 libxi6`
|
|
463
474
|
- Fedora (dnf) / RHEL/CentOS (yum): `dnf install node npm libglvnd-glx libXi`
|
|
464
475
|
|
|
465
476
|
Then you need to install [`gulp-cli`](https://gulpjs.com/) and its dependencies:
|
|
466
|
-
|
|
477
|
+
|
|
478
|
+
```bash
|
|
467
479
|
cd assets/
|
|
468
480
|
sudo npm install gulp-cli -g
|
|
469
481
|
npm install
|
|
470
482
|
```
|
|
471
483
|
|
|
472
|
-
|
|
473
|
-
|
|
484
|
+
You can run the default task that will compress the js, css and images and create the thumbnails for the supported image
|
|
485
|
+
formats:
|
|
486
|
+
|
|
487
|
+
```bash
|
|
474
488
|
cd assets/
|
|
475
489
|
gulp default
|
|
490
|
+
gulp thumbnails # to create all of the images thumbnails
|
|
476
491
|
# tip: run a git status to see the changes
|
|
477
492
|
git status
|
|
478
493
|
```
|
|
479
494
|
|
|
480
|
-
|
|
495
|
+
You can find more about the gulp tasks in the [gulpfile.js](assets/gulpfile.js)
|
|
496
|
+
|
|
497
|
+
### Use as Ruby Gem 💎
|
|
481
498
|
|
|
482
499
|
You can use Type-on-strap as a [gem](https://rubygems.org/gems/type-on-strap).
|
|
483
500
|
|
|
@@ -487,6 +504,7 @@ Add this line to your Jekyll site's Gemfile (or create one):
|
|
|
487
504
|
```ruby
|
|
488
505
|
gem "type-on-strap"
|
|
489
506
|
```
|
|
507
|
+
|
|
490
508
|
Add this line to your Jekyll site's `_config.yml` file:
|
|
491
509
|
|
|
492
510
|
```yml
|
data/_data/language.yml
CHANGED
|
@@ -11,3 +11,6 @@ str_previous_post: "Previous post"
|
|
|
11
11
|
str_next_page: "Next"
|
|
12
12
|
str_previous_page: "Prev"
|
|
13
13
|
str_javascript_required_disqus: "Please enable JavaScript to view comments."
|
|
14
|
+
str_no_result_found: "No result found"
|
|
15
|
+
str_cookie_approve: "Approve"
|
|
16
|
+
str_cookie_disclaimer: "We would like to use third party cookies and scripts to improve the functionality of this website."
|
data/_includes/head.html
CHANGED
|
@@ -35,30 +35,36 @@
|
|
|
35
35
|
<script src="{{ '/assets/js/vendor/katex.min.js' | relative_url }}"></script>
|
|
36
36
|
{% endif %}
|
|
37
37
|
|
|
38
|
-
<!-- Google Analytics -->
|
|
38
|
+
<!-- Google Analytics / Cookie Consent -->
|
|
39
|
+
<script>
|
|
40
|
+
const cookieName = 'cookie-notice-dismissed-{{ site.url }}';
|
|
41
|
+
const isCookieConsent = '{{ site.cookie_consent }}';
|
|
42
|
+
const analyticsName = '{{ site.google_analytics }}';
|
|
43
|
+
</script>
|
|
44
|
+
|
|
39
45
|
{% if site.cookie_consent %}
|
|
40
|
-
|
|
41
|
-
|
|
46
|
+
<div id="cookie-notice"><span>{{ site.data.language.str_cookie_disclaimer | default: "We would like to use third party cookies and scripts to improve the functionality of this website." }}
|
|
47
|
+
</span><a id="cookie-notice-accept" class="button">{{ site.data.language.str_cookie_approve | default: "Approve" }}</a>
|
|
48
|
+
</div>
|
|
49
|
+
{% endif %}
|
|
50
|
+
{% if site.google_analytics %}
|
|
42
51
|
<!-- Global site tag (gtag.js) -->
|
|
43
52
|
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
|
|
44
|
-
<script>
|
|
45
|
-
window.dataLayer = window.dataLayer || [];
|
|
46
|
-
function gtag(){dataLayer.push(arguments);}
|
|
47
|
-
gtag('js', new Date());
|
|
48
|
-
gtag('config', '{{ site.google_analytics }}');
|
|
49
|
-
</script>
|
|
50
|
-
|
|
51
53
|
<!-- Page analysis (analytics.js) -->
|
|
52
54
|
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
|
53
|
-
<script>
|
|
54
|
-
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
|
55
|
-
ga('create', '{{ site.google_analytics }}', 'auto');
|
|
56
|
-
ga('send', 'pageview');
|
|
57
|
-
</script>
|
|
58
|
-
<!-- End Google Analytics -->
|
|
59
55
|
{% endif %}
|
|
60
56
|
|
|
61
57
|
<!-- seo tags -->
|
|
58
|
+
<meta property="og:image" content="{{ '/' | absolute_url }}{% if page.thumbnail %}{{ page.thumbnail }}{% else %}{{ page.feature-img | default: site.header_feature_image }}{% endif %}">
|
|
62
59
|
{% seo %}
|
|
63
|
-
|
|
60
|
+
|
|
61
|
+
<!-- RSS -->
|
|
62
|
+
{% feed_meta %}
|
|
63
|
+
|
|
64
|
+
<!-- Twitter Cards -->
|
|
65
|
+
<meta name="twitter:title" content="{% if page.title %}{{ page.title }}{% else %}{{ site.theme_settings.title }}{% endif %}">
|
|
66
|
+
<meta name="twitter:description" content="{{ page.content | strip_html | strip_newlines | truncate: 160 }}">
|
|
67
|
+
{% if site.theme_settings.twitter %}<meta name="twitter:creator" content="@{{ site.theme_settings.twitter }}">{% endif %}
|
|
68
|
+
<meta name="twitter:card" content="{% unless page.thumbnail %}summary{% else %}summary_large_image{% endunless %}">
|
|
69
|
+
<meta name="twitter:image" content="{{ '/' | absolute_url }}{% if page.thumbnail %}{{ page.thumbnail }}{% else %}{{ page.feature-img | default: site.header_feature_image }}{% endif %}">
|
|
64
70
|
</head>
|
data/_layouts/default.html
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<!--
|
|
3
|
-
Type on Strap jekyll theme v2.2.
|
|
4
|
-
Copyright 2016-
|
|
3
|
+
Type on Strap jekyll theme v2.2.5
|
|
4
|
+
Copyright 2016-2020 Sylhare
|
|
5
5
|
Theme free for personal and commercial use under the MIT license
|
|
6
6
|
https://github.com/sylhare/Type-on-Strap/blob/master/LICENSE
|
|
7
7
|
-->
|
data/_layouts/search.html
CHANGED
|
@@ -3,14 +3,14 @@ layout: page
|
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
<!-- Html Elements for Search -->
|
|
6
|
-
<input type="text" id="search-input" placeholder="Enter keywords..." class="search-bar">
|
|
6
|
+
<input type="text" id="search-input" placeholder="Enter keywords..." class="search-bar" autofocus>
|
|
7
7
|
<br>
|
|
8
8
|
<br>
|
|
9
9
|
<ul id="results-container"></ul>
|
|
10
10
|
|
|
11
11
|
<section>
|
|
12
12
|
<!-- Script pointing to jekyll-search.js -->
|
|
13
|
-
<script src="{{
|
|
13
|
+
<script src="{{ '/assets/js/vendor/simple-jekyll-search.min.js' | relative_url }}" type="text/javascript"></script>
|
|
14
14
|
|
|
15
15
|
<script type="text/javascript">
|
|
16
16
|
SimpleJekyllSearch({
|
|
@@ -18,7 +18,7 @@ layout: page
|
|
|
18
18
|
resultsContainer: document.getElementById('results-container'),
|
|
19
19
|
json: '{{ "/assets/data/search.json" | relative_url }}',
|
|
20
20
|
searchResultTemplate: '<div class="search-title"><a href="{url}"><h3> {title}</h3></a><div class="meta">{date} <div class="right"><i class="fa fa-tag"></i> {tags}</div></div><p>{excerpt}</p></div><hr> ',
|
|
21
|
-
noResultsText: 'No
|
|
21
|
+
noResultsText: '{{ site.data.language.str_no_result_found | default: "No result found" }}',
|
|
22
22
|
limit: 10,
|
|
23
23
|
fuzzy: false,
|
|
24
24
|
exclude: []
|
|
@@ -145,6 +145,8 @@ code.highlighter-rouge {
|
|
|
145
145
|
color: $base0a }
|
|
146
146
|
.m{ /* Literal.Number */
|
|
147
147
|
color: $base0e }
|
|
148
|
+
.mb{ /* Literal.Bytes */
|
|
149
|
+
color: $base0e }
|
|
148
150
|
.mf{ /* Literal.Number.Float */
|
|
149
151
|
color: $base0e }
|
|
150
152
|
.mh{ /* Literal.Number.Hex */
|
|
@@ -164,7 +166,7 @@ code.highlighter-rouge {
|
|
|
164
166
|
.no{ /* Name.Constant */
|
|
165
167
|
color: $base05 }
|
|
166
168
|
.nd{ /* Name.Decorator */
|
|
167
|
-
color: $
|
|
169
|
+
color: $base0f }
|
|
168
170
|
.ni{ /* Name.Entity */
|
|
169
171
|
color: $base05 }
|
|
170
172
|
.ne{ /* Name.Exception */
|
data/_sass/base/_variables.scss
CHANGED
|
@@ -61,9 +61,9 @@ $border-radius: 4px !default;
|
|
|
61
61
|
|
|
62
62
|
// base16 Material Theme
|
|
63
63
|
$base00: #302f2d !default; // Default Background
|
|
64
|
-
$base01: #2E3C43 !default; // Lighter Background (Used for status bars)
|
|
65
|
-
$base02: #314549 !default; // Selection Background
|
|
66
|
-
$base03: #546E7A !default; // Dark Foreground (Used for status bars)
|
|
64
|
+
$base01: #2E3C43 !default; // Lighter Background (Used for status bars) - NOT USED
|
|
65
|
+
$base02: #314549 !default; // Selection Background - NOT USED
|
|
66
|
+
$base03: #546E7A !default; // Dark Foreground (Used for status bars) - NOT USED
|
|
67
67
|
$base04: #B2CCD6 !default; // Comments, Invisible, Line Highlighting
|
|
68
68
|
$base05: #EEFFFF !default; // Light Foreground (Not often used)
|
|
69
69
|
$base06: #EEFFFF !default; // Light Background (Not often used)
|
data/_sass/type-on-strap.scss
CHANGED
|
@@ -1,21 +1,15 @@
|
|
|
1
1
|
// Variables
|
|
2
2
|
@import 'base/variables';
|
|
3
|
+
// Base
|
|
4
|
+
@import 'base/global';
|
|
5
|
+
@import 'base/utility';
|
|
6
|
+
@import 'base/highlight';
|
|
3
7
|
// External
|
|
4
8
|
@import 'external/reset';
|
|
5
|
-
@import 'external/syntax';
|
|
6
9
|
@import 'external/font-awesome';
|
|
7
10
|
@import 'external/pacifico';
|
|
8
11
|
@import 'external/katex';
|
|
9
12
|
@import 'external/source-sans-pro';
|
|
10
|
-
// Base
|
|
11
|
-
@import 'base/global';
|
|
12
|
-
@import 'base/utility';
|
|
13
|
-
// Posts
|
|
14
|
-
@import 'layouts/posts';
|
|
15
|
-
@import 'layouts/blog';
|
|
16
|
-
@import 'layouts/page';
|
|
17
|
-
@import 'layouts/tags';
|
|
18
|
-
@import 'layouts/search';
|
|
19
13
|
// Includes
|
|
20
14
|
@import 'includes/footer';
|
|
21
15
|
@import 'includes/post_nav';
|
|
@@ -25,3 +19,9 @@
|
|
|
25
19
|
@import 'includes/share_buttons';
|
|
26
20
|
@import 'includes/blog_nav.scss';
|
|
27
21
|
@import 'includes/cookie_consent.scss';
|
|
22
|
+
// Posts
|
|
23
|
+
@import 'layouts/posts';
|
|
24
|
+
@import 'layouts/blog';
|
|
25
|
+
@import 'layouts/page';
|
|
26
|
+
@import 'layouts/tags';
|
|
27
|
+
@import 'layouts/search';
|
data/assets/data/search.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[
|
|
4
4
|
{% for post in site.posts %}
|
|
5
5
|
{
|
|
6
|
-
"title" : "{{ post.title | escape }}",
|
|
6
|
+
"title" : "{{ post.title | strip_newlines | escape }}",
|
|
7
7
|
"category" : "{{ post.category }}",
|
|
8
8
|
"tags" : "{{ post.tags | join: ', ' | prepend: " " }}",
|
|
9
9
|
"url" : "{{ post.url | relative_url }}",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
{% for page in site.portfolio %}
|
|
17
17
|
{
|
|
18
18
|
{% if page.title != nil %}
|
|
19
|
-
"title" : "{{ page.title | escape }}",
|
|
19
|
+
"title" : "{{ page.title | strip_newlines | escape }}",
|
|
20
20
|
"category" : "{{ page.category }}",
|
|
21
21
|
"tags" : "{{ page.tags | join: ', ' | prepend: " " }}",
|
|
22
22
|
"url" : "{{ page.url | relative_url }}",
|
data/assets/js/main.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var elements=document.getElementsByTagName("script");Array.prototype.forEach.call(elements,function(e){if(-1!==e.type.indexOf("math/tex")){var t=e.innerText||e.textContent;t=t.replace(/%.*/g,"");var n=document.createElement("span");-1!==e.type.indexOf("mode=display")?(n.className+="math-display",t="\\displaystyle {"+t+"}"):n.className+="math-inline",katex.render(t,n,{displayMode:!1}),e.parentNode.insertBefore(n,e)}});try{var elem=document.querySelector(".grid"),msnry=new Masonry(elem,{itemSelector:".grid-item",columnWidth:".grid-sizer",gutter:".gutter-sizer",percentPosition:!0}),imgLoad=imagesLoaded(elem);imgLoad.on("progress",function(e,t){msnry.layout()})}catch(e){if(!(e instanceof ReferenceError))throw e}document.addEventListener("DOMContentLoaded",function(e){var t=document.getElementById("pull"),n=document.querySelector("nav ul");["click","touch"].forEach(function(e){t.addEventListener(e,function(){n.classList.toggle("hide")},!1)}),window.addEventListener("scroll",function(){var e=-(window.scrollY||window.pageYOffset||document.body.scrollTop)/3;document.getElementById("main").style.backgroundPosition="100% "+e+"px, 0%, center top"})});
|
|
1
|
+
function createCookie(e,t,n){var o="";if(n){var a=new Date;a.setTime(a.getTime()+24*n*60*60*1e3),o="; expires="+a.toUTCString()}document.cookie=e+"="+t+o+"; path=/"}function readCookie(e){for(var t=e+"=",n=document.cookie.split(";"),o=0;o<n.length;o++){for(var a=n[o];" "===a.charAt(0);)a=a.substring(1,a.length);if(0===a.indexOf(t))return a.substring(t.length,a.length)}return null}function addCookieConsentListener(){document.getElementById("cookie-notice-accept").addEventListener("click",function(){createCookie(cookieName,"true",31),document.getElementById("cookie-notice").style.display="none",location.reload()})}function googleAnalytics(){if(""!==analyticsName.toLowerCase()){function e(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],e("js",new Date),e("config",analyticsName),window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create",analyticsName,"auto"),ga("send","pageview")}}"true"===isCookieConsent.toLowerCase()?(addCookieConsentListener(),"true"===readCookie(cookieName)?googleAnalytics():document.getElementById("cookie-notice").style.display="block"):googleAnalytics();var elements=document.getElementsByTagName("script");Array.prototype.forEach.call(elements,function(e){if(-1!==e.type.indexOf("math/tex")){var t=e.innerText||e.textContent;t=t.replace(/%.*/g,"");var n=document.createElement("span");-1!==e.type.indexOf("mode=display")?(n.className+="math-display",t="\\displaystyle {"+t+"}"):n.className+="math-inline",katex.render(t,n,{displayMode:!1}),e.parentNode.insertBefore(n,e)}});try{var elem=document.querySelector(".grid"),msnry=new Masonry(elem,{itemSelector:".grid-item",columnWidth:".grid-sizer",gutter:".gutter-sizer",percentPosition:!0}),imgLoad=imagesLoaded(elem);imgLoad.on("progress",function(e,t){msnry.layout()})}catch(e){if(!(e instanceof ReferenceError))throw e}document.addEventListener("DOMContentLoaded",function(e){var t=document.getElementById("pull"),n=document.querySelector("nav ul");["click","touch"].forEach(function(e){t.addEventListener(e,function(){n.classList.toggle("hide")},!1)}),window.addEventListener("scroll",function(){var e=-(window.scrollY||window.pageYOffset||document.body.scrollTop)/3;document.getElementById("main").style.backgroundPosition="100% "+e+"px, 0%, center top"})});
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
function createCookie(name, value, days) {
|
|
2
|
+
var expires = "";
|
|
3
|
+
if (days) {
|
|
4
|
+
var date = new Date();
|
|
5
|
+
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
|
6
|
+
expires = "; expires=" + date.toUTCString();
|
|
7
|
+
}
|
|
8
|
+
document.cookie = name + "=" + value + expires + "; path=/";
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function readCookie(name) {
|
|
12
|
+
var nameEQ = name + "=";
|
|
13
|
+
var ca = document.cookie.split(';');
|
|
14
|
+
for (var i = 0; i < ca.length; i++) {
|
|
15
|
+
var c = ca[i];
|
|
16
|
+
while (c.charAt(0) === ' ') c = c.substring(1, c.length);
|
|
17
|
+
if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
|
|
18
|
+
}
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function addCookieConsentListener() {
|
|
23
|
+
document.getElementById('cookie-notice-accept').addEventListener("click", function () {
|
|
24
|
+
createCookie(cookieName, 'true', 31);
|
|
25
|
+
document.getElementById('cookie-notice').style.display = 'none';
|
|
26
|
+
location.reload();
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function googleAnalytics() {
|
|
31
|
+
if (analyticsName.toLowerCase() !== '') {
|
|
32
|
+
// Google tag manager
|
|
33
|
+
window.dataLayer = window.dataLayer || [];
|
|
34
|
+
function gtag() { dataLayer.push(arguments); }
|
|
35
|
+
gtag('js', new Date());
|
|
36
|
+
gtag('config', analyticsName);
|
|
37
|
+
|
|
38
|
+
// Google analytics
|
|
39
|
+
window.ga = window.ga || function () { (ga.q = ga.q || []).push(arguments) };
|
|
40
|
+
ga.l = +new Date;
|
|
41
|
+
ga('create', analyticsName, 'auto');
|
|
42
|
+
ga('send', 'pageview');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (isCookieConsent.toLowerCase() === 'true') {
|
|
47
|
+
addCookieConsentListener();
|
|
48
|
+
if (readCookie(cookieName) === 'true') {
|
|
49
|
+
googleAnalytics();
|
|
50
|
+
} else {
|
|
51
|
+
document.getElementById('cookie-notice').style.display = 'block';
|
|
52
|
+
}
|
|
53
|
+
} else {
|
|
54
|
+
googleAnalytics();
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Simple-Jekyll-Search v1.7.
|
|
2
|
+
* Simple-Jekyll-Search v1.7.8 (https://github.com/christian-fei/Simple-Jekyll-Search)
|
|
3
3
|
* Copyright 2015-2020, Christian Fei
|
|
4
4
|
* Licensed under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
!function(){"use strict";var
|
|
6
|
+
!function(){"use strict";var t={compile:function(t){return e.template.replace(e.pattern,function(n,r){var i=e.middleware(r,t[r],e.template);return void 0!==i?i:t[r]||n})},setOptions:function(t){e.pattern=t.pattern||e.pattern,e.template=t.template||e.template,"function"==typeof t.middleware&&(e.middleware=t.middleware)}},e={};e.pattern=/\{(.*?)\}/g,e.template="",e.middleware=function(){};var n=function(t,e){var n=e.length,r=t.length;if(r>n)return!1;if(r===n)return t===e;t:for(var i=0,o=0;i<r;i++){for(var u=t.charCodeAt(i);o<n;)if(e.charCodeAt(o++)===u)continue t;return!1}return!0},r=new function(){this.matches=function(t,e){return n(e.toLowerCase(),t.toLowerCase())}};var i=new function(){this.matches=function(t,e){return!!t&&(t=t.trim().toLowerCase(),(e=e.trim().toLowerCase()).split(" ").filter(function(e){return t.indexOf(e)>=0}).length===e.split(" ").length)}};var o={put:function(t){if(l(t))return f(t);if(e=t,Boolean(e)&&"[object Array]"===Object.prototype.toString.call(e))return function(t){var e=[];s();for(var n=0,r=t.length;n<r;n++)l(t[n])&&e.push(f(t[n]));return e}(t);var e;return},clear:s,search:function(t){if(!t)return[];return function(t,e,n,r){for(var i=[],o=0;o<t.length&&i.length<r.limit;o++){var u=p(t[o],e,n,r);u&&i.push(u)}return i}(a,t,c.searchStrategy,c).sort(c.sort)},setOptions:function(t){(c=t||{}).fuzzy=t.fuzzy||!1,c.limit=t.limit||10,c.searchStrategy=t.fuzzy?r:i,c.sort=t.sort||u}};function u(){return 0}var a=[],c={};function s(){return a.length=0,a}function l(t){return Boolean(t)&&"[object Object]"===Object.prototype.toString.call(t)}function f(t){return a.push(t),a}function p(t,e,n,r){for(var i in t)if(!d(t[i],r.exclude)&&n.matches(t[i],e))return t}function d(t,e){for(var n=!1,r=0,i=(e=e||[]).length;r<i;r++){var o=e[r];!n&&new RegExp(t).test(o)&&(n=!0)}return n}c.fuzzy=!1,c.limit=10,c.searchStrategy=c.fuzzy?r:i,c.sort=u;var h={load:function(t,e){var n=window.XMLHttpRequest?new window.XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP");n.open("GET",t,!0),n.onreadystatechange=function(t,e){return function(){if(4===t.readyState&&200===t.status)try{e(null,JSON.parse(t.responseText))}catch(t){e(t,null)}}}(n,e),n.send()}};var v={merge:function(t,e){var n={};for(var r in t)n[r]=t[r],void 0!==e[r]&&(n[r]=e[r]);return n},isJSON:function(t){try{return!!(t instanceof Object&&JSON.parse(JSON.stringify(t)))}catch(t){return!1}}};!function(e){var n={searchInput:null,resultsContainer:null,json:[],success:Function.prototype,searchResultTemplate:'<li><a href="{url}" title="{desc}">{title}</a></li>',templateMiddleware:Function.prototype,sortMiddleware:function(){return 0},noResultsText:"No results found",limit:10,fuzzy:!1,exclude:[]},r=["searchInput","resultsContainer","json"],i=function t(e){if(!function(t){return!!t&&(void 0!==t.required&&t.required instanceof Array)}(e))throw new Error("-- OptionsValidator: required options missing");if(!(this instanceof t))return new t(e);var n=e.required;this.getRequiredOptions=function(){return n},this.validate=function(t){var e=[];return n.forEach(function(n){void 0===t[n]&&e.push(n)}),e}}({required:r}),u=function(e){var u;return i.validate(e).length>0&&f("You must specify the following required options: "+r),n=v.merge(n,e),t.setOptions({template:n.searchResultTemplate,middleware:n.templateMiddleware}),o.setOptions({fuzzy:n.fuzzy,limit:n.limit,sort:n.sortMiddleware}),v.isJSON(n.json)?a(n.json):(u=n.json,h.load(u,function(t,e){t&&f("failed to get JSON ("+u+")"),a(e)})),{search:l}};function a(t){o.put(t),n.searchInput.addEventListener("keyup",function(t){var e;e=t.which,-1===[13,16,20,37,38,39,40,91].indexOf(e)&&(c(),l(t.target.value))})}function c(){n.resultsContainer.innerHTML=""}function s(t){n.resultsContainer.innerHTML+=t}function l(e){(function(t){return t&&t.length>0})(e)&&(c(),function(e,r){var i=e.length;if(0===i)return s(n.noResultsText);for(var o=0;o<i;o++)e[o].query=r,s(t.compile(e[o]))}(o.search(e),e))}function f(t){throw new Error("SimpleJekyllSearch --- "+t)}e.SimpleJekyllSearch=function(t){var e=u(t);return t.success.call(e),e}}(window)}();
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: type-on-strap
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.2.
|
|
4
|
+
version: 2.2.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sylhare
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2020-
|
|
12
|
+
date: 2020-08-03 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: jekyll
|
|
@@ -91,7 +91,6 @@ files:
|
|
|
91
91
|
- _includes/blog.html
|
|
92
92
|
- _includes/blog_nav.html
|
|
93
93
|
- _includes/citation.html
|
|
94
|
-
- _includes/cookie-consent.html
|
|
95
94
|
- _includes/disqus.html
|
|
96
95
|
- _includes/footer.html
|
|
97
96
|
- _includes/gallery.html
|
|
@@ -111,6 +110,7 @@ files:
|
|
|
111
110
|
- _layouts/search.html
|
|
112
111
|
- _layouts/tags.html
|
|
113
112
|
- _sass/base/_global.scss
|
|
113
|
+
- _sass/base/_highlight.scss
|
|
114
114
|
- _sass/base/_utility.scss
|
|
115
115
|
- _sass/base/_variables.scss
|
|
116
116
|
- _sass/external/_font-awesome.scss
|
|
@@ -118,7 +118,6 @@ files:
|
|
|
118
118
|
- _sass/external/_pacifico.scss
|
|
119
119
|
- _sass/external/_reset.scss
|
|
120
120
|
- _sass/external/_source-sans-pro.scss
|
|
121
|
-
- _sass/external/_syntax.scss
|
|
122
121
|
- _sass/external/font-awesome/_animated.scss
|
|
123
122
|
- _sass/external/font-awesome/_bordered-pulled.scss
|
|
124
123
|
- _sass/external/font-awesome/_core.scss
|
|
@@ -250,6 +249,7 @@ files:
|
|
|
250
249
|
- assets/fonts/source-sans-pro/source-sans-pro-italic.woff2
|
|
251
250
|
- assets/fonts/source-sans-pro/source-sans-pro-regular.woff2
|
|
252
251
|
- assets/js/main.min.js
|
|
252
|
+
- assets/js/partials/cookie_consent_init.js
|
|
253
253
|
- assets/js/partials/katex_init.js
|
|
254
254
|
- assets/js/partials/masonry_init.js
|
|
255
255
|
- assets/js/partials/navbar.js
|
|
@@ -288,8 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
288
288
|
- !ruby/object:Gem::Version
|
|
289
289
|
version: '0'
|
|
290
290
|
requirements: []
|
|
291
|
-
|
|
292
|
-
rubygems_version: 2.7.7
|
|
291
|
+
rubygems_version: 3.0.8
|
|
293
292
|
signing_key:
|
|
294
293
|
specification_version: 4
|
|
295
294
|
summary: A simple and responsive jekyll theme template
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
<div id="cookie-notice"><span>{{ site.cookie_consent_disclaimer
|
|
2
|
-
| default: 'We would like to use third party cookies and scripts to improve the functionality of this website.' }}
|
|
3
|
-
</span><a id="cookie-notice-accept" class="button">Approve</a>
|
|
4
|
-
</div>
|
|
5
|
-
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
|
|
6
|
-
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
|
7
|
-
<script>
|
|
8
|
-
function createCookie(name, value, days) {
|
|
9
|
-
var expires = "";
|
|
10
|
-
if (days) {
|
|
11
|
-
var date = new Date();
|
|
12
|
-
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
|
13
|
-
expires = "; expires=" + date.toUTCString();
|
|
14
|
-
}
|
|
15
|
-
document.cookie = name + "=" + value + expires + "; path=/";
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function readCookie(name) {
|
|
19
|
-
var nameEQ = name + "=";
|
|
20
|
-
var ca = document.cookie.split(';');
|
|
21
|
-
for (var i = 0; i < ca.length; i++) {
|
|
22
|
-
var c = ca[i];
|
|
23
|
-
while (c.charAt(0) === ' ') c = c.substring(1, c.length);
|
|
24
|
-
if (c.indexOf(nameEQ) === 0) return c.substring(nameEQ.length, c.length);
|
|
25
|
-
}
|
|
26
|
-
return null;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if(readCookie('cookie-notice-dismissed')==='true') {
|
|
30
|
-
{% if site.google_analytics %}
|
|
31
|
-
// Google tag manager
|
|
32
|
-
window.dataLayer = window.dataLayer || [];
|
|
33
|
-
function gtag(){dataLayer.push(arguments);}
|
|
34
|
-
gtag('js', new Date());
|
|
35
|
-
gtag('config', '{{ site.google_analytics }}');
|
|
36
|
-
// Google analytics
|
|
37
|
-
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
|
38
|
-
ga('create', '{{ site.google_analytics }}', 'auto');
|
|
39
|
-
ga('send', 'pageview');
|
|
40
|
-
{% endif %}
|
|
41
|
-
} else {
|
|
42
|
-
document.getElementById('cookie-notice').style.display = 'block';
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
document.getElementById('cookie-notice-accept').addEventListener("click",function() {
|
|
46
|
-
createCookie('cookie-notice-dismissed','true',31);
|
|
47
|
-
document.getElementById('cookie-notice').style.display = 'none';
|
|
48
|
-
location.reload();
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
</script>
|