Fixes #273, updates Ghost image and loads notifications template only if members feature is enabled
This commit is contained in:
parent
11415e6da3
commit
0feedfc314
|
@ -1 +1,75 @@
|
|||
.l-fullscreen{display:flex;align-items:center;justify-content:center;height:100vh}.l-fullscreen__content{text-align:center;padding:0 20px}@media only screen and (min-width:48rem){.l-fullscreen__content{max-width:500px}}@media only screen and (min-width:48rem){.l-fullscreen__content.in-subscribe-page{padding:0}}@media only screen and (min-width:64rem){.l-fullscreen__content.in-subscribe-page{max-width:820px}}.m-404-title{color:var(--primary-foreground-color);letter-spacing:3px;line-height:1;font-size:9rem;font-weight:700;margin:0 0 10px}@media only screen and (min-width:48rem){.m-404-title{letter-spacing:4px;font-size:12rem;margin-bottom:5px}}.m-404-subtitle{color:var(--primary-foreground-color);letter-spacing:.4px;line-height:1;font-size:1.25rem;font-weight:600;margin-bottom:20px}@media only screen and (min-width:48rem){.m-404-subtitle{letter-spacing:.5px;font-size:1.5rem}}.m-404-text{letter-spacing:.3px;line-height:1.4;font-size:.875em;padding:0 20px;margin-bottom:25px}@media only screen and (min-width:48rem){.m-404-text{font-size:1rem;padding:0;margin-bottom:30px}}
|
||||
/** Mixins */
|
||||
/** Colors */
|
||||
/** Config */
|
||||
.l-fullscreen {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.l-fullscreen__content {
|
||||
text-align: center;
|
||||
padding: 0 20px;
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.l-fullscreen__content {
|
||||
max-width: 500px;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.l-fullscreen__content.in-subscribe-page {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 64rem) {
|
||||
.l-fullscreen__content.in-subscribe-page {
|
||||
max-width: 820px;
|
||||
}
|
||||
}
|
||||
|
||||
.m-404-title {
|
||||
color: var(--primary-foreground-color);
|
||||
letter-spacing: 3px;
|
||||
line-height: 1;
|
||||
font-size: 9rem;
|
||||
font-weight: 700;
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.m-404-title {
|
||||
letter-spacing: 4px;
|
||||
font-size: 12rem;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.m-404-subtitle {
|
||||
color: var(--primary-foreground-color);
|
||||
letter-spacing: 0.4px;
|
||||
line-height: 1;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.m-404-subtitle {
|
||||
letter-spacing: 0.5px;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.m-404-text {
|
||||
letter-spacing: 0.3px;
|
||||
line-height: 1.4;
|
||||
font-size: 0.875em;
|
||||
padding: 0 20px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.m-404-text {
|
||||
font-size: 1rem;
|
||||
padding: 0;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
}
|
3598
assets/css/app.css
3598
assets/css/app.css
File diff suppressed because one or more lines are too long
|
@ -1 +1,245 @@
|
|||
.m-featured-slider{position:relative;overflow:hidden!important;height:350px;margin:-40px -20px 40px;transition:all .25s cubic-bezier(.02,.01,.47,1)}@media only screen and (min-width:48rem){.m-featured-slider:hover{transform:translateY(-5px);box-shadow:var(--article-shadow-hover),0 0 0 transparent}}@media only screen and (min-width:48rem){.m-featured-slider{width:100%;height:420px;margin:-40px 10px 20px;border-radius:10px}}@media only screen and (min-width:64rem){.m-featured-slider{width:calc(66.66667% - 40px);margin:0 20px 40px;overflow:unset}}.m-featured-slider:not(:root:root){overflow:hidden!important}.m-featured-slider__list{list-style-type:none;padding:0;margin:0;height:100%}@media only screen and (min-width:48rem){.m-featured-slider__list{border-radius:10px;overflow:hidden}}.m-featured-slider__list__item{height:100%;overflow:hidden}@media only screen and (min-width:48rem){.m-featured-slider__list__item{border-radius:10px}}.m-featured-article{position:relative;height:100%;overflow:hidden;background-color:var(--primary-subtle-color);z-index:1}.m-featured-article:hover .m-featured-article__author{box-shadow:0 4px 8px rgba(0,0,0,.3),0 0 0 transparent}.m-featured-article.no-picture .m-featured-article__picture{background-color:var(--primary-subtle-color)}.m-featured-article__picture{position:absolute;top:0;left:0;width:100%;height:100%;background-color:#000;z-index:1}.m-featured-article__picture div{width:100%;height:100%;background-repeat:no-repeat;background-position:50%;background-size:cover;opacity:.7}.m-featured-article__meta{position:absolute;top:20px;left:20px;z-index:4}@media only screen and (min-width:48rem){.m-featured-article__meta{top:40px;left:40px}}.rtl .m-featured-article__meta{left:auto;right:20px}@media only screen and (min-width:48rem){.rtl .m-featured-article__meta{left:auto;right:40px}}.m-featured-article__author{display:block;width:35px;height:35px;background-color:#fff;border:2px solid #fff;border-radius:50%;margin-bottom:20px;transition:all .25s cubic-bezier(.02,.01,.47,1)}.m-featured-article__author div{width:100%;height:100%;background-repeat:no-repeat;background-position:50%;background-size:cover;border-radius:50%}.m-featured-article__tag{color:#fff;letter-spacing:.3px;font-weight:700;font-size:1rem}.m-featured-article__ribbon{display:flex;align-items:center;justify-content:center;position:absolute;top:26px;right:20px;width:24px;height:24px;color:#000;background-color:#fff;border-radius:50%;z-index:2}@media only screen and (min-width:48rem){.m-featured-article__ribbon{justify-content:flex-start;top:47px;right:40px;width:auto;height:22px;padding:0 7px;font-size:.875rem;font-weight:600;border-radius:15px}}.m-featured-article__ribbon span{display:inline-block}@media only screen and (min-width:48rem){.m-featured-article__ribbon span:first-of-type{font-size:.75rem;margin-right:4px}}.m-featured-article__ribbon span:last-of-type{display:none}@media only screen and (min-width:48rem){.m-featured-article__ribbon span:last-of-type{display:block}}.rtl .m-featured-article__ribbon{right:auto;left:20px}@media only screen and (min-width:48rem){.rtl .m-featured-article__ribbon{right:auto;left:40px}}@media only screen and (min-width:48rem){.rtl .m-featured-article__ribbon span:first-of-type{margin-right:0;margin-left:4px}}.m-featured-article__content{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%;padding:120px 20px 20px;position:relative;z-index:3}@media only screen and (min-width:48rem){.m-featured-article__content{padding:125px 40px 40px}}.m-featured-article__title{color:#fff;letter-spacing:.4px;line-height:1.3;font-size:1.625rem;font-weight:600;margin:0}@media only screen and (min-width:48rem){.m-featured-article__title{letter-spacing:.5px;font-size:2.25em;max-width:80%}}.m-featured-article__timestamp{display:flex;align-items:center;color:#fff;letter-spacing:.2px;font-size:.875rem}.m-featured-article__timestamp span:nth-child(2){padding:0 10px}
|
||||
/** Mixins */
|
||||
/** Colors */
|
||||
/** Config */
|
||||
.m-featured-slider {
|
||||
position: relative;
|
||||
overflow: hidden !important;
|
||||
height: 350px;
|
||||
margin: -40px -20px 40px;
|
||||
transition: all 0.25s cubic-bezier(0.02, 0.01, 0.47, 1);
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.m-featured-slider:hover {
|
||||
transform: translateY(-5px);
|
||||
box-shadow: var(--article-shadow-hover), 0 0 0 transparent;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.m-featured-slider {
|
||||
width: 100%;
|
||||
height: 420px;
|
||||
margin: -40px 10px 20px 10px;
|
||||
border-radius: 10px;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 64rem) {
|
||||
.m-featured-slider {
|
||||
width: calc(100% - (100% / 3) - 40px);
|
||||
margin: 0 20px 40px 20px;
|
||||
overflow: unset;
|
||||
}
|
||||
}
|
||||
|
||||
.m-featured-slider:not(:root:root) {
|
||||
overflow: hidden !important;
|
||||
}
|
||||
|
||||
.m-featured-slider__list {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
height: 100%;
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.m-featured-slider__list {
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.m-featured-slider__list__item {
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.m-featured-slider__list__item {
|
||||
border-radius: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.m-featured-article {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
background-color: var(--primary-subtle-color);
|
||||
z-index: 1;
|
||||
}
|
||||
.m-featured-article:hover .m-featured-article__author {
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 0 0 transparent;
|
||||
}
|
||||
.m-featured-article.no-picture .m-featured-article__picture {
|
||||
background-color: var(--primary-subtle-color);
|
||||
}
|
||||
|
||||
.m-featured-article__picture {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #000;
|
||||
z-index: 1;
|
||||
}
|
||||
.m-featured-article__picture div {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.m-featured-article__meta {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
z-index: 4;
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.m-featured-article__meta {
|
||||
top: 40px;
|
||||
left: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.rtl .m-featured-article__meta {
|
||||
left: auto;
|
||||
right: 20px;
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.rtl .m-featured-article__meta {
|
||||
left: auto;
|
||||
right: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.m-featured-article__author {
|
||||
display: block;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
background-color: #fff;
|
||||
border: 2px solid #fff;
|
||||
border-radius: 50%;
|
||||
margin-bottom: 20px;
|
||||
transition: all 0.25s cubic-bezier(0.02, 0.01, 0.47, 1);
|
||||
}
|
||||
.m-featured-article__author div {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
background-size: cover;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.m-featured-article__tag {
|
||||
color: #fff;
|
||||
letter-spacing: 0.3px;
|
||||
font-weight: 700;
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.m-featured-article__ribbon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: absolute;
|
||||
top: 26px;
|
||||
right: 20px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
color: #000;
|
||||
background-color: #fff;
|
||||
border-radius: 50%;
|
||||
z-index: 2;
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.m-featured-article__ribbon {
|
||||
justify-content: flex-start;
|
||||
top: 47px;
|
||||
right: 40px;
|
||||
width: auto;
|
||||
height: 22px;
|
||||
padding: 0 7px;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 600;
|
||||
border-radius: 15px;
|
||||
}
|
||||
}
|
||||
.m-featured-article__ribbon span {
|
||||
display: inline-block;
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.m-featured-article__ribbon span:first-of-type {
|
||||
font-size: 0.75rem;
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
.m-featured-article__ribbon span:last-of-type {
|
||||
display: none;
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.m-featured-article__ribbon span:last-of-type {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.rtl .m-featured-article__ribbon {
|
||||
right: auto;
|
||||
left: 20px;
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.rtl .m-featured-article__ribbon {
|
||||
right: auto;
|
||||
left: 40px;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.rtl .m-featured-article__ribbon span:first-of-type {
|
||||
margin-right: 0;
|
||||
margin-left: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.m-featured-article__content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 120px 20px 20px 20px;
|
||||
position: relative;
|
||||
z-index: 3;
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.m-featured-article__content {
|
||||
padding: 125px 40px 40px 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.m-featured-article__title {
|
||||
color: #fff;
|
||||
letter-spacing: 0.4px;
|
||||
line-height: 1.3;
|
||||
font-size: 1.625rem;
|
||||
font-weight: 600;
|
||||
margin: 0;
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.m-featured-article__title {
|
||||
letter-spacing: 0.5px;
|
||||
font-size: 2.25em;
|
||||
max-width: 80%;
|
||||
}
|
||||
}
|
||||
|
||||
.m-featured-article__timestamp {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #fff;
|
||||
letter-spacing: 0.2px;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
.m-featured-article__timestamp span:nth-child(2) {
|
||||
padding: 0 10px;
|
||||
}
|
|
@ -1 +1,42 @@
|
|||
.l-grid{padding-bottom:20px}@media only screen and (min-width:48rem){.l-grid{display:flex;flex-wrap:wrap;margin:0 -10px}}@media only screen and (min-width:80rem){.l-grid{margin:0 -20px}}@media only screen and (min-width:48rem){.l-grid.centered{justify-content:center}}.m-pagination{display:flex;align-items:center;justify-content:center;margin:0 auto 40px}.m-pagination__text{display:inline-block;color:var(--titles-color);letter-spacing:.2px;text-align:center;font-size:.875rem}@media only screen and (min-width:48rem){.m-pagination__text{letter-spacing:.3px;font-size:1rem}}
|
||||
/** Mixins */
|
||||
.l-grid {
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.l-grid {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin: 0 -10px;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 80rem) {
|
||||
.l-grid {
|
||||
margin: 0 -20px;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.l-grid.centered {
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
.m-pagination {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0 auto 40px;
|
||||
}
|
||||
|
||||
.m-pagination__text {
|
||||
display: inline-block;
|
||||
color: var(--titles-color);
|
||||
letter-spacing: 0.2px;
|
||||
text-align: center;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.m-pagination__text {
|
||||
letter-spacing: 0.3px;
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
|
@ -1 +1,180 @@
|
|||
.l-fullscreen{display:flex;align-items:center;justify-content:center;height:100vh}.l-fullscreen__content{text-align:center;padding:0 20px}@media only screen and (min-width:48rem){.l-fullscreen__content{max-width:500px}}@media only screen and (min-width:48rem){.l-fullscreen__content.in-subscribe-page{padding:0}}@media only screen and (min-width:64rem){.l-fullscreen__content.in-subscribe-page{max-width:820px}}.m-back{display:flex;align-items:center;position:absolute;top:20px;left:20px;color:var(--titles-color);letter-spacing:.2px;font-size:.875rem;cursor:pointer;z-index:2}@media only screen and (min-width:48rem){.m-back{top:40px;letter-spacing:.3px;font-size:1rem}}.m-back span{color:inherit;display:inline-block}.rtl .m-back span:first-of-type{order:2}.m-back__icon{font-size:.75rem;margin-right:10px}@media only screen and (min-width:48rem){.m-back__icon{font-size:.875rem}}.rtl .m-back__icon{order:1}.m-subscribe-section{padding:50px 0;background-color:var(--secondary-subtle-color)}@media only screen and (min-width:48rem){.m-subscribe-section{padding:80px 0}}@media only screen and (min-width:48rem){.m-subscribe-section__content{display:flex;align-items:center;justify-content:space-between}}.m-subscribe-section__text{text-align:center;margin-bottom:30px}@media only screen and (min-width:48rem){.m-subscribe-section__text{flex:1;text-align:left;padding-right:75px;margin-bottom:0}}@media only screen and (min-width:48rem){.rtl .m-subscribe-section__text{text-align:right;padding-right:0;padding-left:75px}}.m-subscribe-section__title{color:var(--titles-color);letter-spacing:.3px;line-height:1.3;font-size:1.25rem;font-weight:600;margin:0 0 20px}@media only screen and (min-width:48rem){.m-subscribe-section__title{letter-spacing:.3px;font-size:1.5rem;margin-bottom:15px}}.m-subscribe-section__description{letter-spacing:.2px;line-height:1.4}@media only screen and (min-width:48rem){.m-subscribe-section__description{font-size:1.125rem}}@media only screen and (min-width:48rem){.m-subscribe-section__form{width:300px;margin:0 auto}}.m-subscribe-section__container.loading .m-button{pointer-events:none}.m-subscribe-section__container.success .m-subscribe__success{display:block}.m-subscribe-section__container.success .m-subscribe__error,.m-subscribe-section__container.success .m-subscribe__form,.m-subscribe-section__container.success .m-subscribe__invalid{display:none}.m-subscribe-section__container.error .m-subscribe__error,.m-subscribe-section__container.invalid .m-subscribe__invalid{display:block}.m-subscribe-section__container.error .m-subscribe__form{margin-bottom:20px}.m-subscribe-section__container .m-subscribe__error,.m-subscribe-section__container .m-subscribe__invalid,.m-subscribe-section__container .m-subscribe__success{display:none}.m-subscribe__success_icon{display:block;width:64px;height:64px;margin:0 auto 25px}.m-subscribe__error{text-align:center}
|
||||
/** Mixins */
|
||||
/** Colors */
|
||||
/** Config */
|
||||
.l-fullscreen {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.l-fullscreen__content {
|
||||
text-align: center;
|
||||
padding: 0 20px;
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.l-fullscreen__content {
|
||||
max-width: 500px;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.l-fullscreen__content.in-subscribe-page {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 64rem) {
|
||||
.l-fullscreen__content.in-subscribe-page {
|
||||
max-width: 820px;
|
||||
}
|
||||
}
|
||||
|
||||
.m-back {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
color: var(--titles-color);
|
||||
letter-spacing: 0.2px;
|
||||
font-size: 0.875rem;
|
||||
cursor: pointer;
|
||||
z-index: 2;
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.m-back {
|
||||
top: 40px;
|
||||
letter-spacing: 0.3px;
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
.m-back span {
|
||||
color: inherit;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.rtl .m-back span:first-of-type {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
.m-back__icon {
|
||||
font-size: 0.75rem;
|
||||
margin-right: 10px;
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.m-back__icon {
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
}
|
||||
|
||||
.rtl .m-back__icon {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.m-subscribe-section {
|
||||
padding: 50px 0;
|
||||
background-color: var(--secondary-subtle-color);
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.m-subscribe-section {
|
||||
padding: 80px 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.m-subscribe-section__content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
}
|
||||
|
||||
.m-subscribe-section__text {
|
||||
text-align: center;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.m-subscribe-section__text {
|
||||
flex: 1;
|
||||
text-align: left;
|
||||
padding-right: 75px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.rtl .m-subscribe-section__text {
|
||||
text-align: right;
|
||||
padding-right: 0;
|
||||
padding-left: 75px;
|
||||
}
|
||||
}
|
||||
|
||||
.m-subscribe-section__title {
|
||||
color: var(--titles-color);
|
||||
letter-spacing: 0.3px;
|
||||
line-height: 1.3;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
margin: 0 0 20px;
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.m-subscribe-section__title {
|
||||
letter-spacing: 0.3px;
|
||||
font-size: 1.5rem;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
.m-subscribe-section__description {
|
||||
letter-spacing: 0.2px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.m-subscribe-section__description {
|
||||
font-size: 1.125rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.m-subscribe-section__form {
|
||||
width: 300px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
.m-subscribe-section__container.loading .m-button {
|
||||
pointer-events: none;
|
||||
}
|
||||
.m-subscribe-section__container.success .m-subscribe__success {
|
||||
display: block;
|
||||
}
|
||||
.m-subscribe-section__container.success .m-subscribe__invalid,
|
||||
.m-subscribe-section__container.success .m-subscribe__error,
|
||||
.m-subscribe-section__container.success .m-subscribe__form {
|
||||
display: none;
|
||||
}
|
||||
.m-subscribe-section__container.invalid .m-subscribe__invalid {
|
||||
display: block;
|
||||
}
|
||||
.m-subscribe-section__container.error .m-subscribe__error {
|
||||
display: block;
|
||||
}
|
||||
.m-subscribe-section__container.error .m-subscribe__form {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.m-subscribe-section__container .m-subscribe__success,
|
||||
.m-subscribe-section__container .m-subscribe__invalid,
|
||||
.m-subscribe-section__container .m-subscribe__error {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.m-subscribe__success_icon {
|
||||
display: block;
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
margin: 0 auto 25px;
|
||||
}
|
||||
|
||||
.m-subscribe__error {
|
||||
text-align: center;
|
||||
}
|
1172
assets/css/post.css
1172
assets/css/post.css
File diff suppressed because one or more lines are too long
|
@ -1 +1,102 @@
|
|||
@media only screen and (min-width:48rem){.l-tags-container{display:flex;flex-wrap:wrap;justify-content:center;margin:0 auto;max-width:720px}}@media only screen and (min-width:64rem){.l-tags-container{max-width:1080px}}.m-tag-card{height:180px;margin:0 0 20px;position:relative;border-radius:10px;border:1px solid var(--secondary-border-color);transition:all .25s cubic-bezier(.02,.01,.47,1)}.m-tag-card:hover{transform:translateY(-5px)}.m-tag-card:hover:before{box-shadow:var(--article-shadow-hover),0 0 0 transparent}@media only screen and (min-width:48rem){.m-tag-card{width:320px;margin:0 20px 40px}}.m-tag-card:before{content:"";position:absolute;top:10px;right:10px;bottom:0;left:10px;border-radius:10px;z-index:1;box-shadow:var(--article-shadow-normal),0 0 0 transparent;transition:all .25s cubic-bezier(.02,.01,.47,1)}.m-tag-card__link{display:block;width:100%;height:100%;border-radius:10px;overflow:hidden;position:relative;background-color:#000;z-index:2}.m-tag-card__link.no-picture{background-color:var(--secondary-subtle-color)}.m-tag-card__picture{position:absolute;top:0;left:0;width:100%;height:100%;border-radius:10px;-o-object-fit:cover;object-fit:cover;opacity:.7;z-index:1}.m-tag-card__info{position:absolute;left:15px;bottom:15px;color:#fff;z-index:2}.m-tag-card__info.no-picture{color:var(--titles-color)}.m-tag-card__name{letter-spacing:.3px;line-height:1.3;font-size:1.25rem;font-weight:600;margin:0 0 5px}.m-tag-card__counter{display:block;letter-spacing:.2px;font-size:.875rem}
|
||||
/** Mixins */
|
||||
/** Colors */
|
||||
/** Config */
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.l-tags-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
margin: 0 auto;
|
||||
max-width: 720px;
|
||||
}
|
||||
}
|
||||
@media only screen and (min-width: 64rem) {
|
||||
.l-tags-container {
|
||||
max-width: 1080px;
|
||||
}
|
||||
}
|
||||
|
||||
.m-tag-card {
|
||||
height: 180px;
|
||||
margin: 0 0 20px;
|
||||
position: relative;
|
||||
border-radius: 10px;
|
||||
border: 1px solid var(--secondary-border-color);
|
||||
transition: all 0.25s cubic-bezier(0.02, 0.01, 0.47, 1);
|
||||
}
|
||||
.m-tag-card:hover {
|
||||
transform: translateY(-5px);
|
||||
}
|
||||
.m-tag-card:hover:before {
|
||||
box-shadow: var(--article-shadow-hover), 0 0 0 transparent;
|
||||
}
|
||||
@media only screen and (min-width: 48rem) {
|
||||
.m-tag-card {
|
||||
width: 320px;
|
||||
margin: 0 20px 40px;
|
||||
}
|
||||
}
|
||||
.m-tag-card:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 10px;
|
||||
bottom: 0;
|
||||
left: 10px;
|
||||
border-radius: 10px;
|
||||
z-index: 1;
|
||||
box-shadow: var(--article-shadow-normal), 0 0 0 transparent;
|
||||
transition: all 0.25s cubic-bezier(0.02, 0.01, 0.47, 1);
|
||||
}
|
||||
|
||||
.m-tag-card__link {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 10px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
background-color: #000;
|
||||
z-index: 2;
|
||||
}
|
||||
.m-tag-card__link.no-picture {
|
||||
background-color: var(--secondary-subtle-color);
|
||||
}
|
||||
|
||||
.m-tag-card__picture {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 10px;
|
||||
-o-object-fit: cover;
|
||||
object-fit: cover;
|
||||
opacity: 0.7;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.m-tag-card__info {
|
||||
position: absolute;
|
||||
left: 15px;
|
||||
bottom: 15px;
|
||||
color: #fff;
|
||||
z-index: 2;
|
||||
}
|
||||
.m-tag-card__info.no-picture {
|
||||
color: var(--titles-color);
|
||||
}
|
||||
|
||||
.m-tag-card__name {
|
||||
letter-spacing: 0.3px;
|
||||
line-height: 1.3;
|
||||
font-size: 1.25rem;
|
||||
font-weight: 600;
|
||||
margin: 0 0 5px;
|
||||
}
|
||||
|
||||
.m-tag-card__counter {
|
||||
display: block;
|
||||
letter-spacing: 0.2px;
|
||||
font-size: 0.875rem;
|
||||
}
|
474
assets/js/app.js
474
assets/js/app.js
File diff suppressed because one or more lines are too long
|
@ -1 +1,186 @@
|
|||
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{1:function(e,t,n){"use strict";n.r(t),n.d(t,"isRTL",(function(){return a})),n.d(t,"isMobile",(function(){return o})),n.d(t,"isDarkMode",(function(){return r})),n.d(t,"formatDate",(function(){return i})),n.d(t,"getParameterByName",(function(){return c})),n.d(t,"adjustImageGallery",(function(){return s})),n.d(t,"managePostImages",(function(){return u})),n.d(t,"makeImagesZoomable",(function(){return l}));var a=function(){var e=document.querySelector("html");return["ar","he","fa"].includes(e.getAttribute("lang"))},o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"768px";return window.matchMedia("(max-width: ".concat(e,")")).matches},r=function(){var e=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)");return e&&e.matches},i=function(e){return e?new Date(e).toLocaleDateString(document.documentElement.lang,{year:"numeric",month:"long",day:"numeric"}):""},c=function(e,t){t||(t=window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var n=new RegExp("[?&]".concat(e,"(=([^&#]*)|&|#|$)")).exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},s=function(){for(var e=document.querySelectorAll(".kg-gallery-image img"),t=0,n=e.length;t<n;t++){var a=e[t].closest(".kg-gallery-image"),o=e[t].attributes.width.value/e[t].attributes.height.value;a.style.flex="".concat(o," 1 0%")}},u=function(e){e(".js-post-content").find("img").each((function(){e(this).closest("figure").hasClass("kg-bookmark-card")||e(this).parent().is("a")||e(this).addClass("js-zoomable");var t=e(this).parent().find("figcaption");t?e(this).attr("alt",t.text()):e(this).attr("alt","")}))},l=function(e,t){var n=t(".js-zoomable");n.on("open",(function(t){o()&&e(t.target).parent().hasClass("kg-gallery-image")&&setTimeout((function(){var t=e(".medium-zoom-image--opened"),n=t[0].style.transform,a=n.substr(0,n.indexOf(" ")),o=parseFloat(a.substr(a.indexOf("(")+1).split(")")[0]),r=n.substr(n.indexOf(" ")+1),i=parseFloat(r.split(",")[1]),c="scale(1) translate3d(0, ".concat(i<0?o*i+i:o*i-i,"px, 0)");t.addClass("medium-zoom-image-mobile"),t[0].style.transform=c}),10)})),n.on("close",(function(){o()&&e(event.target).parent().hasClass("kg-gallery-image")&&e(".medium-zoom-image").removeClass("medium-zoom-image-mobile")}))}},12:function(e,t,n){n(1),n(22),n(27),n(29),n(31),n(33),n(35),e.exports=n(37)},22:function(e,t){},27:function(e,t){},29:function(e,t){},31:function(e,t){},33:function(e,t){},35:function(e,t){},37:function(e,t){}},[[12,0,1]]]);
|
||||
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["/js/helpers"],{
|
||||
|
||||
/***/ "./js/helpers.js":
|
||||
/*!***********************!*\
|
||||
!*** ./js/helpers.js ***!
|
||||
\***********************/
|
||||
/*! exports provided: isRTL, isMobile, isDarkMode, formatDate, getParameterByName, adjustImageGallery, managePostImages, makeImagesZoomable */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isRTL", function() { return isRTL; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isMobile", function() { return isMobile; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDarkMode", function() { return isDarkMode; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatDate", function() { return formatDate; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getParameterByName", function() { return getParameterByName; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "adjustImageGallery", function() { return adjustImageGallery; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "managePostImages", function() { return managePostImages; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeImagesZoomable", function() { return makeImagesZoomable; });
|
||||
var isRTL = function isRTL() {
|
||||
var $html = document.querySelector('html');
|
||||
return ['ar', 'he', 'fa'].includes($html.getAttribute('lang'));
|
||||
};
|
||||
var isMobile = function isMobile() {
|
||||
var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '768px';
|
||||
return window.matchMedia("(max-width: ".concat(width, ")")).matches;
|
||||
};
|
||||
var isDarkMode = function isDarkMode() {
|
||||
var darkModeMatcher = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)');
|
||||
return darkModeMatcher && darkModeMatcher.matches;
|
||||
};
|
||||
var formatDate = function formatDate(date) {
|
||||
if (date) {
|
||||
return new Date(date).toLocaleDateString(document.documentElement.lang, {
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric'
|
||||
});
|
||||
}
|
||||
|
||||
return '';
|
||||
};
|
||||
var getParameterByName = function getParameterByName(name, url) {
|
||||
if (!url) url = window.location.href;
|
||||
name = name.replace(/[\[\]]/g, '\\$&');
|
||||
var regex = new RegExp("[?&]".concat(name, "(=([^&#]*)|&|#|$)"));
|
||||
var results = regex.exec(url);
|
||||
if (!results) return null;
|
||||
if (!results[2]) return '';
|
||||
return decodeURIComponent(results[2].replace(/\+/g, ' '));
|
||||
};
|
||||
var adjustImageGallery = function adjustImageGallery() {
|
||||
var images = document.querySelectorAll('.kg-gallery-image img');
|
||||
|
||||
for (var i = 0, len = images.length; i < len; i++) {
|
||||
var container = images[i].closest('.kg-gallery-image');
|
||||
var width = images[i].attributes.width.value;
|
||||
var height = images[i].attributes.height.value;
|
||||
var ratio = width / height;
|
||||
container.style.flex = "".concat(ratio, " 1 0%");
|
||||
}
|
||||
};
|
||||
var managePostImages = function managePostImages($) {
|
||||
$('.js-post-content').find('img').each(function () {
|
||||
if (!$(this).closest('figure').hasClass('kg-bookmark-card') && !$(this).parent().is('a')) {
|
||||
$(this).addClass('js-zoomable');
|
||||
}
|
||||
|
||||
var $figcaption = $(this).parent().find('figcaption');
|
||||
|
||||
if ($figcaption) {
|
||||
$(this).attr('alt', $figcaption.text());
|
||||
} else {
|
||||
$(this).attr('alt', '');
|
||||
}
|
||||
});
|
||||
};
|
||||
var makeImagesZoomable = function makeImagesZoomable($, mediumZoom) {
|
||||
var zoom = mediumZoom('.js-zoomable');
|
||||
zoom.on('opened', function () {
|
||||
setTimeout(function () {
|
||||
var $mediumZoomImages = $('.medium-zoom-image--opened');
|
||||
$mediumZoomImages.last().hide();
|
||||
}, 10);
|
||||
});
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./sass/404.scss":
|
||||
/*!***********************!*\
|
||||
!*** ./sass/404.scss ***!
|
||||
\***********************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./sass/app.scss":
|
||||
/*!***********************!*\
|
||||
!*** ./sass/app.scss ***!
|
||||
\***********************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./sass/home.scss":
|
||||
/*!************************!*\
|
||||
!*** ./sass/home.scss ***!
|
||||
\************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./sass/listing.scss":
|
||||
/*!***************************!*\
|
||||
!*** ./sass/listing.scss ***!
|
||||
\***************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./sass/newsletter.scss":
|
||||
/*!******************************!*\
|
||||
!*** ./sass/newsletter.scss ***!
|
||||
\******************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./sass/post.scss":
|
||||
/*!************************!*\
|
||||
!*** ./sass/post.scss ***!
|
||||
\************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./sass/tags.scss":
|
||||
/*!************************!*\
|
||||
!*** ./sass/tags.scss ***!
|
||||
\************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 0:
|
||||
/*!***********************************************************************************************************************************************************!*\
|
||||
!*** multi ./js/helpers.js ./sass/app.scss ./sass/home.scss ./sass/listing.scss ./sass/post.scss ./sass/newsletter.scss ./sass/tags.scss ./sass/404.scss ***!
|
||||
\***********************************************************************************************************************************************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
__webpack_require__(/*! /Users/eddie/Code/own/liebling/src/js/helpers.js */"./js/helpers.js");
|
||||
__webpack_require__(/*! /Users/eddie/Code/own/liebling/src/sass/app.scss */"./sass/app.scss");
|
||||
__webpack_require__(/*! /Users/eddie/Code/own/liebling/src/sass/home.scss */"./sass/home.scss");
|
||||
__webpack_require__(/*! /Users/eddie/Code/own/liebling/src/sass/listing.scss */"./sass/listing.scss");
|
||||
__webpack_require__(/*! /Users/eddie/Code/own/liebling/src/sass/post.scss */"./sass/post.scss");
|
||||
__webpack_require__(/*! /Users/eddie/Code/own/liebling/src/sass/newsletter.scss */"./sass/newsletter.scss");
|
||||
__webpack_require__(/*! /Users/eddie/Code/own/liebling/src/sass/tags.scss */"./sass/tags.scss");
|
||||
module.exports = __webpack_require__(/*! /Users/eddie/Code/own/liebling/src/sass/404.scss */"./sass/404.scss");
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
},[[0,"/js/manifest","/js/vendor"]]]);
|
|
@ -1 +1,229 @@
|
|||
(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{1:function(e,t,n){"use strict";n.r(t),n.d(t,"isRTL",(function(){return r})),n.d(t,"isMobile",(function(){return a})),n.d(t,"isDarkMode",(function(){return i})),n.d(t,"formatDate",(function(){return o})),n.d(t,"getParameterByName",(function(){return s})),n.d(t,"adjustImageGallery",(function(){return l})),n.d(t,"managePostImages",(function(){return u})),n.d(t,"makeImagesZoomable",(function(){return d}));var r=function(){var e=document.querySelector("html");return["ar","he","fa"].includes(e.getAttribute("lang"))},a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"768px";return window.matchMedia("(max-width: ".concat(e,")")).matches},i=function(){var e=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)");return e&&e.matches},o=function(e){return e?new Date(e).toLocaleDateString(document.documentElement.lang,{year:"numeric",month:"long",day:"numeric"}):""},s=function(e,t){t||(t=window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var n=new RegExp("[?&]".concat(e,"(=([^&#]*)|&|#|$)")).exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},l=function(){for(var e=document.querySelectorAll(".kg-gallery-image img"),t=0,n=e.length;t<n;t++){var r=e[t].closest(".kg-gallery-image"),a=e[t].attributes.width.value/e[t].attributes.height.value;r.style.flex="".concat(a," 1 0%")}},u=function(e){e(".js-post-content").find("img").each((function(){e(this).closest("figure").hasClass("kg-bookmark-card")||e(this).parent().is("a")||e(this).addClass("js-zoomable");var t=e(this).parent().find("figcaption");t?e(this).attr("alt",t.text()):e(this).attr("alt","")}))},d=function(e,t){var n=t(".js-zoomable");n.on("open",(function(t){a()&&e(t.target).parent().hasClass("kg-gallery-image")&&setTimeout((function(){var t=e(".medium-zoom-image--opened"),n=t[0].style.transform,r=n.substr(0,n.indexOf(" ")),a=parseFloat(r.substr(r.indexOf("(")+1).split(")")[0]),i=n.substr(n.indexOf(" ")+1),o=parseFloat(i.split(",")[1]),s="scale(1) translate3d(0, ".concat(o<0?a*o+o:a*o-o,"px, 0)");t.addClass("medium-zoom-image-mobile"),t[0].style.transform=s}),10)})),n.on("close",(function(){a()&&e(event.target).parent().hasClass("kg-gallery-image")&&e(".medium-zoom-image").removeClass("medium-zoom-image-mobile")}))}},16:function(e,t,n){e.exports=n(17)},17:function(e,t,n){"use strict";n.r(t);var r=n(0),a=n.n(r),i=n(3),o=n(2),s=n(1);a()(document).ready((function(){var e=a()(".js-featured-slider");if(e.length>0){var t=e.find(".js-featured-slide").length,n=new o.d(".js-featured-slider",{type:"slider",rewind:!1,gap:0,swipeThreshold:!1,dragThreshold:!1,direction:Object(s.isRTL)()?"rtl":"ltr",breakpoints:{768:{swipeThreshold:1!==t&&80,dragThreshold:1!==t&&120}}});1===t&&e.find(".js-featured-slider-controls").remove(),n.on("mount.after",(function(){Object(i.a)(".js-featured-article-title",200)})),n.mount({Controls:o.b,Swipe:o.c,Breakpoints:o.a,ArrowDisabler:function(e,n){var r="js-featured-slider-controls",a="js-featured-slider-previous",i="js-featured-slider-next";return{mount:function(){e.settings.rewind||1===t||e.on(["mount.after","run"],(function(){var t=!0,o=!1,s=void 0;try{for(var l,u=n.Controls.items[Symbol.iterator]();!(t=(l=u.next()).done);t=!0){var d=l.value;if(d.className.includes(r)){var c=d.querySelector(".".concat(a));c&&(0===e.index?c.setAttribute("disabled",""):c.removeAttribute("disabled"));var m=d.querySelector(".".concat(i));if(m)(e.settings.bound?e.index+(e.settings.perView-1):e.index)===n.Sizes.length-1?m.setAttribute("disabled",""):m.removeAttribute("disabled")}}}catch(e){o=!0,s=e}finally{try{t||null==u.return||u.return()}finally{if(o)throw s}}}))}}}}),setTimeout((function(){window.dispatchEvent(new Event("resize"))}),350)}Object(i.a)(".js-featured-article-title",200)}))}},[[16,0,1]]]);
|
||||
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["/js/home"],{
|
||||
|
||||
/***/ "./js/helpers.js":
|
||||
/*!***********************!*\
|
||||
!*** ./js/helpers.js ***!
|
||||
\***********************/
|
||||
/*! exports provided: isRTL, isMobile, isDarkMode, formatDate, getParameterByName, adjustImageGallery, managePostImages, makeImagesZoomable */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isRTL", function() { return isRTL; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isMobile", function() { return isMobile; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDarkMode", function() { return isDarkMode; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatDate", function() { return formatDate; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getParameterByName", function() { return getParameterByName; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "adjustImageGallery", function() { return adjustImageGallery; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "managePostImages", function() { return managePostImages; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeImagesZoomable", function() { return makeImagesZoomable; });
|
||||
var isRTL = function isRTL() {
|
||||
var $html = document.querySelector('html');
|
||||
return ['ar', 'he', 'fa'].includes($html.getAttribute('lang'));
|
||||
};
|
||||
var isMobile = function isMobile() {
|
||||
var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '768px';
|
||||
return window.matchMedia("(max-width: ".concat(width, ")")).matches;
|
||||
};
|
||||
var isDarkMode = function isDarkMode() {
|
||||
var darkModeMatcher = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)');
|
||||
return darkModeMatcher && darkModeMatcher.matches;
|
||||
};
|
||||
var formatDate = function formatDate(date) {
|
||||
if (date) {
|
||||
return new Date(date).toLocaleDateString(document.documentElement.lang, {
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric'
|
||||
});
|
||||
}
|
||||
|
||||
return '';
|
||||
};
|
||||
var getParameterByName = function getParameterByName(name, url) {
|
||||
if (!url) url = window.location.href;
|
||||
name = name.replace(/[\[\]]/g, '\\$&');
|
||||
var regex = new RegExp("[?&]".concat(name, "(=([^&#]*)|&|#|$)"));
|
||||
var results = regex.exec(url);
|
||||
if (!results) return null;
|
||||
if (!results[2]) return '';
|
||||
return decodeURIComponent(results[2].replace(/\+/g, ' '));
|
||||
};
|
||||
var adjustImageGallery = function adjustImageGallery() {
|
||||
var images = document.querySelectorAll('.kg-gallery-image img');
|
||||
|
||||
for (var i = 0, len = images.length; i < len; i++) {
|
||||
var container = images[i].closest('.kg-gallery-image');
|
||||
var width = images[i].attributes.width.value;
|
||||
var height = images[i].attributes.height.value;
|
||||
var ratio = width / height;
|
||||
container.style.flex = "".concat(ratio, " 1 0%");
|
||||
}
|
||||
};
|
||||
var managePostImages = function managePostImages($) {
|
||||
$('.js-post-content').find('img').each(function () {
|
||||
if (!$(this).closest('figure').hasClass('kg-bookmark-card') && !$(this).parent().is('a')) {
|
||||
$(this).addClass('js-zoomable');
|
||||
}
|
||||
|
||||
var $figcaption = $(this).parent().find('figcaption');
|
||||
|
||||
if ($figcaption) {
|
||||
$(this).attr('alt', $figcaption.text());
|
||||
} else {
|
||||
$(this).attr('alt', '');
|
||||
}
|
||||
});
|
||||
};
|
||||
var makeImagesZoomable = function makeImagesZoomable($, mediumZoom) {
|
||||
var zoom = mediumZoom('.js-zoomable');
|
||||
zoom.on('opened', function () {
|
||||
setTimeout(function () {
|
||||
var $mediumZoomImages = $('.medium-zoom-image--opened');
|
||||
$mediumZoomImages.last().hide();
|
||||
}, 10);
|
||||
});
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./js/home.js":
|
||||
/*!********************!*\
|
||||
!*** ./js/home.js ***!
|
||||
\********************/
|
||||
/*! no exports provided */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js");
|
||||
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var shave__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! shave */ "./node_modules/shave/dist/shave.es.js");
|
||||
/* harmony import */ var _glidejs_glide_dist_glide_modular_esm__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @glidejs/glide/dist/glide.modular.esm */ "./node_modules/@glidejs/glide/dist/glide.modular.esm.js");
|
||||
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./helpers */ "./js/helpers.js");
|
||||
|
||||
|
||||
|
||||
|
||||
jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).ready(function () {
|
||||
var $featuredSlider = jquery__WEBPACK_IMPORTED_MODULE_0___default()('.js-featured-slider');
|
||||
|
||||
if ($featuredSlider.length > 0) {
|
||||
var numSlides = $featuredSlider.find('.js-featured-slide').length;
|
||||
var featuredSlider = new _glidejs_glide_dist_glide_modular_esm__WEBPACK_IMPORTED_MODULE_2__["default"]('.js-featured-slider', {
|
||||
type: 'slider',
|
||||
rewind: false,
|
||||
gap: 0,
|
||||
swipeThreshold: false,
|
||||
dragThreshold: false,
|
||||
direction: Object(_helpers__WEBPACK_IMPORTED_MODULE_3__["isRTL"])() ? 'rtl' : 'ltr',
|
||||
breakpoints: {
|
||||
768: {
|
||||
swipeThreshold: numSlides === 1 ? false : 80,
|
||||
dragThreshold: numSlides === 1 ? false : 120
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var ArrowDisabler = function ArrowDisabler(Glide, Components) {
|
||||
var controlClasses = {
|
||||
'controls': 'js-featured-slider-controls',
|
||||
'backArrow': 'js-featured-slider-previous',
|
||||
'nextArrow': 'js-featured-slider-next'
|
||||
};
|
||||
return {
|
||||
mount: function mount() {
|
||||
if (Glide.settings.rewind || numSlides === 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
Glide.on(['mount.after', 'run'], function () {
|
||||
var _iteratorNormalCompletion = true;
|
||||
var _didIteratorError = false;
|
||||
var _iteratorError = undefined;
|
||||
|
||||
try {
|
||||
for (var _iterator = Components.Controls.items[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
||||
var controlItem = _step.value;
|
||||
|
||||
if (!controlItem.className.includes(controlClasses.controls)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var left = controlItem.querySelector(".".concat(controlClasses.backArrow));
|
||||
|
||||
if (left) {
|
||||
if (Glide.index === 0) {
|
||||
left.setAttribute('disabled', '');
|
||||
} else {
|
||||
left.removeAttribute('disabled');
|
||||
}
|
||||
}
|
||||
|
||||
var right = controlItem.querySelector(".".concat(controlClasses.nextArrow));
|
||||
|
||||
if (right) {
|
||||
var lastSlideIndex = Glide.settings.bound ? Glide.index + (Glide.settings.perView - 1) : Glide.index;
|
||||
|
||||
if (lastSlideIndex === Components.Sizes.length - 1) {
|
||||
right.setAttribute('disabled', '');
|
||||
} else {
|
||||
right.removeAttribute('disabled');
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (err) {
|
||||
_didIteratorError = true;
|
||||
_iteratorError = err;
|
||||
} finally {
|
||||
try {
|
||||
if (!_iteratorNormalCompletion && _iterator["return"] != null) {
|
||||
_iterator["return"]();
|
||||
}
|
||||
} finally {
|
||||
if (_didIteratorError) {
|
||||
throw _iteratorError;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
if (numSlides === 1) {
|
||||
$featuredSlider.find('.js-featured-slider-controls').remove();
|
||||
}
|
||||
|
||||
featuredSlider.on('mount.after', function () {
|
||||
Object(shave__WEBPACK_IMPORTED_MODULE_1__["default"])('.js-featured-article-title', 200);
|
||||
});
|
||||
featuredSlider.mount({
|
||||
Controls: _glidejs_glide_dist_glide_modular_esm__WEBPACK_IMPORTED_MODULE_2__["Controls"],
|
||||
Swipe: _glidejs_glide_dist_glide_modular_esm__WEBPACK_IMPORTED_MODULE_2__["Swipe"],
|
||||
Breakpoints: _glidejs_glide_dist_glide_modular_esm__WEBPACK_IMPORTED_MODULE_2__["Breakpoints"],
|
||||
ArrowDisabler: ArrowDisabler
|
||||
});
|
||||
setTimeout(function () {
|
||||
window.dispatchEvent(new Event('resize'));
|
||||
}, 350);
|
||||
}
|
||||
|
||||
Object(shave__WEBPACK_IMPORTED_MODULE_1__["default"])('.js-featured-article-title', 200);
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 2:
|
||||
/*!**************************!*\
|
||||
!*** multi ./js/home.js ***!
|
||||
\**************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
module.exports = __webpack_require__(/*! /Users/eddie/Code/own/liebling/src/js/home.js */"./js/home.js");
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
},[[2,"/js/manifest","/js/vendor"]]]);
|
|
@ -1 +1,154 @@
|
|||
!function(e){function r(r){for(var n,l,f=r[0],i=r[1],a=r[2],c=0,s=[];c<f.length;c++)l=f[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n]);for(p&&p(r);s.length;)s.shift()();return u.push.apply(u,a||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,f=1;f<t.length;f++){var i=t[f];0!==o[i]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={0:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var f=window.webpackJsonp=window.webpackJsonp||[],i=f.push.bind(f);f.push=r,f=f.slice();for(var a=0;a<f.length;a++)r(f[a]);var p=i;t()}([]);
|
||||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // install a JSONP callback for chunk loading
|
||||
/******/ function webpackJsonpCallback(data) {
|
||||
/******/ var chunkIds = data[0];
|
||||
/******/ var moreModules = data[1];
|
||||
/******/ var executeModules = data[2];
|
||||
/******/
|
||||
/******/ // add "moreModules" to the modules object,
|
||||
/******/ // then flag all "chunkIds" as loaded and fire callback
|
||||
/******/ var moduleId, chunkId, i = 0, resolves = [];
|
||||
/******/ for(;i < chunkIds.length; i++) {
|
||||
/******/ chunkId = chunkIds[i];
|
||||
/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {
|
||||
/******/ resolves.push(installedChunks[chunkId][0]);
|
||||
/******/ }
|
||||
/******/ installedChunks[chunkId] = 0;
|
||||
/******/ }
|
||||
/******/ for(moduleId in moreModules) {
|
||||
/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
|
||||
/******/ modules[moduleId] = moreModules[moduleId];
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/ if(parentJsonpFunction) parentJsonpFunction(data);
|
||||
/******/
|
||||
/******/ while(resolves.length) {
|
||||
/******/ resolves.shift()();
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // add entry modules from loaded chunk to deferred list
|
||||
/******/ deferredModules.push.apply(deferredModules, executeModules || []);
|
||||
/******/
|
||||
/******/ // run deferred modules when all chunks ready
|
||||
/******/ return checkDeferredModules();
|
||||
/******/ };
|
||||
/******/ function checkDeferredModules() {
|
||||
/******/ var result;
|
||||
/******/ for(var i = 0; i < deferredModules.length; i++) {
|
||||
/******/ var deferredModule = deferredModules[i];
|
||||
/******/ var fulfilled = true;
|
||||
/******/ for(var j = 1; j < deferredModule.length; j++) {
|
||||
/******/ var depId = deferredModule[j];
|
||||
/******/ if(installedChunks[depId] !== 0) fulfilled = false;
|
||||
/******/ }
|
||||
/******/ if(fulfilled) {
|
||||
/******/ deferredModules.splice(i--, 1);
|
||||
/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
|
||||
/******/ }
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ return result;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // object to store loaded and loading chunks
|
||||
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
|
||||
/******/ // Promise = chunk loading, 0 = chunk loaded
|
||||
/******/ var installedChunks = {
|
||||
/******/ "/js/manifest": 0
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ var deferredModules = [];
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = function(exports) {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // create a fake namespace object
|
||||
/******/ // mode & 1: value is a module id, require it
|
||||
/******/ // mode & 2: merge all properties of value into the ns
|
||||
/******/ // mode & 4: return value when already ns object
|
||||
/******/ // mode & 8|1: behave like require
|
||||
/******/ __webpack_require__.t = function(value, mode) {
|
||||
/******/ if(mode & 1) value = __webpack_require__(value);
|
||||
/******/ if(mode & 8) return value;
|
||||
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
||||
/******/ var ns = Object.create(null);
|
||||
/******/ __webpack_require__.r(ns);
|
||||
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
||||
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
||||
/******/ return ns;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "/";
|
||||
/******/
|
||||
/******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || [];
|
||||
/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
|
||||
/******/ jsonpArray.push = webpackJsonpCallback;
|
||||
/******/ jsonpArray = jsonpArray.slice();
|
||||
/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
|
||||
/******/ var parentJsonpFunction = oldJsonpFunction;
|
||||
/******/
|
||||
/******/
|
||||
/******/ // run deferred modules from other chunks
|
||||
/******/ checkDeferredModules();
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([]);
|
|
@ -1 +1,130 @@
|
|||
(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{1:function(e,t,n){"use strict";n.r(t),n.d(t,"isRTL",(function(){return a})),n.d(t,"isMobile",(function(){return o})),n.d(t,"isDarkMode",(function(){return r})),n.d(t,"formatDate",(function(){return i})),n.d(t,"getParameterByName",(function(){return s})),n.d(t,"adjustImageGallery",(function(){return c})),n.d(t,"managePostImages",(function(){return u})),n.d(t,"makeImagesZoomable",(function(){return m}));var a=function(){var e=document.querySelector("html");return["ar","he","fa"].includes(e.getAttribute("lang"))},o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"768px";return window.matchMedia("(max-width: ".concat(e,")")).matches},r=function(){var e=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)");return e&&e.matches},i=function(e){return e?new Date(e).toLocaleDateString(document.documentElement.lang,{year:"numeric",month:"long",day:"numeric"}):""},s=function(e,t){t||(t=window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var n=new RegExp("[?&]".concat(e,"(=([^&#]*)|&|#|$)")).exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},c=function(){for(var e=document.querySelectorAll(".kg-gallery-image img"),t=0,n=e.length;t<n;t++){var a=e[t].closest(".kg-gallery-image"),o=e[t].attributes.width.value/e[t].attributes.height.value;a.style.flex="".concat(o," 1 0%")}},u=function(e){e(".js-post-content").find("img").each((function(){e(this).closest("figure").hasClass("kg-bookmark-card")||e(this).parent().is("a")||e(this).addClass("js-zoomable");var t=e(this).parent().find("figcaption");t?e(this).attr("alt",t.text()):e(this).attr("alt","")}))},m=function(e,t){var n=t(".js-zoomable");n.on("open",(function(t){o()&&e(t.target).parent().hasClass("kg-gallery-image")&&setTimeout((function(){var t=e(".medium-zoom-image--opened"),n=t[0].style.transform,a=n.substr(0,n.indexOf(" ")),o=parseFloat(a.substr(a.indexOf("(")+1).split(")")[0]),r=n.substr(n.indexOf(" ")+1),i=parseFloat(r.split(",")[1]),s="scale(1) translate3d(0, ".concat(i<0?o*i+i:o*i-i,"px, 0)");t.addClass("medium-zoom-image-mobile"),t[0].style.transform=s}),10)})),n.on("close",(function(){o()&&e(event.target).parent().hasClass("kg-gallery-image")&&e(".medium-zoom-image").removeClass("medium-zoom-image-mobile")}))}},20:function(e,t,n){e.exports=n(21)},21:function(e,t,n){"use strict";n.r(t);var a=n(0),o=n.n(a),r=n(5),i=n.n(r),s=n(4),c=n(1);o()(document).ready((function(){i()(".js-post-content"),Object(c.adjustImageGallery)(),Object(c.managePostImages)(o.a),Object(c.makeImagesZoomable)(o.a,s.a)}))}},[[20,0,1]]]);
|
||||
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["/js/page"],{
|
||||
|
||||
/***/ "./js/helpers.js":
|
||||
/*!***********************!*\
|
||||
!*** ./js/helpers.js ***!
|
||||
\***********************/
|
||||
/*! exports provided: isRTL, isMobile, isDarkMode, formatDate, getParameterByName, adjustImageGallery, managePostImages, makeImagesZoomable */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isRTL", function() { return isRTL; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isMobile", function() { return isMobile; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDarkMode", function() { return isDarkMode; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatDate", function() { return formatDate; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getParameterByName", function() { return getParameterByName; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "adjustImageGallery", function() { return adjustImageGallery; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "managePostImages", function() { return managePostImages; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeImagesZoomable", function() { return makeImagesZoomable; });
|
||||
var isRTL = function isRTL() {
|
||||
var $html = document.querySelector('html');
|
||||
return ['ar', 'he', 'fa'].includes($html.getAttribute('lang'));
|
||||
};
|
||||
var isMobile = function isMobile() {
|
||||
var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '768px';
|
||||
return window.matchMedia("(max-width: ".concat(width, ")")).matches;
|
||||
};
|
||||
var isDarkMode = function isDarkMode() {
|
||||
var darkModeMatcher = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)');
|
||||
return darkModeMatcher && darkModeMatcher.matches;
|
||||
};
|
||||
var formatDate = function formatDate(date) {
|
||||
if (date) {
|
||||
return new Date(date).toLocaleDateString(document.documentElement.lang, {
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric'
|
||||
});
|
||||
}
|
||||
|
||||
return '';
|
||||
};
|
||||
var getParameterByName = function getParameterByName(name, url) {
|
||||
if (!url) url = window.location.href;
|
||||
name = name.replace(/[\[\]]/g, '\\$&');
|
||||
var regex = new RegExp("[?&]".concat(name, "(=([^&#]*)|&|#|$)"));
|
||||
var results = regex.exec(url);
|
||||
if (!results) return null;
|
||||
if (!results[2]) return '';
|
||||
return decodeURIComponent(results[2].replace(/\+/g, ' '));
|
||||
};
|
||||
var adjustImageGallery = function adjustImageGallery() {
|
||||
var images = document.querySelectorAll('.kg-gallery-image img');
|
||||
|
||||
for (var i = 0, len = images.length; i < len; i++) {
|
||||
var container = images[i].closest('.kg-gallery-image');
|
||||
var width = images[i].attributes.width.value;
|
||||
var height = images[i].attributes.height.value;
|
||||
var ratio = width / height;
|
||||
container.style.flex = "".concat(ratio, " 1 0%");
|
||||
}
|
||||
};
|
||||
var managePostImages = function managePostImages($) {
|
||||
$('.js-post-content').find('img').each(function () {
|
||||
if (!$(this).closest('figure').hasClass('kg-bookmark-card') && !$(this).parent().is('a')) {
|
||||
$(this).addClass('js-zoomable');
|
||||
}
|
||||
|
||||
var $figcaption = $(this).parent().find('figcaption');
|
||||
|
||||
if ($figcaption) {
|
||||
$(this).attr('alt', $figcaption.text());
|
||||
} else {
|
||||
$(this).attr('alt', '');
|
||||
}
|
||||
});
|
||||
};
|
||||
var makeImagesZoomable = function makeImagesZoomable($, mediumZoom) {
|
||||
var zoom = mediumZoom('.js-zoomable');
|
||||
zoom.on('opened', function () {
|
||||
setTimeout(function () {
|
||||
var $mediumZoomImages = $('.medium-zoom-image--opened');
|
||||
$mediumZoomImages.last().hide();
|
||||
}, 10);
|
||||
});
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./js/page.js":
|
||||
/*!********************!*\
|
||||
!*** ./js/page.js ***!
|
||||
\********************/
|
||||
/*! no exports provided */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js");
|
||||
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var fitvids__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! fitvids */ "./node_modules/fitvids/index.js");
|
||||
/* harmony import */ var fitvids__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fitvids__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var medium_zoom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! medium-zoom */ "./node_modules/medium-zoom/dist/medium-zoom.esm.js");
|
||||
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./helpers */ "./js/helpers.js");
|
||||
|
||||
|
||||
|
||||
|
||||
jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).ready(function () {
|
||||
fitvids__WEBPACK_IMPORTED_MODULE_1___default()('.js-post-content');
|
||||
Object(_helpers__WEBPACK_IMPORTED_MODULE_3__["adjustImageGallery"])();
|
||||
Object(_helpers__WEBPACK_IMPORTED_MODULE_3__["managePostImages"])(jquery__WEBPACK_IMPORTED_MODULE_0___default.a);
|
||||
Object(_helpers__WEBPACK_IMPORTED_MODULE_3__["makeImagesZoomable"])(jquery__WEBPACK_IMPORTED_MODULE_0___default.a, medium_zoom__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 4:
|
||||
/*!**************************!*\
|
||||
!*** multi ./js/page.js ***!
|
||||
\**************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
module.exports = __webpack_require__(/*! /Users/eddie/Code/own/liebling/src/js/page.js */"./js/page.js");
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
},[[4,"/js/manifest","/js/vendor"]]]);
|
|
@ -1 +1,308 @@
|
|||
(window.webpackJsonp=window.webpackJsonp||[]).push([[6],{1:function(e,t,n){"use strict";n.r(t),n.d(t,"isRTL",(function(){return a})),n.d(t,"isMobile",(function(){return o})),n.d(t,"isDarkMode",(function(){return r})),n.d(t,"formatDate",(function(){return i})),n.d(t,"getParameterByName",(function(){return s})),n.d(t,"adjustImageGallery",(function(){return c})),n.d(t,"managePostImages",(function(){return l})),n.d(t,"makeImagesZoomable",(function(){return d}));var a=function(){var e=document.querySelector("html");return["ar","he","fa"].includes(e.getAttribute("lang"))},o=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"768px";return window.matchMedia("(max-width: ".concat(e,")")).matches},r=function(){var e=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)");return e&&e.matches},i=function(e){return e?new Date(e).toLocaleDateString(document.documentElement.lang,{year:"numeric",month:"long",day:"numeric"}):""},s=function(e,t){t||(t=window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var n=new RegExp("[?&]".concat(e,"(=([^&#]*)|&|#|$)")).exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},c=function(){for(var e=document.querySelectorAll(".kg-gallery-image img"),t=0,n=e.length;t<n;t++){var a=e[t].closest(".kg-gallery-image"),o=e[t].attributes.width.value/e[t].attributes.height.value;a.style.flex="".concat(o," 1 0%")}},l=function(e){e(".js-post-content").find("img").each((function(){e(this).closest("figure").hasClass("kg-bookmark-card")||e(this).parent().is("a")||e(this).addClass("js-zoomable");var t=e(this).parent().find("figcaption");t?e(this).attr("alt",t.text()):e(this).attr("alt","")}))},d=function(e,t){var n=t(".js-zoomable");n.on("open",(function(t){o()&&e(t.target).parent().hasClass("kg-gallery-image")&&setTimeout((function(){var t=e(".medium-zoom-image--opened"),n=t[0].style.transform,a=n.substr(0,n.indexOf(" ")),o=parseFloat(a.substr(a.indexOf("(")+1).split(")")[0]),r=n.substr(n.indexOf(" ")+1),i=parseFloat(r.split(",")[1]),s="scale(1) translate3d(0, ".concat(i<0?o*i+i:o*i-i,"px, 0)");t.addClass("medium-zoom-image-mobile"),t[0].style.transform=s}),10)})),n.on("close",(function(){o()&&e(event.target).parent().hasClass("kg-gallery-image")&&e(".medium-zoom-image").removeClass("medium-zoom-image-mobile")}))}},18:function(e,t,n){e.exports=n(19)},19:function(e,t,n){"use strict";n.r(t);var a=n(0),o=n.n(a),r=n(4),i=n(5),s=n.n(i),c=n(3),l=n(2),d=n(1),u=null,m=null,f=window.pageYOffset,h=0,g=0,p=0,w=!1,b=function(){f=window.pageYOffset,j()},y=function(e){Object(d.isMobile)("1023px")?(o()("body").addClass("share-menu-displayed"),setTimeout((function(){u.removeAttr("data-aos")}),e)):o()("body").removeClass("share-menu-displayed")},v=function(){O(),y(100),setTimeout((function(){T(),j()}),200)},j=function(){w||requestAnimationFrame(k),w=!0},k=function(){var e=g-h,t=Math.ceil(f/e*100);t<=100&&x(t),w=!1},O=function(){h=window.innerHeight,g=o()(document).height()},T=function(){var e=m.parent().width(),t=e/2,n=Object(d.isMobile)()?2:3;m.parent().attr("viewBox","0 0 ".concat(e," ").concat(e)),m.attr("stroke-width",n),m.attr("r",t-(n-1)),m.attr("cx",t),m.attr("cy",t),p=2*t*Math.PI,m[0].style.strokeDasharray="".concat(p," ").concat(p),m[0].style.strokeDashoffset=p},x=function(e){if(e<=100){var t=p-e/100*p;m[0].style.strokeDashoffset=t}};o()(document).ready((function(){u=o()(".js-aos-wrapper");var e=o()(".js-scrolltop"),t=o()(".js-load-comments"),n=o()(".js-comments-iframe"),a=o()(".js-recommended-slider");if(s()(".js-post-content"),Object(d.adjustImageGallery)(),y(1e3),a.length>0){var i=new l.d(".js-recommended-slider",{type:"slider",rewind:!1,perView:3,swipeThreshold:!1,dragThreshold:!1,gap:0,direction:Object(d.isRTL)()?"rtl":"ltr",breakpoints:{1023:{type:"carousel",perView:2,swipeThreshold:80,dragThreshold:120},720:{type:"carousel",perView:2,swipeThreshold:80,dragThreshold:120},568:{type:"carousel",perView:1,swipeThreshold:80,dragThreshold:120}}});i.on("mount.after",(function(){Object(c.a)(".js-article-card-title",100),Object(c.a)(".js-article-card-title-no-image",250)})),i.on("length.change",(function(e){1===e&&(i.update({type:"slider"}),a.find(".js-controls").remove())})),i.mount({Controls:l.b,Swipe:l.c,Breakpoints:l.a,Length:function(e,t,n){return{mount:function(){n.emit("length.change",t.Sizes.length)}}}})}Object(c.a)(".js-article-card-title",100),Object(c.a)(".js-article-card-title-no-image",250),e.click((function(){o()("html, body").animate({scrollTop:0},500)})),t.click((function(){t.parent().hide(),n.fadeIn("slow")})),Object(d.managePostImages)(o.a),Object(d.makeImagesZoomable)(o.a,r.a),window.addEventListener("scroll",b,{passive:!0}),window.addEventListener("resize",v,{passive:!0})})),o()(window).on("load",(function(){m=o()(".js-progress"),O(),T(),k(),setTimeout((function(){m.parent().css("opacity",1)}),300)}))}},[[18,0,1]]]);
|
||||
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["/js/post"],{
|
||||
|
||||
/***/ "./js/helpers.js":
|
||||
/*!***********************!*\
|
||||
!*** ./js/helpers.js ***!
|
||||
\***********************/
|
||||
/*! exports provided: isRTL, isMobile, isDarkMode, formatDate, getParameterByName, adjustImageGallery, managePostImages, makeImagesZoomable */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isRTL", function() { return isRTL; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isMobile", function() { return isMobile; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDarkMode", function() { return isDarkMode; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatDate", function() { return formatDate; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getParameterByName", function() { return getParameterByName; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "adjustImageGallery", function() { return adjustImageGallery; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "managePostImages", function() { return managePostImages; });
|
||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "makeImagesZoomable", function() { return makeImagesZoomable; });
|
||||
var isRTL = function isRTL() {
|
||||
var $html = document.querySelector('html');
|
||||
return ['ar', 'he', 'fa'].includes($html.getAttribute('lang'));
|
||||
};
|
||||
var isMobile = function isMobile() {
|
||||
var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '768px';
|
||||
return window.matchMedia("(max-width: ".concat(width, ")")).matches;
|
||||
};
|
||||
var isDarkMode = function isDarkMode() {
|
||||
var darkModeMatcher = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)');
|
||||
return darkModeMatcher && darkModeMatcher.matches;
|
||||
};
|
||||
var formatDate = function formatDate(date) {
|
||||
if (date) {
|
||||
return new Date(date).toLocaleDateString(document.documentElement.lang, {
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric'
|
||||
});
|
||||
}
|
||||
|
||||
return '';
|
||||
};
|
||||
var getParameterByName = function getParameterByName(name, url) {
|
||||
if (!url) url = window.location.href;
|
||||
name = name.replace(/[\[\]]/g, '\\$&');
|
||||
var regex = new RegExp("[?&]".concat(name, "(=([^&#]*)|&|#|$)"));
|
||||
var results = regex.exec(url);
|
||||
if (!results) return null;
|
||||
if (!results[2]) return '';
|
||||
return decodeURIComponent(results[2].replace(/\+/g, ' '));
|
||||
};
|
||||
var adjustImageGallery = function adjustImageGallery() {
|
||||
var images = document.querySelectorAll('.kg-gallery-image img');
|
||||
|
||||
for (var i = 0, len = images.length; i < len; i++) {
|
||||
var container = images[i].closest('.kg-gallery-image');
|
||||
var width = images[i].attributes.width.value;
|
||||
var height = images[i].attributes.height.value;
|
||||
var ratio = width / height;
|
||||
container.style.flex = "".concat(ratio, " 1 0%");
|
||||
}
|
||||
};
|
||||
var managePostImages = function managePostImages($) {
|
||||
$('.js-post-content').find('img').each(function () {
|
||||
if (!$(this).closest('figure').hasClass('kg-bookmark-card') && !$(this).parent().is('a')) {
|
||||
$(this).addClass('js-zoomable');
|
||||
}
|
||||
|
||||
var $figcaption = $(this).parent().find('figcaption');
|
||||
|
||||
if ($figcaption) {
|
||||
$(this).attr('alt', $figcaption.text());
|
||||
} else {
|
||||
$(this).attr('alt', '');
|
||||
}
|
||||
});
|
||||
};
|
||||
var makeImagesZoomable = function makeImagesZoomable($, mediumZoom) {
|
||||
var zoom = mediumZoom('.js-zoomable');
|
||||
zoom.on('opened', function () {
|
||||
setTimeout(function () {
|
||||
var $mediumZoomImages = $('.medium-zoom-image--opened');
|
||||
$mediumZoomImages.last().hide();
|
||||
}, 10);
|
||||
});
|
||||
};
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./js/post.js":
|
||||
/*!********************!*\
|
||||
!*** ./js/post.js ***!
|
||||
\********************/
|
||||
/*! no exports provided */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js");
|
||||
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var medium_zoom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! medium-zoom */ "./node_modules/medium-zoom/dist/medium-zoom.esm.js");
|
||||
/* harmony import */ var fitvids__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! fitvids */ "./node_modules/fitvids/index.js");
|
||||
/* harmony import */ var fitvids__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(fitvids__WEBPACK_IMPORTED_MODULE_2__);
|
||||
/* harmony import */ var shave__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! shave */ "./node_modules/shave/dist/shave.es.js");
|
||||
/* harmony import */ var _glidejs_glide_dist_glide_modular_esm__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @glidejs/glide/dist/glide.modular.esm */ "./node_modules/@glidejs/glide/dist/glide.modular.esm.js");
|
||||
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./helpers */ "./js/helpers.js");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var $aosWrapper = null;
|
||||
var $progressCircle = null;
|
||||
var lastScrollingY = window.pageYOffset;
|
||||
var lastWindowHeight = 0;
|
||||
var lastDocumentHeight = 0;
|
||||
var circumference = 0;
|
||||
var isTicking = false;
|
||||
|
||||
var onScrolling = function onScrolling() {
|
||||
lastScrollingY = window.pageYOffset;
|
||||
requestTicking();
|
||||
};
|
||||
|
||||
var adjustShare = function adjustShare(timeout) {
|
||||
if (!Object(_helpers__WEBPACK_IMPORTED_MODULE_5__["isMobile"])('1023px')) {
|
||||
jquery__WEBPACK_IMPORTED_MODULE_0___default()('body').removeClass('share-menu-displayed');
|
||||
} else {
|
||||
jquery__WEBPACK_IMPORTED_MODULE_0___default()('body').addClass('share-menu-displayed');
|
||||
setTimeout(function () {
|
||||
$aosWrapper.removeAttr('data-aos');
|
||||
}, timeout);
|
||||
}
|
||||
};
|
||||
|
||||
var onResizing = function onResizing() {
|
||||
setHeights();
|
||||
adjustShare(100);
|
||||
setTimeout(function () {
|
||||
setCircleStyles();
|
||||
requestTicking();
|
||||
}, 200);
|
||||
};
|
||||
|
||||
var requestTicking = function requestTicking() {
|
||||
if (!isTicking) {
|
||||
requestAnimationFrame(updating);
|
||||
}
|
||||
|
||||
isTicking = true;
|
||||
};
|
||||
|
||||
var updating = function updating() {
|
||||
var progressMax = lastDocumentHeight - lastWindowHeight;
|
||||
var percent = Math.ceil(lastScrollingY / progressMax * 100);
|
||||
|
||||
if (percent <= 100) {
|
||||
setProgress(percent);
|
||||
}
|
||||
|
||||
isTicking = false;
|
||||
};
|
||||
|
||||
var setHeights = function setHeights() {
|
||||
lastWindowHeight = window.innerHeight;
|
||||
lastDocumentHeight = jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).height();
|
||||
};
|
||||
|
||||
var setCircleStyles = function setCircleStyles() {
|
||||
var svgWidth = $progressCircle.parent().width();
|
||||
var radiusCircle = svgWidth / 2;
|
||||
var borderWidth = Object(_helpers__WEBPACK_IMPORTED_MODULE_5__["isMobile"])() ? 2 : 3;
|
||||
$progressCircle.parent().attr('viewBox', "0 0 ".concat(svgWidth, " ").concat(svgWidth));
|
||||
$progressCircle.attr('stroke-width', borderWidth);
|
||||
$progressCircle.attr('r', radiusCircle - (borderWidth - 1));
|
||||
$progressCircle.attr('cx', radiusCircle);
|
||||
$progressCircle.attr('cy', radiusCircle);
|
||||
circumference = radiusCircle * 2 * Math.PI;
|
||||
$progressCircle[0].style.strokeDasharray = "".concat(circumference, " ").concat(circumference);
|
||||
$progressCircle[0].style.strokeDashoffset = circumference;
|
||||
};
|
||||
|
||||
var setProgress = function setProgress(percent) {
|
||||
if (percent <= 100) {
|
||||
var offset = circumference - percent / 100 * circumference;
|
||||
$progressCircle[0].style.strokeDashoffset = offset;
|
||||
}
|
||||
};
|
||||
|
||||
var prepareProgressCircle = function prepareProgressCircle() {
|
||||
$progressCircle = jquery__WEBPACK_IMPORTED_MODULE_0___default()('.js-progress');
|
||||
setHeights();
|
||||
setCircleStyles();
|
||||
updating();
|
||||
setTimeout(function () {
|
||||
$progressCircle.parent().css('opacity', 1);
|
||||
}, 300);
|
||||
};
|
||||
|
||||
jquery__WEBPACK_IMPORTED_MODULE_0___default()(document).ready(function () {
|
||||
$aosWrapper = jquery__WEBPACK_IMPORTED_MODULE_0___default()('.js-aos-wrapper');
|
||||
var $scrollButton = jquery__WEBPACK_IMPORTED_MODULE_0___default()('.js-scrolltop');
|
||||
var $loadComments = jquery__WEBPACK_IMPORTED_MODULE_0___default()('.js-load-comments');
|
||||
var $commentsIframe = jquery__WEBPACK_IMPORTED_MODULE_0___default()('.js-comments-iframe');
|
||||
var $recommendedSlider = jquery__WEBPACK_IMPORTED_MODULE_0___default()('.js-recommended-slider');
|
||||
fitvids__WEBPACK_IMPORTED_MODULE_2___default()('.js-post-content');
|
||||
Object(_helpers__WEBPACK_IMPORTED_MODULE_5__["adjustImageGallery"])();
|
||||
adjustShare(1000);
|
||||
|
||||
if ($recommendedSlider.length > 0) {
|
||||
var recommendedSlider = new _glidejs_glide_dist_glide_modular_esm__WEBPACK_IMPORTED_MODULE_4__["default"]('.js-recommended-slider', {
|
||||
type: 'slider',
|
||||
rewind: false,
|
||||
perView: 3,
|
||||
swipeThreshold: false,
|
||||
dragThreshold: false,
|
||||
gap: 0,
|
||||
direction: Object(_helpers__WEBPACK_IMPORTED_MODULE_5__["isRTL"])() ? 'rtl' : 'ltr',
|
||||
breakpoints: {
|
||||
1023: {
|
||||
type: 'carousel',
|
||||
perView: 2,
|
||||
swipeThreshold: 80,
|
||||
dragThreshold: 120
|
||||
},
|
||||
720: {
|
||||
type: 'carousel',
|
||||
perView: 2,
|
||||
swipeThreshold: 80,
|
||||
dragThreshold: 120
|
||||
},
|
||||
568: {
|
||||
type: 'carousel',
|
||||
perView: 1,
|
||||
swipeThreshold: 80,
|
||||
dragThreshold: 120
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var Length = function Length(Glide, Components, Events) {
|
||||
return {
|
||||
mount: function mount() {
|
||||
Events.emit('length.change', Components.Sizes.length);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
recommendedSlider.on('mount.after', function () {
|
||||
Object(shave__WEBPACK_IMPORTED_MODULE_3__["default"])('.js-article-card-title', 100);
|
||||
Object(shave__WEBPACK_IMPORTED_MODULE_3__["default"])('.js-article-card-title-no-image', 250);
|
||||
});
|
||||
recommendedSlider.on('length.change', function (length) {
|
||||
if (length === 1) {
|
||||
recommendedSlider.update({
|
||||
type: 'slider'
|
||||
});
|
||||
$recommendedSlider.find('.js-controls').remove();
|
||||
}
|
||||
});
|
||||
recommendedSlider.mount({
|
||||
Controls: _glidejs_glide_dist_glide_modular_esm__WEBPACK_IMPORTED_MODULE_4__["Controls"],
|
||||
Swipe: _glidejs_glide_dist_glide_modular_esm__WEBPACK_IMPORTED_MODULE_4__["Swipe"],
|
||||
Breakpoints: _glidejs_glide_dist_glide_modular_esm__WEBPACK_IMPORTED_MODULE_4__["Breakpoints"],
|
||||
Length: Length
|
||||
});
|
||||
}
|
||||
|
||||
Object(shave__WEBPACK_IMPORTED_MODULE_3__["default"])('.js-article-card-title', 100);
|
||||
Object(shave__WEBPACK_IMPORTED_MODULE_3__["default"])('.js-article-card-title-no-image', 250);
|
||||
$scrollButton.click(function () {
|
||||
jquery__WEBPACK_IMPORTED_MODULE_0___default()('html, body').animate({
|
||||
scrollTop: 0
|
||||
}, 500);
|
||||
});
|
||||
$loadComments.click(function () {
|
||||
$loadComments.parent().hide();
|
||||
$commentsIframe.fadeIn('slow');
|
||||
});
|
||||
Object(_helpers__WEBPACK_IMPORTED_MODULE_5__["managePostImages"])(jquery__WEBPACK_IMPORTED_MODULE_0___default.a);
|
||||
Object(_helpers__WEBPACK_IMPORTED_MODULE_5__["makeImagesZoomable"])(jquery__WEBPACK_IMPORTED_MODULE_0___default.a, medium_zoom__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
||||
window.addEventListener('scroll', onScrolling, {
|
||||
passive: true
|
||||
});
|
||||
window.addEventListener('resize', onResizing, {
|
||||
passive: true
|
||||
});
|
||||
});
|
||||
jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('load', function () {
|
||||
prepareProgressCircle();
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 3:
|
||||
/*!**************************!*\
|
||||
!*** multi ./js/post.js ***!
|
||||
\**************************/
|
||||
/*! no static exports found */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
module.exports = __webpack_require__(/*! /Users/eddie/Code/own/liebling/src/js/post.js */"./js/post.js");
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
},[[3,"/js/manifest","/js/vendor"]]]);
|
19959
assets/js/vendor.js
19959
assets/js/vendor.js
File diff suppressed because one or more lines are too long
|
@ -103,7 +103,9 @@
|
|||
{{> footer}}
|
||||
|
||||
{{!-- Notifications alerts --}}
|
||||
{{#if @labs.members}}
|
||||
{{> "notifications"}}
|
||||
{{/if}}
|
||||
|
||||
{{!-- Common scripts shared between pages --}}
|
||||
<script crossorigin="anonymous" src="https://polyfill.io/v3/polyfill.min.js?features=IntersectionObserver%2CPromise%2CArray.prototype.includes%2CString.prototype.endsWith%2CString.prototype.startsWith%2CObject.assign%2CNodeList.prototype.forEach"></script>
|
||||
|
|
|
@ -54,5 +54,5 @@
|
|||
"desktop": "assets/screenshot-desktop.jpg",
|
||||
"mobile": "assets/screenshot-mobile.jpg"
|
||||
},
|
||||
"version": "0.8.5"
|
||||
"version": "0.8.6"
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ version: '3'
|
|||
|
||||
services:
|
||||
ghost:
|
||||
image: ghost:3.7.0
|
||||
image: ghost:3.32.1
|
||||
container_name: ghost
|
||||
volumes:
|
||||
- ./..:/var/lib/ghost/content/themes/liebling:Z
|
||||
|
|
|
@ -77,28 +77,10 @@ export const managePostImages = ($) => {
|
|||
export const makeImagesZoomable = ($, mediumZoom) => {
|
||||
const zoom = mediumZoom('.js-zoomable')
|
||||
|
||||
zoom.on('open', (event) => {
|
||||
if (isMobile() && $(event.target).parent().hasClass('kg-gallery-image')) {
|
||||
zoom.on('opened', () => {
|
||||
setTimeout(() => {
|
||||
const $mediumZoomImage = $('.medium-zoom-image--opened')
|
||||
const transform = $mediumZoomImage[0].style.transform
|
||||
const scale = transform.substr(0, transform.indexOf(' '))
|
||||
const scaleValue = parseFloat(scale.substr(scale.indexOf('(') + 1).split(')')[0])
|
||||
const translate = transform.substr(transform.indexOf(' ') + 1)
|
||||
const translateY = parseFloat(translate.split(',')[1])
|
||||
const newTranslateY = (translateY < 0) ? (scaleValue * translateY) + translateY : (scaleValue * translateY) - translateY
|
||||
const newTransform = `scale(1) translate3d(0, ${newTranslateY}px, 0)`
|
||||
|
||||
$mediumZoomImage.addClass('medium-zoom-image-mobile')
|
||||
$mediumZoomImage[0].style.transform = newTransform
|
||||
const $mediumZoomImages = $('.medium-zoom-image--opened')
|
||||
$mediumZoomImages.last().hide()
|
||||
}, 10)
|
||||
}
|
||||
})
|
||||
|
||||
zoom.on('close', () => {
|
||||
if (isMobile() && $(event.target).parent().hasClass('kg-gallery-image')) {
|
||||
const $mediumZoomImage = $('.medium-zoom-image')
|
||||
$mediumZoomImage.removeClass('medium-zoom-image-mobile')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -54,13 +54,6 @@ fieldset {
|
|||
background-color: var(--background-color) !important;
|
||||
}
|
||||
|
||||
.medium-zoom-image-mobile {
|
||||
left: 0 !important;
|
||||
width: 100% !important;
|
||||
height: auto !important;
|
||||
@include transition(all .3s cubic-bezier(.2,0,.2,1) !important);
|
||||
}
|
||||
|
||||
.medium-zoom-overlay,
|
||||
.medium-zoom-image {
|
||||
z-index: 5;
|
||||
|
|
Loading…
Reference in a new issue