From e43c5acd799495441193390e67d45a4d1c463d31 Mon Sep 17 00:00:00 2001 From: sakrecoer Date: Tue, 11 Aug 2020 14:47:20 +0200 Subject: [PATCH] murda dem safari boombaclat! --- _includes/scripts.html | 1 + _includes/zafari.html | 22 ++++++++++++++++++++++ _layouts/default.html | 4 ++-- _sass/zafari.scss | 30 ++++++++++++++++++++++++++++++ assets/css/main-20200810.scss | 1 + assets/css/noscripts-20200810.scss | 1 + assets/js/zafari.js | 8 ++++++++ 7 files changed, 65 insertions(+), 2 deletions(-) create mode 100644 _includes/zafari.html create mode 100644 _sass/zafari.scss create mode 100644 assets/js/zafari.js diff --git a/_includes/scripts.html b/_includes/scripts.html index 18072ce..2e63b81 100644 --- a/_includes/scripts.html +++ b/_includes/scripts.html @@ -1,3 +1,4 @@ {% include relBase.html %} + diff --git a/_includes/zafari.html b/_includes/zafari.html new file mode 100644 index 0000000..cafd2fc --- /dev/null +++ b/_includes/zafari.html @@ -0,0 +1,22 @@ +
+
+

Hey Safari User!

+

Amazing! You are surfing the web with one of the leading browsers to download another browser! Such luxury!
+To listen to {{ site.title }}'s music, these are your options: +

+
+If you like browsing the web this way and you really just want to see if this {{ site.title }} thing is for real:
+ + + +

+{% include streamer.html %} +
+
\ No newline at end of file diff --git a/_layouts/default.html b/_layouts/default.html index b07e33f..4c2f7af 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -35,9 +35,9 @@ -{% unless page.collection == 'traks' %} + {% include navigation.html %} -{% endunless %} +{% include zafari.html %} {% include cookie-consent.html %} {% include scripts.html %} {% if page.video_path %} diff --git a/_sass/zafari.scss b/_sass/zafari.scss new file mode 100644 index 0000000..2d7474c --- /dev/null +++ b/_sass/zafari.scss @@ -0,0 +1,30 @@ +.zafariClass { + opacity:1; + pointer-events: auto; + background-color: var(--bg); + text-align: center; + z-index: 10000; + overflow-y: scroll; + > div { + flex-direction: column; + align-items: center; + justify-content: center; + max-width: 700px; + h2 { + font-family: _font(family); + } + ul { + padding: 20px; + width: 100% + } + li { + list-style-type: none; + margin: 20px; + padding: 0; + a { + display: block; + font-size: 14px + } + } + } +} diff --git a/assets/css/main-20200810.scss b/assets/css/main-20200810.scss index dd8fe25..a4613e0 100644 --- a/assets/css/main-20200810.scss +++ b/assets/css/main-20200810.scss @@ -10,6 +10,7 @@ @import 'libs/animations'; @import 'elements'; @import 'navigation'; +@import 'zafari'; @import 'videos'; @import 'cookies'; @import 'player'; diff --git a/assets/css/noscripts-20200810.scss b/assets/css/noscripts-20200810.scss index cd1e5a5..f87fd8f 100644 --- a/assets/css/noscripts-20200810.scss +++ b/assets/css/noscripts-20200810.scss @@ -9,6 +9,7 @@ @import 'layout'; @import 'elements'; @import 'navigation'; +@import 'zafari'; @import 'videos'; @import 'cookies'; @import 'player'; diff --git a/assets/js/zafari.js b/assets/js/zafari.js new file mode 100644 index 0000000..c6c5168 --- /dev/null +++ b/assets/js/zafari.js @@ -0,0 +1,8 @@ +var zafari = document.getElementById("zafari"); +if (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1) { + zafari.classList.add("zafariClass"); +} + +function youMadBro() { + zafari.classList.remove("zafariClass"); +} \ No newline at end of file