Browse Source
# Conflicts: # dist/mix-manifest.json # dist/scripts/aldine.js # dist/styles/aldine.css # dist/styles/editor.css # package.json # webpack.mix.jspull/46/head
39 changed files with 19978 additions and 1357 deletions
@ -1,5 +1,9 @@
|
||||
import $ from 'jquery'; |
||||
|
||||
wp.customize( 'blogname', value => { |
||||
value.bind( to => $( '.brand a' ).text( to ) ); |
||||
value.bind( to => $( '.home .entry-title' ).text( to ) ); |
||||
} ); |
||||
|
||||
wp.customize( 'blogdescription', value => { |
||||
value.bind( to => $( '.home .entry-description' ).text( to ) ); |
||||
} ); |
||||
|
||||
@ -1,25 +1,6 @@
|
||||
export default { |
||||
init() { |
||||
// JavaScript to be fired on the home page
|
||||
|
||||
// Props to Dave Rupert: https://daverupert.com/2017/11/happier-html5-forms/
|
||||
const inputs = document.querySelectorAll( 'input, textarea' ); |
||||
|
||||
inputs.forEach( input => { |
||||
input.addEventListener( |
||||
'invalid', |
||||
event => { |
||||
input.classList.add( 'error' ); |
||||
}, |
||||
false |
||||
); |
||||
input.addEventListener( 'focus', function () { |
||||
input.classList.remove( 'error' ); |
||||
} ); |
||||
input.addEventListener( 'blur', function () { |
||||
input.checkValidity(); |
||||
} ); |
||||
} ); |
||||
}, |
||||
finalize() {}, |
||||
}; |
||||
|
||||
@ -0,0 +1,302 @@
|
||||
// stylelint-disable no-descending-specificity |
||||
|
||||
fieldset { |
||||
border-top: solid 2px var(--accent); |
||||
font-family: $font-family-sans-serif; |
||||
|
||||
h2, |
||||
h3 { |
||||
margin-bottom: 0; |
||||
font-size: 1rem; |
||||
font-weight: bold; |
||||
text-align: left; |
||||
text-transform: none; |
||||
|
||||
&:before { |
||||
display: none; |
||||
} |
||||
|
||||
button { |
||||
display: flex; |
||||
flex-direction: row; |
||||
justify-content: space-between; |
||||
all: inherit; |
||||
width: 100%; |
||||
padding: 1rem 1.1875rem; |
||||
margin: 0; |
||||
border-top: 0; |
||||
|
||||
svg { |
||||
display: block; |
||||
float: right; |
||||
margin-top: 0.5rem; |
||||
} |
||||
|
||||
&:hover, |
||||
&:focus { |
||||
color: var(--primary); |
||||
background: var(--bg-body); |
||||
} |
||||
|
||||
&:active { |
||||
box-shadow: none; |
||||
} |
||||
} |
||||
} |
||||
|
||||
[aria-expanded="true"] { |
||||
color: var(--primary); |
||||
|
||||
svg { |
||||
transform: rotate(180deg); |
||||
} |
||||
} |
||||
|
||||
h2 { |
||||
[aria-expanded="true"] { |
||||
border-bottom: solid 2px var(--accent); |
||||
background: #fafdff; |
||||
} |
||||
} |
||||
|
||||
[type="radio"] { |
||||
position: absolute !important; |
||||
width: 1px !important; |
||||
height: 1px !important; |
||||
padding: 0 !important; |
||||
border: 0 !important; |
||||
overflow: hidden !important; |
||||
clip: rect(1px, 1px, 1px, 1px); |
||||
} |
||||
|
||||
.label { |
||||
display: inline-block; |
||||
width: calc(100% - 2rem); |
||||
} |
||||
|
||||
[type="radio"] + label { |
||||
cursor: pointer; |
||||
display: block; |
||||
padding: 1rem 1.1875rem; |
||||
margin-bottom: 0; |
||||
|
||||
svg { |
||||
display: none; |
||||
} |
||||
} |
||||
|
||||
[type="radio"]:focus { |
||||
label { |
||||
cursor: pointer; |
||||
display: block; |
||||
} |
||||
} |
||||
|
||||
[type="radio"]:checked + label { |
||||
color: var(--primary); |
||||
font-weight: bold; |
||||
|
||||
svg { |
||||
display: block; |
||||
float: right; |
||||
margin-top: 0.5rem; |
||||
width: 1rem; |
||||
height: 1rem; |
||||
fill: transparent; |
||||
} |
||||
} |
||||
|
||||
&:last-of-type { |
||||
border-bottom: solid 2px var(--accent); |
||||
margin-bottom: 1rem; |
||||
} |
||||
} |
||||
|
||||
.js .filter-sort [type="submit"] { |
||||
display: none; |
||||
} |
||||
|
||||
.clear-filters { |
||||
width: calc(100% - 2rem); |
||||
margin: 0 1rem; |
||||
} |
||||
|
||||
.catalog { |
||||
.books { |
||||
width: calc(100% - 1rem); |
||||
padding: 0; |
||||
margin: 2rem 0 1rem 1rem; |
||||
} |
||||
.book { |
||||
height: 14.375rem; |
||||
width: calc(50% - 1rem); |
||||
margin: 0 1rem 1rem 0; |
||||
} |
||||
} |
||||
|
||||
.catalog-navigation { |
||||
display: flex; |
||||
flex-direction: row; |
||||
justify-content: center; |
||||
width: 100%; |
||||
margin-top: rem(40); |
||||
margin-bottom: 2rem; |
||||
align-items: baseline; |
||||
font-family: $font-family-sans-serif; |
||||
|
||||
a { |
||||
color: #000; |
||||
|
||||
&:hover, |
||||
&:focus { |
||||
color: var(--primary); |
||||
} |
||||
} |
||||
|
||||
.previous, |
||||
.next { |
||||
display: block; |
||||
margin: 0 rem(26); |
||||
font-family: $font-family-sans-serif; |
||||
font-size: rem(16); |
||||
|
||||
svg { |
||||
width: 1.2rem; |
||||
height: 1rem; |
||||
margin: 0.25rem rem(6) 0; |
||||
|
||||
path { |
||||
fill: var(--primary); |
||||
} |
||||
} |
||||
} |
||||
|
||||
.pages { |
||||
display: inline-block; |
||||
border-bottom: solid 2px #ececec; |
||||
|
||||
a, |
||||
span { |
||||
display: inline-block; |
||||
width: rem(41); |
||||
padding: rem(8) 0; |
||||
font-size: rem(24); |
||||
text-align: center; |
||||
} |
||||
|
||||
.current { |
||||
border-bottom: solid rem(6) var(--primary); |
||||
} |
||||
} |
||||
} |
||||
|
||||
@media #{$breakpoint-tablet-and-up} { |
||||
.filter-sort { |
||||
width: calc(100% - 1rem); |
||||
height: 7rem; |
||||
margin: 2rem 0 1rem 1rem; |
||||
} |
||||
|
||||
fieldset { |
||||
width: calc(100% / 3 - 1rem); |
||||
margin: 0 1rem 1rem 0; |
||||
float: left; |
||||
border-top: 0; |
||||
position: relative; |
||||
|
||||
&:last-of-type { |
||||
border-bottom: 0; |
||||
} |
||||
} |
||||
|
||||
fieldset h2 button { |
||||
border-bottom: solid 2px var(--accent); |
||||
} |
||||
|
||||
fieldset div:not([hidden]) { |
||||
position: absolute; |
||||
width: 100%; |
||||
background: var(--body-bg); |
||||
z-index: 99; |
||||
border-right: rem(1) solid #ececec; |
||||
border-left: rem(1) solid #ececec; |
||||
border-bottom: rem(1) solid #ececec; |
||||
|
||||
.subject-groups { |
||||
width: calc(100% + 0.125rem); |
||||
margin-left: -0.06125rem; |
||||
|
||||
div { |
||||
position: relative; |
||||
width: calc(100% + 0.125rem); |
||||
margin-left: -0.06125rem; |
||||
border-bottom: 0; |
||||
} |
||||
} |
||||
} |
||||
|
||||
.clear-filters { |
||||
width: calc(100% / 3 - 1rem); |
||||
margin-left: 0; |
||||
} |
||||
|
||||
.catalog .book { |
||||
height: 16.25rem; |
||||
width: calc(100% / 3 - 1rem); |
||||
margin: 0 1rem 1rem 0; |
||||
} |
||||
} |
||||
|
||||
@media #{$breakpoint-large} { |
||||
.catalog #content { |
||||
width: 100%; |
||||
max-width: rem(1440); |
||||
background: transparent; |
||||
} |
||||
|
||||
.catalog .book { |
||||
max-width: calc(100% / 3 - 1rem); |
||||
} |
||||
} |
||||
|
||||
@media #{$breakpoint-extra-large} { |
||||
.catalog #content { |
||||
width: 100%; |
||||
max-width: rem(1650); |
||||
} |
||||
|
||||
.filter-sort { |
||||
width: calc(25% - 1rem); |
||||
height: auto; |
||||
float: left; |
||||
margin-left: 0; |
||||
} |
||||
|
||||
fieldset { |
||||
width: 100%; |
||||
display: block; |
||||
margin-bottom: 0; |
||||
} |
||||
|
||||
fieldset div:not([hidden]) { |
||||
position: relative; |
||||
border: 0; |
||||
} |
||||
|
||||
.clear-filters { |
||||
width: 100%; |
||||
margin-left: 0; |
||||
} |
||||
|
||||
.catalog .books { |
||||
width: 75%; |
||||
float: right; |
||||
margin-left: 0; |
||||
} |
||||
|
||||
.catalog-navigation { |
||||
width: 75%; |
||||
float: right; |
||||
padding-right: 1rem; |
||||
} |
||||
} |
||||
@ -1,79 +1,13 @@
|
||||
@import 'pages/front-page'; |
||||
@import 'pages/catalog'; |
||||
|
||||
.page { |
||||
.page-header { |
||||
h1 { |
||||
font-size: rem(30); |
||||
font-weight: 600; |
||||
color: var(--primary, $brand-primary); |
||||
letter-spacing: 2px; |
||||
line-height: (36/30); |
||||
text-transform: uppercase; |
||||
text-align: center; |
||||
margin: 0; |
||||
padding-top: 1rem; |
||||
|
||||
&::before { |
||||
content: ""; |
||||
display: block; |
||||
margin: 0 auto 1em; |
||||
width: 46px; |
||||
height: 5px; |
||||
background: var(--accent, $brand-accent); |
||||
} |
||||
} |
||||
} |
||||
|
||||
.page-content { |
||||
flex-direction: column; |
||||
justify-content: center; |
||||
align-items: center; |
||||
padding: 0 0.78125rem; |
||||
display: flex; |
||||
height: auto; |
||||
min-height: rem(445); |
||||
background-color: $white; |
||||
margin: rem(-400) auto 0; |
||||
box-shadow: -3px 5px 4px 2px rgba(135, 135, 135, 0.09); |
||||
text-align: center; |
||||
|
||||
p { |
||||
font-size: rem(18); |
||||
line-height: (32/16); |
||||
} |
||||
} |
||||
} |
||||
|
||||
@media (min-width: $medium) { |
||||
.page { |
||||
.page-header h1 { |
||||
font-size: rem(48); |
||||
line-height: (56/48); |
||||
} |
||||
|
||||
.page-content { |
||||
width: rem(775); |
||||
min-height: rem(494); |
||||
margin: rem(-600) auto rem(119); |
||||
padding: 0 90px; |
||||
|
||||
&:last-child { |
||||
margin-bottom: 4.0625rem; |
||||
} |
||||
|
||||
p { |
||||
font-size: rem(18); |
||||
line-height: (32/18); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
@media (min-width: $large) { |
||||
.page { |
||||
.page-content { |
||||
width: rem(1115); |
||||
} |
||||
} |
||||
} |
||||
// .page:not(.home) article { |
||||
// .entry-header h1 { |
||||
// @extend .h2; |
||||
// } |
||||
|
||||
// @extend .page-section; |
||||
// text-align: left; |
||||
// width: 100%; |
||||
// max-width: rem(800); |
||||
// margin-top: calc(-80%); |
||||
// margin-left: auto; |
||||
// margin-right: auto; |
||||
// } |
||||
|
||||
@ -1,516 +0,0 @@
|
||||
// stylelint-disable no-descending-specificity |
||||
|
||||
.catalog { |
||||
.banner .container { |
||||
height: rem(381); |
||||
} |
||||
|
||||
.banner .primary-navigation { |
||||
height: rem(381); |
||||
} |
||||
|
||||
.page-header { |
||||
display: flex; |
||||
flex-direction: column; |
||||
justify-content: center; |
||||
height: rem(381); |
||||
margin-top: rem(-381); |
||||
|
||||
h1 { |
||||
color: var(--primary, $brand-primary); |
||||
margin-bottom: 2rem; |
||||
font-size: rem(36); |
||||
line-height: 0.55556; |
||||
letter-spacing: 0.1125rem; |
||||
} |
||||
} |
||||
|
||||
.network-catalog { |
||||
width: 100%; |
||||
padding-bottom: rem(152); |
||||
} |
||||
|
||||
.controls { |
||||
width: 100%; |
||||
} |
||||
|
||||
.book { |
||||
display: flex; |
||||
flex-direction: column; |
||||
justify-content: flex-end; |
||||
width: percent(165, 358); |
||||
margin: 0 percent(9, 358) rem(8) 0; |
||||
height: rem(230); |
||||
float: left; |
||||
padding: 1.5rem rem(8) rem(26); |
||||
border: solid 2px var(--accent, $brand-accent); |
||||
background: var(--accent, $brand-accent); |
||||
|
||||
p { |
||||
margin: 0; |
||||
} |
||||
|
||||
a { |
||||
font-family: $font-family-sans-serif; |
||||
color: var(--accent-fg, $white); |
||||
text-decoration: none; |
||||
} |
||||
|
||||
&__subject { |
||||
height: rem(44); |
||||
font-size: rem(14); |
||||
} |
||||
|
||||
&__title { |
||||
height: rem(118); |
||||
font-size: rem(16); |
||||
font-weight: 600; |
||||
line-height: (20/16); |
||||
} |
||||
|
||||
&__read-more { |
||||
font-size: rem(14); |
||||
} |
||||
} |
||||
|
||||
.catalog-navigation { |
||||
display: flex; |
||||
flex-direction: row; |
||||
justify-content: center; |
||||
width: 100%; |
||||
margin-top: rem(83); |
||||
align-items: baseline; |
||||
font-family: $font-family-sans-serif; |
||||
|
||||
a { |
||||
color: $black; |
||||
|
||||
&:hover, |
||||
&:focus { |
||||
color: var(--primary, $brand-primary); |
||||
} |
||||
} |
||||
|
||||
.previous, |
||||
.next { |
||||
display: block; |
||||
margin: 0 rem(26); |
||||
font-family: $font-family-sans-serif; |
||||
font-size: rem(16); |
||||
|
||||
svg { |
||||
width: rem(16.2); |
||||
height: rem(12.5); |
||||
margin: 0 rem(6); |
||||
|
||||
path { |
||||
fill: var(--primary, $brand-primary); |
||||
} |
||||
} |
||||
} |
||||
|
||||
.pages { |
||||
display: inline-block; |
||||
border-bottom: solid 2px #ececec; |
||||
|
||||
a, |
||||
span { |
||||
display: inline-block; |
||||
width: rem(41); |
||||
padding: rem(8) 0; |
||||
font-size: rem(24); |
||||
text-align: center; |
||||
} |
||||
|
||||
.current { |
||||
border-bottom: solid rem(6) var(--primary, $brand-primary); |
||||
} |
||||
} |
||||
} |
||||
|
||||
.filters, |
||||
.search, |
||||
.sort { |
||||
width: 100%; |
||||
border-top: solid 2px var(--accent, $brand-accent); |
||||
background: $white; |
||||
|
||||
a { |
||||
display: flex; |
||||
flex-direction: row; |
||||
justify-content: space-between; |
||||
align-items: center; |
||||
width: 100%; |
||||
padding: rem(16) rem(19); |
||||
font-size: rem(16); |
||||
font-weight: 600; |
||||
font-family: $font-family-sans-serif; |
||||
letter-spacing: rem(0.67); |
||||
color: $black; |
||||
|
||||
&:hover, |
||||
&:focus { |
||||
background: #fafdff; |
||||
color: var(--primary, $brand-primary); |
||||
} |
||||
} |
||||
|
||||
.has-active-child > a { |
||||
color: var(--primary, $brand-primary); |
||||
} |
||||
|
||||
ul { |
||||
margin: 0; |
||||
padding: 0; |
||||
list-style: none; |
||||
|
||||
li { |
||||
font-size: rem(16); |
||||
font-family: $font-family-sans-serif; |
||||
letter-spacing: rem(0.67); |
||||
|
||||
a { |
||||
display: flex; |
||||
flex-direction: row; |
||||
justify-content: space-between; |
||||
align-items: center; |
||||
font-weight: normal; |
||||
cursor: pointer; |
||||
|
||||
.close { |
||||
display: inline-block; |
||||
float: right; |
||||
margin-top: rem(-2); |
||||
font-size: rem(20); |
||||
opacity: 0; |
||||
transition: opacity 0.5s; |
||||
} |
||||
} |
||||
|
||||
a.is-active { |
||||
font-weight: 600; |
||||
color: var(--primary, $brand-primary); |
||||
|
||||
.close { |
||||
opacity: 1; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
.arrow { |
||||
path { |
||||
fill: var(--primary, $brand-primary); |
||||
} |
||||
} |
||||
|
||||
.is-active > a .arrow { |
||||
transform: rotate(180deg); |
||||
} |
||||
|
||||
.filters { |
||||
.filter-groups { |
||||
display: none; |
||||
border-top: solid 2px var(--accent, $brand-accent); |
||||
|
||||
h3 { |
||||
margin: 0; |
||||
border-top: solid 1px $light-gray; |
||||
} |
||||
|
||||
h3:first-of-type { |
||||
border-top: none; |
||||
} |
||||
} |
||||
|
||||
.licenses { |
||||
display: none; |
||||
} |
||||
|
||||
.filter-list { |
||||
display: none; |
||||
} |
||||
|
||||
&.is-active { |
||||
.filter-groups, |
||||
.licenses { |
||||
display: block; |
||||
} |
||||
} |
||||
|
||||
.is-active ul { |
||||
display: block; |
||||
} |
||||
} |
||||
|
||||
.search { |
||||
display: none; |
||||
} |
||||
|
||||
.sort { |
||||
border-bottom: solid 2px var(--accent, $brand-accent); |
||||
|
||||
.sorts { |
||||
display: none; |
||||
border-top: solid 2px var(--accent, $brand-accent); |
||||
} |
||||
|
||||
&.is-active { |
||||
.sorts { |
||||
display: block; |
||||
} |
||||
} |
||||
} |
||||
|
||||
.books { |
||||
align-self: flex-start; |
||||
width: percent(358, 360); |
||||
margin: rem(32) 0 0 percent(10.5, 360); |
||||
padding: 0; |
||||
} |
||||
} |
||||
|
||||
@media (min-width: 768px) { |
||||
.catalog { |
||||
.controls { |
||||
width: percent(706, 768); |
||||
height: rem(52); |
||||
margin: rem(60) percent(29, 768) rem(20) percent(33, 768); |
||||
|
||||
.filters, |
||||
.search, |
||||
.sort { |
||||
position: relative; |
||||
border-top: 0; |
||||
border-bottom: solid 2px var(--accent, $brand-accent); |
||||
z-index: 99; |
||||
} |
||||
|
||||
.filters { |
||||
float: left; |
||||
width: rem(360); |
||||
|
||||
.filter-groups { |
||||
border-right: solid 1px #ececec; |
||||
border-left: solid 1px #ececec; |
||||
} |
||||
} |
||||
|
||||
.sort { |
||||
float: right; |
||||
width: rem(160); |
||||
|
||||
.sorts { |
||||
border-right: solid 1px #ececec; |
||||
border-bottom: solid 1px #ececec; |
||||
border-left: solid 1px #ececec; |
||||
} |
||||
} |
||||
} |
||||
|
||||
.books { |
||||
align-self: flex-start; |
||||
width: percent(735, 768); |
||||
margin-bottom: rem(15); |
||||
margin-left: percent(24, 768); |
||||
} |
||||
|
||||
.book { |
||||
width: percent(230, 735); |
||||
height: rem(260); |
||||
margin: 0 percent(15, 735) 2rem 0; |
||||
padding: 0 rem(14) rem(21.35); |
||||
|
||||
&__subject { |
||||
height: rem(45.85); |
||||
font-size: rem(18); |
||||
} |
||||
|
||||
&__title { |
||||
height: rem(147.65); |
||||
font-size: rem(22); |
||||
font-weight: 600; |
||||
line-height: (40/30); |
||||
} |
||||
|
||||
&__read-more { |
||||
font-size: rem(16); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
@media (min-width: $medium) { |
||||
.catalog { |
||||
.page-header { |
||||
h1 { |
||||
font-size: rem(72); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
@media #{$breakpoint-large} { |
||||
.catalog { |
||||
.banner { |
||||
.container { |
||||
height: rem(450); |
||||
} |
||||
|
||||
.primary-navigation { |
||||
height: 40px; |
||||
} |
||||
|
||||
.brand { |
||||
text-align: center; |
||||
|
||||
img { |
||||
max-height: rem(60); |
||||
} |
||||
} |
||||
} |
||||
|
||||
.page-header { |
||||
height: rem(360); |
||||
margin-top: rem(-360); |
||||
} |
||||
} |
||||
} |
||||
|
||||
@media (min-width: $extra-large) { |
||||
.catalog { |
||||
.main { |
||||
width: rem(1535); |
||||
margin: 0 auto; |
||||
} |
||||
|
||||
.network-catalog { |
||||
margin-top: rem(205); |
||||
} |
||||
|
||||
.controls { |
||||
width: 100%; |
||||
margin: 0 0 rem(64); |
||||
|
||||
.filters { |
||||
width: rem(286); |
||||
border-bottom: 0; |
||||
|
||||
> a { |
||||
border-bottom: solid 3px var(--accent, $brand-accent); |
||||
|
||||
&:hover, |
||||
&:focus { |
||||
color: $black; |
||||
background: $white; |
||||
cursor: default; |
||||
} |
||||
|
||||
.arrow { |
||||
display: none; |
||||
} |
||||
} |
||||
|
||||
.filter-groups { |
||||
display: block; |
||||
border-right: 0; |
||||
border-top: 0; |
||||
border-left: 0; |
||||
|
||||
.subjects { |
||||
border-bottom: solid 1px #ececec; |
||||
} |
||||
} |
||||
|
||||
.licenses { |
||||
display: block; |
||||
margin-top: rem(60); |
||||
|
||||
> a { |
||||
background: var(--primary, $brand-primary); |
||||
color: var(--primary-fg, $white); |
||||
|
||||
.arrow { |
||||
path { |
||||
fill: var(--primary-fg, $white); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
ul li { |
||||
a { |
||||
padding-top: 0; |
||||
padding-bottom: 0; |
||||
line-height: 2; |
||||
} |
||||
|
||||
&:last-child a { |
||||
padding-bottom: 1rem; |
||||
} |
||||
} |
||||
} |
||||
|
||||
.sort { |
||||
.sorts { |
||||
border-top: solid 3px var(--accent, $brand-accent); |
||||
border-right: 0; |
||||
border-left: 0; |
||||
} |
||||
} |
||||
} |
||||
|
||||
.books { |
||||
width: percent(1221.5, 1535); |
||||
margin: 0 0 0 percent(316, 1535); |
||||
} |
||||
|
||||
.book { |
||||
width: percent(367, 1221.5); |
||||
height: rem(386); |
||||
margin: 0 0 2rem percent(39.5, 1221.5); |
||||
padding: 1.5rem 1.85rem 2.1875rem; |
||||
|
||||
&__subject { |
||||
height: 4.625rem; |
||||
font-size: rem(24); |
||||
} |
||||
|
||||
&__title { |
||||
height: 13rem; |
||||
font-size: rem(30); |
||||
font-weight: 500; |
||||
line-height: (40/30); |
||||
} |
||||
|
||||
&__read-more { |
||||
font-size: rem(18); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
.catalog.no-js { |
||||
.filters { |
||||
.arrow { |
||||
display: none; |
||||
} |
||||
|
||||
.filter-groups, |
||||
.licenses, |
||||
.filter-list { |
||||
display: block; |
||||
} |
||||
} |
||||
|
||||
.sort { |
||||
.arrow { |
||||
display: none; |
||||
} |
||||
|
||||
.sorts { |
||||
display: block; |
||||
} |
||||
} |
||||
} |
||||
@ -1,321 +0,0 @@
|
||||
.home { |
||||
.block { |
||||
flex-direction: column; |
||||
justify-content: center; |
||||
align-items: center; |
||||
padding: 0 0.78125rem; |
||||
display: flex; |
||||
height: rem(445); |
||||
background-color: $white; |
||||
margin-left: auto; |
||||
margin-right: auto; |
||||
text-align: center; |
||||
|
||||
p { |
||||
font-size: rem(18); |
||||
line-height: (32/16); |
||||
} |
||||
} |
||||
|
||||
.latest-books { |
||||
height: auto; |
||||
padding: 0 0 rem(154); |
||||
|
||||
h3 { |
||||
text-align: center; |
||||
text-transform: uppercase; |
||||
margin-top: 4.375rem; |
||||
margin-bottom: 2.8125rem; |
||||
} |
||||
|
||||
.track { |
||||
display: flex; |
||||
flex-flow: row wrap; |
||||
justify-content: center; |
||||
align-items: center; |
||||
max-width: 22.9375rem; |
||||
margin-left: auto; |
||||
margin-right: auto; |
||||
margin-bottom: 2rem; |
||||
padding: 0 0.46875rem; |
||||
position: relative; |
||||
} |
||||
|
||||
.books { |
||||
display: flex; |
||||
flex-direction: column; |
||||
justify-content: center; |
||||
align-items: center; |
||||
order: 0; |
||||
padding: 0; |
||||
width: 100%; |
||||
margin-bottom: rem(34); |
||||
} |
||||
|
||||
|
||||
.previous, |
||||
.next { |
||||
display: block; |
||||
width: auto; |
||||
height: auto; |
||||
|
||||
svg { |
||||
path { |
||||
fill: var(--primary, $brand); |
||||
} |
||||
} |
||||
} |
||||
|
||||
.previous { |
||||
order: 1; |
||||
margin-right: auto; |
||||
} |
||||
|
||||
.next { |
||||
order: 2; |
||||
margin-left: auto; |
||||
} |
||||
|
||||
.catalog-link { |
||||
text-align: center; |
||||
} |
||||
} |
||||
|
||||
.blocks.blocks-2, |
||||
.blocks.blocks-3 { |
||||
.widget_text:nth-child(2) { |
||||
margin-right: 0.5rem; |
||||
margin-left: 0.5rem; |
||||
border: solid 2px var(--primary, $brand-primary); |
||||
box-shadow: unset; |
||||
} |
||||
} |
||||
|
||||
.blocks.blocks-4 { |
||||
.widget_text:nth-child(2) { |
||||
color: var(--accent-fg, $white); |
||||
background: var(--accent, $brand-accent); |
||||
|
||||
h3 { |
||||
color: var(--accent-fg, $white); |
||||
|
||||
&::before { |
||||
background: var(--accent-fg, $white); |
||||
} |
||||
} |
||||
|
||||
.button { |
||||
color: var(--accent-fg, $white); |
||||
border-color: var(--accent-fg, $white); |
||||
background: transparent; |
||||
|
||||
&:hover, |
||||
&:focus { |
||||
color: var(--accent, $brand-accent); |
||||
background: var(--accent-fg, $white); |
||||
} |
||||
} |
||||
} |
||||
|
||||
.widget_text:nth-child(3) { |
||||
margin-top: 2rem; |
||||
margin-right: 0.5rem; |
||||
margin-left: 0.5rem; |
||||
border: solid 2px var(--primary, $brand-primary); |
||||
box-shadow: unset; |
||||
|
||||
&::after { |
||||
top: rem(1880); |
||||
} |
||||
} |
||||
} |
||||
|
||||
.blocks.blocks-2 .widget_text:nth-child(2), |
||||
.blocks.blocks-3 .widget_text:nth-child(2), |
||||
.blocks.blocks-4 .widget_text:nth-child(3) { |
||||
background: transparent; |
||||
margin-bottom: rem(400); |
||||
|
||||
&::after { |
||||
z-index: -1; |
||||
content: ""; |
||||
display: block; |
||||
width: 100vw; |
||||
height: rem(444); |
||||
background-image: url('../images/banner.jpg'); |
||||
background-position: center; |
||||
background-size: cover; |
||||
position: absolute; |
||||
top: rem(1410); |
||||
left: 0; |
||||
} |
||||
} |
||||
} |
||||
|
||||
@media (min-width: $medium) { |
||||
.home { |
||||
.wrap { |
||||
margin-top: rem(-366); |
||||
} |
||||
|
||||
.block { |
||||
width: rem(775); |
||||
height: rem(494); |
||||
margin-bottom: rem(119); |
||||
padding: 0 90px; |
||||
box-shadow: -3px 5px 4px 2px rgba(135, 135, 135, 0.09); |
||||
|
||||
&:last-child { |
||||
margin-bottom: 4.0625rem; |
||||
} |
||||
|
||||
p { |
||||
font-size: rem(18); |
||||
line-height: (32/18); |
||||
} |
||||
} |
||||
|
||||
.blocks.blocks-2 .widget_text:nth-child(2), |
||||
.blocks.blocks-3 .widget_text:nth-child(2), |
||||
.blocks.blocks-4 .widget_text:nth-child(3) { |
||||
margin-left: auto; |
||||
margin-right: auto; |
||||
margin-bottom: rem(119); |
||||
|
||||
&::after { |
||||
height: rem(600); |
||||
top: rem(1547); |
||||
} |
||||
} |
||||
|
||||
.blocks.blocks-4 .widget_text:nth-child(3) { |
||||
&::after { |
||||
top: rem(2177); |
||||
} |
||||
} |
||||
|
||||
.latest-books { |
||||
width: 100%; |
||||
margin-left: auto; |
||||
margin-right: auto; |
||||
|
||||
h3 { |
||||
margin-bottom: 4.375rem; |
||||
} |
||||
|
||||
.track { |
||||
display: flex; |
||||
flex-flow: row nowrap; |
||||
width: 100%; |
||||
max-width: 100%; |
||||
margin: 0; |
||||
padding: 0; |
||||
} |
||||
|
||||
.next, |
||||
.previous { |
||||
position: absolute; |
||||
top: rem(165.5); |
||||
|
||||
svg { |
||||
width: 2.4375rem; |
||||
height: 1.875rem; |
||||
} |
||||
} |
||||
|
||||
.next { |
||||
margin-right: 0.9375rem; |
||||
right: 0; |
||||
} |
||||
|
||||
.previous { |
||||
order: 0; |
||||
margin-left: 0.9375rem; |
||||
left: 0; |
||||
} |
||||
|
||||
.books { |
||||
width: auto; |
||||
min-width: 50rem; |
||||
flex-direction: row; |
||||
order: 1; |
||||
justify-content: space-between; |
||||
margin-bottom: 2rem; |
||||
} |
||||
|
||||
.book { |
||||
width: 30%; |
||||
max-width: 19.54rem; |
||||
|
||||
&:last-child { |
||||
margin-bottom: 2rem; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
@media (min-width: $large) { |
||||
.home { |
||||
.block { |
||||
width: rem(1115); |
||||
} |
||||
|
||||
.latest-books { |
||||
width: 100%; |
||||
margin-bottom: 0; |
||||
|
||||
.track { |
||||
width: 100%; |
||||
margin: 0 auto; |
||||
max-width: 87rem; |
||||
} |
||||
|
||||
.books { |
||||
width: 100%; |
||||
max-width: 75rem; |
||||
} |
||||
|
||||
.book { |
||||
min-width: 19.54rem; |
||||
max-width: 22.9375rem; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
@media (min-width: $extra-large) { |
||||
.home { |
||||
.block { |
||||
width: rem(1115); |
||||
box-shadow: -3px 5px 4px 2px rgba(135, 135, 135, 0.09); |
||||
} |
||||
|
||||
.blocks.blocks-4 { |
||||
display: flex; |
||||
flex-flow: row wrap; |
||||
width: 1615px; |
||||
|
||||
.widget_text { |
||||
width: 1115px; |
||||
margin-right: auto; |
||||
margin-left: auto; |
||||
} |
||||
|
||||
.widget_text:nth-child(1), |
||||
.widget_text:nth-child(2) { |
||||
width: 775px; |
||||
} |
||||
|
||||
.widget_text:nth-child(1) { |
||||
margin-right: 65px; |
||||
} |
||||
} |
||||
|
||||
.blocks.blocks-4 .widget_text:nth-child(3) { |
||||
&::after { |
||||
top: rem(1596); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
@ -1,8 +1,8 @@
|
||||
{ |
||||
"/scripts/aldine.js": "/scripts/aldine.js?id=efcb42c04ca82ffdf060", |
||||
"/styles/aldine.css": "/styles/aldine.css?id=3a484b180e7757a8b6c7", |
||||
"/styles/editor.css": "/styles/editor.css?id=16680c95cc79caed750f", |
||||
"/scripts/aldine.js": "/scripts/aldine.js?id=28a2ebcb9ae510032b59", |
||||
"/styles/aldine.css": "/styles/aldine.css?id=00b0c10d93f464c01cc5", |
||||
"/styles/editor.css": "/styles/editor.css?id=10e3f4b144847aa8d75e", |
||||
"/styles/blocks/hero-unit/editor.css": "/styles/blocks/hero-unit/editor.css?id=d41d8cd98f00b204e980", |
||||
"/scripts/customizer.js": "/scripts/customizer.js?id=f1f1f4225cba4c1b35f2", |
||||
"/scripts/blocks/hero-unit/block.js": "/scripts/blocks/hero-unit/block.js?id=bb2a9d7ae4e646a7919d" |
||||
"/scripts/customizer.js": "/scripts/customizer.js?id=decf119933e3b2d4b210", |
||||
"/scripts/blocks/hero-unit/block.js": "/scripts/blocks/hero-unit/block.js?id=68feac0df91f56d02826" |
||||
} |
||||
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
!function(e){function t(a){if(o[a])return o[a].exports;var n=o[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var o={};t.m=e,t.c=o,t.d=function(e,o,a){t.o(e,o)||Object.defineProperty(e,o,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var o=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(o,"a",o),o},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=2)}({2:function(e,t,o){e.exports=o("wSxJ")},wSxJ:function(e,t){!function(e,t,o,a){var n=o.createElement;wp.blocks.registerBlockType("aldine/hero-unit",{title:t.__("Hero Unit","pressbooks-aldine"),icon:"flag",category:"layout",attributes:{title:{type:"array",source:"children",selector:"h2"},content:{type:"array",source:"children",selector:"p"}},edit:function(o){var l=o.focus?o.focus.editable||"title":null,c=o.attributes;return n("div",{className:o.className},n(e.Editable,{tagName:"h2",className:"hero__title",inline:!1,placeholder:t.__("About Pressbooks","pressbooks-aldine"),value:c.title,onChange:function(e){o.setAttributes({title:e})},focus:"title"===l?focus:null,onFocus:function(e){o.setFocus(a.extend({},e,{editable:"title"}))}}),n(e.Editable,{tagName:"p",className:"hero__content",inline:!1,placeholder:t.__("Kogi ennui ugh plaid, hella neutra kitsch cloud bread next level twee taiyaki. Live-edge paleo fixie whatever farm-to-table snackwave, meditation fam man braid next level viral. Four loko waistcoat mustache cloud bread activated charcoal food truck pabst roof party ugh kitsch raw denim edison bulb man braid 8-bit try-hard. Activated charcoal put a bird on it tilde meggings farm-to-table coloring book. Before they sold out four dollar toast stumptown actually.","pressbooks-gutenberg"),value:c.content,onChange:function(e){o.setAttributes({content:e})},focus:"content"===l?focus:null,onFocus:function(e){o.setFocus(a.extend({},e,{editable:"content"}))}}),n("p",{classname:"hero__cta"},n(e.Editable,{tagName:"a",className:"call-to-action",inline:!1,placeholder:t.__("Learn More","pressbooks-aldine"),value:c.cta,onChange:function(e){o.setAttributes({cta:e})},focus:"cta"===l?focus:null,onFocus:function(e){o.setFocus(a.extend({},e,{editable:"cta"}))}})))},save:function(e){var t=e.attributes;return n("div",{className:e.className},n("h2",{className:"hero__title"},t.title),n("p",{className:"hero__content"},t.content),n("p",{classname:"hero__cta"},n("a",{classname:"call-to-action"},t.cta)))}})}(window.wp.blocks,window.wp.i18n,window.wp.element,window._)}}); |
||||
!function(e){var t={};function a(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,a),n.l=!0,n.exports}a.m=e,a.c=t,a.d=function(e,t,o){a.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a(a.s=2)}({2:function(e,t,a){e.exports=a("wSxJ")},wSxJ:function(e,t){var a,o,n,l,c;a=window.wp.blocks,o=window.wp.i18n,n=window.wp.element,l=window._,c=n.createElement,wp.blocks.registerBlockType("aldine/hero-unit",{title:o.__("Hero Unit","pressbooks-aldine"),icon:"flag",category:"layout",attributes:{title:{type:"array",source:"children",selector:"h2"},content:{type:"array",source:"children",selector:"p"}},edit:function(e){var t=e.focus?e.focus.editable||"title":null,n=e.attributes;return c("div",{className:e.className},c(a.Editable,{tagName:"h2",className:"hero__title",inline:!1,placeholder:o.__("About Pressbooks","pressbooks-aldine"),value:n.title,onChange:function(t){e.setAttributes({title:t})},focus:"title"===t?focus:null,onFocus:function(t){e.setFocus(l.extend({},t,{editable:"title"}))}}),c(a.Editable,{tagName:"p",className:"hero__content",inline:!1,placeholder:o.__("Kogi ennui ugh plaid, hella neutra kitsch cloud bread next level twee taiyaki. Live-edge paleo fixie whatever farm-to-table snackwave, meditation fam man braid next level viral. Four loko waistcoat mustache cloud bread activated charcoal food truck pabst roof party ugh kitsch raw denim edison bulb man braid 8-bit try-hard. Activated charcoal put a bird on it tilde meggings farm-to-table coloring book. Before they sold out four dollar toast stumptown actually.","pressbooks-gutenberg"),value:n.content,onChange:function(t){e.setAttributes({content:t})},focus:"content"===t?focus:null,onFocus:function(t){e.setFocus(l.extend({},t,{editable:"content"}))}}),c("p",{classname:"hero__cta"},c(a.Editable,{tagName:"a",className:"call-to-action",inline:!1,placeholder:o.__("Learn More","pressbooks-aldine"),value:n.cta,onChange:function(t){e.setAttributes({cta:t})},focus:"cta"===t?focus:null,onFocus:function(t){e.setFocus(l.extend({},t,{editable:"cta"}))}})))},save:function(e){var t=e.attributes;return c("div",{className:e.className},c("h2",{className:"hero__title"},t.title),c("p",{className:"hero__content"},t.content),c("p",{classname:"hero__cta"},c("a",{classname:"call-to-action"},t.cta)))}})}}); |
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,21 +1,29 @@
|
||||
<?php use function \Aldine\Helpers\maybe_truncate_string; ?> |
||||
|
||||
<?php $subject = ( isset( $book['subject'] ) ) ? substr( $book['subject'], 0, 2 ) : ''; |
||||
$date = ( isset( $book['metadata']['datePublished'] ) ) ? str_replace( '-', '', $book['metadata']['datePublished'] ) : ''; |
||||
?> |
||||
|
||||
<div class="book" |
||||
<li class="book" |
||||
<?php if ( $date ) { ?>data-date-published="<?php echo $date; ?>"<?php } ?> |
||||
data-license="<?php echo ( new \Pressbooks\Licensing() )->getLicenseFromUrl( $book['metadata']['license']['url'] ); ?>"
|
||||
<?php if ( ! empty( $subject ) ) { ?> data-subject="<?php echo $subject ?>"<?php } ?> |
||||
> |
||||
<?php if ( ! empty( $subject ) ) { ?> |
||||
<p class="book__title"> |
||||
<a href="<?php echo $book['link']; ?>"><?php echo maybe_truncate_string( $book['metadata']['name'] ); ?></a>
|
||||
</p> |
||||
<?php /* <?php if (isset( $book['metadata']['author'] ) ) { ?> |
||||
<p class="book__author"> |
||||
<?php _e( 'By', 'pressbooks-aldine' ); ?> <?php foreach ( $book['metadata']['author'] as $author ) { |
||||
echo $author['name']; |
||||
} ?> |
||||
</p> |
||||
<?php } ?> */ ?>
|
||||
<?php if ( ! empty( $subject ) ) { ?> |
||||
<p class="book__subject"> |
||||
<a href="<?php echo network_home_url( "/catalog/#$subject" ) ?>"><?php echo \Pressbooks\Metadata\get_subject_from_thema( $book['subject'] ); ?></a>
|
||||
</p> |
||||
<?php } ?> |
||||
<p class="book__title"> |
||||
<a href="<?php echo $book['link']; ?>"><?php echo $book['metadata']['name']; ?></a>
|
||||
</p> |
||||
<p class="book__read-more"> |
||||
<?php } ?> |
||||
<p class="book__read-more"> |
||||
<a href="<?php echo $book['link']; ?>"><?php _e( 'About this book', 'pressbooks-aldine' ); ?> <svg aria-hidden="true"><use xlink:href="#arrow-right" /></svg></a>
|
||||
</p> |
||||
</div> |
||||
</li> |
||||
|
||||
@ -0,0 +1,19 @@
|
||||
<nav class="booknav" aria-labelledby="latest-books-title book-navigation"> |
||||
<span class="screen-reader-text"><?php _e( 'Navigation', 'pressbooks-aldine' ); ?></span>
|
||||
<?php if ( $previous_page ) : ?> |
||||
<a class="previous" rel="previous" data-page="<?php echo $previous_page; ?>" href="<?php echo network_home_url( "/page/$previous_page/#latest-books" ); ?>">
|
||||
<span class="screen-reader-text"><?php _e( 'Previous Page', 'pressbooks' ); ?></span>
|
||||
<svg aria-hidden="true"> |
||||
<use xlink:href="#arrow-left" /> |
||||
</svg> |
||||
</a> |
||||
<?php endif; ?> |
||||
<?php if ( $next_page <= $catalog_data['pages'] ) : ?> |
||||
<a class="next" rel="next" data-page="<?php echo $next_page; ?>" href="<?php echo network_home_url( "/page/$next_page/#latest-books" ); ?>">
|
||||
<span class="screen-reader-text"><?php _e( 'Next Page', 'pressbooks' ); ?></span>
|
||||
<svg aria-hidden="true"> |
||||
<use xlink:href="#arrow-right" /> |
||||
</svg> |
||||
</a> |
||||
<?php endif; ?> |
||||
</nav> |
||||
Loading…
Reference in new issue