Commit 9c9e5e35 authored by Maximilian Schmitt's avatar Maximilian Schmitt
Browse files

HÜ gemeinsam im Call erledigt - Beiträge angelegt und gestyled.

parent be39713b
<footer class="footer">© Maximilian Schmitt, Dennis Schoepf</footer>
<header class="header">
<h1><a href="/">CMS 2020</a></h1>
</header>
<html lang="en">
<!DOCTYPE html>
<html lang="de">
<head>
<title>CMS 2020 Theme.</title>
<?php wp_head(); ?>
</head>
<body>
<header><h1>A simple one-page theme.</h1></header>
<?php wp_body_open(); ?>
<?php get_header(); ?>
<section class="firstcontent">
<?php
if(have_posts()) {
the_post();
the_title();
the_content();
} else {
// No posts
}
?>
</section>
<section>
<h2>With a section here</h2>
<p>And some text below.</p>
<h2>News</h2>
<ul class="news">
<?php
$news_query = new WP_Query(array('category_name' => 'news', 'order' => 'DESC'));
if ($news_query->have_posts()) :
while ($news_query->have_posts()) : $news_query->the_post(); ?>
<li>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<p><?php the_content(); ?></p>
</li>
<?php endwhile; else : ?>
<p>Erster Post demnächst.</p>
<?php endif;
wp_reset_postdata();
?>
</ul>
</section>
<footer>© Maximilian Schmitt, Dennis Schoepf</footer>
<?php wp_footer(); ?>
<?php get_footer() ?>
<?php wp_footer(); ?>
</body>
</html>
\ No newline at end of file
</html>
......@@ -17,7 +17,6 @@ html, body{
}
header,section,footer{
height: 100%;
background-color: #fafaf9;
display: flex;
justify-content: center;
......@@ -31,6 +30,57 @@ header, footer{
}
section{
padding: 0 15px 200px 15px;
background-color: #fff;
color: #000;
}
\ No newline at end of file
}
section.firstcontent{
padding-top: 200px;
}
.header h1 a{
color: #fff;
text-decoration: none;
}
.header{
height: 70px;
}
.footer{
height: 70px;
}
.news {
margin: 0;
padding: 0;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
list-style-type: none;
}
.news > p {
padding: 0;
margin: 0;
}
.news > li {
width: 100%;
padding: 15px;
color: #ffffff;
background-color: #000000;
border-radius: 10px;
margin-bottom: 2%;
}
.news > li > h2 > a,.news > li > h2 > a:active, .news > li > h2 > a:visited, .news > li > h2 > a:hover {
color: #fff;
}
@media (min-width: 768px) {
.news > li {
width: 30%;
}
}
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