Commit 5f2cfefd authored by Simonas's avatar Simonas

recommend components in progress

parent 158469f1
......@@ -2,7 +2,7 @@
/* 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 */
......@@ -37,6 +37,7 @@ c-: Signify that something is a Component. This is a concrete, implementation-sp
@import '_component--nav.css';
@import '_component--phone.css';
@import '_component--recommend-friend.css';
@import '_component--recommend.css';
@import '_component--search.css';
@import '_component--sections.css';
@import '_component--services.css';
......
......@@ -10,8 +10,8 @@
.c-btn--footer { display: block; text-align: center; }
.c-btn--main { color: #fff; background: var(--color--green);
&:hover { background: var(--color--green-darker); }
.c-btn--main { color: #fff; background: var(--color--green); border: 2px solid var(--color--green);
&: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;
......@@ -28,6 +28,11 @@
}
.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--search { min-width: 180px; border-radius: 0 3px 3px 0; text-align: center;
......@@ -38,7 +43,7 @@
.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; }
}
......
......@@ -26,7 +26,7 @@
}
}
.c-job--action { padding: 30px 0;
.c-job--action { padding: 30px 0; display: flex;
@media (--max--medium) {
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 @@
.c-share {
@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 @@
<?php
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
// global $time_start;
......
......@@ -810,6 +810,26 @@ wp_reset_query();
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 = '') {
global $query_string;
......
......@@ -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-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-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://fonts.gstatic.com">
<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>
<?php wp_head(); ?>
......
......@@ -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-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-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://fonts.gstatic.com">
<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>
<?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();
return $res;
}
// delog('type');
// $fields = get_post_meta($ID, '_yoast_wpseo_primary_type');
// debug($fields);
?>
<ul class="c-categories">
......@@ -182,42 +176,50 @@ get_header();
endwhile;
$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
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):
?>
<?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>
<?php
endif;
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
endif;
?>
</p>
<?php
endif;
$validPosition = date_i18n( 'Y-m-d', strtotime( $pod->field( 'valid' ) ) ) >= date('Y-m-d') ? true : false;
?>
<p>
<?php _e('Published', 'biuro'); ?>: <?php echo date_i18n( get_option( 'date_format' ), strtotime( $pod->field( 'post_date' ) ) ); ?>
<br>
<?php _e('Valid till', 'biuro'); ?>: <?php echo date_i18n( get_option( 'date_format' ), strtotime( $pod->field( 'valid' ) ) ); ?>
</p>
<b><?php _e('Published', 'biuro'); ?>:</b> <?php echo date_i18n( get_option( 'date_format' ), strtotime( $pod->field( 'post_date' ) ) ); ?>
<br>
<b><?php _e('Valid till', 'biuro'); ?>:</b> <?php echo date_i18n( get_option( 'date_format' ), strtotime( $pod->field( 'valid' ) ) ); ?>
</div>
<?php
global $recommendPage;
if ($validPosition):
?>
<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>
</div>
<div class="c-job--action">
<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>
<?php
endif;
?>
......
......@@ -49,9 +49,6 @@
<div class="c-share">
<p class="c-share--heading"><?php _e('Suggest a friend', 'biuro'); ?></p>
<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">
<svg width="9px" height="18px" class="c-ico--share-facebook">
<use xlink:href="#ico--job-facebook"></use>
......@@ -86,6 +83,19 @@
</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">
<?php echo $pod->field('contact'); ?>
</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