jumbo-jekyll-theme 5.7.0.6 → 6.0.0.3

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: 5732c728c9d79d12b569d819ca05daae54361b79885cdd05e9243b71966220b3
4
- data.tar.gz: c5db07aab02de7f826e5eaeccba91fea8fb9f59c262697e05e17886a69b2e5ee
3
+ metadata.gz: df56de1e8b0c939d4da79c7a435e3fb5bb71f2b2205b260f4dd6f025ca7864cb
4
+ data.tar.gz: 61f3727930c25426f1a0db4248d8a7b0710114757fea25fbdc2bd112a9699f39
5
5
  SHA512:
6
- metadata.gz: 82945b30c357b89b737cb79199368e1a1fbfa6359b325fa8f0ad43e2d2e96492e223a941b608c03c1b7ef4f678122e7a0ef1a16fc2897fb7b6e1dbe8d312f62a
7
- data.tar.gz: 61d6c6b3453bb858078c00098f246264b9284261f39c3fa61e2372bd8d65650bcecdfa1287a0221b5b6f316cde9214d8dbe659402c25e8dc443408d4ce6d53fd
6
+ metadata.gz: a8a0d98a3815ab3c12c209a1492a123a23664946b856a8793d81ca18bae98dd2b426364ef4823192191f1ec445086a2685cef26b8cf681999b1446fb4af9c749
7
+ data.tar.gz: 69582e78dad72e3fb52307514ddde348997007856acd13fdaff5c997a21b32914ecdd7a61df6b810e12f637e53fab81213777ae17c03baae7ede85e3a6314aa4
@@ -76,11 +76,7 @@ http2_resources:
76
76
  href: /assets/fonts/lato/Lato-regular.woff2
77
77
  google_analytics:
78
78
  enabled: true
79
- cookies_popup_title: Test Cookies & Privacy Policy
80
- cookies_popup_description: >
81
- Cookies enable test you to use this website to the full extent and to personalize your experience on our sites. They tell us which parts of our websites people have visited, help us measure the effectiveness of ads and web searches and give us insights into user behavior so we can improve our communications with you.
82
- privacy_url: /privacy-test/
83
- code: UAXXXXXXB
79
+ code: GTM-XXXX
84
80
  # Set the site-wide default social media share image.
85
81
  social_media_share_image: /assets/images/social-media-image.png
86
82
  # Set the default favicon
@@ -2,15 +2,14 @@
2
2
  {% if site.edit-on-github.enabled and site.edit-on-github.repo %}
3
3
  {% assign page_base = include.pagePermalink | split:"/" %}
4
4
  {% assign page-path = include.pagePath | replace: " ", "" %}
5
- {% if page_base[1] == "blog" %}
6
- {% elsif page_base[1] == "documentation" and site.edit-on-github.docs %}
5
+ {% if page_base[1] == "documentation" and site.edit-on-github.docs %}
7
6
  {% capture github-home %}{{site.edit-on-github.docs}}{% endcapture %}
8
7
  {% capture github-docs %}{{site.edit-on-github.docs}}/tree/master/{% endcapture %}
9
8
  {% capture report-issue-link %}
10
9
  {{github-home}}/issues/new?title=Problem+with+{{page-path}}&body=Please+enter+some+details+about+the+bug/issue+so+we+can+promptly+resolve+it.+%0D%0AURL%3A++{{site.url}}{{page.url}}
11
10
  {% endcapture %}
12
11
  {% capture edit-me-link %}{{github-docs}}{{page-path}}{% endcapture %}
13
- <div class="btn-group my-4" role="group" aria-label="Basic example" id="github_controls">
12
+ <div class="btn-group my-2 mt-1" role="group" aria-label="Basic example" id="github_controls">
14
13
  <a type="button" class="btn btn-secondary" href="{{github-home}}" id="github_home"><i class="icon-github-circled center-block"></i></a>
15
14
  <a type="button" class="btn btn-secondary" href="{{report-issue-link}}" id="submit_issue">Report an Issue</a>
16
15
  <a href="{{edit-me-link | replace: " ", "" }}" type="button" class="btn btn-secondary" id="edit_on_github">Edit on GitHub</a>
@@ -22,7 +21,7 @@
22
21
  {{site.edit-on-github.repo}}/issues/new?title=Problem+with+{{page-path}}&body=Please+enter+some+details+about+the+bug/issue+so+we+can+promptly+resolve+it.+%0D%0AURL%3A++{{site.url}}{{page.url}}
23
22
  {% endcapture %}
24
23
  {% capture edit-me-link %}{{github-docs}}{{page-path}}{% endcapture %}
25
- <div class="btn-group my-4" role="group" aria-label="Basic example" id="github_controls">
24
+ <div class="btn-group my-2 mt-1" role="group" aria-label="Basic example" id="github_controls">
26
25
  <a type="button" class="btn btn-secondary" href="{{github-home}}" id="github_home"><i
27
26
  class="icon-github-circled center-block"></i></a>
28
27
  <a type="button" class="btn btn-secondary" href="{{report-issue-link}}" id="submit_issue">Report an
@@ -31,7 +31,7 @@
31
31
  {% endif %}
32
32
 
33
33
  <link rel="icon" href="{{site.favicon}}" type="image/png" />
34
- <link rel="canonical" href="{{site.url}}/" />
34
+ <link rel="canonical" href="{{ page.url | absolute_url }}" />
35
35
  <!-- Meta tags -->
36
36
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
37
37
  <meta name="generator" content="Jekyll v4" />
@@ -40,7 +40,7 @@
40
40
  <meta property="og:title" content="{{title}}" />
41
41
  <meta property="og:locale" content="en_US" />
42
42
  <meta property="og:description" content="{{description}}" />
43
- <meta property="og:url" content="{{site.url}}/" />
43
+ <meta property="og:url" content="{{ page.url | absolute_url }}" />
44
44
  <meta property="og:site_name" content="Linaro" />
45
45
  <meta property="og:image" content="{{image}}" />
46
46
  <!--Twitter Cards-->
@@ -52,9 +52,6 @@
52
52
  {% endif %}
53
53
  {% if site.google_analytics.enabled %}
54
54
  <meta name="analytics_code" content="{{site.google_analytics.code}}">
55
- <meta name="cookies_popup_title" content="{{site.google_analytics.cookies_popup_title}}">
56
- <meta name="cookies_popup_description" content="{{site.google_analytics.cookies_popup_description}}">
57
- <meta name="privacy_url" content="{{site.google_analytics.privacy_url}}">
58
55
  {% endif %}
59
56
  {% if page.keywords %}
60
57
  <meta name="keywords" content="{{page.keywords}}">
@@ -44,7 +44,6 @@
44
44
  {% if page.jumbotron.image %}
45
45
  {% assign image_path = page.jumbotron.image | remove_first: "/assets/images/" %}
46
46
  {% picture header_image {{image_path}} %}
47
-
48
47
  {% endif %}
49
48
  {% if page.jumbotron.video %}
50
49
  <video autoplay muted preload="none" poster="{{page.jumbotron.video.poster}}" playsinline loop id="jumbotronVideo">
@@ -6,6 +6,28 @@
6
6
  {% assign block_width = include.object.item_width %}
7
7
  {% endif %}
8
8
  {% for block in include.object.block_section_content.blocks %}
9
+ {% if block.modal_content %}
10
+ <!-- Modal -->
11
+ <div class="modal fade" id="blockModal-{{forloop.index}}-{{block.title | slugify}}" tabindex="-1" role="dialog" aria-labelledby="blockModalLabel-{{forloop.index}}-{{block.title | slugify}}"
12
+ aria-hidden="true">
13
+ <div class="modal-dialog modal-dialog-centered modal-lg" role="document">
14
+ <div class="modal-content">
15
+ <div class="modal-header">
16
+ <h5 class="modal-title" id="blockModalLabel-{{forloop.index}}-{{block.title | slugify}}">{{block.title}}</h5>
17
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
18
+ <span aria-hidden="true">&times;</span>
19
+ </button>
20
+ </div>
21
+ <div class="modal-body text-left">
22
+ {{block.modal_content | markdownify}}
23
+ </div>
24
+ <div class="modal-footer">
25
+ <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
26
+ </div>
27
+ </div>
28
+ </div>
29
+ </div>
30
+ {% endif %}
9
31
  <div class="col col-12 col-sm-6 col-lg-{{block_width}} block_column">
10
32
  <div class="card h-100 {% if block.background_image %}background_image text-white{% endif %} {% if block.style %}{{block.style}}{% endif %}">
11
33
  {% if block.image %}
@@ -25,10 +47,17 @@
25
47
  {{block.description | markdownify }}
26
48
  </p>
27
49
  {% endif %}
28
- {% if block.buttons %}
29
- {% for button in block.buttons %}
30
- {% include flow/button.html object=button %}
31
- {% endfor %}
50
+ {% if block.modal_content %}
51
+ <!-- Button trigger modal -->
52
+ <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#blockModal-{{forloop.index}}-{{block.title | slugify}}">
53
+ More Info
54
+ </button>
55
+ {% else %}
56
+ {% if block.buttons %}
57
+ {% for button in block.buttons %}
58
+ {% include flow/button.html object=button %}
59
+ {% endfor %}
60
+ {% endif %}
32
61
  {% endif %}
33
62
  </div>
34
63
  {% if block.footer_text %}
@@ -1,6 +1,6 @@
1
1
  <div class="col col-12 tabbed_content {% if include.object.style %}{{include.object.style}}{% endif %}">
2
2
  <nav>
3
- <div class="nav nav-tabs" id="{{tab.title | slugify}}{{forloop.index}}" role="tablist">
3
+ <div class="nav nav-tabs" id="{{page.title | slugify}}{{forloop.index}}" role="tablist">
4
4
  {% for tab in include.object.tabs %}
5
5
  <a class="nav-item nav-link {% if forloop.first %}active{% endif %}" href="#{{tab.title | slugify}}{{forloop.index}}" id="{{tab.title | slugify}}{{forloop.index}}-tab"
6
6
  data-toggle="tab" href="#{{tab.title | slugify}}{{forloop.index}}" role="tab"
@@ -1,53 +1,5 @@
1
1
  <footer>
2
2
  <div class="container-fluid">
3
- <div class="row main">
4
- <div class="container">
5
- <div class="row">
6
- {% if site.data.footer.display_contact_details %}
7
- <div class="col col-12 col-lg-4 contact-details">
8
- <a class="email" href="mailto:{{site.email}}?subject={{site.url}}">
9
- <h3>{{site.email}}</h3>
10
- </a>
11
- <address>
12
- {% for address-line in site.address %}
13
- {{address-line}}<br>
14
- {% endfor %}
15
- </address>
16
- <h3>Follow us</h3>
17
- {% include_cached social_media_icons.html %}
18
- </div>
19
- {% endif %}
20
- {% if site.data.footer.middle_column %}
21
- <div class="col col-12 col-lg-4 footer-column">
22
- <h3>{{site.data.footer.middle_column.title}}</h3>
23
- <ul class="list-group">
24
- {% if site.data.footer.middle_column.latest_posts %}
25
- {% include_cached blog/latest_posts.html %}
26
- {% else %}
27
- {% for item in site.data.footer.middle_column.items %}
28
- <li class="list-group-item">
29
- <a href="{{item.url}}">{{item.name}}</a>
30
- </li>
31
- {% endfor %}
32
- {% endif %}
33
- </ul>
34
- </div>
35
- {% endif %}
36
- {% if site.data.footer.third_column %}
37
- <div class="col col-12 col-lg-4 footer-column">
38
- <h3>{{site.data.footer.third_column.title}}</h3>
39
- <ul class="list-group">
40
- {% for item in site.data.footer.third_column.items %}
41
- <li class="list-group-item">
42
- <a href="{{item.url}}">{{item.name}}</a>
43
- </li>
44
- {% endfor %}
45
- </ul>
46
- </div>
47
- {% endif %}
48
- </div>
49
- </div>
50
- </div>
51
3
  <div class="row strip p-t-20 p-b-20">
52
4
  <div class="container">
53
5
  <div class="row">
@@ -57,18 +9,19 @@
57
9
  <div class="col col-12 text-white text-center">
58
10
  <span class="copyright">Copyright &copy; {{ 'now' | date: "%Y" }} {{site.data.footer.copyright_text}}</span>
59
11
  {% for link in site.data.footer.company_links %}
60
- <span class="coloured-bp">&bull;</span>
61
- <a href="{{link.url}}">{{link.name}}</a>
12
+ <span class="coloured-bp">&bull;</span>
13
+ <a href="{{link.url}}">{{link.name}}</a>
62
14
  {% endfor %}
15
+ {% include_cached social_media_icons.html %}
63
16
  </div>
17
+ {% if site.data.footer.footer_brand %}
64
18
  <div class="col col-12 text-white text-center m-t-10">
65
- {% if site.data.footer.footer_brand %}
66
- <a href="{{site.url}}/">
67
- <img src="{{site.data.footer.footer_brand.logo}}" class="footer-logo mx-auto"
68
- alt="{{site.name}} Logo" />
69
- </a>
70
- {% endif %}
19
+ <a href="{{site.url}}/">
20
+ <img src="{{site.data.footer.footer_brand.logo}}" class="footer-logo mx-auto"
21
+ alt="{{site.name}} Logo" />
22
+ </a>
71
23
  </div>
24
+ {% endif %}
72
25
  </div>
73
26
  </div>
74
27
  </div>
@@ -16,7 +16,7 @@ $navbar_text_color: #575757;
16
16
  $navbar_bg_color: #fff;
17
17
  // Jumbotron
18
18
  $jumbotron_bg_color: lightgray;
19
- $jumbotron_height: 500px;
19
+ $jumbotron_height: 350px;
20
20
  // Typography
21
21
  @font-face {
22
22
  font-display: fallback;
@@ -34,88 +34,10 @@ $font-family-base: "Lato";
34
34
  $footer_bg_color: #00000b;
35
35
  $footer_strip_bg_color: $secondary;
36
36
  // Flow
37
- $flow_row_padding: 20px;
37
+ $flow_row_padding: 10px;
38
38
  $flow_component_padding: 15px;
39
39
  // Cookie Consent
40
40
  $cookie_consent_bg: #000;
41
41
  $cookie_consent_text_color: #fff;
42
42
  // Breadcrumb
43
43
  $breadcrumb_bg_color: #e9ecef;
44
-
45
-
46
- //Home
47
- // $home-page-title-text: #000;
48
- // $home-page-main-title-color: $primary;
49
- // Footer
50
- // $footer-bg-color: #131313;
51
- // $footer-text-color: #fff;
52
- // Sub footer
53
- // $sub-footer-bg-color: #ccc;
54
- // $footer-border-color: #272727;
55
- // $text-color: rgba(0,0,0,.84);
56
- // Navbar
57
- // $navbar-text-color: #fff !default;
58
- // $navbar-hover-text-color: #fff !default;
59
- // $navbar-hover-background-color: $primary !default;
60
- // $navbar-height: 66px;
61
- // $navbar-inverse-bg: #000;
62
- // $navbar-inverse-color: #fff;
63
- // $navbar-submenu-bg-color: #3e3e3e !default;
64
- // $navbar-submenu-color: #fff !default;
65
- // $navbar-dropdown-text-color: $navbar-text-color;
66
- // Custom Variables
67
- // $cookie-consent-text: #FFF !default;
68
- // $cookie-consent-bg: #000 !default;
69
- // $cookie-consent-btn-bg: $primary !default;
70
- // homepage title text and sub text
71
- // $home-page-title-text: #FFF !default; // all title text
72
- // $home-page-text: #fff !default; // all title text
73
- // $home-page-main-title-color: $home-page-title-text !default; // overide for specific main title text
74
-
75
-
76
- // Footer Colour
77
- // $footer-border-color: #eee !default;
78
- // $footer-bg-color: #131313 !default;
79
- // $footer-text-color: #fff !default;
80
- // $sub-footer-color: #E5E5E5 !default;
81
- // Breadcrumb
82
- // $breadcrumb-background-color: $primary !default;
83
- // $breadcrumb-title-color: #fff !default;
84
- // $breadcrumb-span-color: #fff !default;
85
- //Contact Page
86
- // $contact-banner-text-color: #fff !default;
87
- // Featured Image Jumbotron
88
- // $featured-image-text-color: #fff !default;
89
-
90
- // Nav Bar Overrides
91
- // $navbar-text-color: #ffffff !default;
92
- // $navbar-dropdown-text-color: #000 !default;
93
- // $blog-panel-title-colour: #fff !default;
94
- // Custom Jumbotron colours
95
- // $jumbotron-top-color: $navbar-inverse-bg !default;
96
- // $jumbotron-bottom-color: $primary !default;
97
- // Breadcrumb
98
- // $breadcrumb-background-color: $primary !default;
99
- // $breadcrumb-title-color: #fff !default;
100
- // $breadcrumb-span-color: #fff !default;
101
- //Contact Page
102
- // $contact-banner-text-color: #fff !default;
103
- // Jumbotron Settings
104
- // $jumbotron-height: 400px;
105
- // $overlay: 0.5;
106
- // $jumbotron-font-size-xs: 26px;
107
- // $jumbotron-font-size: 32px;
108
- // $jumbotron-heading-color: #fff !default;
109
- // $jumbotron-sub-title-font-size-xs: 16px;
110
- // $jumbotron-sub-title-font-size: 18px;
111
- // $jumbotron-sub-title-color: #fff !default;
112
- // Tabbed Navbar
113
- // $tabbed-nav-bg-color: #ccc !default;
114
- // $tabbed-nav-text-color: #000 !default;
115
- // $tabbed-nav-hover-color: $primary !default;
116
- // // Post tags
117
- // $post-tag-bg: #d7d7d7 !default;
118
- // $post-tag-color: #000 !default;
119
- // $post-tag-border: #8b8b8b !default;
120
- // $post-tag-hover-bg: #1f1f1f !default;
121
- // $post-tag-hover-color: #fff !default;
@@ -63,6 +63,7 @@
63
63
  padding: 7px;
64
64
  border-radius: 3px;
65
65
  margin-left: 15px;
66
+ margin-bottom: 5px;
66
67
  cursor: pointer;
67
68
  transition: all 0.3s ease-in;
68
69
  }
@@ -192,3 +193,5 @@
192
193
  .btn-toggle.active {
193
194
  background-color: $primary;
194
195
  }
196
+ #gdpr-cookie-message button, #gdpr-cookie-message button#ihavecookiesBtn {
197
+ }
@@ -1,28 +1,20 @@
1
1
  #wrapper {
2
2
  footer {
3
+ i {
4
+ color: white;
5
+ &:hover {
6
+ color: $primary;
7
+ }
8
+ }
9
+ a {
10
+ color: white;
11
+ &:hover {
12
+ color: $primary;
13
+ }
14
+ }
3
15
  .main {
4
16
  background-color: $footer_bg_color;
5
- .contact-details {
6
- margin: 30px 0;
7
- address {
8
- text-align: left;
9
- font-size: 18px;
10
- color: #fff;
11
- }
12
- h3 {
13
- text-align: left;
14
- color :$primary;
15
- margin-top: 0px;
16
- font-size: 24px;
17
- font-weight: bold;
18
- }
19
- i {
20
- color: white;
21
- &:hover {
22
- color: $primary;
23
- }
24
- }
25
- }
17
+ margin: 30px 0;
26
18
  .footer-column {
27
19
  margin: 30px 0;
28
20
  h3 {
@@ -15,13 +15,17 @@
15
15
  }
16
16
  }
17
17
  h1 {
18
- @include media-breakpoint-up(sm){
19
- font-size: 3.5rem;
18
+ margin-bottom:5px;
19
+ @include media-breakpoint-up(lg){
20
+ font-size: 3rem;
20
21
  font-weight: 300;
21
22
  line-height: 1.2;
22
23
 
23
24
  }
24
25
  }
26
+ p {
27
+ margin-bottom:5px;
28
+ }
25
29
  &.video {
26
30
  background-color: transparent;
27
31
  }
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  ---
3
3
  @charset "UTF-8";
4
- // Custom sass and css rules
5
- @import "app/custom";
6
4
  //Bootstrap Overrides
7
5
  @import "app/overrides";
8
6
  @import "bootstrap/functions";
@@ -12,3 +10,5 @@
12
10
  @import 'bootstrap/bootstrap';
13
11
  // Linaro Jekyll Theme Includes
14
12
  @import "core";
13
+ // Custom sass and css rules
14
+ @import "app/custom";
@@ -1,7 +1,7 @@
1
- $(document).ready(function() {
1
+ $(document).ready(function () {
2
2
  // Clipboard JS
3
3
  if ($("div.highlight").length > 0) {
4
- $("div.highlight").each(function(index) {
4
+ $("div.highlight").each(function (index) {
5
5
  var uniqueId = "highlight" + index;
6
6
  $(this).attr("id", uniqueId);
7
7
  var copyBtn =
@@ -13,10 +13,10 @@ $(document).ready(function() {
13
13
  copyBtn +=
14
14
  '<img src="/assets/images/clipboard.svg" width="13" alt="Copy to clipboard"></button>';
15
15
  $(this).append(copyBtn);
16
- (function() {
16
+ (function () {
17
17
  new ClipboardJS("#copyBtn" + index);
18
18
  })();
19
- $("#copyBtn" + index).on("click", function() {
19
+ $("#copyBtn" + index).on("click", function () {
20
20
  $(this)
21
21
  .attr("title", "Copied!")
22
22
  .tooltip("_fixTitle")
@@ -40,11 +40,11 @@ $(document).ready(function() {
40
40
  lazyLoadEager: 0,
41
41
  loop: false,
42
42
  lazyLoad: true,
43
- dots: true
43
+ dots: true,
44
44
  });
45
45
  }
46
46
  if ($(".owl-carousel.slider_block").length > 0) {
47
- $(".owl-carousel.slider_block").each(function(index) {
47
+ $(".owl-carousel.slider_block").each(function (index) {
48
48
  // Set Default values for the responsive items
49
49
  var xs_items = 1;
50
50
  var sm_items = 2;
@@ -91,20 +91,20 @@ $(document).ready(function() {
91
91
  responsive: {
92
92
  // breakpoint from 0 up
93
93
  0: {
94
- items: xs_items
94
+ items: xs_items,
95
95
  },
96
96
  // breakpoint from 480 up
97
97
  768: {
98
- items: sm_items
98
+ items: sm_items,
99
99
  },
100
100
  // breakpoint from 768 up
101
101
  992: {
102
- items: md_items
102
+ items: md_items,
103
103
  },
104
104
  1200: {
105
- items: lg_items
106
- }
107
- }
105
+ items: lg_items,
106
+ },
107
+ },
108
108
  });
109
109
  });
110
110
  }
@@ -113,7 +113,7 @@ $(document).ready(function() {
113
113
  if ($(".double-scroll").length > 0) {
114
114
  $(".double-scroll").doubleScroll({
115
115
  resetOnWindowResize: true,
116
- onlyIfScroll: true
116
+ onlyIfScroll: true,
117
117
  });
118
118
  }
119
119
  // Theme navbar setup
@@ -149,15 +149,17 @@ $(document).ready(function() {
149
149
  }
150
150
  }
151
151
  navbar();
152
- $(window).scroll(function() {
152
+ $(window).scroll(function () {
153
153
  navbar();
154
154
  });
155
155
 
156
156
  // Multi-level dropdowns
157
- $(".navbar .dropdown-menu > li:not(.dropdown-item)").on("click", function(e) {
157
+ $(".navbar .dropdown-menu > li:not(.dropdown-item)").on("click", function (
158
+ e
159
+ ) {
158
160
  e.stopPropagation();
159
161
  });
160
- $(".navbar .dropdown-item").on("click", function(e) {
162
+ $(".navbar .dropdown-item").on("click", function (e) {
161
163
  var $el = $(this).children(".dropdown-toggle");
162
164
  var $parent = $el.offsetParent(".dropdown-menu");
163
165
  if (!$parent.parent().hasClass("navbar-nav")) {
@@ -166,10 +168,7 @@ $(document).ready(function() {
166
168
  $el.next().removeClass("show");
167
169
  $el.next().css({ top: -999, left: -999 });
168
170
  } else {
169
- $parent
170
- .parent()
171
- .find(".show")
172
- .removeClass("show");
171
+ $parent.parent().find(".show").removeClass("show");
173
172
  $parent.addClass("show");
174
173
  $el.next().addClass("show");
175
174
  $el
@@ -182,13 +181,11 @@ $(document).ready(function() {
182
181
  });
183
182
 
184
183
  // Reset forms when bootstrap modal closes.
185
- $(".modal").on("hidden.bs.modal", function() {
186
- $(this)
187
- .find("form")[0]
188
- .reset();
184
+ $(".modal").on("hidden.bs.modal", function () {
185
+ $(this).find("form")[0].reset();
189
186
  });
190
187
  // Stacked Navbar
191
- $("#stacked-nav-bar").on("hidden.bs.collapse", function() {
188
+ $("#stacked-nav-bar").on("hidden.bs.collapse", function () {
192
189
  $(".nav-pills").removeClass("nav-stacked");
193
190
  });
194
191
  // Scrolling sticking on IOS7 (Bug fix)
@@ -196,7 +193,7 @@ $(document).ready(function() {
196
193
  $("html").addClass("ios7");
197
194
  }
198
195
  // Open External links in a new tab
199
- $("a").each(function() {
196
+ $("a").each(function () {
200
197
  var a = new RegExp("/" + window.location.host + "/");
201
198
  if (!a.test(this.href)) {
202
199
  if ($(this).attr("target") != "_self") {
@@ -204,16 +201,29 @@ $(document).ready(function() {
204
201
  }
205
202
  }
206
203
  });
207
- // Enabled permalinks to specific Bootstrap tabs
208
- var hash = document.location.hash;
209
- if (hash) {
210
- $('.nav-tabs a[href="' + hash + '"]').tab("show");
204
+
205
+ if ($(".nav-tabs").length > 0) {
206
+ let url = location.href.replace(/\/$/, "");
207
+
208
+ if (location.hash) {
209
+ const hash = url.split("#");
210
+ $('.nav-tabs a[href="#' + hash[1] + '"]').tab("show");
211
+ url = location.href.replace(/\/#/, "#");
212
+ history.replaceState(null, null, url);
213
+ setTimeout(() => {
214
+ $(window).scrollTop(0);
215
+ }, 400);
216
+ }
217
+
218
+ $('a[data-toggle="tab"]').on("click", function () {
219
+ let newUrl;
220
+ const hash = $(this).attr("href");
221
+ newUrl = url.split("#")[0] + hash;
222
+ history.replaceState(null, null, newUrl);
223
+ });
211
224
  }
212
- // Change hash for page-reload
213
- $(".nav-tabs a").on("shown", function(e) {
214
- window.location.hash = e.target.hash.replace("#", "#" + prefix);
215
- });
216
225
 
226
+ // COOKIES CONFIG
217
227
  // Cookie Consent Setup
218
228
  if ($("meta[name=analytics_code]")) {
219
229
  var privacy_url = $("meta[name=privacy_url]").attr("content");
@@ -230,45 +240,62 @@ $(document).ready(function() {
230
240
  title: cookies_popup_title,
231
241
  link: privacy_url,
232
242
  moreInfoLabel: "View our Privacy Policy",
243
+ cookieLink: "/cookies/",
244
+ cookieLabel: "Manage your cookies",
245
+ links: [
246
+ { url: "/cookies/", text: "Cookies Policy" },
247
+ { url: "/privacy", text: "Privacy Policy" },
248
+ ],
233
249
  delay: 1000,
234
- acceptBtnLabel: "Accept all cookies",
235
- uncheckBoxes: false,
250
+ acceptBtnLabel: "Accept All Cookies",
251
+ analyticsChecked: true,
236
252
  message: cookies_popup_description,
237
253
  cookieTypes: [
238
254
  {
239
255
  type: "Analytics",
240
256
  value: "analytics",
241
- description: "Cookies related to site visits, browser types, etc."
242
- }
257
+ checked: true,
258
+ description: "Cookies related to site visits, browser types, etc.",
259
+ },
243
260
  ],
244
- onAccept: function() {
261
+ onAccept: function () {
245
262
  init_ga();
246
- }
263
+ },
247
264
  };
248
265
  // Enabled Google Analytics if cookie to allow us to collect is set.
249
266
  function init_ga() {
250
267
  if ($.fn.ihavecookies.preference("analytics")) {
251
- (function(i, s, o, g, r, a, m) {
252
- i["GoogleAnalyticsObject"] = r;
253
- (i[r] =
254
- i[r] ||
255
- function() {
256
- (i[r].q = i[r].q || []).push(arguments);
257
- }),
258
- (i[r].l = 1 * new Date());
259
- (a = s.createElement(o)), (m = s.getElementsByTagName(o)[0]);
260
- a.async = 1;
261
- a.src = g;
262
- m.parentNode.insertBefore(a, m);
263
- })(
264
- window,
265
- document,
266
- "script",
267
- "https://www.google-analytics.com/analytics.js",
268
- "ga"
269
- );
270
- ga("create", ga_code, "auto");
271
- ga("send", "pageview");
268
+ // (function (i, s, o, g, r, a, m) {
269
+ // i["GoogleAnalyticsObject"] = r;
270
+ // (i[r] =
271
+ // i[r] ||
272
+ // function () {
273
+ // (i[r].q = i[r].q || []).push(arguments);
274
+ // }),
275
+ // (i[r].l = 1 * new Date());
276
+ // (a = s.createElement(o)), (m = s.getElementsByTagName(o)[0]);
277
+ // a.async = 1;
278
+ // a.src = g;
279
+ // m.parentNode.insertBefore(a, m);
280
+ // })(
281
+ // window,
282
+ // document,
283
+ // "script",
284
+ // "https://www.google-analytics.com/analytics.js",
285
+ // "ga"
286
+ // );
287
+ // ga("create", ga_code, "auto");
288
+ // ga("send", "pageview");
289
+ (function (w, d, s, l, i) {
290
+ w[l] = w[l] || [];
291
+ w[l].push({ "gtm.start": new Date().getTime(), event: "gtm.js" });
292
+ var f = d.getElementsByTagName(s)[0],
293
+ j = d.createElement(s),
294
+ dl = l != "dataLayer" ? "&l=" + l : "";
295
+ j.async = true;
296
+ j.src = "https://www.googletagmanager.com/gtm.js?id=" + i + dl;
297
+ f.parentNode.insertBefore(j, f);
298
+ })(window, document, "script", "dataLayer", ga_code);
272
299
  console.log("Google Analytics started");
273
300
  } else {
274
301
  console.log("Google analytics not started... :(");
@@ -281,8 +308,16 @@ $(document).ready(function() {
281
308
  var analytics_toggle = $("#analytics_toggle");
282
309
  if ($.fn.ihavecookies.preference("analytics")) {
283
310
  analytics_toggle.addClass("active");
311
+ options.cookieTypes = [
312
+ {
313
+ type: "Analytics",
314
+ value: "analytics",
315
+ checked: false,
316
+ description: "Cookies related to site visits, browser types, etc.",
317
+ },
318
+ ];
284
319
  }
285
- analytics_toggle.on("click", function() {
320
+ analytics_toggle.on("click", function () {
286
321
  $.removeCookie("_ga");
287
322
  $.removeCookie("_ga", { path: "/" });
288
323
  $.removeCookie("_gid");
@@ -293,14 +328,13 @@ $(document).ready(function() {
293
328
  $.removeCookie("cookieControlPrefs", { path: "/" });
294
329
  $.removeCookie("cookieControl");
295
330
  $.removeCookie("cookieControl", { path: "/" });
296
- options["analyticsChecked"] = false;
297
- options["acceptBtnLabel"] = "Updated Cookies";
298
- $("body").ihavecookies(options);
331
+ options["acceptBtnLabel"] = "Update Cookies";
332
+ $("body").ihavecookies(options, "reinit");
299
333
  });
300
334
  }
301
335
  $("body").ihavecookies(options);
302
336
  }
303
- $(function() {
337
+ $(function () {
304
338
  $('[data-toggle="tooltip"]').tooltip();
305
339
  });
306
340
 
@@ -308,7 +342,7 @@ $(document).ready(function() {
308
342
  var file_path = $("#post_search").data("file-path");
309
343
 
310
344
  $("#results-container").hide();
311
- $("#search-input").keyup(function() {
345
+ $("#search-input").keyup(function () {
312
346
  if ($("#search-input").val().length == 0) {
313
347
  $("#results-container").fadeOut("fast");
314
348
  $(".close_search").hide();
@@ -317,7 +351,7 @@ $(document).ready(function() {
317
351
  $(".close_search").show();
318
352
  }
319
353
  });
320
- $(".close_search").click(function(e) {
354
+ $(".close_search").click(function (e) {
321
355
  e.preventDefault();
322
356
  $("#search-input").val("");
323
357
  $("#results-container").fadeOut("fast");
@@ -331,9 +365,9 @@ $(document).ready(function() {
331
365
  searchResultTemplate:
332
366
  '<li class="media flex-row"><picture><img class="lazyload mr-3 img-thumbnail suggested_post_thumb search_result_img" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-src="{image}"></picture><div class="media-body"><a href="{url}"><h5 class="mt-0 mb-1">{title}</h5><em class="suggested_post_date">{date}</em><p>{description}</p></a></div></li>',
333
367
  json: file_path,
334
- success: function(data) {
368
+ success: function (data) {
335
369
  console.log(data);
336
- }
370
+ },
337
371
  });
338
372
  }
339
373
  });