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 {
|
||||
grid-area: tile-details;
|
||||
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:
|
||||
". . ."
|
||||
". banner ."
|
||||
". tile-title ."
|
||||
". tile-subtitle .";
|
||||
}
|
||||
article.tile > header > .status-banner {
|
||||
article.tile > header > .status-banner,
|
||||
article.tile > header > .source-banner {
|
||||
padding: 0.3em 1em;
|
||||
grid-area: banner;
|
||||
width: 80%;
|
||||
margin: auto;
|
||||
width: auto;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
border-radius: 0px 0px 10px 10px;
|
||||
text-align: center;
|
||||
text-decoration: none !important;
|
||||
}
|
||||
article.tile > header > .source-banner {
|
||||
background-color: #ebebeb;
|
||||
}
|
||||
article.tile > header > .status-banner--ongoing {
|
||||
background-color: #cfea6b;
|
||||
}
|
||||
|
@ -1232,11 +1238,13 @@ a[href=""] {
|
|||
color: red;
|
||||
}
|
||||
|
||||
|
||||
a {
|
||||
opacity: 0.8;
|
||||
text-decoration: underline !important;
|
||||
}
|
||||
a.item {
|
||||
text-decoration: none !important;
|
||||
}
|
||||
.footnote_plugin_index a {
|
||||
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"' : ''; ?>>
|
||||
<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
|
||||
if ( strlen( get_the_title() ) > 70 ) {
|
||||
$title_length = strlen( get_the_title() );
|
||||
if ( $title_length > 70 ) {
|
||||
$small = 'vsmall';
|
||||
} elseif ( strlen( get_the_title() ) > 35 ) {
|
||||
} elseif ( $title_length > 35 ) {
|
||||
$small = 'small';
|
||||
} elseif ( strlen( get_the_title() ) > 12 ) {
|
||||
} elseif ( $title_length > 12 ) {
|
||||
$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>
|
||||
<?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">
|
||||
<?php echo wp_kses_post( get_the_title() ); ?>
|
||||
</h1>
|
||||
<?php
|
||||
$subtitle = get_post_meta( get_the_ID(), 'Subtitle', true );
|
||||
if ( $subtitle ) :
|
||||
?>
|
||||
<?php
|
||||
$subtitle = get_post_meta( get_the_ID(), 'Subtitle', true );
|
||||
if ( $subtitle ) :
|
||||
?>
|
||||
<h2>
|
||||
<?php echo wp_kses_post( $subtitle ); ?>
|
||||
<?php echo wp_kses_post( $subtitle ); ?>
|
||||
</h2>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</header>
|
||||
</article><!-- #post-## -->
|
||||
</a>
|
||||
|
|
Reference in a new issue