libreddit/templates/post.html.hbs

189 lines
3.1 KiB
Handlebars

<html>
<head>
<title>{{title}}</title>
<meta name="description" content="View post and karma on Libreddit, the private frontend for Reddit.">
<style>
* {
transition: 0.2s all;
margin: 0px;
color: white;
font-family: sans-serif;
}
html {
background: black;
}
header {
display: flex;
justify-content: space-between;
color: aqua;
background: #151515;
padding: 15px;
font-weight: bold;
font-size: 20px;
/* border-bottom: 3px solid #222; */
}
main {
max-width: 750px;
margin: 0 auto;
margin-top: 50px;
padding: 0px 10px;
}
button {
background: none;
border: none;
font-weight: bold;
}
a {
color: inherit;
text-decoration: none;
}
a:not(.post_right):hover {
text-decoration: underline;
}
.user {
max-width: 750px;
margin: 0 auto;
display: flex;
}
.user_right {
display: flex;
flex-flow: column;
justify-content: center;
}
.user_icon {
width: 100px;
height: 100px;
border-radius: 100%;
padding: 20px;
}
#sort {
max-width: 750px;
margin: 20px auto 20px;
display: flex;
justify-content: start;
padding: 0px 10px;
}
#sort > div {
background: #151515;
color: lightgrey;
border-radius: 5px;
margin-right: 5px;
padding: 10px;
width: 50px;
text-align: center;
cursor: pointer;
font-weight: bold;
}
#sort > div:hover {
background: #222;
}
#sort > #sort_{{sort}} {
background: aqua;
color: black;
}
.post {
/* border: 3px solid #222; */
border-radius: 5px;
background: #151515;
display: flex;
}
.post:hover {
background: #222;
}
.post:hover > .post_left {
background: #333;
}
.post_left, .post_right {
display: flex;
flex-direction: column;
}
.post_left {
text-align: center;
background: #222;
border-radius: 5px 0px 0px 5px;
min-width: 50px;
padding: 5px;
}
.post_upvote {
display: none;
}
.post_score {
margin-top: 1em;
color: aqua;
}
.post_right {
padding: 20px 25px;
flex-grow: 1;
flex-shrink: 1;
}
.post_right > * {
margin: 5px;
}
.post_right > p {
opacity: 0.75;
}
.post_image {
max-width: 500px;
align-self: center;
}
.post_image[src=""] {
display: none;
}
.post_body {
opacity: 0.9;
font-weight: normal;
margin: 10px 5px;
}
.post_body > p:not(:first-child) {
margin-top: 1.5em;
}
.post_body a {
text-decoration: underline;
color: aqua;
}
</style>
</head>
<body>
<header>
<a href="/"><span style="color:white">lib</span>reddit.</a>
<a style="color:white" href="https://github.com/spikecodes/libreddit">GITHUB</a>
</header>
{{!-- <div id="sort">
<div id="sort_new"><a href="/u/{{user}}/?sort=new">New</a></div>
<div id="sort_hot"><a href="/u/{{user}}/?sort=hot">Hot</a></div>
<div id="sort_top"><a href="/u/{{user}}/?sort=top">Top</a></div>
</div> --}}
<main>
{{{post}}}
{{{comments}}}
</main>
</body>
</html>