Commit f4c61289 authored by Benthe Kuijpers's avatar Benthe Kuijpers
Browse files

news single

parent 76a319b3
......@@ -4,18 +4,16 @@
<div class="container">
<section class="error-404 not-found">
<header class="page-header">
<h1>404</h1>
<h4><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'makeitopen' ); ?></h4>
</header>
<h1>404</h1>
<h4><?php esc_html_e( 'Oops! That page can&rsquo;t be found.', 'makeitopen' ); ?></h4>
<div class="page-content">
<p><?php esc_html_e( 'It looks like this page doesn\'t exist (anymore).', 'makeitopen' ); ?></p>
<a href="<?php echo home_url(); ?>" class="btn"><?php _e('go to the homepage'); ?></a>
<a href="<?php echo home_url(); ?>" class="text-link text-link--back"><?php _e('go to the homepage'); ?></a>
</div>
</section>
</div>
</main><!-- #main -->
</main>
<?php get_footer(); ?>
\ No newline at end of file
......@@ -51,7 +51,7 @@
"name": "file",
"type": "file",
"instructions": "",
"required": 0,
"required": 1,
"conditional_logic": [
[
{
......@@ -78,7 +78,7 @@
"name": "url",
"type": "url",
"instructions": "",
"required": 0,
"required": 1,
"conditional_logic": [
[
{
......@@ -114,5 +114,5 @@
"hide_on_screen": "",
"active": true,
"description": "",
"modified": 1614868081
"modified": 1614870148
}
\ No newline at end of file
......@@ -67,10 +67,13 @@ $post_type_obj = get_post_type_object( $post_type ); ?>
foreach ($filters as $filter) {
$filterclass .= ' ' . $filter->slug;
}
} ?>
}
$type = get_field('type');
$url = ($type === 'url') ? get_field('url') : get_field('file'); ?>
<div class="list__item <?php echo $filterclass; ?>">
<a href="<?php the_permalink(); ?>">
<a href="<?php echo $url; ?>" target="_blank">
<?php
if (!empty($filters)) {
foreach($filters as $filter) {
......
......@@ -15,7 +15,7 @@ a.btn, .btn, .text-link {
transition: all 0.25s ease-out;
&:after {
margin-left: 5px;
margin: 0 0 0 5px;
content: "\2192";
transition: all 0.25s ease-out;
display: inline-block;
......@@ -27,6 +27,17 @@ a.btn, .btn, .text-link {
}
}
&--back {
&:after {
float: left;
margin: 0 5px 0 0;
content: "\2190";
}
&:hover:after {
transform: translateX(-2px);
}
}
&--down {
&:after {
content: "\2193";
......
.label {
background: $red;
box-shadow: 2px 2px 0 $bg-yellow;
color: white;
font-family: $font-header;
padding: 0 10px;
display: inline-block;
font-weight: bold;
font-weight: 600;
font-size: 16px;
line-height: 26px;
mix-blend-mode: multiply;
@include colourBg($bg-yellow, 0deg);
}
\ No newline at end of file
......@@ -10,5 +10,15 @@
line-height: 180px;
margin: 0;
color: $bg-red;
mix-blend-mode: multiply;
}
h1:before {
display: block;
content:"404";
position: absolute;
color: $blue;
mix-blend-mode: multiply;
transform: rotate(2deg);
}
}
\ No newline at end of file
......@@ -2,19 +2,111 @@
&__content {
display: block;
padding: 30px 0 200px;
padding: 0 0 200px;
h1 {
font-size: 56px;
font-size: 48px;
line-height: 48px;
@media only screen and (min-width: $medium) {
font-size: 56px;
line-height: 56px;
}
}
h2, h3, h4 {
font-size: 20px;
margin: 20px 0 0;
}
p, ul, li {
font-size: 18px;
line-height: 32px;
}
ul, ol {
list-style: none;
margin: 0 0 20px;
padding: 0;
li {
padding: 0 0 0 30px;
position: relative;
margin: 0 0 5px;
&:before,
&:after {
content: " ";
display: block;
position: absolute;
left: 0;
mix-blend-mode: multiply;
background: $blue;
border-radius: 50%;
}
&:before {
z-index: -2;
background: $bg-yellow;
transform: rotate(-2deg) translate(-1px, 1px);
}
}
}
ol {
counter-reset: counter;
li {
counter-increment: counter;
&:before,
&:after {
z-index: -1;
font-family: $font-header;
content: counter(counter);
font-weight: 600;
font-size: 15px;
line-height: 20px;
color: white;
text-align: center;
top: 5px;
height: 20px;
width: 20px;
}
}
}
ul li {
&:before,
&:after {
width: 10px;
height: 10px;
border-radius: 50%;
top: 10px;
}
}
}
&__image {
margin: 0 0 60px;
@include colourBg($bg-yellow, -1deg);
margin: 0 0 30px;
width: 100%;
height: 250px;
overflow: hidden;
@media only screen and (min-width: $medium) {
height: 350px;
margin: 130px auto 30px;
max-width: 890px;
}
img {
transform: rotate(0.5deg);
width: 100%;
height: 100%;
object-fit: cover;
}
}
&__button {
margin: 100px 0 0;
}
}
\ No newline at end of file
......@@ -31,6 +31,10 @@ function excerpt($string,$length) {
// Fix current menu item class for CPT archives
function current_menu_item_for_archives($menu) {
global $post;
if (is_singular('post')) {
$menu = str_replace( 'news', 'current-menu-item', $menu );
}
if (get_post_type($post) == 'resources') {
$menu = str_replace( 'resources', 'current-menu-item', $menu );
}
......
......@@ -2,22 +2,35 @@
<main id="primary" class="site-main">
<div class="container container--small">
<div class="single__content">
<?php
while ( have_posts() ) :
the_post();
if (has_post_thumbnail()) {
echo '<div class="single__image">' . get_the_post_thumbnail($post, 'large') . '</div>';
}
echo '<h1>' . get_the_title() . '</h1>';
the_content();
endwhile;
?>
</div>
<div class="single__content">
<?php
while ( have_posts() ) :
the_post();
if (has_post_thumbnail()) { ?>
<div class="single__image"><?php echo get_the_post_thumbnail($post, 'large'); ?></div>
<?php } ?>
<div class="container container--small">
<?php $categories = get_the_category(); ?>
<?php if (!empty($categories)) {
$cat_string = join(', ', wp_list_pluck($categories, 'name'));
echo '<span class="label">' . $cat_string . '</span>';
} ?>
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
<div class="single__button">
<a href="<?php echo get_permalink(get_option('page_for_posts')); ?>" class="btn btn--red btn--back"><?php _e('see all news', 'makeitopen'); ?></a>
</div>
</div>
<?php endwhile; ?>
</div>
</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