Commit 91e647db authored by Simon's avatar Simon

in progress

parent 761e47a5
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
:root { :root {
/*--layout-width: 976px;*/ /*--layout-width: 976px;*/
--layout-width: 73.125em; /* 1170px */ --layout-width: 1210px; /* 1170px */
} }
/* critical:end */ /* critical:end */
/* ------------- Elements: anchor ------------- */ /* ------------- Elements: anchor ------------- */
/* critical:start */ /* critical:start */
a { color: var(--color--gray); } a { color: inherit; }
/* critical:end */ /* critical:end */
a { a {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
body { body {
font-size: var(--typo--font-size); font-size: var(--typo--font-size);
line-height: var(--typo--line-height); line-height: var(--typo--line-height);
color: var(--color--gray); color: var(--color--gray-darker);
@media (--max--small) { @media (--max--small) {
font-family: var(--typo--font-family); font-family: var(--typo--font-family);
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
/* critical:start */ /* critical:start */
.l-inner { max-width: var(--layout-width); margin-right: auto; margin-left: auto; padding-right: 1em; padding-left: 1em; } .l-inner { max-width: var(--layout-width); margin-right: auto; margin-left: auto; padding-right: 20px; padding-left: 20px; }
/* critical:end */ /* critical:end */
.l-inner--header { display: flex; flex-direction: row; } .l-inner--header { display: flex; flex-direction: row; align-items: center; }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
.l-nav { .l-nav {
@media (--min--small) { @media (--min--small) {
flex: 1 1 100%; flex: 1 1 auto;
} }
} }
......
...@@ -6,4 +6,5 @@ no cosmetic design patterns. Class only styles from here onwards. Classes here a ...@@ -6,4 +6,5 @@ no cosmetic design patterns. Class only styles from here onwards. Classes here a
o-: Signify that something is an Object, and that it may be used in any number of unrelated contexts to the one you can currently see it in. Making modifications to these types of class could potentially have knock-on effects in a lot of other unrelated places. Tread carefully. o-: Signify that something is an Object, and that it may be used in any number of unrelated contexts to the one you can currently see it in. Making modifications to these types of class could potentially have knock-on effects in a lot of other unrelated places. Tread carefully.
========================================================================== */ ========================================================================== */
@import '_object--btn.css';
@import '_object--nav.css'; @import '_object--nav.css';
/* ------------- Object: button ------------- */
/* critical:start */
.o-btn { border: 0; color: #fff; background: var(--color--green); padding: 12px 24px; cursor: pointer; border-radius: 3px;
&:hover { background: var(--color--green-darker); }
}
.c-btn--header { margin-right: 28px; }
/*.o-nav--item { display: block; }*/
/*.o-nav--link { display: block; }*/
/* critical:end */
/*.o-nav { user-select: none; }*/
...@@ -18,6 +18,7 @@ c-: Signify that something is a Component. This is a concrete, implementation-sp ...@@ -18,6 +18,7 @@ c-: Signify that something is a Component. This is a concrete, implementation-sp
@import '_component--jobs-pagination.css'; @import '_component--jobs-pagination.css';
@import '_component--logo.css'; @import '_component--logo.css';
@import '_component--nav.css'; @import '_component--nav.css';
@import '_component--phone.css';
@import '_component--search.css'; @import '_component--search.css';
@import '_component--share.css'; @import '_component--share.css';
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
/* critical:start */ /* critical:start */
.c-logo { display: block; width: 81px; margin-right: 89px; padding: 11px 0; text-decoration: none; }
.c-logo--svg { display: block; } .c-logo--svg { display: block; }
/* critical:end */ /* critical:end */
.c-logo { text-decoration: none; }
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
.c-nav { } .c-nav { }
.c-nav--main { display: flex; z-index: 300; padding-left: 224px; .c-nav--main { display: flex;
/* @media (--max--small) { /* @media (--max--small) {
margin: 20px 0; margin: 20px 0;
} }
...@@ -16,12 +16,16 @@ ...@@ -16,12 +16,16 @@
.c-nav--sub { display: none; } .c-nav--sub { display: none; }
/* critical:end */ /* critical:end */
.c-nav--main-item { position: relative; height: 70px; margin-right: 26px; padding: 24px 0 0; } .c-nav--main-item { position: relative; height: 70px; margin-right: 26px; padding: 24px 0 0; z-index: 500; }
.c-nav--main-anchor { display: block; padding: 5px 0; text-transform: uppercase; border-bottom: 2px solid transparent; text-decoration: none; } .c-nav--main-anchor { display: block; padding: 5px 0; text-transform: uppercase; border-bottom: 2px solid transparent; text-decoration: none; color: var(--color--gray);
&:hover { border-bottom-color: var(--color--gray-dark); color: var(--color--gray-dark); }
}
.c-nav--sub { position: absolute; top: 100%; padding: 0 1em 0 6px; overflow: hidden; } .c-nav--sub { position: absolute; top: 100%; }
.c-nav--sub-item { height: 46px; line-height: 46; } .c-nav--sub-item { margin-right: 45px; }
.c-nav--sub-anchor { color: #fff; text-transform: uppercase; white-space: nowrap; } .c-nav--sub-anchor { display: block; padding: 17px 0; color: #fff; text-transform: uppercase; white-space: nowrap; text-decoration: none;
&:hover { color: var(--color--green); }
}
/*.c-nav--item { margin: 10px; }*/ /*.c-nav--item { margin: 10px; }*/
...@@ -31,6 +35,6 @@ ...@@ -31,6 +35,6 @@
.c-nav--region { } .c-nav--region { }
.c-nav--lang { display: flex; .c-nav--lang {
li { padding: 0 5px; } li { }
} }
/* ------------- Component: phone ------------- */
/* critical:start */
.c-phone { white-space: nowrap; margin-right: 35px; padding: 10px 0; text-decoration: none; color: inherit;
svg { float: left; margin: -6px 5px 0 0; }
}
/* critical:end */
...@@ -19,4 +19,4 @@ ...@@ -19,4 +19,4 @@
} }
.is-nav--main-anchor-active { border-bottom-color: var(--color--gray-dark); color: var(--color--gray-dark); } .is-nav--main-anchor-active { border-bottom-color: var(--color--gray-dark); color: var(--color--gray-dark); }
.is-nav--sub-anchor-active { text-decoration: none; } .is-nav--sub-anchor-active { color: var(--color--green-darker); }
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -49,13 +49,6 @@ define('cityID', $cityID); ...@@ -49,13 +49,6 @@ define('cityID', $cityID);
<?php <?php
global $post; global $post;
global $section;
$section = get_post_meta( $post->ID, 'section', true );
// int $post_id, string $key = '', bool $single = false
// echo '<h1>Lorem meta: ' . get_post_meta( $post->ID, 'section', true ) . '</h1>';
// debug( get_post_meta( $post->ID) ) ;
?> ?>
<body> <body>
...@@ -71,17 +64,25 @@ $section = get_post_meta( $post->ID, 'section', true ); ...@@ -71,17 +64,25 @@ $section = get_post_meta( $post->ID, 'section', true );
<div class="l-inner l-inner--header"> <div class="l-inner l-inner--header">
<a href="<?php echo pll_home_url(); ?>" class="c-logo" title="<?php echo get_the_title( get_option('page_on_front') ); ?>"> <a href="<?php echo pll_home_url(); ?>" class="c-logo" title="<?php echo get_the_title( get_option('page_on_front') ); ?>">
<svg width="133px" height="78px" class="c-logo--svg"> <svg width="81px" height="47px" class="c-logo--svg">
<use xlink:href="#biuro-logo"></use> <use xlink:href="#biuro-logo"></use>
</svg> </svg>
</a> </a>
<nav class="l-nav"> <nav class="l-nav">
<?php <?php
get_template_part( 'template-parts/menus/menu', 'main' ); get_template_part( 'template-parts/menus/menu', 'main' );
?> ?>
</nav> </nav>
<a href="tel:+37064902392" class="c-phone">
<svg xmlns="http://www.w3.org/2000/svg" width="21px" height="22px" viewBox="0 0 21 22">
<path d="M20.0073662,1.61350199 C20.5897947,1.74475969 20.9999499,2.26157937 20.9999499,2.86039004 C20.9999499,13.2496151 12.5794702,21.6249937 2.23534623,21.6249937 C1.63653556,21.6249937 1.11971588,21.2148385 0.984372653,20.6283244 L0.0328044109,16.4980528 C-0.106624349,15.8951166 0.205077636,15.2798837 0.775209486,15.0337905 L5.2212686,13.1265685 C5.74217381,12.9009831 6.35740672,13.0527486 6.71833535,13.4916227 L8.52714413,15.7023356 C11.3695122,14.3078077 13.6786783,11.994556 15.0732063,9.15627347 L12.8624533,7.34750474 C12.4236192,6.98653606 12.2718538,6.37130315 12.4974392,5.850438 L14.4046612,1.4002533 C14.6507543,0.830121445 15.2700728,0.51841946 15.873009,0.65784822 L20.0073662,1.61350199 Z M2.25993953,20.3124969 C11.8780807,20.3002002 19.6751564,12.5072501 19.6833675,2.88910892 L15.598197,1.9457518 L13.7114827,6.35079539 L16.6974051,8.79121926 C14.7122776,13.0240297 12.4112825,15.3331958 8.16208992,17.3265745 L5.72166605,14.3406521 L1.3165824,16.2273664 L2.25993953,20.3124969 Z"></path>
</svg> +370 649 02392
</a>
<button class="o-btn c-btn--header"><?php _e('Get a job offer', 'biuro_theme'); ?></button> <!-- Gauk darbo pasiūlymą -->
<?php <?php
get_template_part( 'template-parts/menus/menu', 'language' ); get_template_part( 'template-parts/menus/menu', 'language' );
?> ?>
...@@ -96,18 +97,6 @@ $section = get_post_meta( $post->ID, 'section', true ); ...@@ -96,18 +97,6 @@ $section = get_post_meta( $post->ID, 'section', true );
?> ?>
</div> </div>
<div class="l-inner">
<?php
/*
delog( get_search_query(), 'Search Query');
delog( get_post_type(), 'Post type');
delog( get_page_template_slug(), 'slug');
delog( is_front_page(), 'is_front_page');
delog( is_search(), 'is_search');
*/
?>
</div>
<div id="main" class="l-content"> <div id="main" class="l-content">
<?php <?php
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
/******/ /******/
/******/ var hotApplyOnUpdate = true; /******/ var hotApplyOnUpdate = true;
/******/ // eslint-disable-next-line no-unused-vars /******/ // eslint-disable-next-line no-unused-vars
/******/ var hotCurrentHash = "4a39df4fc069760248ad"; /******/ var hotCurrentHash = "a252b4caac14ab9ae6ef";
/******/ var hotRequestTimeout = 10000; /******/ var hotRequestTimeout = 10000;
/******/ var hotCurrentModuleData = {}; /******/ var hotCurrentModuleData = {};
/******/ var hotCurrentChildModule; /******/ var hotCurrentChildModule;
......
<?php <?php
global $section; $menu_name = 'main-menu';
$locations = get_nav_menu_locations();
$menu_name = 'main-menu'; $menu = $locations ? wp_get_nav_menu_object( $locations[ $menu_name ] ) : null;
$locations = get_nav_menu_locations(); $menu_items = $menu ? wp_get_nav_menu_items( $menu->term_id, array( 'order' => 'DESC' ) ) : array();
$menu = $locations ? wp_get_nav_menu_object( $locations[ $menu_name ] ) : null; $items = array();
$menu_items = $menu ? wp_get_nav_menu_items( $menu->term_id, array( 'order' => 'DESC' ) ) : array(); $ID = get_the_ID();
$items = array(); $no = 0;
$ID = get_the_ID(); $main = '';
$no = 0;
$main = ''; function isSubActive($childID, $ID) {
if (!$ID):
function isSubActive($childID, $ID) { return false;
if (!$ID) { endif;
return false;
} if ($childID == $ID):
return true;
if ($childID == $ID) { endif;
return true;
} return ( get_post_meta( $childID, 'divisions-page', true )&& pods( 'division' )->find( array( 'limit' => 1, 'where'=>"page-id.ID = " . $ID ) )->total() ) ? true : false;
}
return ( get_post_meta( $childID, 'divisions-page', true )&& pods( 'division' )->find( array( 'limit' => 1, 'where'=>"page-id.ID = " . $ID ) )->total() ) ? true : false;
} foreach( $menu_items as $menu_item ):
if ($menu_item->menu_item_parent == 0):
foreach( $menu_items as $menu_item ) { $no++;
if ($menu_item->menu_item_parent == 0) { $items[$menu_item->ID]['props'] = $menu_item;
$items[$menu_item->ID]['no'] = $no;
$no++; $items[$menu_item->ID]['active'] = ($menu_item->object_id == $ID) ? true : false;
$items[$menu_item->ID]['props'] = $menu_item; else:
$items[$menu_item->ID]['no'] = $no; $items[$menu_item->menu_item_parent]['children'][] = $menu_item;
$items[$menu_item->ID]['active'] = ($menu_item->object_id == $ID) ? true : false;
} else { if ($menu_item->object_id == $ID):
$items[$menu_item->menu_item_parent]['children'][] = $menu_item; $items[$menu_item->menu_item_parent]['active'] = true;
endif;
if ($menu_item->object_id == $ID) { endif;
$items[$menu_item->menu_item_parent]['active'] = true; endforeach;
}
}
}
$main .= '<ul class="o-nav c-nav--main">'; $main .= '<ul class="o-nav c-nav--main">';
foreach($items as $item) { foreach($items as $item) :
$children = array_key_exists('children', $item); $children = array_key_exists('children', $item);
$url = ($children) ? $item['children'][0]->url : $item['props']->url; $url = ($children) ? $item['children'][0]->url : $item['props']->url;
$sectionCSS = ($section == get_post_meta( $item['props']->object_id, 'section', true )) ? 'is-nav--main-item-active' : ''; $sectionCSS = ( get_post_meta( $post->ID, 'section', true) == get_post_meta( $item['props']->object_id, 'section', true )) ? 'is-nav--main-item-active' : '';
$main .= '<li class="c-nav--main-item ' . $sectionCSS . '">'; $main .= '<li class="c-nav--main-item ' . $sectionCSS . '">';
$classCSS = ($item['active']) ? 'is-nav--main-anchor-active"' : ''; $classCSS = ($item['active']) ? 'is-nav--main-anchor-active"' : '';
$main .= '<a href="' . $url . '" title="' . get_the_title($item['props']->object_id) . '" class="c-nav--main-anchor ' . $classCSS . '">' . $item['props']->title . '</a>'; $main .= '<a href="' . $url . '" title="' . get_the_title($item['props']->object_id) . '" class="c-nav--main-anchor ' . $classCSS . '">' . $item['props']->title . '</a>';
if ( $children ) : if ( $children ) :
$main .= '<ul class="o-nav c-nav--sub">'; $main .= '<ul class="o-nav c-nav--sub">';
foreach($item['children'] as $child) : foreach($item['children'] as $child) :
$classCSS = isSubActive($child->object_id, $ID ) ? 'is-nav--sub-anchor-active' : '';
$main .= '<li class="c-nav--sub-item"><a href="' . $child->url . '" title="' . get_the_title($child->object_id) . '" class="c-nav--sub-anchor ' . $classCSS .'">' . $child->title . '</a></li>';
endforeach;
// $classCSS = ($child->object_id == $ID ) ? 'is-nav--sub-anchor-active' : ''; $main .= '</ul>';
$classCSS = isSubActive($child->object_id, $ID ) ? 'is-nav--sub-anchor-active' : ''; endif;
$main .= '<li class="c-nav--sub-item"><a href="' . $child->url . '" title="' . get_the_title($child->object_id) . '" class="c-nav--sub-anchor ' . $classCSS .'">' . $child->title . '</a></li>';
endforeach;
$main .= '</ul>'; $main .= '</li>';
endif; endforeach;
$main .= '</li>'; $main .= '</ul>';
}
$main .= '</ul>';
echo $main; echo $main;
?> ?>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment