Fixed header controls
This commit is contained in:
parent
1b5c107119
commit
6b82d36f96
|
@ -1,11 +1,13 @@
|
||||||
import { Show } from 'solid-js/web'
|
import { Show } from 'solid-js/web'
|
||||||
import type { Author } from '../../graphql/types.gen'
|
import type { Author } from '../../graphql/types.gen'
|
||||||
import style from './Userpic.module.scss'
|
import style from './Userpic.module.scss'
|
||||||
|
import { clsx } from 'clsx'
|
||||||
|
|
||||||
interface UserpicProps {
|
interface UserpicProps {
|
||||||
user: Author
|
user: Author
|
||||||
hasLink?: boolean
|
hasLink?: boolean
|
||||||
isBig?: boolean
|
isBig?: boolean
|
||||||
|
class?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export default (props: UserpicProps) => {
|
export default (props: UserpicProps) => {
|
||||||
|
@ -16,7 +18,7 @@ export default (props: UserpicProps) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class={style.circlewrap} classList={{ [style.big]: props.isBig }}>
|
<div class={clsx(style.circlewrap, props.class)} classList={{ [style.big]: props.isBig }}>
|
||||||
<Show when={props.hasLink}>
|
<Show when={props.hasLink}>
|
||||||
<a href={`/author/${props.user.slug}`}>
|
<a href={`/author/${props.user.slug}`}>
|
||||||
<Show
|
<Show
|
||||||
|
|
|
@ -10,8 +10,13 @@
|
||||||
padding: divide($container-padding-x, 2);
|
padding: divide($container-padding-x, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.circlewrap {
|
.userpic {
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
|
|
||||||
|
img {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -81,6 +86,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.userControlItemWritePost {
|
.userControlItemWritePost {
|
||||||
|
width: auto;
|
||||||
|
|
||||||
@include media-breakpoint-up(lg) {
|
@include media-breakpoint-up(lg) {
|
||||||
.icon {
|
.icon {
|
||||||
display: none;
|
display: none;
|
||||||
|
@ -88,8 +95,16 @@
|
||||||
|
|
||||||
.textLabel {
|
.textLabel {
|
||||||
display: inline;
|
display: inline;
|
||||||
|
padding: 0 1.2rem;
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&,
|
||||||
|
a::before {
|
||||||
|
border-radius: 1.2em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.userControlItemInbox,
|
.userControlItemInbox,
|
||||||
|
|
|
@ -15,7 +15,7 @@ export default () => {
|
||||||
<div class={clsx(styles.userControlItem, styles.userControlItemWritePost)}>
|
<div class={clsx(styles.userControlItem, styles.userControlItemWritePost)}>
|
||||||
<a href="/create">
|
<a href="/create">
|
||||||
<span class={styles.textLabel}>опубликовать материал</span>
|
<span class={styles.textLabel}>опубликовать материал</span>
|
||||||
<Icon name="pencil" />
|
<Icon name="pencil" class={styles.icon} />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class={clsx(styles.userControlItem, styles.userControlItemInbox)}>
|
<div class={clsx(styles.userControlItem, styles.userControlItemInbox)}>
|
||||||
|
@ -30,7 +30,7 @@ export default () => {
|
||||||
<a href={`/${session().user?.slug}`}>
|
<a href={`/${session().user?.slug}`}>
|
||||||
{/*FIXME: replace with route*/}
|
{/*FIXME: replace with route*/}
|
||||||
<div classList={{ entered: page().path === `/${session().user?.slug}` }}>
|
<div classList={{ entered: page().path === `/${session().user?.slug}` }}>
|
||||||
<Userpic user={session().user as Author} />
|
<Userpic user={session().user as Author} class={styles.userpic} />
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user