Full article gallery style fixes
This commit is contained in:
parent
c647cf5a75
commit
b059f1024e
|
@ -175,9 +175,6 @@ export const FullArticle = (props: ArticleProps) => {
|
||||||
</div>
|
</div>
|
||||||
</Show>
|
</Show>
|
||||||
</Show>
|
</Show>
|
||||||
<Show when={props.article.layout === 'image'}>
|
|
||||||
<SolidSwiper images={media()} />
|
|
||||||
</Show>
|
|
||||||
<Show when={media() && props.article.layout === 'video'}>
|
<Show when={media() && props.article.layout === 'video'}>
|
||||||
<div class="media-items">
|
<div class="media-items">
|
||||||
<For each={media() || []}>
|
<For each={media() || []}>
|
||||||
|
@ -203,6 +200,18 @@ export const FullArticle = (props: ArticleProps) => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<Show when={props.article.layout === 'image'}>
|
||||||
|
<div class="floor floor--important">
|
||||||
|
<div class="wide-container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-20 offset-md-2">
|
||||||
|
<SolidSwiper images={media()} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</Show>
|
||||||
|
|
||||||
<div class="wide-container">
|
<div class="wide-container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-16 offset-md-5">
|
<div class="col-md-16 offset-md-5">
|
||||||
|
|
|
@ -156,6 +156,7 @@ export const SolidSwiper = (props: Props) => {
|
||||||
thumbs-swiper={'.thumbSwiper'}
|
thumbs-swiper={'.thumbSwiper'}
|
||||||
observer={true}
|
observer={true}
|
||||||
onSlideChange={handleSlideChange}
|
onSlideChange={handleSlideChange}
|
||||||
|
space-between={20}
|
||||||
>
|
>
|
||||||
<For each={props.images}>
|
<For each={props.images}>
|
||||||
{(slide, index) => (
|
{(slide, index) => (
|
||||||
|
@ -322,7 +323,7 @@ export const SolidSwiper = (props: Props) => {
|
||||||
})}
|
})}
|
||||||
onClick={() => thumbSwipeRef.current.swiper.slidePrev()}
|
onClick={() => thumbSwipeRef.current.swiper.slidePrev()}
|
||||||
>
|
>
|
||||||
<Icon iconClassName={styles.icon} name="swiper-l-arr" class={styles.icon} />
|
<Icon name="swiper-l-arr" class={styles.icon} />
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class={clsx(styles.navigation, styles.thumbsNav, styles.next, {
|
class={clsx(styles.navigation, styles.thumbsNav, styles.next, {
|
||||||
|
@ -330,7 +331,7 @@ export const SolidSwiper = (props: Props) => {
|
||||||
})}
|
})}
|
||||||
onClick={() => thumbSwipeRef.current.swiper.slideNext()}
|
onClick={() => thumbSwipeRef.current.swiper.slideNext()}
|
||||||
>
|
>
|
||||||
<Icon name="swiper-r-arr" iconClassName={styles.icon} class={styles.icon} />
|
<Icon name="swiper-r-arr" class={styles.icon} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
$navigation-reserve: 32px;
|
$navigation-reserve: 32px;
|
||||||
$slide-height: 500px;
|
|
||||||
|
:root {
|
||||||
|
--slide-height: 300px;
|
||||||
|
|
||||||
|
@include media-breakpoint-up(md) {
|
||||||
|
--slide-height: 500px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.Swiper {
|
.Swiper {
|
||||||
display: block;
|
display: block;
|
||||||
|
@ -14,26 +21,23 @@ $slide-height: 500px;
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
margin: auto;
|
margin: auto;
|
||||||
max-width: 800px;
|
//max-width: 800px;
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 24px 0;
|
padding: 24px 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
|
width: 100%;
|
||||||
.holder {
|
|
||||||
width: 600px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.thumbsHolder {
|
.thumbsHolder {
|
||||||
width: unset;
|
width: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.thumbs {
|
.thumbs {
|
||||||
padding: 52px 0;
|
padding: 52px 0;
|
||||||
width: 110px;
|
width: 110px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
height: $slide-height + 40px;
|
height: calc(var(--slide-height) + 40px);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -56,7 +60,7 @@ $slide-height: 500px;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
transform: rotate(45deg);
|
transform: rotate(90deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.prev {
|
&.prev {
|
||||||
|
@ -64,7 +68,7 @@ $slide-height: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.next {
|
&.next {
|
||||||
top: unset;
|
top: auto;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -98,16 +102,15 @@ $slide-height: 500px;
|
||||||
.holder {
|
.holder {
|
||||||
position: relative;
|
position: relative;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 0 $navigation-reserve;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
width: calc(100% - 130px);
|
||||||
|
|
||||||
.counter {
|
.counter {
|
||||||
@include font-size(1.2rem);
|
@include font-size(1.2rem);
|
||||||
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
top: 476px;
|
top: 477px;
|
||||||
right: $navigation-reserve;
|
right: 0;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
padding: 0.2rem 0.8rem;
|
padding: 0.2rem 0.8rem;
|
||||||
color: var(--background-color);
|
color: var(--background-color);
|
||||||
|
@ -118,7 +121,7 @@ $slide-height: 500px;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
height: $slide-height;
|
height: var(--slide-height);
|
||||||
background: var(--placeholder-color-semi);
|
background: var(--placeholder-color-semi);
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
@ -133,15 +136,17 @@ $slide-height: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navigation {
|
.navigation {
|
||||||
|
background: rgb(0 0 0 / 40%);
|
||||||
display: flex;
|
display: flex;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: $navigation-reserve;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
height: $slide-height;
|
height: var(--slide-height);
|
||||||
|
width: 52px;
|
||||||
|
z-index: 2;
|
||||||
|
|
||||||
&.disabled {
|
&.disabled {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
|
@ -163,39 +168,46 @@ $slide-height: 500px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:not(.disabled):hover .icon {
|
&:not(.disabled):hover .icon {
|
||||||
scale: 1.1;
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.articleMode .navigation {
|
&.articleMode .navigation {
|
||||||
filter: invert(1);
|
.icon {
|
||||||
|
filter: invert(1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.slideDescription {
|
.slideDescription {
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
|
|
||||||
.articleTitle {
|
.articleTitle {
|
||||||
@include font-size(1.4rem);
|
@include font-size(1.4rem);
|
||||||
}
|
}
|
||||||
|
|
||||||
.source {
|
.source {
|
||||||
@include font-size(1.2rem);
|
@include font-size(1.2rem);
|
||||||
|
|
||||||
color: var(--secondary-color);
|
color: var(--secondary-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.body {
|
.body {
|
||||||
@include font-size(1.7rem);
|
@include font-size(1.7rem);
|
||||||
|
|
||||||
margin-top: 24px;
|
margin-top: 24px;
|
||||||
|
|
||||||
|
@include media-breakpoint-up(md) {
|
||||||
|
//margin-left: calc((100% + 130px) * 0.15);
|
||||||
|
margin-left: calc(15% + 24px);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.thumbs {
|
.thumbs {
|
||||||
margin: 3rem 0;
|
margin: 3rem 0;
|
||||||
max-height: 488px;
|
max-height: var(--slide-height);
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.navigation {
|
.navigation {
|
||||||
height: unset;
|
height: auto;
|
||||||
|
|
||||||
&.prev {
|
&.prev {
|
||||||
left: -$navigation-reserve;
|
left: -$navigation-reserve;
|
||||||
|
@ -260,7 +272,7 @@ $slide-height: 500px;
|
||||||
&:hover {
|
&:hover {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
filter: unset;
|
filter: none;
|
||||||
|
|
||||||
.thumbAction {
|
.thumbAction {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -309,12 +321,16 @@ $slide-height: 500px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:global(.swiper-lazy-preloader) {
|
||||||
|
top: calc(var(--slide-height) / 2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
:global(.swiper-slide-thumb-active) {
|
:global(.swiper-slide-thumb-active) {
|
||||||
.imageThumb {
|
.imageThumb {
|
||||||
opacity: 1 !important;
|
opacity: 1 !important;
|
||||||
filter: unset !important;
|
filter: none !important;
|
||||||
|
|
||||||
.thumbAction {
|
.thumbAction {
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user