Skip to content

Instantly share code, notes, and snippets.

@lovasoa
Created June 24, 2019 16:46
Show Gist options
  • Save lovasoa/a2decd2bd719b8912f65bbb8bc1122a4 to your computer and use it in GitHub Desktop.
Save lovasoa/a2decd2bd719b8912f65bbb8bc1122a4 to your computer and use it in GitHub Desktop.
html, body {
font-family: sans-serif;
margin: 0;
padding: 0;
font-size: 16px;
}
header > nav{
display: flex;
border: 1px solid black;
background: linear-gradient(#ddd, #fff);
}
header > nav > a{
padding: 5px 10px;
min-width: 100px;
border-right: 1px solid black;
font-size: 1.1em;
font-weight: bold;
text-decoration: none;
color: black;
}
header > nav > a:hover {
background: linear-gradient(#aaa, #fff);
}
main {
display: flex;
width: 100%;
justify-content: space-between;
}
.quotes{
margin: 20px;
flex: 3;
}
article.quote{
border: 1px solid black;
border-radius: 5px;
padding: 10px;
width: 100%;
margin: 20px 0;
}
article.quote > .quote-info {
border-top: 1px solid black;
padding-top: 8px;
width: 100%;
display: flex;
justify-content: space-between;
}
article.quote > .quote-info > .score > a {
text-decoration:none;
border: 1px solid black;
display: inline-block;
width: 1em;
height: 1em;
text-align: center;
border-radius: 2px;
}
aside {
flex: 1;
margin-right: 10px;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Quotes</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="quotes.css" rel="stylesheet">
</head>
<body>
<header>
<h1>Quotes</h1>
<nav>
<a href="#">Profile</a>
<a href="#">Top 10</a>
<a href="#">Flop 10</a>
<a href="#">Last</a>
</nav>
</header>
<main>
<section class="quotes">
<h2>Top 10 quotes</h2>
<article class="quote">
<blockquote>I am a quote</blockquote>
<div class="quote-info">
<div class="score">
Score:
<a href="#">-</a>
<span class="score">42</span>
<a href="#">+</a>
</div>
<span class="quote-author">
Posted by
<a href="#">login</a>
</span>
</div>
</article>
<article class="quote">
<blockquote>I am a quote</blockquote>
<div class="quote-info">
<div class="score">
Score:
<a href="#">-</a>
<span class="score">42</span>
<a href="#">+</a>
</div>
<span class="quote-author">
Posted by
<a href="#">login</a>
</span>
</div>
</article>
</section>
<aside>
<p>Logged in as <a href="#">user</a></p>
<div class="user-menu">
<h5>Last votes</h5>
<ol>
<li>Quote</li>
<li>Quote</li>
<li>Quote</li>
</ol>
</div>
</aside>
</main>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment