Redesigned news post preview information section.

This commit is contained in:
flash 2023-07-25 19:02:00 +00:00
parent eb30b6b718
commit 92f18bfe9a
5 changed files with 73 additions and 122 deletions
assets/misuzu.css/news

View file

@ -1,31 +1,6 @@
.news__preview {
display: flex;
margin: 2px 0;
flex-direction: row-reverse;
--user-colour: var(--accent-colour);
}
.news__preview__info__content {
width: 200px;
text-align: center;
display: flex;
flex-direction: column;
padding: 15px;
flex: 0 0 auto;
margin-right: 4px;
}
.news__preview__info__background {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
mask-image: linear-gradient(90deg, transparent 10%, var(--background-colour) 100%);
-webkit-mask-image: linear-gradient(90deg, transparent 10%, var(--background-colour) 100%);
background: var(--background-pattern);
background-color: var(--user-colour);
background-blend-mode: multiply;
padding: 10px 12px;
}
.news__preview__listing {
@ -33,68 +8,63 @@
flex-shrink: 1;
}
.news__preview__container {
.news__preview__header {
border-bottom: 1px solid var(--accent-colour);
display: flex;
margin: 1px;
flex-direction: column;
}
.news__preview__user {
display: flex;
text-align: left;
align-items: center;
align-items: flex-end;
flex-wrap: wrap;
margin-bottom: 10px;
padding-bottom: 2px;
}
.news__preview__user__details {
.news__preview__title {
flex-grow: 1;
flex-shrink: 1;
}
.news__preview__title h1 {
font-size: 2em;
line-height: 1.5em;
}
.news__preview__attrs {
flex-grow: 0;
flex-shrink: 0;
display: flex;
flex-direction: column;
gap: 4px;
font-size: .9em;
}
.news__preview__avatar {
width: 60px;
height: 60px;
margin-right: 10px;
.news__preview__attr {
display: flex;
gap: 4px;
align-items: center;
}
.news__preview__username {
color: inherit;
font-size: 1.4em;
line-height: 1.5em;
text-decoration: none;
}
.news__preview__username[href]:hover {
text-decoration: underline;
}
.news__preview__date {
font-size: 1.1em;
line-height: 1.5em;
}
.news__preview__category {
.news__preview__author a {
color: inherit;
text-decoration: none;
font-size: 1.1em;
line-height: 1.5em;
margin: 6px 0;
}
.news__preview__category:hover {
.news__preview__author__name a {
font-weight: bold;
display: inline-block;
padding-top: 2px;
border-bottom: 2px solid var(--user-colour, #fff);
}
.news__preview__category a {
color: inherit;
text-decoration: none;
}
.news__preview__category a:hover,
.news__preview__category a:focus {
text-decoration: underline;
}
.news__preview__content {
display: flex;
flex-direction: column;
line-height: 1.2em;
flex: 1 1 auto;
line-height: 1.4em;
word-wrap: break-word;
overflow: hidden;
margin: 2px;
padding: 0 10px 10px 10px;
}
.news__preview__text {
flex: 1 1 auto;
}
.news__preview__links {
@ -105,25 +75,3 @@
.news__preview__link {
font-size: .9em;
}
@media (max-width: 800px) {
.news__preview { flex-direction: column-reverse; }
.news__preview__info { display: none; }
.news__preview__info__content {
width: 100%;
flex-wrap: wrap;
text-align: left;
}
.news__preview__info__background {
mask-image: linear-gradient(180deg, transparent 10%, var(--background-colour) 100%);
-webkit-mask-image: linear-gradient(180deg, transparent 10%, var(--background-colour) 100%);
}
.news__preview__user {
margin-bottom: 0;
margin-right: 10px;
}
.news__preview__avatar {
width: 50px;
height: 50px;
}
}