Skip to content

Commit

Permalink
Out theme in V2
Browse files Browse the repository at this point in the history
  • Loading branch information
KhardungLa committed Nov 23, 2022
1 parent de6ed69 commit e5382f6
Show file tree
Hide file tree
Showing 72 changed files with 2,102 additions and 340 deletions.
3 changes: 3 additions & 0 deletions assets/images/icons/discord.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 50 additions & 0 deletions assets/images/icons/instagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions assets/images/icons/plus-simple.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions assets/images/icons/plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions assets/images/icons/tooltip.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions assets/images/icons/twitter.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions assets/images/icons/zoom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 0 additions & 36 deletions assets/js/scripts.js

This file was deleted.

File renamed without changes.
89 changes: 89 additions & 0 deletions assets/scripts/scripts.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
$(function () {
/*
$(window).on('ajaxError', function(event, c,message,d,e) {
UIkit.notification({
message: message,
status: 'warning',
pos: 'top-center',
timeout: 5000
});
});
*/
$(window).on('ajaxConfirmMessage', function(event, message) {
event.preventDefault();
UIkit.modal.confirm(message, {labels: {ok: 'JA', cancel: 'NEIN'}}).then(() => {
event.promise.resolve();
}, () => {event.promise.reject()});
return true;
});
$(document).on('ajaxSetup', function (event, context) {
context.options.handleErrorMessage = function (message) {
UIkit.notification({
message: message,
status: 'warning',
pos: 'top-center',
timeout: 5000
});
}
context.options.handleFlashMessage = function (message, type) {
UIkit.notification({
message: message,
pos: 'top-center',
timeout: 5000
});
}
})
});

var Smooth = {
init: function(el) {
if (!el.hasAttribute('data-height')) {
el.style.display = el.hasAttribute('data-flex') ? 'flex' : 'block';
el.dataset.height = el.offsetHeight+"px";
el.classList.add('smooth');
el.style.height = 0;
}
return el;
},
expand: function(element) {
var div = Smooth.init(element);
setTimeout(function() { div.style.height = div.dataset.height; }, 20);
},
collapse: function(element) {
var div = Smooth.init(element);
div.style.height = 0;
}
}

function toggleContent(element) {
element.closest('.toggle-content').classList.toggle('expanded')
if (element.closest('.toggle-content').classList.contains('expanded')) {
Smooth.expand(element.closest('.toggle-content').querySelector('.hidden-content'))
} else {
Smooth.collapse(element.closest('.toggle-content').querySelector('.hidden-content'))
}
}

function initNavigationScroll() {
let lastScrollTop = 0;
const wrapper = document.querySelector(".autohide");
const navHeight = wrapper.clientHeight;
window.addEventListener("scroll", function () {
const scrollTop = window.scrollY;
const safeArea = scrollTop < navHeight;
if (safeArea || scrollTop < lastScrollTop) {
wrapper.classList.remove("scrolled-down");
wrapper.classList.add("scrolled-up");
} else {
wrapper.classList.remove("scrolled-up");
wrapper.classList.remove("expanded");
wrapper.classList.add("scrolled-down");
Smooth.collapse(wrapper.closest('.toggle-content').querySelector('.hidden-content'))
}
lastScrollTop = scrollTop;
});
}

document.addEventListener("DOMContentLoaded", function() {
initNavigationScroll();
});
File renamed without changes.
File renamed without changes.
33 changes: 33 additions & 0 deletions assets/styles/_layout.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.uk-logo, .uk-navbar-toggle-icon {
padding-left: 0;
}

@media (max-width: $container-max-width) {
footer {
img#logo {
width: 107px;
}
.uk-navbar-nav.footer {
margin-top: 10px !important;
display: block;
li {
width: 100%;
&:after {
display: none;
}
}
}
.uk-navbar-nav.footer-social {
a {
padding: 0 15px !important;
.icon {
width: 30px;
height: 30px;
}
}
}
.uk-container div:last-child {
font-size: 0.8em;
}
}
}
Loading

0 comments on commit e5382f6

Please sign in to comment.