colors and titles

This commit is contained in:
j 2023-08-22 17:35:56 +02:00
parent ae238c90f8
commit b56167a703
5 changed files with 53 additions and 8 deletions

View file

@ -1,5 +1,7 @@
:root { :root {
--fg: rgb(240, 240, 240); --fg: rgb(240, 240, 240);
--blue: rgb(110, 194, 240);
--title: rgb(110, 194, 240);
} }
@font-face { @font-face {
@ -41,9 +43,8 @@ header {
} }
.index { .index {
padding-top: 16px;
.item { .item {
border-bottom: 1px solid blueviolet; //border-bottom: 1px solid blueviolet;
padding-bottom: 4px; padding-bottom: 4px;
margin-bottom: 8px; margin-bottom: 8px;
@ -51,7 +52,14 @@ header {
text-decoration: none; text-decoration: none;
color: var(--fg); color: var(--fg);
h1 { h1 {
color: var(--title);
text-decoration: underline; text-decoration: underline;
font-size: 16px;
}
h2 {
border-bottom: 1px solid pink;
font-size: 18px;
font-weight: bold;
} }
} }
h1 { h1 {
@ -77,6 +85,7 @@ header {
} }
.archive { .archive {
text-align: center; text-align: center;
padding-bottom: 32px;
} }
&.archive { &.archive {
h2.week { h2.week {
@ -95,6 +104,10 @@ header {
} }
} }
.item { .item {
h2 {
font-size: 16px;
font-weight: initial;
}
.comments { .comments {
text-align: right; text-align: right;
padding-right: 4px; padding-right: 4px;
@ -104,6 +117,18 @@ header {
} }
} }
} }
@media(max-width:768px) {
.index {
.item {
a {
h1, h2 {
padding-left: 4px;
padding-right: 4px;
}
}
}
}
}
nav.overlay { nav.overlay {
position: absolute; position: absolute;

View file

@ -20,7 +20,7 @@ body {
} }
a { a {
color: rgb(128, 128, 255) color: var(--blue)
} }
iframe { iframe {
max-width: 100%; max-width: 100%;
@ -38,12 +38,19 @@ video, .poster {
min-height: 100vh; min-height: 100vh;
max-width: 1000px; max-width: 1000px;
margin: auto; margin: auto;
padding-top: 16px;
}
.item-title {
color: var(--title);
text-decoration: underline;
padding-bottom: 0;
font-size: 16px;
text-wrap: balance;
} }
.title { .title {
padding-top: 16px;
padding-bottom: 0; padding-bottom: 0;
margin-bottom: 4px; margin-bottom: 4px;
font-size: 14pt; font-size: 18px;
font-weight: bold; font-weight: bold;
border-bottom: 1px solid pink; border-bottom: 1px solid pink;
text-wrap: balance; text-wrap: balance;
@ -58,6 +65,7 @@ video, .poster {
padding-bottom: 0px; padding-bottom: 0px;
} }
@media(max-width:768px) { @media(max-width:768px) {
.item-title,
.title, .title,
.byline { .byline {
padding-left: 4px; padding-left: 4px;

View file

@ -3,7 +3,8 @@ function renderItemInfo(data) {
div = document.createElement('div') div = document.createElement('div')
div.className = "content" div.className = "content"
div.innerHTML = ` div.innerHTML = `
<div class="title">${data.title}</div> <h1 class="item-title">${item.title}</h1>
<h2 class="title">${data.title}</h2>
<div class="byline">${data.byline}</div> <div class="byline">${data.byline}</div>
<figure> <figure>
<img src="${data.icon}"> <img src="${data.icon}">
@ -12,6 +13,9 @@ function renderItemInfo(data) {
<a href="${data.link}">Open on ${data.site}</a> <a href="${data.link}">Open on ${data.site}</a>
</div> </div>
` `
if (!item.title) {
div.querySelector('item-title').remove()
}
document.querySelector(".content").replaceWith(div) document.querySelector(".content").replaceWith(div)
} }
@ -25,7 +29,8 @@ function renderItem(data) {
div = document.createElement('div') div = document.createElement('div')
div.className = "content" div.className = "content"
div.innerHTML = ` div.innerHTML = `
<div class="title">${data.title}</div> <h1 class="item-title">${item.title}</h1>
<h2 class="title">${data.title}</h2>
<div class="byline">${data.byline}</div> <div class="byline">${data.byline}</div>
<div class="player"> <div class="player">
<div class="video"></div> <div class="video"></div>
@ -38,6 +43,9 @@ function renderItem(data) {
<a href="${data.link}">Open on ${data.site}</a> <a href="${data.link}">Open on ${data.site}</a>
</div> </div>
` `
if (!item.title) {
div.querySelector('item-title').remove()
}
if (window.renderComments) { if (window.renderComments) {
renderComments(div.querySelector('.comments'), data) renderComments(div.querySelector('.comments'), data)

View file

@ -52,6 +52,10 @@
<script> <script>
var comments = {{ comments }}; var comments = {{ comments }};
var user = {{ user }}; var user = {{ user }};
var item = {
id: {{ item.id }},
title: '{{ item.title|escapejs }}'
};
</script> </script>
{% compress js file m %} {% compress js file m %}
<script src="/static/js/utils.js"></script> <script src="/static/js/utils.js"></script>

View file

@ -2,7 +2,7 @@
<a href="{{ item.get_absolute_url }}"> <a href="{{ item.get_absolute_url }}">
<div class="info"> <div class="info">
<h1>{{ item.title }}</h1> <h1>{{ item.title }}</h1>
{{ item.data.title }} <h2>{{ item.data.title }}</h2>
</div> </div>
<div class="image"> <div class="image">
<img src={{ item.data.thumbnail }}> <img src={{ item.data.thumbnail }}>