Commit 5f2cfefd authored by Simonas's avatar Simonas

recommend components in progress

parent 158469f1
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
/* critical:start */ /* critical:start */
.o-btn { display: inline-block; border: 0; padding: 12px 24px 11px; cursor: pointer; border-radius: 3px; font-weight: 500; text-decoration: none; font-family: inherit; } .o-btn { display: inline-block; border: 0; padding: 11px 24px 10px; cursor: pointer; border-radius: 3px; font-weight: 500; line-height: 15px; text-decoration: none; font-family: inherit; }
/* critical:end */ /* critical:end */
...@@ -37,6 +37,7 @@ c-: Signify that something is a Component. This is a concrete, implementation-sp ...@@ -37,6 +37,7 @@ c-: Signify that something is a Component. This is a concrete, implementation-sp
@import '_component--nav.css'; @import '_component--nav.css';
@import '_component--phone.css'; @import '_component--phone.css';
@import '_component--recommend-friend.css'; @import '_component--recommend-friend.css';
@import '_component--recommend.css';
@import '_component--search.css'; @import '_component--search.css';
@import '_component--sections.css'; @import '_component--sections.css';
@import '_component--services.css'; @import '_component--services.css';
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
.c-btn--footer { display: block; text-align: center; } .c-btn--footer { display: block; text-align: center; }
.c-btn--main { color: #fff; background: var(--color--green); .c-btn--main { color: #fff; background: var(--color--green); border: 2px solid var(--color--green);
&:hover { background: var(--color--green-darker); } &:hover { background: var(--color--green-darker); border-color: var(--color--green-darker); }
} }
.c-btn--disabled { background: #6f7479; outline: none; pointer-events: none; user-select: none; .c-btn--disabled { background: #6f7479; outline: none; pointer-events: none; user-select: none;
...@@ -28,6 +28,11 @@ ...@@ -28,6 +28,11 @@
} }
.c-btn--fill { width: 100%; } .c-btn--fill { width: 100%; }
.c-btn--fit { flex: 1 1 20%;
+ .c-btn--fit { margin-left: 20px; }
}
.c-btn--max-fill { width: 100%; max-width: 320px; } .c-btn--max-fill { width: 100%; max-width: 320px; }
.c-btn--search { min-width: 180px; border-radius: 0 3px 3px 0; text-align: center; .c-btn--search { min-width: 180px; border-radius: 0 3px 3px 0; text-align: center;
...@@ -38,7 +43,7 @@ ...@@ -38,7 +43,7 @@
.c-btn--search-small { margin: 9px; min-width: 133px; text-align: center; } .c-btn--search-small { margin: 9px; min-width: 133px; text-align: center; }
.c-btn--slim { color: #14A28A; background: none; font-weight: 500; text-align: center; border: 2px solid #1FB299; border-radius: 3px; .c-btn--slim { color: #14A28A; background: none; text-align: center; border: 2px solid #1FB299;
&:hover { border-color: var(--color--green-darker); background-color: var(--color--green-darker); color: #fff; } &:hover { border-color: var(--color--green-darker); background-color: var(--color--green-darker); color: #fff; }
} }
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
} }
} }
.c-job--action { padding: 30px 0; .c-job--action { padding: 30px 0; display: flex;
@media (--max--medium) { @media (--max--medium) {
display: none; display: none;
} }
......
/* ------------- Component: recommend friend ------------- */
/* critical:start */
.c-recommend { display: block; background: var(--color--green); min-height: 140px; margin: 0 0 40px; padding: 20px; border-radius: 6px; text-decoration: none; }
.c-recommend--headline { display: block; }
/* critical:end */
.c-recommend--headline { color: #fff; max-width: 180px; margin-bottom: 20px; font-size: 24px; line-height: 28px; }
.c-recommend--anchor { color: #fff; border-bottom: 1px solid #fff; }
.c-recommend {
strong { display: inline-block; padding: 3px 5px; border-radius: 4px; background: #004ed4; }
&:hover {
.c-recommend--anchor { border-bottom-color: transparent; }
}
}
...@@ -37,6 +37,6 @@ ...@@ -37,6 +37,6 @@
.c-share { .c-share {
@media (--min--medium) { @media (--min--medium) {
margin-bottom: 90px; margin-bottom: 40px;
} }
} }
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
<?php <?php
endif; endif;
?> ?>
<script src="/wp-content/themes/biuro/js/main-bda32991.min.js" async></script> <script src="/wp-content/themes/biuro/js/main.min.js" async></script>
<?php <?php
// global $time_start; // global $time_start;
......
...@@ -810,6 +810,26 @@ wp_reset_query(); ...@@ -810,6 +810,26 @@ wp_reset_query();
define('positionsPage', $positionsPage); define('positionsPage', $positionsPage);
$recommendPage = '';
$recommendQuery = new WP_Query( array(
'numberposts' => 1,
'post_type' => 'page',
'meta_key' => 'page',
'meta_value' => 'recommend-friend'
) );
if ( $recommendQuery->have_posts() ) :
while( $recommendQuery->have_posts() ) :
$recommendQuery->the_post();
$recommendPage = get_the_permalink();
endwhile;
endif;
wp_reset_query();
define('recommendPage', $recommendPage);
function getOptions($taxonomy, $location = '', $str = '', $langID = '') { function getOptions($taxonomy, $location = '', $str = '', $langID = '') {
global $query_string; global $query_string;
......
...@@ -31,18 +31,18 @@ ...@@ -31,18 +31,18 @@
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-500.woff2" crossorigin="anonymous" > <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-500.woff2" crossorigin="anonymous" >
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-regular.woff2" crossorigin="anonymous" > <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-regular.woff2" crossorigin="anonymous" >
<style><?php include 'css/core-afb860776e.min.css'; ?></style> <style><?php include 'css/core.min.css'; ?></style>
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-300.woff2" crossorigin="anonymous" > <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-300.woff2" crossorigin="anonymous" >
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-700.woff2" crossorigin="anonymous" > <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-700.woff2" crossorigin="anonymous" >
<link rel="preload" href="/wp-content/themes/biuro/css/main-84fd3913fa.min.css" as="style" onload="this.rel='stylesheet'"> <link rel="preload" href="/wp-content/themes/biuro/css/main.min.css" as="style" onload="this.rel='stylesheet'">
<link rel="preconnect" href="https://www.gstatic.com"> <link rel="preconnect" href="https://www.gstatic.com">
<link rel="preconnect" href="https://fonts.gstatic.com"> <link rel="preconnect" href="https://fonts.gstatic.com">
<noscript> <noscript>
<link rel="stylesheet" href="/wp-content/themes/biuro/css/main-84fd3913fa.min.css"> <link rel="stylesheet" href="/wp-content/themes/biuro/css/main.min.css">
</noscript> </noscript>
<?php wp_head(); ?> <?php wp_head(); ?>
......
...@@ -31,18 +31,18 @@ ...@@ -31,18 +31,18 @@
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-500.woff2" crossorigin="anonymous" > <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-500.woff2" crossorigin="anonymous" >
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-regular.woff2" crossorigin="anonymous" > <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-regular.woff2" crossorigin="anonymous" >
<style><?php include 'css/core-afb860776e.min.css'; ?></style> <style><?php include 'css/core.min.css'; ?></style>
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-300.woff2" crossorigin="anonymous" > <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-300.woff2" crossorigin="anonymous" >
<link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-700.woff2" crossorigin="anonymous" > <link rel="preload" as="font" type="font/woff2" href="/wp-content/themes/biuro/fonts/roboto-v19-cyrillic_latin_cyrillic-ext_latin-ext-700.woff2" crossorigin="anonymous" >
<link rel="preload" href="/wp-content/themes/biuro/css/main-84fd3913fa.min.css" as="style" onload="this.rel='stylesheet'"> <link rel="preload" href="/wp-content/themes/biuro/css/main.min.css" as="style" onload="this.rel='stylesheet'">
<link rel="preconnect" href="https://www.gstatic.com"> <link rel="preconnect" href="https://www.gstatic.com">
<link rel="preconnect" href="https://fonts.gstatic.com"> <link rel="preconnect" href="https://fonts.gstatic.com">
<noscript> <noscript>
<link rel="stylesheet" href="/wp-content/themes/biuro/css/main-84fd3913fa.min.css"> <link rel="stylesheet" href="/wp-content/themes/biuro/css/main.min.css">
</noscript> </noscript>
<?php wp_head(); ?> <?php wp_head(); ?>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -91,12 +91,6 @@ get_header(); ...@@ -91,12 +91,6 @@ get_header();
return $res; return $res;
} }
// delog('type');
// $fields = get_post_meta($ID, '_yoast_wpseo_primary_type');
// debug($fields);
?> ?>
<ul class="c-categories"> <ul class="c-categories">
...@@ -182,41 +176,49 @@ get_header(); ...@@ -182,41 +176,49 @@ get_header();
endwhile; endwhile;
$pod = pods( 'job', get_the_id() ); $pod = pods( 'job', get_the_id() );
if (!is_array($pod->field( 'salary_from' )) && $pod->field( 'salary_from' ) > 0 || !is_array($pod->field( 'salary_to' )) && $pod->field( 'salary_to' ) > 0):
?> ?>
<p> <div class="c-job--content">
<?php <?php
if (!is_array($pod->field( 'salary_from' )) && $pod->field( 'salary_from' ) > 0 || !is_array($pod->field( 'salary_to' )) && $pod->field( 'salary_to' ) > 0):
if ($pod->field( 'salary_from' ) > 0): if ($pod->field( 'salary_from' ) > 0):
?> ?>
<?php _e('Salary from', 'biuro'); ?>: <?php echo $pod->field( 'salary_from' ); ?> <b><?php _e('Salary from', 'biuro'); ?>:</b> <?php echo $pod->field( 'salary_from' ); ?>
<br> <br>
<?php <?php
endif; endif;
if ($pod->field( 'salary_to' ) > 0): if ($pod->field( 'salary_to' ) > 0):
?> ?>
<?php _e('Salary to', 'biuro'); ?>: <?php echo $pod->field( 'salary_to' ); ?> <b><?php _e('Salary to', 'biuro'); ?>:</b> <?php echo $pod->field( 'salary_to' ); ?>
<?php <?php
endif; endif;
?>
</p>
<?php
endif; endif;
$validPosition = date_i18n( 'Y-m-d', strtotime( $pod->field( 'valid' ) ) ) >= date('Y-m-d') ? true : false; $validPosition = date_i18n( 'Y-m-d', strtotime( $pod->field( 'valid' ) ) ) >= date('Y-m-d') ? true : false;
?> ?>
<p> <b><?php _e('Published', 'biuro'); ?>:</b> <?php echo date_i18n( get_option( 'date_format' ), strtotime( $pod->field( 'post_date' ) ) ); ?>
<?php _e('Published', 'biuro'); ?>: <?php echo date_i18n( get_option( 'date_format' ), strtotime( $pod->field( 'post_date' ) ) ); ?>
<br> <br>
<?php _e('Valid till', 'biuro'); ?>: <?php echo date_i18n( get_option( 'date_format' ), strtotime( $pod->field( 'valid' ) ) ); ?> <b><?php _e('Valid till', 'biuro'); ?>:</b> <?php echo date_i18n( get_option( 'date_format' ), strtotime( $pod->field( 'valid' ) ) ); ?>
</p> </div>
<?php <?php
global $recommendPage;
if ($validPosition): if ($validPosition):
?> ?>
<div class="c-job--action"> <div class="c-job--action">
<button type="button" class="js-inititate-position-form o-btn c-btn--main c-btn--fill" name="submit" value="1" data-id="action--form"><?php _e('Apply', 'biuro'); ?></button> <button type="button" class="js-inititate-position-form o-btn c-btn--main c-btn--fit" name="submit" value="1" data-id="action--form"><?php _e('Apply', 'biuro'); ?></button>
<?php
if ($recommendPage):
?>
<a href="<?php echo $recommendPage; ?>" class="o-btn c-btn--slim c-btn--fit"><?php _e('Recommend a friend', 'biuro'); ?></a>
<!-- <button type="button" class="o-btn c-btn--main c-btn--fit" name="submit" value="1" data-id="action--form"><?php _e('Apply', 'biuro'); ?></button> -->
<?php
endif;
?>
</div> </div>
<?php <?php
endif; endif;
......
...@@ -49,9 +49,6 @@ ...@@ -49,9 +49,6 @@
<div class="c-share"> <div class="c-share">
<p class="c-share--heading"><?php _e('Suggest a friend', 'biuro'); ?></p> <p class="c-share--heading"><?php _e('Suggest a friend', 'biuro'); ?></p>
<div class="c-share--options"> <div class="c-share--options">
<a rel="noopener" href="https://www.facebook.com/dialog/share?app_id=<?php echo $appID; ?>&display=popup&amp;href=<?php echo urlencode($requestURL . '?utm_source=facebook_share_button_job_page'); ?>&redirect_uri=<?php echo $requestURL; ?>" class="gtm-share-click js-share-facebook c-share--option c-share--option-facebook" data-label="Facebook"> <a rel="noopener" href="https://www.facebook.com/dialog/share?app_id=<?php echo $appID; ?>&display=popup&amp;href=<?php echo urlencode($requestURL . '?utm_source=facebook_share_button_job_page'); ?>&redirect_uri=<?php echo $requestURL; ?>" class="gtm-share-click js-share-facebook c-share--option c-share--option-facebook" data-label="Facebook">
<svg width="9px" height="18px" class="c-ico--share-facebook"> <svg width="9px" height="18px" class="c-ico--share-facebook">
<use xlink:href="#ico--job-facebook"></use> <use xlink:href="#ico--job-facebook"></use>
...@@ -86,6 +83,19 @@ ...@@ -86,6 +83,19 @@
</div> </div>
</div> </div>
<?php
global $recommendPage;
if ($recommendPage):
?>
<a class="c-recommend" href="<?php echo $recommendPage; ?>">
<span class="c-recommend--headline"><?php _e('Recommend a friend - receive <strong>50 Eur!</strong>', 'biuro'); ?></span>
<span class="c-recommend--anchor"><?php _e('Find out more', 'biuro'); ?></span>
</a>
<?php
endif;
?>
<div class="c-job-contacts"> <div class="c-job-contacts">
<?php echo $pod->field('contact'); ?> <?php echo $pod->field('contact'); ?>
</div> </div>
......
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