From 7ea5c5d1e8dc95d21fb0f8495cf7e88aed31f08f Mon Sep 17 00:00:00 2001 From: infeeeee Date: Thu, 18 Jul 2019 23:55:33 +0200 Subject: [PATCH] added lot of things --- KÉZIKÖNYV.md | 32 +++++---- _teendők.md | 37 ++--------- css/base.css | 138 +++++++++++++++++++++++++++++++++------ customizer.php | 60 +++++++++++++++++ functions.php | 37 ++++++----- header.php | 2 +- js/scripts.js | 5 ++ languages/HTML5Blank.pot | 120 +++++++++++++++++++++------------- languages/hu_HU.mo | Bin 3638 -> 4551 bytes languages/hu_HU.po | 120 +++++++++++++++++++++------------- sass/_font-mixins.scss | 8 ++- sass/base.scss | 122 ++++++++++++++++++++++++++++------ singular.php | 87 ++++++++++++------------ 13 files changed, 538 insertions(+), 230 deletions(-) create mode 100644 customizer.php diff --git a/KÉZIKÖNYV.md b/KÉZIKÖNYV.md index d4b8b4b..9dfcb40 100644 --- a/KÉZIKÖNYV.md +++ b/KÉZIKÖNYV.md @@ -1,15 +1,5 @@ # Felhasználói kézikönyv -## Telepítés utáni teendők: - -### function.php - -esemény cat-id-t átírni!! (Line 195) - -### wp beállítások - -settings>reading>Blog pages show at most 6 - ## Különböző elemek szerkesztése ### Bejegyzések @@ -78,9 +68,29 @@ dis-esemeny-link A leírást itt kell szerkeszteni: - Bejegyzés>Címkék>Szerkesztés +- Bejegyzés > Címkék > Szerkesztés +## Beállítások + +### Események + +Megjelenés > Testreszabás > Designisso 2019 + +Be kell írni az események category-id-ját. Ez egy darab szám. + +Így lehet megtudni ezt a számot: Bejegyzés > Kategóriák > Esemény > szerkesztés és az url-ben a szám a `tag_ID=` után fog szerepelni. + +### Megjelenő cikkek száma + +Beállítások > Olvasás + +- A megjelenő oldal mutasson legfeljebb: Ez a beállítás csak a 'Mutass többet' gombra való kattintáskor megjelenő cikkek számát jelenti. Ez a beállítás minden listázott oldalt befolyásol! +- Ide mindenképp 6-tal osztható számot kell írni! 6, 12, 18... + +Megjelenés > Testreszabás > Designisso 2019 + +Itt kell beállítani hogy hány cikk jelenjen meg a kezdőlapon illetve az archívumokban ## Developement verzió telepítése diff --git a/_teendők.md b/_teendők.md index e36718c..790bebc 100644 --- a/_teendők.md +++ b/_teendők.md @@ -1,40 +1,21 @@ # Single -lightbox - og: tag: pluginnal! -crop thumbnail a fenti képnél - állókép körbefut a szöveg!!!! -képaláírás asztalin csak hoverre - -címhez scrolloljon - -Hasonló cikkek: - Ugyanabból a kategóriából a 3 legfrisebb - bal felső sarokban nem jó a sarok border!! jobb oldali margó dupla akkora minimum, és nőjön, hogy a szöveg fix széles maradhasson - -szövegtörzs betűméretek: mint a mostani designisso - -Nagy idézet balra zárjon - -Címsor 2 serif betű - -Idézet forrás balra zárt, kicsit behúzva - -Kijelölés színe a tagtől függ: sárga a kékkel, piros a zölddel - -Szerző: üres mint az asztali tervben +margók összébb húzni a tartalmat: 1024px | elválasztó vonalakat is szűkebbre venni lightbox: mobilon ott ahol van most Asztalin menjen ki a képernyő szélére + galéria jobb/bal nyilat a képernyő széléhez igazítani | X-et is Link a kiemelt hátterű szövegben mint a mostani designisson! Lásd annabella cikke, valamelyik kérdés +szövegben kiemelt résznél link opacity + # Esemény oldal @@ -77,13 +58,9 @@ képek magassága és maszk tag archive: Magyarázat betűméret, baloldali magyarázó szöveg legyen nagyobb +reszponzivitás több oldalméreten megnézni +vonalak néhol túlvékonyodik, vastagodik - egyenletlen + # menü # Oldal - -Nem kell dátum fentre - -Oldal: ne legyen első vonal
- -Nincs kiemelt kép, fehér háttér, csak egy vonalként látszik a border, ugyanaz a margó fent mint oldalt - \ No newline at end of file diff --git a/css/base.css b/css/base.css index 4d43243..9f588d0 100644 --- a/css/base.css +++ b/css/base.css @@ -19,7 +19,7 @@ html { font-size: 62.5%; } body { - font: 300 14px/1.4 "Westeinde Caption", "Helvetica Neue", Helvetica, Arial, sans-serif; + font: 300 18px/1.8 "Westeinde Caption", "Helvetica Neue", Helvetica, Arial, sans-serif; color: #000; } /* clear */ @@ -1617,15 +1617,15 @@ body.category.category-esemeny main { padding: 0; } .single article .titlewrapper, .page article .titlewrapper { - position: absolute; + position: relative; top: 0; width: 100%; - height: 100vh; display: flex; flex-direction: column; - justify-content: flex-end; + justify-content: flex-start; align-content: flex-start; - padding: 0; } + padding: 0; + padding-top: 10rem; } .single article .titlewrapper .metadata, .page article .titlewrapper .metadata { width: calc(100vw - 5rem); @@ -1651,16 +1651,26 @@ body.category.category-esemeny main { margin: 0; font: 800 3rem "Butler"; color: #000; - min-height: 25vh; padding: 2rem; background-color: #fff; } @media (min-width: 769px) { .single article .titlewrapper h1.single-title, .page article .titlewrapper h1.single-title { font-size: 5rem; } } + @media (max-width: 768px) { + .single article.has-post-thumbnail .titlewrapper, + .page article.has-post-thumbnail .titlewrapper { + position: absolute; + height: 100vh; + justify-content: flex-end; + padding: 0; } + .single article.has-post-thumbnail .titlewrapper h1.single-title, + .page article.has-post-thumbnail .titlewrapper h1.single-title { + min-height: 25vh; } } @media (min-width: 769px) { .single article, .page article { + min-height: calc(100vh - 10rem); margin-top: 100vh; margin-left: 5rem; background-color: #fff; @@ -1685,7 +1695,8 @@ body.category.category-esemeny main { .page article .titlewrapper { position: relative; justify-content: flex-start; - height: unset; } + height: unset; + padding-top: 0; } .single article .titlewrapper .metadata, .page article .titlewrapper .metadata { top: -5rem; @@ -1744,15 +1755,18 @@ body.category.category-esemeny main { width: 40%; } .single article hr.content-begin, .page article hr.content-begin { - margin-top: calc(25vh + 2rem); } + margin-top: 2rem; } @media (min-width: 769px) { .single article hr.content-begin, .page article hr.content-begin { - margin-top: 0; } } + margin-top: 0 !important; } } .single article hr.content-end, .page article hr.content-end { margin-top: 2rem; margin-bottom: 2rem; } + .single article.has-post-thumbnail hr.content-begin, + .page article.has-post-thumbnail hr.content-begin { + margin-top: calc(25vh + 2rem); } .single article .single-content, .page article .single-content { position: relative; @@ -1763,6 +1777,9 @@ body.category.category-esemeny main { top: -5rem; padding-left: 0; padding-right: 10rem; } } + .single article .single-content h2, + .page article .single-content h2 { + font: 800 3rem "Butler"; } .single article .single-content h3, .page article .single-content h3 { font: 800 2rem "Butler"; @@ -1776,7 +1793,8 @@ body.category.category-esemeny main { .single article .single-content h4, .page article .single-content h4 { font-weight: 500; - font-size: 2rem; } + font-size: 2.4rem; + line-height: 1.6; } .single article .single-content a:hover, .page article .single-content a:hover { text-decoration: underline; } @@ -1798,9 +1816,14 @@ body.category.category-esemeny main { box-shadow: 10px 0 #ff5f5f, -5px 0 #ff5f5f; } .single article .single-content blockquote cite, .page article .single-content blockquote cite { + display: block; position: relative; font-size: 80%; - top: 2rem; } + top: 0.5rem; + left: 2rem; } + .single article .single-content .wp-block-pullquote, + .page article .single-content .wp-block-pullquote { + text-align: unset; } .single article .single-content .wp-block-image, .page article .single-content .wp-block-image { margin: 2rem 0; @@ -1937,6 +1960,20 @@ body.category.category-esemeny main { .page article .single-content .wp-block-gallery .alignright, .page article .single-content .wp-block-image .alignright { text-align: right; } + .single article .single-content .authors, + .page article .single-content .authors { + font-weight: 500; + font-size: 2.4rem; + line-height: 1.6; } + .single article .single-content .authors a, + .page article .single-content .authors a { + font: bold 1rem "Westeinde Caption"; } + @media (min-width: 769px) { + .single article .single-content .authors a, + .page article .single-content .authors a { + font: 900 2rem "Westeinde Caption"; + color: #fff; + -webkit-text-stroke: #000 1px; } } .single #cboxOverlay, .page #cboxOverlay { width: 100%; @@ -2040,7 +2077,14 @@ body.category.category-esemeny main { @media (min-width: 769px) { .single .toHome, .page .toHome { - padding-top: 4rem; } } + position: relative; + padding-top: 4rem; + top: -5rem; + padding-right: 10rem; } + .single .toHome a, + .page .toHome a { + margin-bottom: 4rem; + display: block; } } .single #related_posts, .page #related_posts { /* ------------------------ related posts on desktop ------------------------ */ } @@ -2100,7 +2144,10 @@ body.category.category-esemeny main { @media (min-width: 769px) { .single #related_posts, .page #related_posts { - padding-right: 10rem; } + padding-right: 10rem; + top: -5rem; + position: relative; + padding-top: 2rem; } .single #related_posts > h3, .page #related_posts > h3 { display: block; } @@ -2236,6 +2283,11 @@ body.category.category-esemeny main { .page #related_posts ul li h2 a { width: calc(100% - 10rem); } } +/* -------------------------------- page only------------------------------- */ +@media (min-width: 769px) { + body.page article { + margin-top: 10rem; } } + /* -------------------------------------------------------------------------- */ /* TAG COLORS */ /* -------------------------------------------------------------------------- */ @@ -2280,6 +2332,10 @@ body.category.category-esemeny main { .tag-be.archive.tag article *:not(.vr) { background-color: #fdff00 !important; } +.tag-be ::selection { + color: #000; + background-color: #3c00ff; } + @media (min-width: 769px) { .tag-be.random .thumbnailwrapper > img { -webkit-mask: url(../img/clip/be_desktop.svg); @@ -2330,6 +2386,10 @@ body.category.category-esemeny main { .tag-do.archive.tag article *:not(.vr) { background-color: #3c00ff !important; } +.tag-do ::selection { + color: #000; + background-color: #fdff00; } + @media (min-width: 769px) { .tag-do.random .thumbnailwrapper > img { -webkit-mask: url(../img/clip/do_desktop.svg); @@ -2380,6 +2440,10 @@ body.category.category-esemeny main { .tag-think.archive.tag article *:not(.vr) { background-color: #00ffb8 !important; } +.tag-think ::selection { + color: #000; + background-color: #ff5f5f; } + @media (min-width: 769px) { .tag-think.random .thumbnailwrapper > img { -webkit-mask: url(../img/clip/think_desktop.svg); @@ -2430,6 +2494,10 @@ body.category.category-esemeny main { .tag-love.archive.tag article *:not(.vr) { background-color: #ff5f5f !important; } +.tag-love ::selection { + color: #000; + background-color: #00ffb8; } + @media (min-width: 769px) { .tag-love.random .thumbnailwrapper > img { -webkit-mask: url(../img/clip/love_desktop.svg); @@ -2441,13 +2509,14 @@ body.category.category-esemeny main { @media (min-width: 769px) { .single .tag-be .titlewrapper .metadata { - color: #fff !important; -webkit-text-stroke: #fdff00 1px !important; } } @media (min-width: 769px) { .single .tag-be .titlewrapper .metadata a { color: #fff !important; - -webkit-text-stroke: #fdff00 1px !important; } } + -webkit-text-stroke: #fdff00 1px !important; } + .single .tag-be .titlewrapper .metadata a:hover { + color: #fdff00 !important; } } .single .tag-be .single-content blockquote p, .single .tag-be .single-content h3 { @@ -2459,15 +2528,22 @@ body.category.category-esemeny main { .single .tag-be .single-content a { color: #fdff00; } +.single .tag-be .single-content .authors a { + -webkit-text-stroke: #fdff00 1px !important; } + .single .tag-be .single-content .authors a:hover { + color: #fdff00 !important; + text-decoration: none; } + @media (min-width: 769px) { .single .tag-do .titlewrapper .metadata { - color: #fff !important; -webkit-text-stroke: #3c00ff 1px !important; } } @media (min-width: 769px) { .single .tag-do .titlewrapper .metadata a { color: #fff !important; - -webkit-text-stroke: #3c00ff 1px !important; } } + -webkit-text-stroke: #3c00ff 1px !important; } + .single .tag-do .titlewrapper .metadata a:hover { + color: #3c00ff !important; } } .single .tag-do .single-content blockquote p, .single .tag-do .single-content h3 { @@ -2479,15 +2555,22 @@ body.category.category-esemeny main { .single .tag-do .single-content a { color: #3c00ff; } +.single .tag-do .single-content .authors a { + -webkit-text-stroke: #3c00ff 1px !important; } + .single .tag-do .single-content .authors a:hover { + color: #3c00ff !important; + text-decoration: none; } + @media (min-width: 769px) { .single .tag-think .titlewrapper .metadata { - color: #fff !important; -webkit-text-stroke: #00ffb8 1px !important; } } @media (min-width: 769px) { .single .tag-think .titlewrapper .metadata a { color: #fff !important; - -webkit-text-stroke: #00ffb8 1px !important; } } + -webkit-text-stroke: #00ffb8 1px !important; } + .single .tag-think .titlewrapper .metadata a:hover { + color: #00ffb8 !important; } } .single .tag-think .single-content blockquote p, .single .tag-think .single-content h3 { @@ -2499,15 +2582,22 @@ body.category.category-esemeny main { .single .tag-think .single-content a { color: #00ffb8; } +.single .tag-think .single-content .authors a { + -webkit-text-stroke: #00ffb8 1px !important; } + .single .tag-think .single-content .authors a:hover { + color: #00ffb8 !important; + text-decoration: none; } + @media (min-width: 769px) { .single .tag-love .titlewrapper .metadata { - color: #fff !important; -webkit-text-stroke: #ff5f5f 1px !important; } } @media (min-width: 769px) { .single .tag-love .titlewrapper .metadata a { color: #fff !important; - -webkit-text-stroke: #ff5f5f 1px !important; } } + -webkit-text-stroke: #ff5f5f 1px !important; } + .single .tag-love .titlewrapper .metadata a:hover { + color: #ff5f5f !important; } } .single .tag-love .single-content blockquote p, .single .tag-love .single-content h3 { @@ -2519,6 +2609,12 @@ body.category.category-esemeny main { .single .tag-love .single-content a { color: #ff5f5f; } +.single .tag-love .single-content .authors a { + -webkit-text-stroke: #ff5f5f 1px !important; } + .single .tag-love .single-content .authors a:hover { + color: #ff5f5f !important; + text-decoration: none; } + body.hover-tag-be, .header-1.hover-tag-be, .header-2.hover-tag-be { diff --git a/customizer.php b/customizer.php new file mode 100644 index 0000000..9e63bb9 --- /dev/null +++ b/customizer.php @@ -0,0 +1,60 @@ + +add_section('dis-2019', array( + 'title' => 'Designisso 2019', + )); + + $wp_customize->add_setting('dis-2019-event-cat-id'); + + $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'dis-2019-event-cat-id', + array( + 'label' => __('Event category id', 'dis2019'), + 'section' => 'dis-2019', + 'description' => __('This category will be hidden from the start page.', 'dis2019'), + 'settings' => 'dis-2019-event-cat-id', + 'type' => 'number', + ))); + + $wp_customize->add_setting('dis-2019-event-cat-slug'); + + $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'dis-2019-event-cat-slug', + array( + 'label' => __('Event category slug', 'dis2019'), + 'section' => 'dis-2019', + 'description' => __('This category will be hidden from the start page. Write category slug here', 'dis2019'), + 'settings' => 'dis-2019-event-cat-slug', + ))); + + $wp_customize->add_setting('dis-2019-posts-on-home'); + + $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'dis-2019-posts-on-home', + array( + 'label' => __('Number of posts on homepage', 'dis2019'), + 'section' => 'dis-2019', + 'description' => __('Use 6*n+2 numbers, e.g. 8, 14, 20, 26...', 'dis2019'), + 'settings' => 'dis-2019-posts-on-home', + 'type' => 'number', + ))); + + $wp_customize->add_setting('dis-2019-posts-on-tag'); + + $wp_customize->add_control(new WP_Customize_Control($wp_customize, 'dis-2019-posts-on-tag', + array( + 'label' => __('Number of posts on tag archives', 'dis2019'), + 'section' => 'dis-2019', + 'description' => __('Be, do, think, love pages. Use 6*n-2 numbers, e.g. 4, 10, 16, 22... ', 'dis2019'), + 'settings' => 'dis-2019-posts-on-tag', + 'type' => 'number', + ))); + + //__('Choose from most used writer', 'dis2019') + // get_theme_mod( 'dis-2019-posts-on-home' ); +} +add_action('customize_register', 'dis2019_customizer_settings'); + +?> \ No newline at end of file diff --git a/functions.php b/functions.php index 8be276c..9787eed 100644 --- a/functions.php +++ b/functions.php @@ -16,11 +16,17 @@ External Modules/Files //ChromePhp::log('Hello console!'); // Debug $data will display in console -function console_debug( $data ) { +function console_debug($data) +{ $data = json_encode($data); echo ""; } +/** + * Customizer additions. + */ +include get_template_directory() . '/customizer.php'; + /*------------------------------------*\ Theme Support \*------------------------------------*/ @@ -144,16 +150,16 @@ function dis2019_header_scripts() wp_register_script('modernizr', get_template_directory_uri() . '/js/lib/modernizr-custom.js', array(), '2.7.1'); // Modernizr wp_enqueue_script('modernizr'); // Enqueue it! - wp_register_script('simpler-sidebar', get_template_directory_uri() . '/js/lib/jquery.simpler-sidebar.min.js', array('jquery'), '2.2.5'); // + wp_register_script('simpler-sidebar', get_template_directory_uri() . '/js/lib/jquery.simpler-sidebar.min.js', array('jquery'), '2.2.5'); // wp_enqueue_script('simpler-sidebar'); // Enqueue it! - // wp_register_script('snap-scroll', get_template_directory_uri() . '/js/lib/snap-scroll.min.js', array('jquery'), '1.0.0'); // + // wp_register_script('snap-scroll', get_template_directory_uri() . '/js/lib/snap-scroll.min.js', array('jquery'), '1.0.0'); // // wp_enqueue_script('snap-scroll'); // Enqueue it! - wp_register_script('jquery.colorbox', get_template_directory_uri() . '/js/lib/jquery.colorbox-min.js', array('jquery'), '1.0.0'); // + wp_register_script('jquery.colorbox', get_template_directory_uri() . '/js/lib/jquery.colorbox-min.js', array('jquery'), '1.0.0'); // wp_enqueue_script('jquery.colorbox'); // Enqueue it! - wp_register_script('lettering', get_template_directory_uri() . '/js/lib/jquery.lettering.js', array('jquery'), '1.0.0'); // + wp_register_script('lettering', get_template_directory_uri() . '/js/lib/jquery.lettering.js', array('jquery'), '1.0.0'); // wp_enqueue_script('lettering'); // Enqueue it! wp_register_script('dis2019scripts', get_template_directory_uri() . '/js/scripts.js', array( @@ -196,12 +202,11 @@ function dis2019_styles() } //remove events from home page -// !!!add event cat id to here!!!! -//search keywords: event esemeny esemény category function exclude_category_home($query) { if ($query->is_home) { - $query->set('cat', '-5'); + $minus_catid = '-' . get_theme_mod('dis-2019-event-cat-id'); + $query->set('cat', $minus_catid); } return $query; @@ -209,17 +214,13 @@ function exclude_category_home($query) add_filter('pre_get_posts', 'exclude_category_home'); - - // order events by date on events page -// !!!add event cat id to here!!!! -//search keywords: event esemeny esemény category add_action('pre_get_posts', 'dis_2019_order_events_by_date', 1); function dis_2019_order_events_by_date(&$query) { //Before anything else, make sure this is the right query... - if (!$query->get('category_name') == 'esemeny') { + if (!$query->get('category_name') == get_theme_mod('dis-2019-event-cat-slug')) { return; } @@ -522,15 +523,16 @@ function dis_2019_more_posts_on_home(&$query) if (!$query->is_home() && !$query->is_archive()) { return; } - + if ($query->is_home()) { - $pposts = 14; + $pposts = get_theme_mod( 'dis-2019-posts-on-home' ); } elseif ($query->is_tag()) { - $pposts = 10; + $pposts = get_theme_mod( 'dis-2019-posts-on-tag' );; } elseif (!$query->in_the_loop()) { return; } else { - $pposts = 6; + $pposts = get_option( 'posts_per_page' ); + // $pposts = 6; } //set post_per_page if it's homepage @@ -734,7 +736,6 @@ function dis2019_register_taxonomy_writer() 'not_found' => __('No writer found', 'dis2019'), 'back_to_items' => __('Back to writers', 'dis2019'), - ]; $args = [ 'hierarchical' => false, // make it hierarchical (like categories) diff --git a/header.php b/header.php index 02c08d7..4be279d 100644 --- a/header.php +++ b/header.php @@ -101,7 +101,7 @@