parent
be4a89193a
commit
80a9a4c9a5
|
@ -23,22 +23,16 @@ img {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.shoutCover {
|
.articleContent {
|
||||||
background-size: cover;
|
img {
|
||||||
height: 0;
|
cursor: zoom-in;
|
||||||
padding-bottom: 56.2%;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.shoutBody {
|
.shoutBody {
|
||||||
font-size: 1.6rem;
|
font-size: 1.6rem;
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
|
|
||||||
img {
|
|
||||||
display: block;
|
|
||||||
margin-bottom: 0.5em;
|
|
||||||
cursor: zoom-in;
|
|
||||||
}
|
|
||||||
|
|
||||||
blockquote,
|
blockquote,
|
||||||
blockquote[data-type='punchline'] {
|
blockquote[data-type='punchline'] {
|
||||||
clear: both;
|
clear: both;
|
||||||
|
|
|
@ -28,6 +28,7 @@ import { AuthorBadge } from '../Author/AuthorBadge'
|
||||||
import { getImageUrl } from '../../utils/getImageUrl'
|
import { getImageUrl } from '../../utils/getImageUrl'
|
||||||
import { FeedArticlePopup } from '../Feed/FeedArticlePopup'
|
import { FeedArticlePopup } from '../Feed/FeedArticlePopup'
|
||||||
import { Lightbox } from '../_shared/Lightbox'
|
import { Lightbox } from '../_shared/Lightbox'
|
||||||
|
import { Image } from '../_shared/Image'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
article: Shout
|
article: Shout
|
||||||
|
@ -252,7 +253,10 @@ export const FullArticle = (props: Props) => {
|
||||||
<Title>{props.article.title}</Title>
|
<Title>{props.article.title}</Title>
|
||||||
<div class="wide-container">
|
<div class="wide-container">
|
||||||
<div class="row position-relative">
|
<div class="row position-relative">
|
||||||
<article class="col-md-16 col-lg-14 col-xl-12 offset-md-5">
|
<article
|
||||||
|
class={clsx('col-md-16 col-lg-14 col-xl-12 offset-md-5', styles.articleContent)}
|
||||||
|
onClick={handleArticleBodyClick}
|
||||||
|
>
|
||||||
{/*TODO: Check styles.shoutTopic*/}
|
{/*TODO: Check styles.shoutTopic*/}
|
||||||
<Show when={props.article.layout !== 'music'}>
|
<Show when={props.article.layout !== 'music'}>
|
||||||
<div class={styles.shoutHeader}>
|
<div class={styles.shoutHeader}>
|
||||||
|
@ -282,12 +286,7 @@ export const FullArticle = (props: Props) => {
|
||||||
props.article.layout !== 'image'
|
props.article.layout !== 'image'
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<div
|
<Image width={1600} alt={props.article.title} src={props.article.cover} />
|
||||||
class={styles.shoutCover}
|
|
||||||
style={{
|
|
||||||
'background-image': `url('${getImageUrl(props.article.cover, { width: 1600 })}')`
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</Show>
|
</Show>
|
||||||
</div>
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
|
@ -328,7 +327,7 @@ export const FullArticle = (props: Props) => {
|
||||||
</Show>
|
</Show>
|
||||||
|
|
||||||
<Show when={body()}>
|
<Show when={body()}>
|
||||||
<div id="shoutBody" class={styles.shoutBody} onClick={handleArticleBodyClick}>
|
<div id="shoutBody" class={styles.shoutBody}>
|
||||||
<Show when={!body().startsWith('<')} fallback={<div innerHTML={body()} />}>
|
<Show when={!body().startsWith('<')} fallback={<div innerHTML={body()} />}>
|
||||||
<MD body={body()} />
|
<MD body={body()} />
|
||||||
</Show>
|
</Show>
|
||||||
|
|
|
@ -17,7 +17,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.close {
|
.close {
|
||||||
position: absolute;
|
position: fixed;
|
||||||
|
z-index: 1001;
|
||||||
top: 20px;
|
top: 20px;
|
||||||
right: 40px;
|
right: 40px;
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
|
@ -29,12 +30,13 @@
|
||||||
|
|
||||||
.zoomControls {
|
.zoomControls {
|
||||||
display: flex;
|
display: flex;
|
||||||
position: absolute;
|
position: fixed;
|
||||||
bottom: 16px;
|
bottom: 16px;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
|
z-index: 1001;
|
||||||
|
|
||||||
.control {
|
.control {
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import { clsx } from 'clsx'
|
import { clsx } from 'clsx'
|
||||||
import styles from './Lightbox.module.scss'
|
import styles from './Lightbox.module.scss'
|
||||||
import { createSignal } from 'solid-js'
|
import { createSignal, onCleanup, onMount } from 'solid-js'
|
||||||
import { Icon } from '../Icon'
|
import { Icon } from '../Icon'
|
||||||
|
import { useEscKeyDownHandler } from '../../../utils/useEscKeyDownHandler'
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
class?: string
|
class?: string
|
||||||
|
@ -31,6 +32,8 @@ export const Lightbox = (props: Props) => {
|
||||||
transition: 'transform 0.3s ease'
|
transition: 'transform 0.3s ease'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
useEscKeyDownHandler(closeLightbox)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class={clsx(styles.Lightbox, props.class)} onClick={closeLightbox}>
|
<div class={clsx(styles.Lightbox, props.class)} onClick={closeLightbox}>
|
||||||
<span class={styles.close} onClick={closeLightbox}>
|
<span class={styles.close} onClick={closeLightbox}>
|
||||||
|
@ -40,6 +43,9 @@ export const Lightbox = (props: Props) => {
|
||||||
<button class={styles.control} onClick={(event) => zoomOut(event)}>
|
<button class={styles.control} onClick={(event) => zoomOut(event)}>
|
||||||
<b>-</b>
|
<b>-</b>
|
||||||
</button>
|
</button>
|
||||||
|
<button class={styles.control} onClick={() => setZoomLevel(1)}>
|
||||||
|
<b style={{ 'font-size': '10px' }}>1:1</b>
|
||||||
|
</button>
|
||||||
<button class={styles.control} onClick={(event) => zoomIn(event)}>
|
<button class={styles.control} onClick={(event) => zoomIn(event)}>
|
||||||
<b>+</b>
|
<b>+</b>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -234,9 +234,12 @@ h5 {
|
||||||
border: 1px solid var(--black-100);
|
border: 1px solid var(--black-100);
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
img {
|
.userpicImage {
|
||||||
width: 100%;
|
width: 180px;
|
||||||
|
height: 180px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
|
background-position: center;
|
||||||
|
background-size: contain;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.hasControls {
|
&.hasControls {
|
||||||
|
@ -254,6 +257,7 @@ h5 {
|
||||||
.control {
|
.control {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
padding: 10px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: var(--background-color);
|
background: var(--background-color);
|
||||||
border: 1px solid var(--black-100);
|
border: 1px solid var(--black-100);
|
||||||
|
|
|
@ -24,6 +24,7 @@ import { Icon } from '../../components/_shared/Icon'
|
||||||
import { Popover } from '../../components/_shared/Popover'
|
import { Popover } from '../../components/_shared/Popover'
|
||||||
import { Image } from '../../components/_shared/Image'
|
import { Image } from '../../components/_shared/Image'
|
||||||
import { Loading } from '../../components/_shared/Loading'
|
import { Loading } from '../../components/_shared/Loading'
|
||||||
|
import { getImageUrl } from '../../utils/getImageUrl'
|
||||||
|
|
||||||
export const ProfileSettingsPage = () => {
|
export const ProfileSettingsPage = () => {
|
||||||
const { t } = useLocalize()
|
const { t } = useLocalize()
|
||||||
|
@ -150,7 +151,15 @@ export const ProfileSettingsPage = () => {
|
||||||
<Loading />
|
<Loading />
|
||||||
</Match>
|
</Match>
|
||||||
<Match when={form.userpic}>
|
<Match when={form.userpic}>
|
||||||
<Image width={180} alt={form.name} src={form.userpic} />
|
<div
|
||||||
|
class={styles.userpicImage}
|
||||||
|
style={{
|
||||||
|
'background-image': `url(${getImageUrl(form.userpic, {
|
||||||
|
width: 180,
|
||||||
|
height: 180
|
||||||
|
})})`
|
||||||
|
}}
|
||||||
|
/>
|
||||||
<div class={styles.controls}>
|
<div class={styles.controls}>
|
||||||
<Popover content={t('Delete userpic')}>
|
<Popover content={t('Delete userpic')}>
|
||||||
{(triggerRef: (el) => void) => (
|
{(triggerRef: (el) => void) => (
|
||||||
|
|
Loading…
Reference in New Issue
Block a user