Add sources to writings
This commit is contained in:
parent
23aab0f59e
commit
65e5c15f4d
2 changed files with 32 additions and 14 deletions
18
style.css
18
style.css
|
@ -264,21 +264,27 @@ html {
|
||||||
article.tile > header {
|
article.tile > header {
|
||||||
grid-area: tile-details;
|
grid-area: tile-details;
|
||||||
grid-template-columns: 5px auto 5px;
|
grid-template-columns: 5px auto 5px;
|
||||||
grid-template-rows: 0 1.2em auto auto;
|
grid-template-rows: 0 1.3em auto auto;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
". . ."
|
". . ."
|
||||||
". banner ."
|
". banner ."
|
||||||
". tile-title ."
|
". tile-title ."
|
||||||
". tile-subtitle .";
|
". tile-subtitle .";
|
||||||
}
|
}
|
||||||
article.tile > header > .status-banner {
|
article.tile > header > .status-banner,
|
||||||
|
article.tile > header > .source-banner {
|
||||||
|
padding: 0.3em 1em;
|
||||||
grid-area: banner;
|
grid-area: banner;
|
||||||
width: 80%;
|
width: auto;
|
||||||
margin: auto;
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
border-radius: 0px 0px 10px 10px;
|
border-radius: 0px 0px 10px 10px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
text-decoration: none !important;
|
text-decoration: none !important;
|
||||||
}
|
}
|
||||||
|
article.tile > header > .source-banner {
|
||||||
|
background-color: #ebebeb;
|
||||||
|
}
|
||||||
article.tile > header > .status-banner--ongoing {
|
article.tile > header > .status-banner--ongoing {
|
||||||
background-color: #cfea6b;
|
background-color: #cfea6b;
|
||||||
}
|
}
|
||||||
|
@ -1232,11 +1238,13 @@ a[href=""] {
|
||||||
color: red;
|
color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
a {
|
a {
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
text-decoration: underline !important;
|
text-decoration: underline !important;
|
||||||
}
|
}
|
||||||
|
a.item {
|
||||||
|
text-decoration: none !important;
|
||||||
|
}
|
||||||
.footnote_plugin_index a {
|
.footnote_plugin_index a {
|
||||||
text-decoration: none !important;
|
text-decoration: none !important;
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,11 +21,12 @@
|
||||||
<a class="item" href="<?php echo esc_url( $post_link ); ?>"<?php echo ( $links_externally ) ? ' target="_blank" rel="noopener noreferrer"' : ''; ?>>
|
<a class="item" href="<?php echo esc_url( $post_link ); ?>"<?php echo ( $links_externally ) ? ' target="_blank" rel="noopener noreferrer"' : ''; ?>>
|
||||||
<article id="post-<?php the_ID(); ?>" class="tile col-m-6 col-4 col-w-3" style="background-image: url('<?php the_post_thumbnail_url(); ?>');">
|
<article id="post-<?php the_ID(); ?>" class="tile col-m-6 col-4 col-w-3" style="background-image: url('<?php the_post_thumbnail_url(); ?>');">
|
||||||
<?php
|
<?php
|
||||||
if ( strlen( get_the_title() ) > 70 ) {
|
$title_length = strlen( get_the_title() );
|
||||||
|
if ( $title_length > 70 ) {
|
||||||
$small = 'vsmall';
|
$small = 'vsmall';
|
||||||
} elseif ( strlen( get_the_title() ) > 35 ) {
|
} elseif ( $title_length > 35 ) {
|
||||||
$small = 'small';
|
$small = 'small';
|
||||||
} elseif ( strlen( get_the_title() ) > 12 ) {
|
} elseif ( $title_length > 12 ) {
|
||||||
$small = 'qsmall';
|
$small = 'qsmall';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
@ -36,17 +37,26 @@
|
||||||
?>
|
?>
|
||||||
<span class="status-banner status-banner--<?php echo esc_attr( lcfirst( $post_status ) ); ?>"><?php echo wp_kses_post( $post_status ); ?></span>
|
<span class="status-banner status-banner--<?php echo esc_attr( lcfirst( $post_status ) ); ?>"><?php echo wp_kses_post( $post_status ); ?></span>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
$source = get_post_meta( get_the_ID(), 'Source', true );
|
||||||
|
if ( $source ) :
|
||||||
|
?>
|
||||||
|
<span class="source-banner"><?php echo wp_kses_post( $source ); ?></span>
|
||||||
|
<?php endif; ?>
|
||||||
|
|
||||||
<h1 class="<?php echo esc_attr( $small ); ?> post-title">
|
<h1 class="<?php echo esc_attr( $small ); ?> post-title">
|
||||||
<?php echo wp_kses_post( get_the_title() ); ?>
|
<?php echo wp_kses_post( get_the_title() ); ?>
|
||||||
</h1>
|
</h1>
|
||||||
<?php
|
<?php
|
||||||
$subtitle = get_post_meta( get_the_ID(), 'Subtitle', true );
|
$subtitle = get_post_meta( get_the_ID(), 'Subtitle', true );
|
||||||
if ( $subtitle ) :
|
if ( $subtitle ) :
|
||||||
?>
|
?>
|
||||||
<h2>
|
<h2>
|
||||||
<?php echo wp_kses_post( $subtitle ); ?>
|
<?php echo wp_kses_post( $subtitle ); ?>
|
||||||
</h2>
|
</h2>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
</header>
|
</header>
|
||||||
</article><!-- #post-## -->
|
</article><!-- #post-## -->
|
||||||
</a>
|
</a>
|
||||||
|
|
Reference in a new issue