Compare commits
7 Commits
0.0.2
...
19cec75d2c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
19cec75d2c | ||
|
|
609da6ba6a | ||
|
|
9393e8be06 | ||
|
|
58be407f0a | ||
|
|
752ff9c0aa | ||
|
|
1595691bc3 | ||
|
|
5d03dea44d |
15
KÉZIKÖNYV.md
15
KÉZIKÖNYV.md
@@ -20,7 +20,7 @@ dis-alcim:
|
|||||||
|
|
||||||
dis-bevezeto:
|
dis-bevezeto:
|
||||||
|
|
||||||
- Csak az első két nagy cikknél jelenik meg
|
- Asztalin csak az első két nagy cikknél jelenik meg, mobilon az midegyiknél kivéve az első kettő
|
||||||
|
|
||||||
#### Dokumentum beállítások
|
#### Dokumentum beállítások
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ Cikkíró:
|
|||||||
#### Blokkok és egyéb megjegyzések
|
#### Blokkok és egyéb megjegyzések
|
||||||
|
|
||||||
|
|
||||||
Bevezető: Az első bekezdés-t állítsd félkövérre (Ctrl+B), hogy megfelelő legyen a kiemelés
|
Bevezető: Az első bekezdés-t állítsd Kiemelés4 (H4), hogy megfelelő legyen a kiemelés.
|
||||||
|
|
||||||
Elválasztók azaz vízszintes vonalak: A cikk elejére és végére automatikusan kerül egy-egy, az összes többit kézzel kell belerakni, a méretezésük automatikus.
|
Elválasztók azaz vízszintes vonalak: A cikk elejére és végére automatikusan kerül egy-egy, az összes többit kézzel kell belerakni, a méretezésük automatikus.
|
||||||
|
|
||||||
@@ -101,13 +101,22 @@ Megjelenés > Testreszabás > Designisso 2019
|
|||||||
|
|
||||||
Itt kell beállítani hogy hány cikk jelenjen meg a kezdőlapon illetve az archívumokban
|
Itt kell beállítani hogy hány cikk jelenjen meg a kezdőlapon illetve az archívumokban
|
||||||
|
|
||||||
Alapértelmezett értékek:
|
Alapértelmezett értékek, ha nem írsz be semmit akkor érvényesek! Ha utólag kitörlöd az értékeket, nem fognak működni a dolgok!
|
||||||
|
|
||||||
- Kezdőlapon megjelenő posztok száma: 20
|
- Kezdőlapon megjelenő posztok száma: 20
|
||||||
- Címke archívumban megjelenő posztok száma: 10
|
- Címke archívumban megjelenő posztok száma: 10
|
||||||
- Archívumban és keresési találatokban megjelenő posztok száma: 11
|
- Archívumban és keresési találatokban megjelenő posztok száma: 11
|
||||||
- Hasonló cikkek száma: 3
|
- Hasonló cikkek száma: 3
|
||||||
|
|
||||||
|
## Téma frissítése
|
||||||
|
|
||||||
|
Automatikus frissítés nincs.
|
||||||
|
|
||||||
|
- Ellenőrizd, hogy a 'Update Theme and Plugins from Zip File' bővítmény be van-e kapcsolva
|
||||||
|
- (Opcionális) Kapcsold be a biztonsági mentését a régi verziónak: Beállítások -> Update Theme and Plugins from Zip File
|
||||||
|
- Töltsd le a téma legfrissebb verzióját innen: https://git.gyetpet.dynu.net/infeeeee/dis-2019/releases Válaszd a 'Source Code (ZIP)' gombot
|
||||||
|
- Wordpressen témáknál telepítsd mint egy új témát. Ha a fent említett bővítmény be van kapcsolva, akkor felül fogja írni a jelenlegi verziót.
|
||||||
|
|
||||||
## Developement verzió telepítése
|
## Developement verzió telepítése
|
||||||
|
|
||||||
Szükséges: python2, gulp global, max node 11
|
Szükséges: python2, gulp global, max node 11
|
||||||
|
|||||||
14
_teendők.md
14
_teendők.md
@@ -8,20 +8,8 @@ Facebook like gomb
|
|||||||
|
|
||||||
Betöltéskor rejteni a dolgokat méretezés előtt, vagy betöltést optimalizálni
|
Betöltéskor rejteni a dolgokat méretezés előtt, vagy betöltést optimalizálni
|
||||||
|
|
||||||
onresize js!
|
|
||||||
|
|
||||||
`@media print{}`
|
`@media print{}`
|
||||||
|
|
||||||
# Megjegyzések
|
# Megjegyzések
|
||||||
|
|
||||||
## DESKTOP
|
~ Adrinak írni, hogy küldjön tökéletesen négyzet logót - szerintem nem kell, megoldottam azt az 1px problémát
|
||||||
~szövegek: alap kijelölő szín a sárga legyen -> invertáltakat meg kell javítani!
|
|
||||||
|
|
||||||
## DESKTOP
|
|
||||||
|
|
||||||
## MOBIL
|
|
||||||
|
|
||||||
|
|
||||||
### Iphone only???
|
|
||||||
~ nem mindig működik a home DIS gomb -> Mikor nem működik, nem találok ilyet, elvileg mindenhol mennie kell, vsz ugyanaz a hiba okozta mint az eltűnő dolgokat, szerintem ezt is megoldottam, de ellenőrizd
|
|
||||||
~ menü: nagyobb fekete flekk kell a dis logó alá, mert az „S” betű lelóg kicsit -> Ezt nem látom sehol, küldj printscreent
|
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
<!-- post thumbnail -->
|
<!-- post thumbnail -->
|
||||||
<?php if (has_post_thumbnail()): // Check if thumbnail exists ?>
|
<?php if (has_post_thumbnail()): // Check if thumbnail exists ?>
|
||||||
<a class="thumbnailwrapper" href="<?php echo $event_link; ?>" title="<?php the_title();?>">
|
<a class="thumbnailwrapper" href="<?php echo $event_link; ?>" title="<?php the_title();?>" target="_blank">
|
||||||
<?php the_post_thumbnail('home-event-thumbnail');?>
|
<?php the_post_thumbnail('home-event-thumbnail');?>
|
||||||
</a>
|
</a>
|
||||||
<?php endif;?>
|
<?php endif;?>
|
||||||
@@ -45,7 +45,8 @@
|
|||||||
<div class="bottom-row">
|
<div class="bottom-row">
|
||||||
<!-- title -->
|
<!-- title -->
|
||||||
<h2>
|
<h2>
|
||||||
<?php the_title();?>
|
<a href="<?php echo $event_link; ?>" target="_blank"><?php the_title();?></a>
|
||||||
|
|
||||||
</h2>
|
</h2>
|
||||||
<div class="vr"></div>
|
<div class="vr"></div>
|
||||||
<!-- Tovább button -->
|
<!-- Tovább button -->
|
||||||
|
|||||||
6186
css/base.css
6186
css/base.css
File diff suppressed because one or more lines are too long
@@ -225,6 +225,15 @@ function add_slug_to_body_class($classes)
|
|||||||
return $classes;
|
return $classes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function add_masonry_to_body_class( $classes ) {
|
||||||
|
if(is_home() || is_archive() || is_search() || is_404()){
|
||||||
|
$classes[] = 'masonrypage';
|
||||||
|
} else if(is_singular()){
|
||||||
|
$classes[] = 'singularpage';
|
||||||
|
}
|
||||||
|
return $classes;
|
||||||
|
}
|
||||||
|
|
||||||
// // If Dynamic Sidebar Exists
|
// // If Dynamic Sidebar Exists
|
||||||
// if (function_exists('register_sidebar'))
|
// if (function_exists('register_sidebar'))
|
||||||
// {
|
// {
|
||||||
@@ -605,6 +614,7 @@ remove_action('wp_head', 'wp_shortlink_wp_head', 10, 0);
|
|||||||
// Add Filters
|
// Add Filters
|
||||||
add_filter('avatar_defaults', 'dis2019gravatar'); // Custom Gravatar in Settings > Discussion
|
add_filter('avatar_defaults', 'dis2019gravatar'); // Custom Gravatar in Settings > Discussion
|
||||||
add_filter('body_class', 'add_slug_to_body_class'); // Add slug to body class (Starkers build)
|
add_filter('body_class', 'add_slug_to_body_class'); // Add slug to body class (Starkers build)
|
||||||
|
add_filter('body_class', 'add_masonry_to_body_class'); // Add masonry to body class
|
||||||
add_filter('widget_text', 'do_shortcode'); // Allow shortcodes in Dynamic Sidebar
|
add_filter('widget_text', 'do_shortcode'); // Allow shortcodes in Dynamic Sidebar
|
||||||
add_filter('widget_text', 'shortcode_unautop'); // Remove <p> tags in Dynamic Sidebars (better!)
|
add_filter('widget_text', 'shortcode_unautop'); // Remove <p> tags in Dynamic Sidebars (better!)
|
||||||
add_filter('wp_nav_menu_args', 'my_wp_nav_menu_args'); // Remove surrounding <div> from WP Navigation
|
add_filter('wp_nav_menu_args', 'my_wp_nav_menu_args'); // Remove surrounding <div> from WP Navigation
|
||||||
|
|||||||
@@ -3,12 +3,14 @@
|
|||||||
var gulp = require('gulp');
|
var gulp = require('gulp');
|
||||||
var sass = require('gulp-sass');
|
var sass = require('gulp-sass');
|
||||||
var livereload = require('gulp-livereload');
|
var livereload = require('gulp-livereload');
|
||||||
|
var cleanCSS = require('gulp-clean-css');
|
||||||
|
|
||||||
sass.compiler = require('node-sass');
|
sass.compiler = require('node-sass');
|
||||||
|
|
||||||
gulp.task('sass', function () {
|
gulp.task('sass', function () {
|
||||||
return gulp.src('./sass/**/*.scss')
|
return gulp.src('./sass/**/*.scss')
|
||||||
.pipe(sass().on('error', sass.logError))
|
.pipe(sass().on('error', sass.logError))
|
||||||
|
.pipe(cleanCSS())
|
||||||
.pipe(gulp.dest('./css'))
|
.pipe(gulp.dest('./css'))
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
44
header.php
44
header.php
@@ -44,44 +44,51 @@
|
|||||||
|
|
||||||
<!-- ------------------------------ header-1 ------------------------------- -->
|
<!-- ------------------------------ header-1 ------------------------------- -->
|
||||||
|
|
||||||
<div class="header-1">
|
<div class="header-1 header-inner">
|
||||||
<!-- logo -->
|
<!-- logo -->
|
||||||
<div class="logo">
|
<div class="logo">
|
||||||
<a href="<?php echo home_url(); ?>">
|
<a href="<?php echo home_url(); ?>">
|
||||||
<object class="white" data="<?php echo get_template_directory_uri(); ?>/img/dis-logo-white.svg"
|
<div class="dis-logo">
|
||||||
|
</div>
|
||||||
|
<!-- <object class="white" data="<?php echo get_template_directory_uri(); ?>/img/dis-logo-white.svg"
|
||||||
type="image/svg+xml">
|
type="image/svg+xml">
|
||||||
<img src="<?php echo get_template_directory_uri(); ?>/img/dis-logo-white.png" />
|
<img src="<?php echo get_template_directory_uri(); ?>/img/dis-logo-white.png" />
|
||||||
</object>
|
</object>
|
||||||
<object class="black" data="<?php echo get_template_directory_uri(); ?>/img/dis-logo-black.svg"
|
<object class="black" data="<?php echo get_template_directory_uri(); ?>/img/dis-logo-black.svg"
|
||||||
type="image/svg+xml">
|
type="image/svg+xml">
|
||||||
<img src="<?php echo get_template_directory_uri(); ?>/img/dis-logo-black.png" />
|
<img src="<?php echo get_template_directory_uri(); ?>/img/dis-logo-black.png" />
|
||||||
</object>
|
</object> -->
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<!-- /logo -->
|
<!-- /logo -->
|
||||||
<div class="fb-link social-link">
|
<div class="fb-link social-link">
|
||||||
<a href="https://www.facebook.com/designisso" target="_blank">
|
<a href="https://www.facebook.com/designisso" target="_blank">
|
||||||
<object class="white" data="<?php echo get_template_directory_uri(); ?>/img/facebook_icon-white.svg"
|
<div class="facebook-icon icon menuicon">
|
||||||
|
</div>
|
||||||
|
<!-- <object class="white" data="<?php echo get_template_directory_uri(); ?>/img/facebook_icon-white.svg"
|
||||||
type="image/svg+xml">
|
type="image/svg+xml">
|
||||||
<img src="<?php echo get_template_directory_uri(); ?>/img/facebook_icon-white.png" />
|
<img src="<?php echo get_template_directory_uri(); ?>/img/facebook_icon-white.png" />
|
||||||
</object>
|
</object>
|
||||||
<object class="black" data="<?php echo get_template_directory_uri(); ?>/img/facebook_icon-black.svg"
|
<object class="black" data="<?php echo get_template_directory_uri(); ?>/img/facebook_icon-black.svg"
|
||||||
type="image/svg+xml">
|
type="image/svg+xml">
|
||||||
<img src="<?php echo get_template_directory_uri(); ?>/img/facebook_icon-black.png" />
|
<img src="<?php echo get_template_directory_uri(); ?>/img/facebook_icon-black.png" />
|
||||||
</object>
|
</object> -->
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="search-box">
|
<div class="search-box">
|
||||||
<button type="button" id="search-button">
|
<button type="button" id="search-button">
|
||||||
<object class="white" data="<?php echo get_template_directory_uri(); ?>/img/kereso_icon-white.svg"
|
<div class="kereso-icon icon">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- <object class="white" data="<?php echo get_template_directory_uri(); ?>/img/kereso_icon-white.svg"
|
||||||
type="image/svg+xml">
|
type="image/svg+xml">
|
||||||
<img src="<?php echo get_template_directory_uri(); ?>/img/kereso_icon-white.png" />
|
<img src="<?php echo get_template_directory_uri(); ?>/img/kereso_icon-white.png" />
|
||||||
</object>
|
</object>
|
||||||
<object class="black" data="<?php echo get_template_directory_uri(); ?>/img/kereso_icon-black.svg"
|
<object class="black" data="<?php echo get_template_directory_uri(); ?>/img/kereso_icon-black.svg"
|
||||||
type="image/svg+xml">
|
type="image/svg+xml">
|
||||||
<img src="<?php echo get_template_directory_uri(); ?>/img/kereso_icon-black.png" />
|
<img src="<?php echo get_template_directory_uri(); ?>/img/kereso_icon-black.png" />
|
||||||
</object>
|
</object> -->
|
||||||
</button>
|
</button>
|
||||||
<div class="search-bar">
|
<div class="search-bar">
|
||||||
<?php get_search_form();?>
|
<?php get_search_form();?>
|
||||||
@@ -101,43 +108,52 @@
|
|||||||
|
|
||||||
<!-- ----------------------------- header 2 ------------------------------ -->
|
<!-- ----------------------------- header 2 ------------------------------ -->
|
||||||
|
|
||||||
<div class="header-2">
|
<div class="header-2 header-inner">
|
||||||
<div class="menubutton">
|
<div class="menubutton">
|
||||||
<button type="button" id="toggle-sidebar">
|
<button type="button" id="toggle-sidebar">
|
||||||
<object class="white" data="<?php echo get_template_directory_uri(); ?>/img/dis-plus-white.svg"
|
<div class="menubutton-icon icon menuicon">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- <object class="white" data="<?php echo get_template_directory_uri(); ?>/img/dis-plus-white.svg"
|
||||||
type="image/svg+xml">
|
type="image/svg+xml">
|
||||||
<img src="<?php echo get_template_directory_uri(); ?>/img/dis-plus-white.png" />
|
<img src="<?php echo get_template_directory_uri(); ?>/img/dis-plus-white.png" />
|
||||||
</object>
|
</object>
|
||||||
<object class="black" data="<?php echo get_template_directory_uri(); ?>/img/dis-plus-black.svg"
|
<object class="black" data="<?php echo get_template_directory_uri(); ?>/img/dis-plus-black.svg"
|
||||||
type="image/svg+xml">
|
type="image/svg+xml">
|
||||||
<img src="<?php echo get_template_directory_uri(); ?>/img/dis-plus-black.png" />
|
<img src="<?php echo get_template_directory_uri(); ?>/img/dis-plus-black.png" />
|
||||||
</object>
|
</object> -->
|
||||||
|
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="ig-link social-link">
|
<div class="ig-link social-link">
|
||||||
<a href="https://www.instagram.com/design_is_so/" target="_blank">
|
<a href="https://www.instagram.com/design_is_so/" target="_blank">
|
||||||
<object class="white" data="<?php echo get_template_directory_uri(); ?>/img/instagram_icon-white.svg"
|
<div class="instagram-icon icon menuicon">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- <object class="white" data="<?php echo get_template_directory_uri(); ?>/img/instagram_icon-white.svg"
|
||||||
type="image/svg+xml">
|
type="image/svg+xml">
|
||||||
<img src="<?php echo get_template_directory_uri(); ?>/img/instagram_icon-white.png" />
|
<img src="<?php echo get_template_directory_uri(); ?>/img/instagram_icon-white.png" />
|
||||||
</object>
|
</object>
|
||||||
<object class="black" data="<?php echo get_template_directory_uri(); ?>/img/instagram_icon-black.svg"
|
<object class="black" data="<?php echo get_template_directory_uri(); ?>/img/instagram_icon-black.svg"
|
||||||
type="image/svg+xml">
|
type="image/svg+xml">
|
||||||
<img src="<?php echo get_template_directory_uri(); ?>/img/instagram_icon-black.png" />
|
<img src="<?php echo get_template_directory_uri(); ?>/img/instagram_icon-black.png" />
|
||||||
</object>
|
</object> -->
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="events-link">
|
<div class="events-link">
|
||||||
<a href="/index.php/category/<?php echo get_theme_mod('dis-2019-event-cat-slug'); ?>" target="_top">
|
<a href="/index.php/category/<?php echo get_theme_mod('dis-2019-event-cat-slug'); ?>" target="_top">
|
||||||
<object class="white" data="<?php echo get_template_directory_uri(); ?>/img/naptar_icon-white.svg"
|
<div class="esemeny-icon icon menuicon">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- <object class="white" data="<?php echo get_template_directory_uri(); ?>/img/naptar_icon-white.svg"
|
||||||
type="image/svg+xml">
|
type="image/svg+xml">
|
||||||
<img src="<?php echo get_template_directory_uri(); ?>/img/naptar_icon-white.png" />
|
<img src="<?php echo get_template_directory_uri(); ?>/img/naptar_icon-white.png" />
|
||||||
</object>
|
</object>
|
||||||
<object class="black" data="<?php echo get_template_directory_uri(); ?>/img/naptar_icon-black.svg"
|
<object class="black" data="<?php echo get_template_directory_uri(); ?>/img/naptar_icon-black.svg"
|
||||||
type="image/svg+xml">
|
type="image/svg+xml">
|
||||||
<img src="<?php echo get_template_directory_uri(); ?>/img/naptar_icon-black.png" />
|
<img src="<?php echo get_template_directory_uri(); ?>/img/naptar_icon-black.png" />
|
||||||
</object>
|
</object> -->
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
766
js/scripts.js
766
js/scripts.js
@@ -17,12 +17,14 @@
|
|||||||
// const wiw = window.innerWidth
|
// const wiw = window.innerWidth
|
||||||
// const bw = $('body').width()
|
// const bw = $('body').width()
|
||||||
|
|
||||||
// const woh = window.outerHeight
|
// // const woh = window.outerHeight
|
||||||
// const wih = window.innerHeight
|
// const wih = window.innerHeight
|
||||||
// const vh = $(window).height()
|
// const vh = $(window).height()
|
||||||
// const boh = document.body.offsetHeight
|
// const boh = document.body.offsetHeight
|
||||||
// const dch = document.documentElement.clientHeight
|
// const dch = document.documentElement.clientHeight
|
||||||
|
|
||||||
|
// console.log('pixelratio:', window.devicePixelRatio)
|
||||||
|
|
||||||
|
|
||||||
const bottomScrollHeight = 0
|
const bottomScrollHeight = 0
|
||||||
// height of scrollbar at bottom
|
// height of scrollbar at bottom
|
||||||
@@ -41,19 +43,22 @@
|
|||||||
// w_wow: wow,
|
// w_wow: wow,
|
||||||
// w_wiw: wiw,
|
// w_wiw: wiw,
|
||||||
// w_bw: bw,
|
// w_bw: bw,
|
||||||
// desktophomemargin: desktophomemargin,
|
// // desktophomemargin: desktophomemargin,
|
||||||
// h_wih: wih,
|
// h_wih: wih,
|
||||||
// h_vh: vh,
|
// h_vh: vh,
|
||||||
// bottomScrollHeight: bottomScrollHeight,
|
// // bottomScrollHeight: bottomScrollHeight,
|
||||||
// h_woh: woh,
|
// // h_woh: woh,
|
||||||
// h_boh: boh,
|
// h_boh: boh,
|
||||||
// h_dch: dch
|
// h_dch: dch
|
||||||
// }
|
// }
|
||||||
// console.log(cssWidths)
|
// console.log(cssWidths)
|
||||||
|
|
||||||
|
|
||||||
/* --------------------------- css values to vars --------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
|
/* FUNCTIONS */
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
/* --------------------------- css values to vars --------------------------- */
|
||||||
|
|
||||||
function calcWidths() {
|
function calcWidths() {
|
||||||
let wow = window.outerWidth
|
let wow = window.outerWidth
|
||||||
@@ -82,9 +87,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var isMobile = checkDevice('mobile')
|
|
||||||
var isTablet = checkDevice('tablet')
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if body has a class
|
* Checks if body has a class
|
||||||
@@ -108,256 +110,25 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//isHome
|
/**
|
||||||
const isHome = bodyHasClass('home')
|
* finds a name of a class, from the first element
|
||||||
|
* @param {Array} classlist the list of classes to search from as an array
|
||||||
//isArchive
|
* @param {String} startString the string to search for
|
||||||
const isArchive = bodyHasClass('archive', 'category-esemeny')
|
* @param {String} sep the separator that separates the startString from the rest of the classname
|
||||||
|
*/
|
||||||
//isSearch
|
function findClassByStart(classlist, startString, sep = "-") {
|
||||||
const isSearch = bodyHasClass('search-results')
|
var fullstring
|
||||||
|
for (let i = 0; i < classlist.length; i++) {
|
||||||
//isSearchNoResults
|
let curr = classlist[i].split(sep)
|
||||||
const isSearchNoResults = bodyHasClass('search-no-results')
|
if (curr[0] == startString) {
|
||||||
|
fullstring = classlist[i]
|
||||||
//isEsemeny
|
|
||||||
const isEsemeny = bodyHasClass('category-esemeny')
|
|
||||||
|
|
||||||
//isSingle
|
|
||||||
const isSingle = bodyHasClass('single')
|
|
||||||
|
|
||||||
// Masonrypage: archive, home or search results
|
|
||||||
var isMasonryPage = isArchive || isHome || isSearch || isSearchNoResults
|
|
||||||
|
|
||||||
|
|
||||||
/* ========================================================================== */
|
|
||||||
/* FUNCTIONS */
|
|
||||||
/* ========================================================================== */
|
|
||||||
|
|
||||||
|
|
||||||
var rotateMenuButton = function () {
|
|
||||||
if ($(".menubutton button").hasClass("rotated")) {
|
|
||||||
$(".menubutton button").removeClass("rotated");
|
|
||||||
} else {
|
|
||||||
$(".menubutton button").addClass("rotated").addClass("inverted");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return fullstring
|
||||||
var showHideSocial = function () {
|
|
||||||
if (isMobile && $('.social-link').hasClass('hidden')) {
|
|
||||||
$('.social-link, .events-link').removeClass('hidden')
|
|
||||||
} else if (isMobile) {
|
|
||||||
$('.social-link, .events-link').addClass('hidden')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* --------------------- generic page load for onresize --------------------- */
|
|
||||||
|
|
||||||
function loadPage() {
|
|
||||||
if (isMobile) {
|
|
||||||
// hide social buttons
|
|
||||||
$('.social-link, .events-link').addClass('hidden')
|
|
||||||
// move search to menu
|
|
||||||
$(".search-box>.search-bar").prependTo("#sidebar-wrapper")
|
|
||||||
} else {
|
|
||||||
$('.social-link, .events-link').removeClass('hidden')
|
|
||||||
// move search to back
|
|
||||||
$("#sidebar-wrapper>.search-bar").appendTo(".search-box")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
loadPage()
|
|
||||||
|
|
||||||
/* ========================================================================== */
|
|
||||||
/* SEARCH */
|
|
||||||
/* ========================================================================== */
|
|
||||||
|
|
||||||
// on mobile add to sidebar:
|
|
||||||
// if (isMobile) {
|
|
||||||
// $(".search-box>.search-bar").prependTo("#sidebar-wrapper")
|
|
||||||
// }
|
|
||||||
|
|
||||||
//clicking on desktop
|
|
||||||
if (!isMobile) {
|
|
||||||
$(".search-box button").click(function (e) {
|
|
||||||
// e.preventDefault()
|
|
||||||
var bar = $(this).next(".search-bar")
|
|
||||||
if (bar.hasClass("opensearch")) {
|
|
||||||
//if search is opened close:
|
|
||||||
bar.stop().animate({ width: "0" }, 400, function () {
|
|
||||||
bar.hide().removeClass("opensearch")
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
let ww = calcWidths()
|
|
||||||
//if it's closed open:
|
|
||||||
bar.show().stop().animate({ width: ww.wiw - (ww.desktophomemargin * 2) }, 400, function () {
|
|
||||||
bar.addClass("opensearch")
|
|
||||||
$(".search-input").focus()
|
|
||||||
})
|
|
||||||
// console.log("calc(100% - " + (desktophomemargin * 2) + "px)")
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ========================================================================== */
|
|
||||||
/* MENU */
|
|
||||||
/* ========================================================================== */
|
|
||||||
|
|
||||||
|
|
||||||
function mwCalc() {
|
|
||||||
let ww = calcWidths()
|
|
||||||
if (isMobile) {
|
|
||||||
return ww.wow
|
|
||||||
} else if (isTablet) {
|
|
||||||
return 350
|
|
||||||
} else {
|
|
||||||
return 500
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var menuWidth = mwCalc()
|
|
||||||
// var menuWidth = 100
|
|
||||||
|
|
||||||
// if (isTablet) {
|
|
||||||
// menuWidth = 350
|
|
||||||
// }
|
|
||||||
// if (!isMobile && !isTablet) {
|
|
||||||
// menuWidth = 500
|
|
||||||
// }
|
|
||||||
|
|
||||||
$("#sidebar").simplerSidebar({
|
|
||||||
|
|
||||||
selectors: {
|
|
||||||
trigger: "#toggle-sidebar",
|
|
||||||
quitter: "#toggle-sidebar"
|
|
||||||
},
|
|
||||||
sidebar: {
|
|
||||||
width: menuWidth
|
|
||||||
},
|
|
||||||
mask: {
|
|
||||||
display: false,
|
|
||||||
css: {
|
|
||||||
backgroundColor: "black",
|
|
||||||
opacity: 1,
|
|
||||||
filter: "Alpha(opacity=100)" // IE opacity fix
|
|
||||||
}
|
|
||||||
},
|
|
||||||
gap: 0,
|
|
||||||
events: {
|
|
||||||
on: {
|
|
||||||
animation: {
|
|
||||||
both: rotateMenuButton
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
callbacks: {
|
|
||||||
animation: {
|
|
||||||
both: showHideSocial,
|
|
||||||
close: function () { $(".menubutton button").removeClass("inverted") },
|
|
||||||
freezePage: false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
|
||||||
/* HOME & ARCHIVES */
|
|
||||||
/* -------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
|
|
||||||
/* ------------------------------- no results ------------------------------- */
|
|
||||||
|
|
||||||
|
|
||||||
if (isMasonryPage && $("article").hasClass('no-result')) {
|
|
||||||
$('body').addClass("no-result")
|
|
||||||
if (!isMobile) {
|
|
||||||
$('article.no-result h2').appendTo('.archivetitle')
|
|
||||||
$('article.no-result').hide()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ----------------------------- css on desktop ----------------------------- */
|
/* ----------------------------- random ----------------------------- */
|
||||||
|
|
||||||
/* ------------------------------ wrap articles ----------------------------- */
|
|
||||||
|
|
||||||
if (!isMobile) {
|
|
||||||
if (isMasonryPage) {
|
|
||||||
//no overflowY
|
|
||||||
$('html').css({ overflowY: "hidden" })
|
|
||||||
|
|
||||||
//calculate wrappable elements
|
|
||||||
$('#content>*:not(.misha_loadmore)').addClass("hbox")
|
|
||||||
var wrapArticles = $(".hbox").length
|
|
||||||
|
|
||||||
//wrapping for big-small difference
|
|
||||||
if (isHome) {
|
|
||||||
$('.hbox:first-child').wrap('<div class="home_wrapper-big home_wrapper-1"></div>').addClass("home-big")
|
|
||||||
$('.hbox:nth-child(2)').wrap('<div class="home_wrapper-big home_wrapper-2"></div>').addClass("home-big")
|
|
||||||
wrapArticles = $(".hbox").length - 2
|
|
||||||
}
|
|
||||||
|
|
||||||
//add classes to articles and elements
|
|
||||||
var articleWrapCounter = 0
|
|
||||||
for (let i = 0; i < wrapArticles; i++) {
|
|
||||||
var j = i + 1
|
|
||||||
|
|
||||||
if (isHome) {
|
|
||||||
j = i + 3
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i % 6 == 0) {
|
|
||||||
articleWrapCounter++
|
|
||||||
}
|
|
||||||
//console.log($('.hbox:nth-child(' + j + ')').attr("id"), i, j)
|
|
||||||
$('.hbox:nth-child(' + j + ')').addClass("home-small home-thumbnail-small-" + articleWrapCounter)
|
|
||||||
//change order if there is a description
|
|
||||||
if ($("body").is('.archive, .tag') && articleWrapCounter == 1) {
|
|
||||||
if (j == 3 || j == 4) {
|
|
||||||
$('.hbox:nth-child(' + j + ')').css({ order: j - 1 })
|
|
||||||
} else if (j == 5 || j == 6) {
|
|
||||||
$('.hbox:nth-child(' + j + ')').css({ order: j })
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//wrap classes
|
|
||||||
for (let i = 0; i < articleWrapCounter; i++) {
|
|
||||||
var j = i + 1
|
|
||||||
if (isHome) {
|
|
||||||
j = i + 3
|
|
||||||
}
|
|
||||||
var k = i + 1
|
|
||||||
$(".home-thumbnail-small-" + k).wrapAll('<div class="home_wrapper-small home_wrapper-' + j + '"></div>')
|
|
||||||
if (i == 0) {
|
|
||||||
$(".home_wrapper-" + j).addClass("home_wrapper-s1")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------------------------- other css ------------------------------- */
|
|
||||||
|
|
||||||
//add bottom scrollbar to div on bottom:
|
|
||||||
if (bottomScrollHeight > 0) {
|
|
||||||
$(".home_wrapper-big .metadata").css({ bottom: bottomScrollHeight })
|
|
||||||
}
|
|
||||||
|
|
||||||
//fit title
|
|
||||||
$("body:not(.no-result) .archivetitle h1").fitText(0.7)
|
|
||||||
|
|
||||||
}//isMasonryPage end
|
|
||||||
}// !isMobile end
|
|
||||||
|
|
||||||
/* ---------------- move bevezeto out from metadata on mobile --------------- */
|
|
||||||
|
|
||||||
if (isHome && isMobile) {
|
|
||||||
$("article .metadata .bevezetoWrapper").each(function () {
|
|
||||||
$(this).parents('article').append($(this))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ----------------------------- random cutouts ----------------------------- */
|
|
||||||
|
|
||||||
function random2() {
|
function random2() {
|
||||||
const choices = [
|
const choices = [
|
||||||
@@ -386,49 +157,93 @@
|
|||||||
};
|
};
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
/* HOME & ARCHIVES FUNCTIONS */
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
$(".home_wrapper-small").each(function () {
|
|
||||||
$(this).addRandomClasses()
|
/* ------------------------------ wrap articles ----------------------------- */
|
||||||
|
|
||||||
|
function wrapArts() {
|
||||||
|
//calculate wrappable elements
|
||||||
|
if ($(".hbox").length) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
$('#content>article, #content>.archivetitle, #content>.archivedescription').addClass("hbox")
|
||||||
|
var wrapArticles = $(".hbox").length
|
||||||
|
|
||||||
|
if (isHome) {
|
||||||
|
$('.hbox:first-child').wrap('<div class="home_wrapper-big home_wrapper-1"></div>').addClass("home-big")
|
||||||
|
$('.hbox:nth-child(2)').wrap('<div class="home_wrapper-big home_wrapper-2"></div>').addClass("home-big")
|
||||||
|
wrapArticles = $(".hbox").length - 2
|
||||||
|
}
|
||||||
|
|
||||||
|
//add classes to articles and elements
|
||||||
|
|
||||||
|
for (let i = 0; i < wrapArticles; i++) {
|
||||||
|
var j = i + 1
|
||||||
|
|
||||||
|
if (isHome) {
|
||||||
|
j = i + 3
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i % 6 == 0) {
|
||||||
|
articleWrapCounter++
|
||||||
|
}
|
||||||
|
//console.log($('.hbox:nth-child(' + j + ')').attr("id"), i, j)
|
||||||
|
$('.hbox:nth-child(' + j + ')').addClass("home-small home-thumbnail-small-" + articleWrapCounter)
|
||||||
|
//change order if there is a description
|
||||||
|
if ($("body").is('.archive, .tag') && articleWrapCounter == 1) {
|
||||||
|
if (j == 3 || j == 4) {
|
||||||
|
$('.hbox:nth-child(' + j + ')').css({ order: j - 1 })
|
||||||
|
} else if (j == 5 || j == 6) {
|
||||||
|
$('.hbox:nth-child(' + j + ')').css({ order: j })
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//wrap classes
|
||||||
|
for (let i = 0; i < articleWrapCounter; i++) {
|
||||||
|
let j = i + 1
|
||||||
|
if (isHome) {
|
||||||
|
j = i + 3
|
||||||
|
}
|
||||||
|
let k = i + 1
|
||||||
|
$(".home-thumbnail-small-" + k).wrapAll('<div class="home_wrapper-small home_wrapper-' + j + '"></div>')
|
||||||
|
if (i == 0) {
|
||||||
|
$(".home_wrapper-" + j).addClass("home_wrapper-s1")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function unWrapArts() {
|
||||||
|
$('.home_wrapper-big .hbox').unwrap('.home_wrapper-big')
|
||||||
|
|
||||||
|
|
||||||
|
var wrapArticles = $(".hbox").length
|
||||||
|
for (let i = 0; i < wrapArticles; i++) {
|
||||||
|
let hs = 'home-thumbnail-small-' + (i + 1)
|
||||||
|
$('.' + hs).removeClass(hs)
|
||||||
|
}
|
||||||
|
$('.hbox').removeClass('home-small').removeClass('hbox').unwrap('.home_wrapper-small')
|
||||||
|
$('.home_wrapper-s1').removeClass('home_wrapper-s1')
|
||||||
|
|
||||||
|
$('.home-big').removeClass('home-big')
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------------- move bevezeto out from metadata on mobile --------------- */
|
||||||
|
|
||||||
|
function moveBevezetoMobile() {
|
||||||
|
$("article .metadata .bevezetoWrapper").each(function () {
|
||||||
|
$(this).parents('article').append($(this))
|
||||||
})
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function moveBevezetoDesktop() {
|
||||||
/* ---------------------------- Cutouts on mobile --------------------------- */
|
$("article>.bevezetoWrapper").each(function () {
|
||||||
|
$(this).parent('article').children('.metadata').children('.postedon').after($(this))
|
||||||
//add class to odd elems
|
})
|
||||||
|
}
|
||||||
// function mobileHomeClass() {
|
|
||||||
// if (isMobile && isMasonryPage) {
|
|
||||||
// $('article:not(.post_nr):not(.cutOk) ').addClass('cutCurr')
|
|
||||||
// $('article.cutCurr:nth-child(even)').addClass('cut-even')
|
|
||||||
// $('article.cutCurr').addClass('cutOk').removeClass('cutCurr')
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
// mobileHomeClass()
|
|
||||||
|
|
||||||
/* ----------------------------- Snap on mobile ----------------------------- */
|
|
||||||
|
|
||||||
// if (isMobile) {
|
|
||||||
// if (isMasonryPage) {
|
|
||||||
// $("article.post").SnapScroll({
|
|
||||||
// animateDuration: 400
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
/* --------------------------------- To top --------------------------------- */
|
|
||||||
|
|
||||||
// $(".totop>a").click(function (e) {
|
|
||||||
// e.preventDefault()
|
|
||||||
// $('html, body').stop().animate({ scrollTop: 0 }, 800);
|
|
||||||
// })
|
|
||||||
|
|
||||||
// //hide totop if not needed
|
|
||||||
// if (!($("main").height() > $(window).height()) && isMobile) {
|
|
||||||
// $(".totop").hide()
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
/* ---------------------------- Scroll on desktop --------------------------- */
|
/* ---------------------------- Scroll on desktop --------------------------- */
|
||||||
|
|
||||||
@@ -509,8 +324,150 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
/* SEARCH */
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
|
||||||
|
//clicking on desktop
|
||||||
|
if (!isMobile) {
|
||||||
|
$(".search-box button").click(function (e) {
|
||||||
|
// e.preventDefault()
|
||||||
|
var bar = $(this).next(".search-bar")
|
||||||
|
if (bar.hasClass("opensearch")) {
|
||||||
|
//if search is opened close:
|
||||||
|
bar.stop().animate({ width: "0" }, 400, function () {
|
||||||
|
bar.hide().removeClass("opensearch")
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
let ww = calcWidths()
|
||||||
|
//if it's closed open:
|
||||||
|
bar.show().stop().animate({ width: ww.wiw - (ww.desktophomemargin * 2) }, 400, function () {
|
||||||
|
bar.addClass("opensearch")
|
||||||
|
$(".search-input").focus()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
/* MENU */
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
/* ------------------------------ menufunctions ----------------------------- */
|
||||||
|
|
||||||
|
var rotateMenuButton = function () {
|
||||||
|
if ($(".menubutton button").hasClass("rotated")) {
|
||||||
|
$(".menubutton button").removeClass("rotated");
|
||||||
|
} else {
|
||||||
|
$(".menubutton button").addClass("rotated").addClass("inverted");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function mwCalc() {
|
||||||
|
let ww = calcWidths()
|
||||||
|
if (isMobile) {
|
||||||
|
return ww.wow
|
||||||
|
} else if (isTablet) {
|
||||||
|
return 350
|
||||||
|
} else {
|
||||||
|
return 500
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ----------------------------- Set up the menu ---------------------------- */
|
||||||
|
|
||||||
|
var menuWidth = mwCalc()
|
||||||
|
|
||||||
|
$("#sidebar").simplerSidebar({
|
||||||
|
|
||||||
|
selectors: {
|
||||||
|
trigger: "#toggle-sidebar",
|
||||||
|
quitter: "#toggle-sidebar"
|
||||||
|
},
|
||||||
|
sidebar: {
|
||||||
|
width: menuWidth
|
||||||
|
},
|
||||||
|
mask: {
|
||||||
|
display: false,
|
||||||
|
css: {
|
||||||
|
backgroundColor: "black",
|
||||||
|
opacity: 1,
|
||||||
|
filter: "Alpha(opacity=100)" // IE opacity fix
|
||||||
|
}
|
||||||
|
},
|
||||||
|
gap: 0,
|
||||||
|
events: {
|
||||||
|
on: {
|
||||||
|
animation: {
|
||||||
|
both: rotateMenuButton
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
callbacks: {
|
||||||
|
animation: {
|
||||||
|
open: function () {
|
||||||
|
if (isMobile) {
|
||||||
|
$('.social-link, .events-link').removeClass('hidden')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
close: function () {
|
||||||
|
$(".menubutton button").removeClass("inverted")
|
||||||
|
if (isMobile) {
|
||||||
|
$('.social-link, .events-link').addClass('hidden')
|
||||||
|
}
|
||||||
|
},
|
||||||
|
freezePage: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
/* BOOLEANS */
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
var isMobile = checkDevice('mobile')
|
||||||
|
var isTablet = checkDevice('tablet')
|
||||||
|
|
||||||
|
//isHome
|
||||||
|
const isHome = bodyHasClass('home')
|
||||||
|
|
||||||
|
//isArchive
|
||||||
|
const isArchive = bodyHasClass('archive', 'category-esemeny')
|
||||||
|
|
||||||
|
//isSearch
|
||||||
|
const isSearch = bodyHasClass('search-results')
|
||||||
|
|
||||||
|
//isSearchNoResults
|
||||||
|
const isSearchNoResults = bodyHasClass('search-no-results')
|
||||||
|
|
||||||
|
//isEsemeny
|
||||||
|
const isEsemeny = bodyHasClass('category-esemeny')
|
||||||
|
|
||||||
|
//isSingle
|
||||||
|
const isSingle = bodyHasClass('single')
|
||||||
|
|
||||||
|
// Masonrypage: archive, home or search results
|
||||||
|
var isMasonryPage = isArchive || isHome || isSearch || isSearchNoResults
|
||||||
|
|
||||||
|
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
/* Set up specific pages */
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
/* ------------------------------- no results ------------------------------- */
|
||||||
|
|
||||||
|
if (isMasonryPage && $("article").hasClass('no-result')) {
|
||||||
|
$('body').addClass("no-result")
|
||||||
|
}
|
||||||
|
|
||||||
const selector = isEsemeny ? 'main>section>article' : 'main>#content>div'
|
const selector = isEsemeny ? 'main>section>article' : 'main>#content>div'
|
||||||
|
|
||||||
|
// default current elem for scrolling
|
||||||
var currElem = $(selector + ':first-child')
|
var currElem = $(selector + ':first-child')
|
||||||
|
|
||||||
//checking the current scroll location for refresh:
|
//checking the current scroll location for refresh:
|
||||||
@@ -549,13 +506,127 @@
|
|||||||
|
|
||||||
// console.log("currscroll", currscroll, "scrollnr", scrollnr, "closest", closest)
|
// console.log("currscroll", currscroll, "scrollnr", scrollnr, "closest", closest)
|
||||||
console.log("start location: " + currElem.attr("class"))
|
console.log("start location: " + currElem.attr("class"))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
/* EVENTS - ESEMÉNYEK */
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
if (isEsemeny) {
|
||||||
|
if (!isMobile) {
|
||||||
|
$('html').css({ overflowY: "hidden" })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* --------------------- generic page load for onresize --------------------- */
|
||||||
|
|
||||||
|
var articleWrapCounter = 0
|
||||||
|
|
||||||
|
function loadPage() {
|
||||||
|
if (isMobile) {
|
||||||
|
// hide social buttons
|
||||||
|
$('.social-link, .events-link').addClass('hidden')
|
||||||
|
|
||||||
|
// move search to menu
|
||||||
|
$(".search-box>.search-bar").prependTo("#sidebar-wrapper")
|
||||||
|
|
||||||
|
// set up no results
|
||||||
|
$('article.no-result').show()
|
||||||
|
$('body.no-result .archivetitle>h2').appendTo('article.no-result')
|
||||||
|
|
||||||
|
|
||||||
|
} else {
|
||||||
|
// not mobile
|
||||||
|
|
||||||
|
//show social links
|
||||||
|
$('.social-link, .events-link').removeClass('hidden')
|
||||||
|
|
||||||
|
// move search to back
|
||||||
|
$("#sidebar-wrapper>.search-bar").appendTo(".search-box")
|
||||||
|
|
||||||
|
// set up no results
|
||||||
|
$('article.no-result h2').appendTo('.archivetitle')
|
||||||
|
$('article.no-result').hide()
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isMasonryPage) {
|
||||||
|
if (isMobile) {
|
||||||
|
//no overflowY
|
||||||
|
$('html').css({ overflowY: "unset" })
|
||||||
|
|
||||||
|
unWrapArts()
|
||||||
|
|
||||||
|
moveBevezetoMobile()
|
||||||
|
} else {
|
||||||
|
//no overflowY
|
||||||
|
$('html').css({ overflowY: "hidden" })
|
||||||
|
|
||||||
|
wrapArts()
|
||||||
|
|
||||||
|
$("body:not(.no-result) .archivetitle h1").fitText(0.7)
|
||||||
|
|
||||||
|
moveBevezetoDesktop()
|
||||||
|
|
||||||
|
// add random classes
|
||||||
|
if (!$('.random').length) {
|
||||||
|
$(".home_wrapper-small").each(function () {
|
||||||
|
$(this).addRandomClasses()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isMasonryPage || isEsemeny) {
|
||||||
|
if (isMobile) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
currElem = $(selector + ':first-child')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
loadPage()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
/* Black logo on scroll on mobile */
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
$.fn.scrollStopped = function (callback) {
|
||||||
|
var that = this, $this = $(that);
|
||||||
|
$this.scroll(function (ev) {
|
||||||
|
clearTimeout($this.data('scrollTimeout'));
|
||||||
|
$this.data('scrollTimeout', setTimeout(callback.bind(that), 250, ev));
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
var isMenuOpen = function () {
|
||||||
|
let menuopen = ($('#sidebar').attr('data-simplersidebar') == 'opened') ? true : false
|
||||||
|
return menuopen
|
||||||
|
}
|
||||||
|
|
||||||
|
$(window).scroll(function () {
|
||||||
|
if (isMobile && !isMenuOpen() && (isHome || isSingle) ) {
|
||||||
|
$('.dis-logo, .menubutton-icon').addClass('black')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
$(window).scrollStopped(function () {
|
||||||
|
if (isMobile && !isMenuOpen() && (isHome || isSingle)) {
|
||||||
|
$('.dis-logo, .menubutton-icon').removeClass('black')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
/* SCROLL */
|
||||||
|
/* -------------------------------------------------------------------------- */
|
||||||
|
|
||||||
|
/* ------------------------ scroll on home on desktop ----------------------- */
|
||||||
|
|
||||||
var scrolltimer = false;
|
var scrolltimer = false;
|
||||||
$(window).on('wheel DOMMouseScroll', function (e) {
|
$(window).on('wheel DOMMouseScroll', function (e) {
|
||||||
//e.preventDefault();
|
//e.preventDefault();
|
||||||
@@ -597,7 +668,7 @@
|
|||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
if (!isMobile) {
|
if (!isMobile) {
|
||||||
if (isMasonryPage) {
|
if (isMasonryPage || isEsemeny) {
|
||||||
if (!$('.search-bar *').is(':focus')) {
|
if (!$('.search-bar *').is(':focus')) {
|
||||||
// console.log("keydown!")
|
// console.log("keydown!")
|
||||||
kd = true
|
kd = true
|
||||||
@@ -629,7 +700,7 @@
|
|||||||
//check for keyup for disabling counter
|
//check for keyup for disabling counter
|
||||||
$('html *:not(input)').keyup(function (event) {
|
$('html *:not(input)').keyup(function (event) {
|
||||||
if (!isMobile) {
|
if (!isMobile) {
|
||||||
if (isMasonryPage) {
|
if (isMasonryPage || isEsemeny) {
|
||||||
if (!$('.search-bar *').is(':focus')) {
|
if (!$('.search-bar *').is(':focus')) {
|
||||||
kd = false
|
kd = false
|
||||||
}
|
}
|
||||||
@@ -746,18 +817,20 @@
|
|||||||
|
|
||||||
/* ------------------------------ hover on home ----------------------------- */
|
/* ------------------------------ hover on home ----------------------------- */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const metadataHeights = {}
|
const metadataHeights = {}
|
||||||
|
|
||||||
//hover on big articles
|
//hover on big articles
|
||||||
|
|
||||||
$(".home-big h2 a").hover(function () {
|
$('body').on('mouseenter', '.home-big h2 a', function () {
|
||||||
bigArticleHoverShow($(this))
|
bigArticleHoverShow($(this))
|
||||||
|
})
|
||||||
|
$('body').on('mouseleave', '.home-big h2 a', function () {
|
||||||
|
bigArticleHoverHide($(this))
|
||||||
|
})
|
||||||
|
|
||||||
}, function () {
|
function bigArticleHoverHide(cc) {
|
||||||
|
// let cc = $(this)
|
||||||
let cc = $(this)
|
if (!isMobile) {
|
||||||
let cArticle = cc.parents("article")
|
let cArticle = cc.parents("article")
|
||||||
let cMetadata = cArticle.children(".metadata")
|
let cMetadata = cArticle.children(".metadata")
|
||||||
|
|
||||||
@@ -777,11 +850,13 @@
|
|||||||
//hide and show metadata
|
//hide and show metadata
|
||||||
cMetadata.children(".alcimWrapper, .bevezetoWrapper").css({ display: 'none' }).removeClass("transparent")
|
cMetadata.children(".alcimWrapper, .bevezetoWrapper").css({ display: 'none' }).removeClass("transparent")
|
||||||
cMetadata.children(".categories, .postedon").removeClass("transparent").show()
|
cMetadata.children(".categories, .postedon").removeClass("transparent").show()
|
||||||
|
cMetadata.css({ height: '' })
|
||||||
})
|
})
|
||||||
})
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function bigArticleHoverShow(cc) {
|
function bigArticleHoverShow(cc) {
|
||||||
|
if (!isMobile) {
|
||||||
// let cc = $(this)
|
// let cc = $(this)
|
||||||
let cArticle = cc.parents("article")
|
let cArticle = cc.parents("article")
|
||||||
let cMetadata = cArticle.children(".metadata")
|
let cMetadata = cArticle.children(".metadata")
|
||||||
@@ -857,7 +932,9 @@
|
|||||||
ellipsis.set();
|
ellipsis.set();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Uncomment for debugging hover
|
||||||
// if (!isMobile && isHome) {
|
// if (!isMobile && isHome) {
|
||||||
// setTimeout(() => {
|
// setTimeout(() => {
|
||||||
// bigArticleHoverShow($(".home_wrapper-1 .home-big h2 a"))
|
// bigArticleHoverShow($(".home_wrapper-1 .home-big h2 a"))
|
||||||
@@ -865,35 +942,17 @@
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
/* ------------------------- hover on small articles ------------------------ */
|
||||||
|
|
||||||
/**
|
|
||||||
* finds a name of a class, from the first element
|
|
||||||
* @param {Array} classlist the list of classes to search from as an array
|
|
||||||
* @param {String} startString the string to search for
|
|
||||||
* @param {String} sep the separator that separates the startString from the rest of the classname
|
|
||||||
*/
|
|
||||||
function findClassByStart(classlist, startString, sep = "-") {
|
|
||||||
var fullstring
|
|
||||||
for (let i = 0; i < classlist.length; i++) {
|
|
||||||
let curr = classlist[i].split(sep)
|
|
||||||
if (curr[0] == startString) {
|
|
||||||
fullstring = classlist[i]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return fullstring
|
|
||||||
}
|
|
||||||
|
|
||||||
//hover on small articles
|
|
||||||
function showTitle(th) {
|
function showTitle(th) {
|
||||||
if (!$('body').hasClass('no-result')) {
|
if (!$('body').hasClass('no-result') && !isMobile) {
|
||||||
$(th).children("h2").show()
|
$(th).children("h2").show()
|
||||||
$(th).children(".metadata").addClass("vis")
|
$(th).children(".metadata").addClass("vis")
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function hideTitle(th) {
|
function hideTitle(th) {
|
||||||
if (!$('body').hasClass('no-result')) {
|
if (!$('body').hasClass('no-result') && !isMobile) {
|
||||||
$(th).children("h2").hide()
|
$(th).children("h2").hide()
|
||||||
$(th).children(".metadata").removeClass("vis")
|
$(th).children(".metadata").removeClass("vis")
|
||||||
}
|
}
|
||||||
@@ -929,17 +988,6 @@
|
|||||||
}, ".home-small a.thumbnailwrapper")
|
}, ".home-small a.thumbnailwrapper")
|
||||||
|
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
|
||||||
/* EVENTS - ESEMÉNYEK */
|
|
||||||
/* -------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
if (isEsemeny) {
|
|
||||||
if (!isMobile) {
|
|
||||||
$('html').css({ overflowY: "hidden" })
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
/* CIRCULAR TEXT */
|
/* CIRCULAR TEXT */
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
@@ -948,26 +996,6 @@
|
|||||||
const bedoWords = bedoListItems + " a"
|
const bedoWords = bedoListItems + " a"
|
||||||
const bedoLetters = bedoWords + " span"
|
const bedoLetters = bedoWords + " span"
|
||||||
|
|
||||||
|
|
||||||
//move subs to wrapper
|
|
||||||
$(bedoListItems).each(function () {
|
|
||||||
let itemId = $(this).attr("id")
|
|
||||||
let tagClass = $(this).attr("class").split(" ")
|
|
||||||
let itemClass = findClassByStart(tagClass, 'tag')
|
|
||||||
|
|
||||||
// add wrapper div
|
|
||||||
// $(".sub-wrapper").append('<div id="' + itemId + '" class="bedo-sub-wrapper ' + itemClass + '"></div>')
|
|
||||||
|
|
||||||
// add tag title
|
|
||||||
// $(this).children("a").clone().appendTo(".sub-wrapper #" + itemId)
|
|
||||||
|
|
||||||
//add sub text
|
|
||||||
// $(this).children("span").appendTo(".sub-wrapper #" + itemId)
|
|
||||||
|
|
||||||
//add circle
|
|
||||||
// $(".sub-wrapper #" + itemId + " span").append('<div class="circle">')
|
|
||||||
})
|
|
||||||
|
|
||||||
//wrap each letter to spans
|
//wrap each letter to spans
|
||||||
var charnum = 0
|
var charnum = 0
|
||||||
$(bedoWords).each(function () {
|
$(bedoWords).each(function () {
|
||||||
@@ -1017,36 +1045,23 @@
|
|||||||
|
|
||||||
//hide caption on desktop
|
//hide caption on desktop
|
||||||
if (!isMobile) {
|
if (!isMobile) {
|
||||||
// $('.wp-block-gallery img, .wp-block-image img, .vis').hover(function () {
|
|
||||||
// $(this).parent('a').next("figcaption").addClass("vis")
|
|
||||||
// }, function () {
|
|
||||||
// $('.wp-block-gallery .vis, .wp-block-image .vis')
|
|
||||||
// .removeClass("vis")
|
|
||||||
// })
|
|
||||||
|
|
||||||
$('.wp-block-gallery .blocks-gallery-item, .wp-block-image').hover(function () {
|
$('.wp-block-gallery .blocks-gallery-item, .wp-block-image').hover(function () {
|
||||||
$(this).find("figcaption").addClass("vis")
|
$(this).find("figcaption").addClass("vis")
|
||||||
|
|
||||||
}, function () {
|
}, function () {
|
||||||
$('.wp-block-gallery .vis, .wp-block-image .vis').removeClass("vis")
|
$('.wp-block-gallery .vis, .wp-block-image .vis').removeClass("vis")
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* -------------------------------- Lightbox -------------------------------- */
|
/* -------------------------------- Lightbox -------------------------------- */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//group gallery images:
|
//group gallery images:
|
||||||
$('.wp-block-gallery a, .wp-block-image a').addClass('cb-gallery')
|
$('.wp-block-gallery a, .wp-block-image a').addClass('cb-gallery')
|
||||||
|
|
||||||
//copy figcaption to title
|
//copy figcaption to title
|
||||||
$("a.cb-gallery ~ figcaption").each(function () {
|
$("a.cb-gallery ~ figcaption").each(function () {
|
||||||
let captiotext = $(this).html()
|
let captiontext = $(this).html()
|
||||||
$(this).prev('.cb-gallery').attr({ title: captiotext })
|
$(this).prev('.cb-gallery').attr({ title: captiontext })
|
||||||
})
|
})
|
||||||
|
|
||||||
const lightBoxMaxHeight = isMobile ? '65%' : '80%'
|
const lightBoxMaxHeight = isMobile ? '65%' : '80%'
|
||||||
@@ -1077,6 +1092,12 @@
|
|||||||
swipeRight: function () {
|
swipeRight: function () {
|
||||||
$.colorbox.prev()
|
$.colorbox.prev()
|
||||||
},
|
},
|
||||||
|
swipeUp: function () {
|
||||||
|
return false
|
||||||
|
},
|
||||||
|
swipeDown: function () {
|
||||||
|
return false
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
// lightbox for galleries
|
// lightbox for galleries
|
||||||
@@ -1129,11 +1150,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}//if single end
|
}//if single end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
/* window resize event */
|
/* window resize event */
|
||||||
/* -------------------------------------------------------------------------- */
|
/* -------------------------------------------------------------------------- */
|
||||||
@@ -1148,6 +1166,8 @@
|
|||||||
// calc other vars
|
// calc other vars
|
||||||
menuWidth = mwCalc()
|
menuWidth = mwCalc()
|
||||||
|
|
||||||
|
articleWrapCounter = 0
|
||||||
|
|
||||||
//run load script
|
//run load script
|
||||||
loadPage()
|
loadPage()
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,6 @@
|
|||||||
"node-sass": "^4.11.0"
|
"node-sass": "^4.11.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"gulp-clean-css": "^4.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,9 +43,13 @@
|
|||||||
@media #{$smalldesktop} {
|
@media #{$smalldesktop} {
|
||||||
font-size: 5rem;
|
font-size: 5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media #{$bigdesktop} {
|
@media #{$bigdesktop} {
|
||||||
font-size: 6.8rem;
|
font-size: 6.8rem;
|
||||||
}
|
}
|
||||||
|
@media #{$bigdesktop-hidpi} {
|
||||||
|
// font-size: 5.5rem !important;
|
||||||
|
}
|
||||||
@media #{$verybigdesktop} {
|
@media #{$verybigdesktop} {
|
||||||
font-size: 11rem;
|
font-size: 11rem;
|
||||||
}
|
}
|
||||||
@@ -84,6 +88,9 @@
|
|||||||
@media #{$bigdesktop} {
|
@media #{$bigdesktop} {
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
}
|
}
|
||||||
|
@media #{$bigdesktop-hidpi} {
|
||||||
|
// font-size: 1.5rem !important;
|
||||||
|
}
|
||||||
@media #{$verybigdesktop} {
|
@media #{$verybigdesktop} {
|
||||||
font-size: 3rem;
|
font-size: 3rem;
|
||||||
}
|
}
|
||||||
@@ -115,6 +122,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@mixin home-metadata-big {
|
@mixin home-metadata-big {
|
||||||
|
// font-size: 1.4rem;
|
||||||
|
// @media #{$bigmobile} {
|
||||||
|
// font-size: 1.5rem;
|
||||||
|
// }
|
||||||
@media #{$tablet} {
|
@media #{$tablet} {
|
||||||
font-size: 1.2rem;
|
font-size: 1.2rem;
|
||||||
}
|
}
|
||||||
@@ -127,7 +138,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@mixin home-metadata-bevezeto {
|
@mixin home-metadata-bevezeto {
|
||||||
font: 300 1rem "Westeinde Caption";
|
@include home-title-small();
|
||||||
|
font-weight: 300;
|
||||||
|
// font: 300 1rem "Westeinde Caption";
|
||||||
color: #000;
|
color: #000;
|
||||||
@media #{$tablet} {
|
@media #{$tablet} {
|
||||||
font: bold 1rem "Butler";
|
font: bold 1rem "Butler";
|
||||||
@@ -196,9 +209,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@mixin single-h4 {
|
@mixin single-h4 {
|
||||||
font-weight: 500;
|
font-weight: 300;
|
||||||
// font-size: 2.4rem;
|
font-size: 2.4rem;
|
||||||
// line-height: 1.6;
|
line-height: 1.3;
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin captiontext {
|
@mixin captiontext {
|
||||||
@@ -213,6 +226,16 @@
|
|||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@mixin single-quote-big{
|
||||||
|
font: 800 2.1rem "Butler";
|
||||||
|
color: #000;
|
||||||
|
padding-top: 8px;
|
||||||
|
@media #{$tablet} {
|
||||||
|
font-size: 2.8rem;
|
||||||
|
padding-top: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@mixin related-title {
|
@mixin related-title {
|
||||||
font: 500 2rem "Westeinde Caption";
|
font: 500 2rem "Westeinde Caption";
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
@@ -227,16 +250,16 @@
|
|||||||
font-size: 1.8rem;
|
font-size: 1.8rem;
|
||||||
}
|
}
|
||||||
@media #{$tablet} {
|
@media #{$tablet} {
|
||||||
font-size: 2.2rem;
|
font-size: 2rem;
|
||||||
}
|
}
|
||||||
@media #{$smalldesktop} {
|
@media #{$smalldesktop} {
|
||||||
font-size: 3rem;
|
font-size: 2.5rem;
|
||||||
}
|
}
|
||||||
@media #{$bigdesktop} {
|
@media #{$bigdesktop} {
|
||||||
font-size: 3.2rem;
|
font-size: 3rem;
|
||||||
}
|
}
|
||||||
@media #{$verybigdesktop} {
|
@media #{$verybigdesktop} {
|
||||||
font-size: 4.5rem;
|
font-size: 4rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
629
sass/base.scss
629
sass/base.scss
File diff suppressed because it is too large
Load Diff
@@ -2,14 +2,17 @@
|
|||||||
<form class="search" method="get" action="<?php echo home_url(); ?>" role="search">
|
<form class="search" method="get" action="<?php echo home_url(); ?>" role="search">
|
||||||
<input class="search-input" type="search" name="s" placeholder="">
|
<input class="search-input" type="search" name="s" placeholder="">
|
||||||
<button class="search-submit" type="submit" role="button">
|
<button class="search-submit" type="submit" role="button">
|
||||||
<object class="white" data="<?php echo get_template_directory_uri(); ?>/img/kereso_icon-white.svg"
|
<div class="kereso-icon icon">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- <object class="white" data="<?php echo get_template_directory_uri(); ?>/img/kereso_icon-white.svg"
|
||||||
type="image/svg+xml">
|
type="image/svg+xml">
|
||||||
<img src="<?php echo get_template_directory_uri(); ?>/img/kereso_icon-white.png" />
|
<img src="<?php echo get_template_directory_uri(); ?>/img/kereso_icon-white.png" />
|
||||||
</object>
|
</object>
|
||||||
<object class="black" data="<?php echo get_template_directory_uri(); ?>/img/kereso_icon-black.svg"
|
<object class="black" data="<?php echo get_template_directory_uri(); ?>/img/kereso_icon-black.svg"
|
||||||
type="image/svg+xml">
|
type="image/svg+xml">
|
||||||
<img src="<?php echo get_template_directory_uri(); ?>/img/kereso_icon-black.png" />
|
<img src="<?php echo get_template_directory_uri(); ?>/img/kereso_icon-black.png" />
|
||||||
</object>
|
</object> -->
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
<!-- /search -->
|
<!-- /search -->
|
||||||
Reference in New Issue
Block a user