Basic styles and page layout

doctorpavel
Emil Miler 3 years ago
parent 8bc5be6259
commit 9710556740

@ -1,19 +1,126 @@
<!DOCTYPE html>
<html>
<head>
<title>rchan - {name}</title>
<link rel="stylesheet" type="text/css" href="css">
<title>kchan - {name}</title>
<link rel="icon" type="image/x-icon" href="favicon.ico">
<style>
.wrap {
max-width: 60rem;
margin: 0 auto;
}
body {
margin: 0;
box-sizing: border-box;
font-size: 18px;
line-height: 1.5;
}
header {
box-shadow: 0 0 20px 5px rgba(0,0,0,0.2);
padding: .25em .5em;
margin-bottom: 3rem;
}
nav a {
text-decoration: none;
color: #000;
}
nav a:hover {
color: blue;
}
nav a:before {
content: "[ ";
color: #999;
}
nav a:after {
content: " ]";
color: #999;
}
main { padding: 0 .5rem }
article {
display: grid;
grid-template-columns: 15rem 1fr;
grid-column-gap: 1rem;
margin-bottom: 3rem;
}
article img {
width: 100%;
max-height: 25rem;
}
article .title {
font-weight: bold;
margin-bottom: .5rem;
}
article .meta {
display: flex;
margin-bottom: .5rem;
}
article .image-info {
font-size: .8rem;
color: #444;
margin-bottom: .5rem;
}
@media screen and (max-width: 900px) {
article { grid-template-columns: 10rem 1fr }
}
@media screen and (max-width: 700px) {
body { font-size: 16px }
article { grid-template-columns: 6rem 1fr }
article .meta { flex-direction: column-reverse }
}
</style>
</head>
<body>
<div class="grid">
<div class="home">
<h1>
<a href="/">rchan</a> <a href="/readme">readme</a> <a href="post">post</a>
</h1>
<hr>
<header>
<div class="wrap">
<nav>
<span>kchan &ndash;</span>
<a href="#">index</a>
<a href="#">faq</a>
<a href="#">new thread</a>
</nav>
</div>
</header>
<main>
<div class="wrap">
<article>
<img src="placeholder.jpg" alt="img">
<div>
<div class="meta">
<div>
{ post_datetime }&nbsp;
<strong>{ post_id }</strong>&nbsp;
</div>
<nav>
<a href="#">open</a>
<a href="#">quote</a>
<a href="#">reply</a>
</nav>
</div>
<div class="image-info">{ image_filename }</div>
<div class="title">{ post_title }</div>
{ post_content }
</div>
<div class="text">{}</div>
</article>
<article>
<img src="placeholder.jpg" alt="img">
<div>
<div class="meta">
<div>
{ post_datetime }&nbsp;
<strong>{ post_id }</strong>&nbsp;
</div>
<nav>
<a href="#">open</a>
<a href="#">quote</a>
<a href="#">reply</a>
</nav>
</div>
<div class="image-info">{ image_filename }</div>
<div class="title">{ post_title }</div>
{ post_content }
</div>
</article>
</div>
</main>
</head>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Loading…
Cancel
Save