Top viewed block style fixes

This commit is contained in:
kvakazyambra 2023-11-21 01:38:55 +03:00
parent a3afe6ca15
commit 671e627ae5
2 changed files with 41 additions and 4 deletions

View File

@ -19,24 +19,41 @@
} }
&.top { &.top {
background-color: transparent;
border-bottom: 1px solid #e1e1e1; border-bottom: 1px solid #e1e1e1;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
line-height: 1; line-height: 1;
margin-bottom: 1.5rem; margin: 0;
padding-bottom: 1.5rem; padding: 1.5rem 0;
position: relative; position: relative;
transition: background-color 0.2s;
&:last-child { &:last-child {
border: none; border: none;
margin-bottom: 0; margin-bottom: 0;
padding-bottom: 0;
.shoutCardContent { .shoutCardContent {
margin-bottom: 0; margin-bottom: 0;
} }
} }
&:hover {
background: #000;
&::after {
color: #fff;
}
a:link,
a:visited {
&,
* {
color: #fff !important;
}
}
}
&::after { &::after {
content: counter(item, upper-roman); content: counter(item, upper-roman);
counter-increment: item; counter-increment: item;
@ -47,6 +64,13 @@
min-width: 1.4em; min-width: 1.4em;
padding-left: 0.3em; padding-left: 0.3em;
text-align: center; text-align: center;
transition: color 0.2s;
}
a:link {
&:hover {
background: none;
}
} }
} }
} }
@ -59,6 +83,15 @@
} }
} }
.besideColumnTopViewed {
margin-top: 0;
li.top {
margin-left: -0.3em;
padding-left: 0.3em;
}
}
.besideColumnTitle { .besideColumnTitle {
align-items: baseline; align-items: baseline;
justify-content: space-between; justify-content: space-between;

View File

@ -62,7 +62,11 @@ export const Beside = (props: Props) => {
</Show> </Show>
</div> </div>
</Show> </Show>
<ul class={styles.besideColumn}> <ul
class={clsx(styles.besideColumn, {
[styles.besideColumnTopViewed]: props.wrapper === 'top-article',
})}
>
<For each={[...props.values]}> <For each={[...props.values]}>
{(value: Partial<Shout | User | Topic>) => ( {(value: Partial<Shout | User | Topic>) => (
<li classList={{ [styles.top]: props.wrapper.startsWith('top-') }}> <li classList={{ [styles.top]: props.wrapper.startsWith('top-') }}>