summaryrefslogtreecommitdiff
path: root/themes/new_theme
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2018-04-27 20:45:12 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2018-04-27 20:45:12 +0200
commit74087a15b63dbc062e1c8a785917f44cda5f14c7 (patch)
treebd20677420b33aae27bb3ba6065c1757880caecf /themes/new_theme
parente372ee22511a0e084b7957316909705bf9628d01 (diff)
downloadwww-andreasbaumann-cc-74087a15b63dbc062e1c8a785917f44cda5f14c7.tar.gz
www-andreasbaumann-cc-74087a15b63dbc062e1c8a785917f44cda5f14c7.tar.bz2
better GDPR page
Diffstat (limited to 'themes/new_theme')
-rw-r--r--themes/new_theme/layouts/partials/comments-disqus.html31
-rw-r--r--themes/new_theme/layouts/partials/footer.html2
-rw-r--r--themes/new_theme/layouts/partials/menu.html4
-rw-r--r--themes/new_theme/layouts/partials/widgets/elasticlunr_search.html24
4 files changed, 28 insertions, 33 deletions
diff --git a/themes/new_theme/layouts/partials/comments-disqus.html b/themes/new_theme/layouts/partials/comments-disqus.html
deleted file mode 100644
index 7af75f0..0000000
--- a/themes/new_theme/layouts/partials/comments-disqus.html
+++ /dev/null
@@ -1,31 +0,0 @@
-{{ if (not .Params.disable_comments) }}
-<div id="disqus_thread"></div>
-
-<script src="/js/jquery.js" type="text/javascript"></script>
-
-<script type="text/javascript">
-
-var disqus_config = function () {
- this.page.url = '{{ .Permalink }}';
- this.page.identifier = '{{ .Site.Params.DisqusShortname }}_{{ .UniqueID }}';
-};
-
-(function() {
- // Don't ever inject Disqus on localhost--it creates unwanted
- // discussions from 'localhost:1313' on your Disqus account...
- if (window.location.hostname == "localhost")
- return;
-
- var d = document, s = d.createElement('script');
-
- s.src = 'https://wwwandreasbaumanncc.disqus.com/embed.js';
-
- s.setAttribute('data-timestamp', +new Date());
- (d.head || d.body).appendChild(s);
-
-alert( disqus_config );
-})();
-</script>
-<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
-<a href="http://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
-{{ end }}
diff --git a/themes/new_theme/layouts/partials/footer.html b/themes/new_theme/layouts/partials/footer.html
index 3513e6c..d7fce85 100644
--- a/themes/new_theme/layouts/partials/footer.html
+++ b/themes/new_theme/layouts/partials/footer.html
@@ -1,7 +1,7 @@
</div>
<footer class="footer" itemscope="itemscope" itemtype="http://schema.org/WPFooter">
<div class="container container-inner">
- <p class="footer__copyright">&copy; {{ .Site.Params.copyright_years }}, {{ .Site.Params.Location }}, {{ .Site.Params.author }}. Based on <a href="//wordpress.org/themes/mh-magazine-lite/" target="_blank" rel="nofollow noopener noreferrer">MH Magazine lite</a>.</p>
+ <p class="footer__copyright">&copy; {{ .Site.Params.copyright_years }}, {{ .Site.Params.Location }}, {{ .Site.Params.author }}. Based on <a href="//wordpress.org/themes/mh-magazine-lite/" target="_blank" rel="nofollow noopener noreferrer">MH Magazine lite</a>, read here about <a href="/dataprotection">Data Protection and Privacy</a></p>
</div>
</footer>
</div><!-- .mh-container-outer -->
diff --git a/themes/new_theme/layouts/partials/menu.html b/themes/new_theme/layouts/partials/menu.html
index 3a8fae2..fbeb352 100644
--- a/themes/new_theme/layouts/partials/menu.html
+++ b/themes/new_theme/layouts/partials/menu.html
@@ -3,7 +3,9 @@
{{- if .Site.Menus.main }}
{{- $currentNode := . }}
{{- range sort .Site.Menus.main }}
- <li class="menu__item {{if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }}menu__item--active{{end}}"><a class="menu__link" href="{{ .URL }}">{{ .Name | upper }}</a></li>
+ {{ if ( not ( eq .Name "Data Protection And Privacy" ) ) }}
+ <li class="menu__item {{if or ($currentNode.IsMenuCurrent "main" .) ($currentNode.HasMenuCurrent "main" .) }}menu__item--active{{end}}"><a class="menu__link" href="{{ .URL }}">{{ .Name | upper }}</a></li>
+ {{- end }}
{{- end }}
{{- end }}
</ul>
diff --git a/themes/new_theme/layouts/partials/widgets/elasticlunr_search.html b/themes/new_theme/layouts/partials/widgets/elasticlunr_search.html
new file mode 100644
index 0000000..544be8d
--- /dev/null
+++ b/themes/new_theme/layouts/partials/widgets/elasticlunr_search.html
@@ -0,0 +1,24 @@
+{{- if .Site.Params.widgets.search }}
+ElasticLunr:
+<div class="widget-search widget">
+ <form class="widget-search__form" role="search" method="get" action="/search/">
+ <label>
+ <span class="screen-reader-text">Search for:</span>
+ <input class="widget-search__field" type="search" autocomplete="off" placeholder="SEARCH..." value="" id="query" name="q">
+ </label>
+ <input class="widget-search__submit" type="submit" value="Search">
+ </form>
+</div>
+<script language="Javascript">
+ $( window ).load( function( ) {
+ var paramsString = window.location.search;
+ var searchParams = new URLSearchParams( paramsString );
+ if( searchParams.has( "q" ) ) {
+ $( "#query" ).val( searchParams.get( "q" ) );
+ $( "#query" ).removeAttr( "placeholder" );
+ }
+ } );
+</script>
+{{- end }}
+
+