Loading components/article.php 0 → 100644 +50 −0 Changes for components/article.php: 50 added lines, 0 removed lines. Original line number Diff line number Diff line <article> <?php if(has_post_thumbnail()) { // A header configured specifically for this article $url = get_the_post_thumbnail_url(); } elseif(!$args["hide_default_header_image"]) { // Fall back to the default header (which can be configured site-wide, so we can't hardcode the URL) $url = get_header_image(); } else { $url = null; } if($url !== null) { $style = "style=\"background-image:url('$url')\""; } else { $style = ""; } ?> <header <?php echo $style; ?>> <?php if($args["link_title"]): ?> <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1> <?php else: ?> <h1><?php the_title(); ?></h1> <?php endif; ?> </header> <div class="content"> <?php if($args["show_only_excerpt"]) { the_excerpt(); } else { the_content(); } ?> </div> <footer> <?php if($args["show_author"]): ?> <div class="author"><?php the_author_meta('display_name'); ?></div> <?php endif; ?> <?php if($args["show_published_date"]): ?> <div class="published date"><span class="label">Veröffentlicht: </span><time><?php the_date(); ?></time></div> <?php endif; ?> <?php if($args["show_modified_date"]): $different = ""; if($args["show_published_date"] && get_the_modified_date() !== get_the_date()) { $different = "different"; } ?> <div class="modified date <?php echo $different; ?>"><span class="label">Zuletzt geändert: </span><time><?php the_modified_date(); ?></time></div> <?php endif; ?> </footer> </article> index.php +22 −36 Changes for index.php: 22 added lines, 36 removed lines. Original line number Diff line number Diff line Loading @@ -14,61 +14,47 @@ get_header(); ?> <aside class="levitating list-meta"> <h1> <?php if ( is_category() ) { <?php if(is_category()) { single_cat_title(); } elseif(is_archive()) { single_month_title(' '); single_month_title(" "); } else { echo "Blog"; } ?> } ?> </h1> <br> <h2>Kategorien</h2> <br> <ul class="categories seamless box-links"> <?php wp_list_categories(array('title_li'=>'')); ?> <?php wp_list_categories(array("title_li"=>"")); ?> </ul> <br> <br> <h2>Archiv</h2> <br> <select onchange="document.location.href=this.options[this.selectedIndex].value;"> <option>nach Monat</option> <?php wp_get_archives(array('format'=>'option')); ?> <?php wp_get_archives(array("format"=>"option")); ?> </select> <br> <br> <a href="<?php bloginfo('rss2_url'); ?>" class="rss"> <a href="<?php bloginfo("rss2_url"); ?>" class="rss"> zum RSS-Feed </a> </aside> <main class="list"> <?php while ( have_posts() ) : the_post(); ?> <article> <header <?php if ( has_post_thumbnail($post->ID) ) : ?> style="background-image:url('<?php echo wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>');" <?php endif; ?> > <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1> </header> <div class="content"> <?php the_excerpt(); ?> </div> <footer> <div class="published date"><time><?php the_date(); ?></time></div> </footer> </article> <?php endwhile; ?> <?php while (have_posts()) { the_post(); get_template_part("components/article", null, array( "show_author" => false, "show_published_date" => true, "show_modified_date" => false, "show_only_excerpt" => true, "link_title" => true, "hide_default_header_image" => true )); } ?> <div class="pagination"> <div class="older-posts"><?php next_posts_link( '« Ältere Posts' ); ?></div> <div class="newer-posts"><?php previous_posts_link( 'Neuere Posts »' ); ?></div> <div class="older-posts"><?php next_posts_link("« Ältere Posts"); ?></div> <div class="newer-posts"><?php previous_posts_link("Neuere Posts »"); ?></div> </div> </main> <?php get_footer(); ?> page.php +8 −18 Changes for page.php: 8 added lines, 18 removed lines. Original line number Diff line number Diff line Loading @@ -22,23 +22,13 @@ get_header(); ?> <main> <?php the_post(); ?> <article> <header style="background-image:url('<?php if(has_post_thumbnail()) { // A header configured specifically for this page the_post_thumbnail_url(); } else { // Fall back to the default header (which can be configured site-wide, so we can't hardcode the URL) header_image(); } ?>')"> <h1><?php the_title(); ?></h1> </header> <div class="content"> <?php the_content(); ?> </div> <footer> <div class="modified date">Zuletzt geändert: <time><?php the_modified_date(); ?></time></div> </footer> </article> <?php the_post(); get_template_part("components/article", null, array( "show_author" => false, "show_published_date" => false, "show_modified_date" => true )); ?> </main> <?php get_footer(); ?> single.php +8 −20 Changes for single.php: 8 added lines, 20 removed lines. Original line number Diff line number Diff line Loading @@ -20,25 +20,13 @@ get_header(); ?> <main> <?php the_post(); ?> <article> <header style="background-image:url('<?php if(has_post_thumbnail()) { // A header configured specifically for this post the_post_thumbnail_url(); } else { // Fall back to the default header (which can be configured site-wide, so we can't hardcode the URL) header_image(); } ?>')"> <h1><?php the_title(); ?></h1> </header> <div class="content"> <?php the_content(); ?> </div> <footer> <div class="author"><?php the_author_meta('display_name'); ?></div> <div class="published date">Veröffentlicht: <time><?php the_date(); ?></time></div> <div class="modified date <?php if(get_the_modified_date() !== get_the_date()) { echo 'different'; } ?>">Zuletzt geändert: <time><?php the_modified_date(); ?></time></div> </footer> </article> <?php the_post(); get_template_part("components/article", null, array( "show_author" => true, "show_published_date" => true, "show_modified_date" => true )); ?> </main> <?php get_footer(); ?> style.css +9 −0 Changes for style.css: 9 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -614,6 +614,10 @@ main.list footer .date { opacity: 0.5; } main.list footer .date .label { display: none; } main.list article .content { position: relative; z-index: 1; Loading @@ -639,6 +643,10 @@ main.list article > header h1 { left: 1.1em; } .list-meta > h2 { margin: 1em 0; } .list-meta > h1::before { display: inline-block; width: 1em; Loading @@ -662,6 +670,7 @@ main.list article > header h1 { font-size: 0.8em; color: #8d8d8d; text-align: right; margin-top: 2em; } .list-meta .categories li a { Loading Loading
components/article.php 0 → 100644 +50 −0 Changes for components/article.php: 50 added lines, 0 removed lines. Original line number Diff line number Diff line <article> <?php if(has_post_thumbnail()) { // A header configured specifically for this article $url = get_the_post_thumbnail_url(); } elseif(!$args["hide_default_header_image"]) { // Fall back to the default header (which can be configured site-wide, so we can't hardcode the URL) $url = get_header_image(); } else { $url = null; } if($url !== null) { $style = "style=\"background-image:url('$url')\""; } else { $style = ""; } ?> <header <?php echo $style; ?>> <?php if($args["link_title"]): ?> <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1> <?php else: ?> <h1><?php the_title(); ?></h1> <?php endif; ?> </header> <div class="content"> <?php if($args["show_only_excerpt"]) { the_excerpt(); } else { the_content(); } ?> </div> <footer> <?php if($args["show_author"]): ?> <div class="author"><?php the_author_meta('display_name'); ?></div> <?php endif; ?> <?php if($args["show_published_date"]): ?> <div class="published date"><span class="label">Veröffentlicht: </span><time><?php the_date(); ?></time></div> <?php endif; ?> <?php if($args["show_modified_date"]): $different = ""; if($args["show_published_date"] && get_the_modified_date() !== get_the_date()) { $different = "different"; } ?> <div class="modified date <?php echo $different; ?>"><span class="label">Zuletzt geändert: </span><time><?php the_modified_date(); ?></time></div> <?php endif; ?> </footer> </article>
index.php +22 −36 Changes for index.php: 22 added lines, 36 removed lines. Original line number Diff line number Diff line Loading @@ -14,61 +14,47 @@ get_header(); ?> <aside class="levitating list-meta"> <h1> <?php if ( is_category() ) { <?php if(is_category()) { single_cat_title(); } elseif(is_archive()) { single_month_title(' '); single_month_title(" "); } else { echo "Blog"; } ?> } ?> </h1> <br> <h2>Kategorien</h2> <br> <ul class="categories seamless box-links"> <?php wp_list_categories(array('title_li'=>'')); ?> <?php wp_list_categories(array("title_li"=>"")); ?> </ul> <br> <br> <h2>Archiv</h2> <br> <select onchange="document.location.href=this.options[this.selectedIndex].value;"> <option>nach Monat</option> <?php wp_get_archives(array('format'=>'option')); ?> <?php wp_get_archives(array("format"=>"option")); ?> </select> <br> <br> <a href="<?php bloginfo('rss2_url'); ?>" class="rss"> <a href="<?php bloginfo("rss2_url"); ?>" class="rss"> zum RSS-Feed </a> </aside> <main class="list"> <?php while ( have_posts() ) : the_post(); ?> <article> <header <?php if ( has_post_thumbnail($post->ID) ) : ?> style="background-image:url('<?php echo wp_get_attachment_url( get_post_thumbnail_id($post->ID) ); ?>');" <?php endif; ?> > <h1><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h1> </header> <div class="content"> <?php the_excerpt(); ?> </div> <footer> <div class="published date"><time><?php the_date(); ?></time></div> </footer> </article> <?php endwhile; ?> <?php while (have_posts()) { the_post(); get_template_part("components/article", null, array( "show_author" => false, "show_published_date" => true, "show_modified_date" => false, "show_only_excerpt" => true, "link_title" => true, "hide_default_header_image" => true )); } ?> <div class="pagination"> <div class="older-posts"><?php next_posts_link( '« Ältere Posts' ); ?></div> <div class="newer-posts"><?php previous_posts_link( 'Neuere Posts »' ); ?></div> <div class="older-posts"><?php next_posts_link("« Ältere Posts"); ?></div> <div class="newer-posts"><?php previous_posts_link("Neuere Posts »"); ?></div> </div> </main> <?php get_footer(); ?>
page.php +8 −18 Changes for page.php: 8 added lines, 18 removed lines. Original line number Diff line number Diff line Loading @@ -22,23 +22,13 @@ get_header(); ?> <main> <?php the_post(); ?> <article> <header style="background-image:url('<?php if(has_post_thumbnail()) { // A header configured specifically for this page the_post_thumbnail_url(); } else { // Fall back to the default header (which can be configured site-wide, so we can't hardcode the URL) header_image(); } ?>')"> <h1><?php the_title(); ?></h1> </header> <div class="content"> <?php the_content(); ?> </div> <footer> <div class="modified date">Zuletzt geändert: <time><?php the_modified_date(); ?></time></div> </footer> </article> <?php the_post(); get_template_part("components/article", null, array( "show_author" => false, "show_published_date" => false, "show_modified_date" => true )); ?> </main> <?php get_footer(); ?>
single.php +8 −20 Changes for single.php: 8 added lines, 20 removed lines. Original line number Diff line number Diff line Loading @@ -20,25 +20,13 @@ get_header(); ?> <main> <?php the_post(); ?> <article> <header style="background-image:url('<?php if(has_post_thumbnail()) { // A header configured specifically for this post the_post_thumbnail_url(); } else { // Fall back to the default header (which can be configured site-wide, so we can't hardcode the URL) header_image(); } ?>')"> <h1><?php the_title(); ?></h1> </header> <div class="content"> <?php the_content(); ?> </div> <footer> <div class="author"><?php the_author_meta('display_name'); ?></div> <div class="published date">Veröffentlicht: <time><?php the_date(); ?></time></div> <div class="modified date <?php if(get_the_modified_date() !== get_the_date()) { echo 'different'; } ?>">Zuletzt geändert: <time><?php the_modified_date(); ?></time></div> </footer> </article> <?php the_post(); get_template_part("components/article", null, array( "show_author" => true, "show_published_date" => true, "show_modified_date" => true )); ?> </main> <?php get_footer(); ?>
style.css +9 −0 Changes for style.css: 9 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -614,6 +614,10 @@ main.list footer .date { opacity: 0.5; } main.list footer .date .label { display: none; } main.list article .content { position: relative; z-index: 1; Loading @@ -639,6 +643,10 @@ main.list article > header h1 { left: 1.1em; } .list-meta > h2 { margin: 1em 0; } .list-meta > h1::before { display: inline-block; width: 1em; Loading @@ -662,6 +670,7 @@ main.list article > header h1 { font-size: 0.8em; color: #8d8d8d; text-align: right; margin-top: 2em; } .list-meta .categories li a { Loading