Last active
October 13, 2021 05:42
-
-
Save danielkraic/9af53f9ea4615cfa4a2d44fa48cea98f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- widget 1 --> | |
<a href="https://www.mkck.sk/nase-akcie-v-cechach/"> | |
<img src="https://www.mkck.sk/wp-content/uploads/2018/01/Budko.jpg" | |
class="image wp-image-9540 attachment-full size-full" | |
alt="" | |
style="max-width: 100%; height: auto;" | |
width="266" | |
height="201"> | |
</a> | |
<!-- widget 2 --> | |
<a href="https://www.mkck.sk/nase-akcie-v-stredomori/"> | |
<img src="https://www.mkck.sk/wp-content/uploads/2018/01/Stredomorie.jpg" | |
class="image wp-image-9540 attachment-full size-full" | |
alt="" | |
style="max-width: 100%; height: auto;" | |
width="266" | |
height="201"> | |
</a> | |
<!-- widget 3 --> | |
<script> | |
function createBanner() { | |
var main = document.querySelector('#primary'); | |
if (!main) { | |
return; | |
} | |
var banner = document.createElement('div'); | |
banner.setAttribute("id", "banner"); | |
banner.innerHTML = '<a href="https://www.websupport.sk/" \ | |
title="Webhosting, domény, virtuálne servery" target="_top"> \ | |
<img id="banner_img" \ | |
src="https://www.mkck.sk/wp-content/uploads/2021/10/freeweb-sk-5.png" \ | |
alt="Sponzorvaný hosting od WebSupport.sk" title="Webhosting, domény, virtuálne servery" width="728" height="90" /> \ | |
</a>'; | |
main.insertBefore(banner, main.firstChild); | |
} | |
function addNavigationUp() { | |
function getEventYear() { | |
var path = window.location.pathname; | |
var re = /\/(\d{4})\/(\d){2}\/(\d{2})\//; | |
var matched = path.match(re); | |
if (!matched) { | |
return null; | |
} | |
return matched[1]; | |
} | |
function createNavigationUp(year) { | |
var nav_div = document.createElement('div'); | |
nav_div.setAttribute("class", "nav-next"); | |
nav_div.innerHTML= '<a href="https://www.mkck.sk/akcie-' + year + '"> \ | |
<span class="meta-nav" aria-hidden="true">Zoznam akcií</span> \ | |
<span class="screen-reader-text">Zoznam akcií:</span> \ | |
<span class="post-title">Zoznam akcií ' + year + '</span> \ | |
</a>'; | |
return nav_div; | |
} | |
var year = getEventYear(); | |
if (!year) { | |
return; | |
} | |
var nav_prev = document.querySelector('#main > nav > div > div.nav-previous'); | |
if (nav_prev) { | |
nav_prev.parentNode.insertBefore(createNavigationUp(year), nav_prev.nextSibling); | |
return; | |
} | |
var nav_next = document.querySelector('#main > nav > div > div.nav-next'); | |
if (nav_next) { | |
nav_next.parentNode.insertBefore(createNavigationUp(year), nav_next); | |
return; | |
} | |
} | |
window.onload = function() { | |
createBanner(); | |
addNavigationUp(); | |
} | |
</script> | |
<!-- social icons --> | |
<ul class="social-icons-lists icons-background-square"> | |
<li class="social-icons-list-item"> | |
<a href="https://www.facebook.com/groups/551329538344540/" target="_blank" class="social-icon"> | |
<span class="socicon socicon-facebook" | |
style="padding: 10px; font-size: 16px; background-color: #3e5b98"></span> | |
</a> | |
</li> | |
<!-- <li class="social-icons-list-item"> | |
<a href="https://mkck-trnava.tumblr.com/" target="_blank" class="social-icon"> | |
<span class="socicon socicon-tumblr" | |
style="padding: 10px; font-size: 16px; background-color: #45556c"></span> | |
</a> | |
</li> --> | |
<li class="social-icons-list-item"> | |
<a href="https://www.mkck.info/" target="_blank" class="social-icon"> | |
<span class="socicon socicon-bebo" | |
style="padding: 10px; font-size: 16px; background-color: #45556c"></span> | |
</a> | |
</li> | |
<li class="social-icons-list-item"> | |
<a href="https://jurajgolier.smugmug.com/" target="_blank" class="social-icon"> | |
<span class="socicon socicon-smugmug" | |
style="padding: 10px; font-size: 16px; background-color: #acfd32"></span> | |
</a> | |
</li> | |
</ul> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment