commit 101179e99480342a4bcba49e03facf10afe0cf7a Author: Benjamin Date: Thu Jan 29 19:10:03 2026 +0100 Start Theme Repo diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f209606 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.env +.idea +node_modules +vendor \ No newline at end of file diff --git a/404.php b/404.php new file mode 100644 index 0000000..9ca99fa --- /dev/null +++ b/404.php @@ -0,0 +1,3 @@ + 130 ); + } + + function isColorDark( hexColor ) { + return ( getColorBrightness( hexColor ) <= 130 ); + } + + function loadCustomFont( font, type ) { + var fontFile = font.split( " " ).join( "+" ); + var fontFileURL = "https://fonts.googleapis.com/css?family=" + fontFile + ":400,700"; + + var fontStylesheet = ""; + var checkLink = $( "head" ).find( "#treville-pro-custom-" + type ).length; + + if (checkLink > 0) { + $( "head" ).find( "#treville-pro-custom-" + type ).remove(); + } + $( "head" ).append( fontStylesheet ); + } + +} )( jQuery ); diff --git a/assets/treville/css/customizer.css b/assets/treville/css/customizer.css new file mode 100755 index 0000000..67ba835 --- /dev/null +++ b/assets/treville/css/customizer.css @@ -0,0 +1,145 @@ +/* + * Customizer CSS + * + * Adjusts styling for theme option controls in the Customizer + * + * @package Treville + */ + +.customize-control-checkbox { + margin-bottom: 4px; +} + +#customize-control-treville_theme_options-retina_logo, +#customize-control-treville_theme_options-site_description, +#customize-control-treville_theme_options-theme_links, +#customize-control-treville_theme_options-pro_version, +#customize-control-treville_theme_options-magazine_blocks { + margin-bottom: 16px; +} + +#customize-control-treville_theme_options-blog_description, +#customize-control-treville_theme_options-blog_layout, +#customize-control-treville_theme_options-excerpt_length, +#customize-control-treville_theme_options-read_more_text, +#customize-control-treville_theme_options-blog_magazine_widgets_title, +#customize-control-treville_theme_options-single_post_headline, +#customize-control-treville_theme_options-featured_images, +#customize-control-treville_theme_options-slider_category, +#customize-control-treville_theme_options-slider_limit, +#customize-control-treville_theme_options-slider_animation { + margin-top: 16px; +} + +#customize-control-treville_theme_options-retina_logo_title, +#customize-control-treville_theme_options-post_meta_headline, +#customize-control-treville_theme_options-blog_magazine_widgets_title, +#customize-control-treville_theme_options-single_post_headline, +#customize-control-treville_theme_options-featured_images, +#customize-control-treville_theme_options-slider_activate { + margin-bottom: 0; +} + +#customize-control-treville_theme_options-blog_layout { + padding: 0; +} + +#customize-control-treville_theme_options-blog_description textarea { + height: 4em; +} + +/* Magazine Widgets Button Controls */ +#customize-theme-controls #magazine-widgets-buttons .add-new-widget { + margin-bottom: 10px; +} + +#customize-theme-controls #magazine-widgets-buttons .add-new-magazine-widget::before, +#available-widgets [id*='widget-tpl-treville-magazine-'] .widget-title::before { + content: "\f116"; +} + +body.adding-widget #magazine-widgets-buttons .add-new-magazine-widget::before, +body.adding-widget.adding-magazine-widget #magazine-widgets-buttons .button.add-new-widget::before { + transform: rotate(0deg); +} + +body.adding-widget #magazine-widgets-buttons .add-new-magazine-widget, +body.adding-widget.adding-magazine-widget #magazine-widgets-buttons .button.add-new-widget { + background: #f7f7f7; + border-color: #ccc; + box-shadow: 0 1px 0 #ccc; + color: #555; + cursor: not-allowed; + opacity: 0.2; + pointer-events: none; +} + +body.adding-widget.adding-magazine-widget #magazine-widgets-buttons .add-new-magazine-widget { + background: #eee; + border-color: #929793; + box-shadow: 0 2px 5px -3px rgba(0, 0, 0, 0.5) inset; + color: #32373c; + cursor: pointer; + opacity: 1; + pointer-events: auto; +} + +/* Magazine Homepage Available Sections */ +.adding-magazine-widget #available-widgets #available-widgets-list > div, +.adding-magazine-widget #available-widgets #available-widgets-filter { + display: none !important; + visibility: hidden; +} + +.adding-magazine-widget #available-widgets { + width: 400px; + left: -401px; +} + +.adding-magazine-widget #available-widgets #available-widgets-list { + top: 0; + border-top: none; +} + +.adding-magazine-widget #available-widgets #available-widgets-list [id*='widget-tpl-treville-magazine-'] { + display: block !important; + visibility: visible; +} + +.adding-magazine-widget #available-widgets .widget-tpl { + float: left; + clear: left; + padding-left: 15px; + width: 100%; + box-sizing: border-box; +} + +.adding-magazine-widget #available-widgets .widget-tpl .widget-title::before { + display: none; +} + +.adding-magazine-widget #available-widgets .widget-tpl .widget-top::before { + display: block; + float: left; + font-size: 1px; + content: " "; + width: 120px; + height: 75px; + border: 1px solid #ccc; + margin: 0 15px 0 0; +} + +.adding-magazine-widget #available-widgets [id*='widget-tpl-treville-magazine-'] .widget-top::before { + background-size: 100%; + background-repeat: no-repeat; + background-position: center; + background-color: #f2f2f2; +} + +.adding-magazine-widget #available-widgets [id*='widget-tpl-treville-magazine-columns'] .widget-top::before { + background-image: url( '../images/magazine-columns.png' ); +} + +.adding-magazine-widget #available-widgets [id*='widget-tpl-treville-magazine-grid'] .widget-top::before { + background-image: url( '../images/magazine-grid.png' ); +} diff --git a/assets/treville/css/editor-style.css b/assets/treville/css/editor-style.css new file mode 100755 index 0000000..73f8e66 --- /dev/null +++ b/assets/treville/css/editor-style.css @@ -0,0 +1,354 @@ +/* + * Editor Style CSS + * + * Add styling for the Visual Editor + * + * @package Treville + */ + +/*-------------------------------------------------------------- +>>> TABLE OF CONTENTS: +---------------------------------------------------------------- +1.0 - Container +2.0 - Typography +3.0 - Elements +4.0 - Alignments +5.0 - Captions +6.0 - Galleries +7.0 - Shortcodes + + +/*-------------------------------------------------------------- +# 1.0 - Container +--------------------------------------------------------------*/ +body { + margin: 0.5em 1.5em; + max-width: 830px; +} + +/*-------------------------------------------------------------- +# 2.0 - Typography +--------------------------------------------------------------*/ +body { + color: #303030; + font-size: 17px; + font-size: 1.0625rem; + font-family: 'Gudea', Tahoma, Arial; + line-height: 1.75; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + clear: both; +} + +p { + margin-bottom: 1.5em; +} + +dfn, +cite, +em, +i { + font-style: italic; +} + +blockquote { + margin: 0 1.5em; +} + +address { + margin: 0 0 1.5em; +} + +pre { + overflow: auto; + margin-bottom: 1.6em; + padding: 1.6em; + max-width: 100%; + background: #eee; + font-size: 15px; + font-size: 0.9375rem; + font-family: "Courier 10 Pitch", Courier, monospace; + line-height: 1.6; +} + +code, +kbd, +tt, +var { + font-size: 15px; + font-size: 0.9375rem; + font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; +} + +abbr, +acronym { + border-bottom: 1px dotted #666; + cursor: help; +} + +mark, +ins { + background: #fff9c0; + text-decoration: none; +} + +big { + font-size: 125%; +} + +/*-------------------------------------------------------------- +# 3.0 - Elements +--------------------------------------------------------------*/ +html { + box-sizing: border-box; +} + +*, +*:before, +*:after { /* Inherit box-sizing to make it easier to change the property for components that leverage other behavior; see http://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ */ + box-sizing: inherit; +} + +blockquote { + margin: 0 0 1.5em; + padding: 0.05em 1.25em 1em; + border: 1px solid #ddd; + border-left: 3px solid #ee4455; + color: #777; + font-style: italic; + font-size: 18px; + font-size: 1.125rem; +} + +blockquote cite, +blockquote small { + display: block; + margin-top: 1em; + color: #404040; + font-size: 16px; + font-size: 1rem; + line-height: 1.75; +} + +blockquote cite:before, +blockquote small:before { + content: "\2014\00a0"; +} + +blockquote em, +blockquote i, +blockquote cite { + font-style: normal; +} + +blockquote > :last-child { + margin-bottom: 0.5em; +} + +hr { + margin-bottom: 1.5em; + height: 1px; + border: 0; + background-color: #ccc; +} + +ul, +ol { + margin: 0 0 1.5em; + padding: 0 0 0 1.25em; +} + +ul { + list-style: disc; +} + +ol { + list-style: decimal; +} + +li > ul, +li > ol { + margin-bottom: 0; + margin-left: 1.5em; +} + +dt { + font-weight: bold; +} + +dd { + margin: 0 0 1.5em; +} + +img { + max-width: 100%; /* Adhere to container width. */ + height: auto; /* Make sure images are scaled correctly. */ +} + +table { + margin: 0 0 1.5em; + width: 100%; + border: none; + table-layout: fixed; +} + +th, +td { + padding: 0.3em 0.6em; + border: 1px solid #ddd; +} + +a { + color: #ee4455; + text-decoration: none; +} + +a:link, +a:visited { + color: #ee4455; +} + +a:hover, +a:focus, +a:active { + color: #303030; +} + +a:focus { + outline: thin dotted; +} + +a:hover, +a:active { + outline: 0; +} + +/*-------------------------------------------------------------- +# 4.0 - Alignments +--------------------------------------------------------------*/ +.alignleft { + display: inline; + float: left; + margin-right: 1.5em; +} + +.alignright { + display: inline; + float: right; + margin-left: 1.5em; +} + +.aligncenter { + display: block; + clear: both; + margin-right: auto; + margin-left: auto; +} + + +/*-------------------------------------------------------------- +# 5.0 - Captions +--------------------------------------------------------------*/ +.wp-caption { + margin-bottom: 1.5em; + max-width: 100%; +} + +.wp-caption img[class*="wp-image-"] { + display: block; + margin: 0 auto; +} + +.wp-caption-text { + text-align: center; +} + +.wp-caption .wp-caption-text { + margin: 0.8075em 0; +} + +/*-------------------------------------------------------------- +# 6.0 - Galleries +--------------------------------------------------------------*/ +.gallery { + margin-bottom: 1.25em; +} + +.gallery-item { + display: inline-block; + box-sizing: border-box; + margin: 0; + padding: 0.75em 1em 0 0; + width: 100%; + vertical-align: top; + text-align: center; +} + +.gallery-columns-2 .gallery-item { + max-width: 50%; +} + +.gallery-columns-3 .gallery-item { + max-width: 33.33%; +} + +.gallery-columns-4 .gallery-item { + max-width: 25%; +} + +.gallery-columns-5 .gallery-item { + max-width: 20%; +} + +.gallery-columns-6 .gallery-item { + max-width: 16.66%; +} + +.gallery-columns-7 .gallery-item { + max-width: 14.28%; +} + +.gallery-columns-8 .gallery-item { + max-width: 12.5%; +} + +.gallery-columns-9 .gallery-item { + max-width: 11.11%; +} + +.gallery-caption { + display: block; + font-size: 13px; + font-size: 0.8125rem; +} + +/*-------------------------------------------------------------- +# 7.0 - Shortcodes +--------------------------------------------------------------*/ +.wp-audio-shortcode a, +.wp-playlist a { + box-shadow: none; +} + +.mce-content-body .wp-audio-playlist { + margin: 0; + padding-bottom: 0; +} + +.mce-content-body .wp-playlist-tracks { + margin-top: 0; +} + +.mce-content-body .wp-playlist-item { + padding: 10px 0; +} + +.mce-content-body .wp-playlist-item-length { + top: 10px; +} diff --git a/assets/treville/css/editor-styles.css b/assets/treville/css/editor-styles.css new file mode 100755 index 0000000..551fa7c --- /dev/null +++ b/assets/treville/css/editor-styles.css @@ -0,0 +1,1159 @@ +@charset "UTF-8"; + +/* + * Editor Styles + * + * @package Treville + */ + +/*-------------------------------------------------------------- +# - Variables +--------------------------------------------------------------*/ +:root { + --primary-color: #1177aa; + --secondary-color: #005e91; + --tertiary-color: #004477; + --accent-color: #11aa44; + --highlight-color: #aa1d11; + --light-gray-color: #e5e5e5; + --gray-color: #999; + --dark-gray-color: #454545; + --text-color: #454545; + --medium-text-color: #666; + --light-text-color: #999; + --dark-border-color: #454545; + --medium-border-color: rgba(0, 0, 0, 0.3); + --light-border-color: rgba(0, 0, 0, 0.15); + --link-color: #1177aa; + --link-hover-color: #454545; + --button-color: #1177aa; + --button-text-color: #fff; + --button-hover-color: #454545; + --button-hover-text-color: #fff; + --header-background-color: #454545; + --header-text-color: #fff; + --site-title-color: #fff; + --site-title-hover-color: rgba(255, 255, 255, 0.5); + --top-navi-color: #fff; + --top-navi-hover-color: rgba(255, 255, 255, 0.5); + --top-navi-border-color: rgba(255, 255, 255, 0.1); + --navi-background-color: #fff; + --navi-color: #454545; + --navi-hover-color: rgba(0, 0, 0, 0.5); + --navi-border-color: rgba(0, 0, 0, 0.2); + --page-background-color: #fff; + --page-border-color: rgba(0, 0, 0, 0.2); + --content-border-color: #1177aa; + --title-color: #1177aa; + --title-hover-color: #454545; + --widget-background-color: #fff; + --widget-border-color: rgba(0, 0, 0, 0.2); + --widget-title-color: #454545; + --footer-background-color: #454545; + --footer-text-color: #ddd; + --footer-link-color: #fff; + --footer-link-hover-color: rgba(255, 255, 255, 0.5); + --text-font: "Gudea", arial, helvetica, sans-serif; + --title-font: "Magra", arial, helvetica, sans-serif; + --navi-font: "Magra", arial, helvetica, sans-serif; + --widget-title-font: "Magra", arial, helvetica, sans-serif; + --title-font-weight: normal; + --navi-font-weight: normal; + --widget-title-font-weight: normal; + --title-text-transform: none; + --navi-text-transform: uppercase; + --widget-title-text-transform: uppercase; + --text-line-height: 1.75; + --title-line-height: 1.4; +} + +/*-------------------------------------------------------------- +# - Layout +--------------------------------------------------------------*/ +.edit-post-visual-editor { + background-color: #fff; + background-color: var(--page-background-color); +} + +.wp-block { + max-width: 880px; + margin-top: 0; + margin-bottom: 1.5em; +} + +.wp-block[data-align="wide"] { + max-width: 1120px; +} + +.wp-block[data-align="full"] { + max-width: 1440px; +} + +/* Fullwidth Template */ +.treville-fullwidth-page-layout .wp-block { + max-width: 1280px; +} + +.treville-fullwidth-page-layout .wp-block[data-align="wide"], +.treville-fullwidth-page-layout .wp-block[data-align="full"] { + max-width: 1440px; +} + +/* Wide Theme Layout */ +.treville-wide-theme-layout .wp-block[data-align="full"], +.treville-wide-theme-layout.treville-fullwidth-page-layout .wp-block[data-align="full"] { + max-width: none; +} + +.treville-wide-theme-layout.treville-fullwidth-page-layout .wp-block[data-align="wide"] { + max-width: 1440px; +} + +/* Post and Page Title */ +body.block-editor-page .editor-post-title__block .editor-post-title__input { + color: #1177aa; + color: var(--title-color); + font-size: 40px; + font-size: 2.5rem; + font-family: Magra, arial, helvetica, sans-serif; + font-family: var(--title-font); + font-weight: 400; + font-weight: var(--title-font-weight); + text-transform: none; + text-transform: var(--title-text-transform); + line-height: 1.4; + line-height: var(--title-line-height); +} + +@media only screen and (max-width: 800px) { + body.block-editor-page .editor-post-title__block .editor-post-title__input { + font-size: 36px; + font-size: 2.25rem; + } +} + +@media only screen and (max-width: 640px) { + body.block-editor-page .editor-post-title__block .editor-post-title__input { + font-size: 32px; + font-size: 2rem; + } +} + +@media only screen and (max-width: 480px) { + body.block-editor-page .editor-post-title__block .editor-post-title__input { + font-size: 28px; + font-size: 1.75rem; + } +} + +@media only screen and (max-width: 320px) { + body.block-editor-page .editor-post-title__block .editor-post-title__input { + font-size: 24px; + font-size: 1.5rem; + } +} + +/* Hidden Page Title */ +body.treville-page-title-hidden.block-editor-page .edit-post-visual-editor .edit-post-visual-editor__post-title-wrapper { + background-color: #fff; + background-image: linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%, #ddd), linear-gradient(45deg, #ddd 25%, transparent 25%, transparent 75%, #ddd 75%, #ddd); + background-size: 20px 20px; + background-position: 0 0, 10px 10px; +} + +body.treville-page-title-hidden.block-editor-page .edit-post-visual-editor .edit-post-visual-editor__post-title-wrapper .editor-post-title__block .editor-post-title__input { + border-bottom: none; + padding-bottom: 1rem; +} + +/*-------------------------------------------------------------- +# - Elements +--------------------------------------------------------------*/ + +/* Typography */ +.edit-post-visual-editor__content-area .editor-styles-wrapper { + color: #454545; + color: var(--text-color); + font-size: 17px; + font-size: 1.0625rem; + font-family: Gudea, arial, helvetica, sans-serif; + font-family: var(--text-font); + line-height: 1.75; + line-height: var(--text-line-height); +} + +.editor-styles-wrapper p { + font-size: inherit; + line-height: 1.75; + line-height: var(--text-line-height); + margin-top: 1.5em; + margin-bottom: 1.5em; +} + +.editor-styles-wrapper .mce-content-body { + line-height: 1.75; + line-height: var(--text-line-height); +} + +.editor-styles-wrapper a { + color: #1177aa; + color: var(--link-color); +} + +.editor-styles-wrapper hr { + margin-top: 1.5em; + margin-bottom: 1.5em; + height: 1px; + border: 0; + background-color: rgba(0, 0, 0, 0.15); + background-color: var(--light-border-color); +} + +.editor-styles-wrapper pre { + margin-top: 1.5em; + margin-bottom: 1.5em; + padding: 1.5em; + border: 1px solid; + color: #454545; + color: var(--text-color); + border-color: rgba(0, 0, 0, 0.15); + border-color: var(--light-border-color); + background: rgba(0, 0, 0, 0.05); + font-size: 15px; + font-size: 0.9375rem; + font-family: "Courier 10 Pitch", Courier, monospace; + line-height: 1.75; + line-height: var(--text-line-height); +} + +.editor-styles-wrapper code, +.editor-styles-wrapper .wp-block code, +.editor-styles-wrapper kbd, +.editor-styles-wrapper tt, +.editor-styles-wrapper var { + font-size: 15px; + font-size: 0.9375rem; + font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; + background: rgba(0, 0, 0, 0.1); + color: inherit; + border-radius: 3px; + padding: 2px 5px; +} + +.editor-styles-wrapper .wp-block-code code { + background: none; + padding: 0; +} + +/* Headings */ +.editor-styles-wrapper h1, +.editor-styles-wrapper h2, +.editor-styles-wrapper h3, +.editor-styles-wrapper h4, +.editor-styles-wrapper h5, +.editor-styles-wrapper h6 { + clear: both; + margin-top: 1em; + margin-bottom: 0.75em; + line-height: 1.4; + line-height: var(--title-line-height); +} + +.editor-styles-wrapper h1.mce-content-body, +.editor-styles-wrapper h2.mce-content-body, +.editor-styles-wrapper h3.mce-content-body, +.editor-styles-wrapper h4.mce-content-body, +.editor-styles-wrapper h5.mce-content-body, +.editor-styles-wrapper h6.mce-content-body { + line-height: 1.4; + line-height: var(--title-line-height); +} + +.editor-styles-wrapper h1 { + font-size: 36px; + font-size: 2.25rem; +} + +.editor-styles-wrapper h2 { + font-size: 28px; + font-size: 1.75rem; +} + +.editor-styles-wrapper h3 { + font-size: 24px; + font-size: 1.5rem; +} + +.editor-styles-wrapper h4 { + font-size: 22px; + font-size: 1.375rem; +} + +.editor-styles-wrapper h5 { + font-size: 20px; + font-size: 1.25rem; +} + +.editor-styles-wrapper h6 { + font-size: 19px; + font-size: 1.1875rem; +} + +/* Blockquotes */ +.editor-styles-wrapper blockquote, +.wp-block-quote { + margin-top: 1.5em; + margin-bottom: 1.5em; + padding: 0 1.25em 0.25em; + border-left: 4px solid; + border-color: #1177aa; + border-color: var(--link-color); + color: #666; + color: var(--medium-text-color); + font-size: 18px; + font-size: 1.125rem; +} + +.editor-styles-wrapper blockquote p { + margin-bottom: 1rem; +} + +.editor-styles-wrapper blockquote cite, +.wp-block-quote cite, +.wp-block-quote__citation, +.wp-block-pullquote__citation, +.wp-block-pullquote cite { + display: block; + color: #454545; + color: var(--text-color); + font-family: Gudea, arial, helvetica, sans-serif; + font-family: var(--text-font); + font-size: 16px; + font-size: 1rem; + font-style: normal; +} + +.wp-block-quote cite::before, +.wp-block-quote__citation::before, +.wp-block-pullquote__citation::before, +.wp-block-pullquote cite::before { + content: "— "; +} + +.wp-block-pullquote:not(.is-style-solid-color) .wp-block-pullquote__citation { + color: #454545; + color: var(--text-color); + text-transform: none; +} + +/* Lists */ +.editor-styles-wrapper ul, +.editor-styles-wrapper ol { + margin-top: 1.5em; + margin-bottom: 1.5em; + padding: 0 0 0 1.25em; +} + +.editor-styles-wrapper ul { + list-style: square; +} + +.editor-styles-wrapper ol { + list-style: decimal; +} + +.editor-styles-wrapper li > ul, +.editor-styles-wrapper li > ol { + margin-top: 0.5em; + margin-bottom: 0.5em; + margin-left: 1.5em; +} + +/* Tables */ +.editor-styles-wrapper table { + margin-top: 1.5em; + margin-bottom: 1.5em; + width: 100%; + border: none; + table-layout: auto; +} + +.editor-styles-wrapper th, +.editor-styles-wrapper td { + padding: 0.4em 0.6em; + border: 1px solid; + border-color: rgba(0, 0, 0, 0.15); + border-color: var(--light-border-color); +} + +.editor-styles-wrapper th { + font-weight: 400; + text-align: initial; + background: rgba(0, 0, 0, 0.05); +} + +.editor-styles-wrapper tfoot td { + background: rgba(0, 0, 0, 0.05); +} + +.wp-block-table thead, +.wp-block-table tfoot { + border: 1px solid; +} + +/* Captions */ +.wp-block-embed figcaption, +.wp-block-image figcaption, +.wp-block-audio figcaption, +.wp-block-table figcaption { + margin-top: 0.5rem; + margin-bottom: 1.5rem; + font-size: 13px; + font-size: 0.8125rem; + text-align: center; +} + +.wp-block-image figcaption { + margin-top: 0; +} + +/*-------------------------------------------------------------- +# - Blocks +--------------------------------------------------------------*/ + +/* Block Spacing */ +.wp-block-audio, +.wp-block-button, +.wp-block-buttons, +.wp-block-columns, +.wp-block-embed, +.wp-block-image, +.wp-block-gallery, +.wp-block-cover, +.wp-block-table { + margin-bottom: 1.5em; +} + +/* Paragraph Block */ +p.has-background { + padding: 1rem 1.25rem; +} + +.has-drop-cap:not(:focus)::first-letter { + font-size: 4.5rem; + line-height: 0.7; + font-weight: 700; +} + +/* Code Block */ +.wp-block-code { + border-radius: 3px; +} + +/* Separator Block */ +.wp-block-separator { + border: none; +} + +.wp-block-separator:not(.is-style-wide):not(.is-style-dots), +.wp-block-separator.has-background:not(.is-style-wide):not(.is-style-dots) { + margin-left: auto; + margin-right: auto; + max-width: 6rem; + height: 4px; +} + +/* Table Block */ +.wp-block-table table { + margin: 0; +} + +.wp-block-table.is-style-stripes { + border-bottom: none; +} + +.wp-block-table.is-style-stripes tbody tr:nth-child(odd) { + background: rgba(0, 0, 0, 0.05); +} + +.wp-block-table.is-style-stripes thead { + border-bottom: 2px solid; +} + +.wp-block-table.is-style-stripes tfoot { + border-top: 2px solid; +} + +.wp-block-table.is-style-stripes thead, +.wp-block-table.is-style-stripes tfoot { + border-color: #454545; + border-color: var(--text-color); +} + +.wp-block-table.is-style-stripes thead th, +.wp-block-table.is-style-stripes tfoot td { + background: none; +} + +/* Buttons Block */ +.wp-block-buttons .wp-block-button { + margin: 0 0.5rem 0 0; +} + +.wp-block-buttons .wp-block-button:last-child { + margin-right: 0; +} + +/* Button Block */ +.wp-block-button { + font-size: 17px; + font-size: 1.0625rem; +} + +.wp-block-button.aligncenter { + text-align: center; +} + +.wp-block-button__link { + margin: 0; + padding: 0.6em 1em; + border: none; + border-radius: 0; + color: inherit; + font-size: inherit; + text-decoration: none; + transition: all 0.2s ease; +} + +.wp-block-button__link:link, +.wp-block-button__link:visited { + color: inherit; + text-decoration: none; +} + +.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-text-color), +.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-text-color):link, +.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-text-color):visited { + color: #fff; + color: var(--button-text-color); +} + +.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background) { + background-color: #1177aa; + background-color: var(--button-color); +} + +.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-text-color):not(.has-background):hover, +.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-text-color):not(.has-background):active { + background-color: #454545; + background-color: var(--button-hover-color); +} + +.wp-block-button:not(.is-style-outline) .wp-block-button__link.has-text-color:hover, +.wp-block-button:not(.is-style-outline) .wp-block-button__link.has-text-color:active, +.wp-block-button:not(.is-style-outline) .wp-block-button__link.has-background:hover, +.wp-block-button:not(.is-style-outline) .wp-block-button__link.has-background:active { + text-decoration: underline; +} + +/* Outline Style */ +.wp-block-button.is-style-outline .wp-block-button__link { + padding: calc(0.6em - 2px) calc(1em - 2px); + background-color: transparent !important; +} + +.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color), +.wp-block-button__link.is-style-outline:not(.has-text-color), +.wp-block-cover .wp-block-button.is-style-outline .wp-block-button__link, +.wp-block-media-text .wp-block-button.is-style-outline .wp-block-button__link { + color: inherit; +} + +.wp-block-button.is-style-outline .wp-block-button__link:hover, +.wp-block-button.is-style-outline .wp-block-button__link:active { + text-decoration: underline; +} + +.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color):hover, +.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color):active { + color: inherit; +} + +/* Quote Block */ +.wp-block-quote.has-text-align-center:not(.is-style-large), +.wp-block-quote.has-text-align-right:not(.is-style-large) { + padding-left: 0; + border-left: 0; +} + +.wp-block-quote.has-text-align-right:not(.is-style-large) { + padding-right: 1.25em; + border-right: 3px solid; + border-color: #1177aa; + border-color: var(--link-color); +} + +.wp-block-quote.is-style-large { + padding: 0; + border: none; + font-size: 28px; + font-size: 1.75rem; +} + +.wp-block-quote.is-style-large p { + font-size: inherit; + font-style: inherit; + line-height: inherit; +} + +.wp-block-quote.is-style-large cite { + text-align: inherit; + font-size: 16px; + font-size: 1rem; +} + +/* Pullquote Block */ +.wp-block-pullquote { + margin-top: 1.5em; + margin-bottom: 1.5em; + padding: 0; + border-bottom: 4px solid; + border-top: 4px solid; + border-color: rgba(0, 0, 0, 0.15); + border-color: var(--light-border-color); +} + +.wp-block-pullquote blockquote { + border: none; + padding: 0; + font-size: 28px; + font-size: 1.75rem; +} + +.wp-block-pullquote p { + font-size: inherit; + line-height: inherit; +} + +.wp-block-pullquote blockquote > p:last-of-type { + margin-bottom: 0; +} + +.wp-block-pullquote.alignleft p, +.wp-block-pullquote.alignright p { + font-size: 0.75em; +} + +.wp-block-pullquote blockquote cite { + color: #454545; + color: var(--text-color); +} + +.wp-block-pullquote.is-style-solid-color { + padding: 1px 2rem; +} + +.wp-block-pullquote.is-style-solid-color blockquote { + margin-left: 0; + margin-right: 0; + max-width: 100%; +} + +.wp-block-pullquote.is-style-solid-color blockquote p { + font-size: inherit; +} + +.wp-block-pullquote.is-style-solid-color blockquote cite { + color: inherit; +} + +/* Audio */ +.wp-block-audio audio { + width: 100%; +} + +/* Image Block */ +.wp-block-image img { + vertical-align: top; +} + +/* Cover Block */ +.wp-block-cover, +.wp-block-cover-image { + width: auto; +} + +.wp-block-cover > .wp-block-cover__inner-container > *:first-child, +.wp-block-cover-image > .wp-block-cover__inner-container > *:first-child { + margin-top: 0; +} + +.wp-block-cover > .wp-block-cover__inner-container > *:last-child, +.wp-block-cover-image > .wp-block-cover__inner-container > *:last-child { + margin-bottom: 0; +} + +/* Gallery Block */ +.wp-block-gallery { + justify-content: center; +} + +/* Video Embed Block */ +.wp-block-embed-vimeo.alignfull iframe { + width: 100%; +} + +/* Group Block */ +.wp-block-group.has-background { + padding: 1.5em; +} + +.wp-block-group.has-background > .wp-block-group__inner-container > *:first-child { + margin-top: 0; +} + +.wp-block-group.has-background > .wp-block-group__inner-container > *:last-child { + margin-bottom: 0; +} + +/* Columns Block */ +div.wp-block-columns { + gap: 1.5em; +} + +/* Column Block */ +.wp-block-column.has-background { + padding: 1.5em; + box-sizing: border-box; +} + +.wp-block-column.has-background > *:first-child { + margin-top: 0; +} + +.wp-block-column.has-background > *:last-child { + margin-bottom: 0; +} + +/* Latest Posts */ +.wp-block-latest-posts.wp-block-latest-posts__list { + margin-top: 1.5em; + margin-bottom: 1.5em; + padding: 0; +} + +.wp-block-latest-posts.wp-block-latest-posts__list li { + margin-top: 0.5rem; +} + +.wp-block-latest-posts__post-date, +.wp-block-latest-posts__post-author { + color: #999; + color: var(--light-text-color); + font-size: 15px; + font-size: 0.9375rem; +} + +/* Search Block */ +.wp-block-search .wp-block-search__label { + width: auto; +} + +/* Columns Block */ +.editor-styles-wrapper div.wp-block-columns { + gap: 1.5em; +} + +/* Editor Block Styles */ +.editor-styles-wrapper .wp-block-heading.is-style-widget-title { + margin-top: 0; + padding: 0.75em 1em; + color: #454545; + color: var(--widget-title-color); + border-bottom: 1px solid; + border-color: rgba(0, 0, 0, 0.15); + border-color: var(--light-border-color); + font-size: 15px; + font-size: 0.9375rem; + font-family: Magra, arial, helvetica, sans-serif; + font-family: var(--widget-title-font); + font-weight: 400; + font-weight: var(--widget-title-font-weight); + text-transform: uppercase; + text-transform: var(--widget-title-text-transform); + line-height: 1.4; + line-height: var(--title-line-height); + box-shadow: inset 0 2px #1177aa; + box-shadow: inset 0 2px var(--content-border-color); +} + +/*-------------------------------------------------------------- +# - Colors +--------------------------------------------------------------*/ + +/* Block Text Colors */ +.has-primary-color, +.wp-block-button__link.has-primary-color { + color: #1177aa; + color: var(--primary-color); +} + +.has-secondary-color, +.wp-block-button__link.has-secondary-color { + color: #005e91; + color: var(--secondary-color); +} + +.has-tertiary-color, +.wp-block-button__link.has-tertiary-color { + color: #004477; + color: var(--tertiary-color); +} + +.has-accent-color, +.wp-block-button__link.has-accent-color { + color: #11aa44; + color: var(--accent-color); +} + +.has-highlight-color, +.wp-block-button__link.has-highlight-color { + color: #aa1d11; + color: var(--highlight-color); +} + +.has-white-color, +.wp-block-button__link.has-white-color { + color: #fff; +} + +.has-light-gray-color, +.wp-block-button__link.has-light-gray-color { + color: #e5e5e5; + color: var(--light-gray-color); +} + +.has-gray-color, +.wp-block-button__link.has-gray-color { + color: #999; + color: var(--gray-color); +} + +.has-dark-gray-color, +.wp-block-button__link.has-dark-gray-color { + color: #454545; + color: var(--dark-gray-color); +} + +.has-black-color, +.wp-block-button__link.has-black-color { + color: #000; +} + +/* Block Background Colors */ +.has-primary-background-color, +.has-primary-background-color[class] { + background-color: #1177aa; + background-color: var(--primary-color); +} + +.has-secondary-background-color, +.has-secondary-background-color[class] { + background-color: #005e91; + background-color: var(--secondary-color); +} + +.has-tertiary-background-color, +.has-tertiary-background-color[class] { + background-color: #004477; + background-color: var(--tertiary-color); +} + +.has-accent-background-color, +.has-accent-background-color[class] { + background-color: #11aa44; + background-color: var(--accent-color); +} + +.has-highlight-background-color, +.has-highlight-background-color[class] { + background-color: #aa1d11; + background-color: var(--highlight-color); +} + +.has-white-background-color, +.has-white-background-color[class] { + background-color: #fff; +} + +.has-light-gray-background-color, +.has-light-gray-background-color[class] { + background-color: #e5e5e5; + background-color: var(--light-gray-color); +} + +.has-gray-background-color, +.has-gray-background-color[class] { + background-color: #999; + background-color: var(--gray-color); +} + +.has-dark-gray-background-color, +.has-dark-gray-background-color[class] { + background-color: #454545; + background-color: var(--dark-gray-color); +} + +.has-black-background-color, +.has-black-background-color[class] { + background-color: #000; +} + +/*-------------------------------------------------------------- +# - Font Sizes +--------------------------------------------------------------*/ + +/* Block Font Sizes */ +.has-small-font-size { + font-size: 16px; +} + +.has-medium-font-size { + font-size: 24px; +} + +.has-large-font-size { + font-size: 36px; +} + +.has-extra-large-font-size { + font-size: 48px; +} + +.has-huge-font-size { + font-size: 64px; +} + +/*-------------------------------------------------------------- +# - Plugins +--------------------------------------------------------------*/ +:root { + --tz-column-gap: 1.5em; +} + +.tz-magazine-block .tz-magazine-post { + margin: 0 0 1.5em 0; + padding: 0; + border: none; + background: none; + box-shadow: none; +} + +.tz-magazine-block .tz-entry-image { + margin: 0 0 1em; +} + +.tz-magazine-block .tz-entry-image .wp-post-image { + margin: 0; +} + +.tz-magazine-block .tz-entry-header { + padding: 0; +} + +.tz-magazine-block .tz-entry-title { + font-size: 22px; + font-size: 1.375rem; +} + +.tz-magazine-block .tz-magazine-grid-columns-3 .tz-entry-title { + font-size: 18px; + font-size: 1.125rem; +} + +.tz-magazine-block .tz-magazine-grid-columns-4 .tz-entry-title, +.tz-magazine-block .tz-magazine-thumbnail-list .tz-entry-title { + font-size: 16px; + font-size: 1rem; +} + +.tz-magazine-block .tz-entry-meta { + margin: 0.4em 0; + padding: 0; + border: none; + font-size: 14px; + font-size: 0.875rem; +} + +.tz-magazine-block .tz-entry-meta .tz-meta-field { + margin-right: 1em; +} + +.tz-magazine-block .tz-meta-field a { + text-decoration: none; +} + +.tz-magazine-block .tz-entry-content { + margin-top: 1em; + font-size: 16px; + font-size: 1rem; +} + +.tz-magazine-block .tz-read-more { + margin-top: 0; +} + +.tz-magazine-block .tz-more-link { + text-decoration: none; +} + +/* ThemeZee Magazine Blocks - Editor Styles */ +.edit-post-visual-editor .tz-magazine-block .tz-entry-image { + margin-bottom: 0.5rem; +} + +.edit-post-visual-editor .tz-magazine-block .tz-entry-title { + margin-top: 0; + margin-bottom: 0.25rem; + padding: 0; + color: #1177aa; + color: var(--title-color); + font-size: 24px; + font-size: 1.5rem; + font-family: Magra, arial, helvetica, sans-serif; + font-family: var(--title-font); + font-weight: 400; + font-weight: var(--title-font-weight); + text-transform: none; + text-transform: var(--title-text-transform); + line-height: 1.4; +} + +.edit-post-visual-editor .tz-magazine-block .tz-entry-title a:link, +.edit-post-visual-editor .tz-magazine-block .tz-entry-title a:visited { + color: #1177aa; + color: var(--title-color); + text-decoration: none; + transition: all 0.15s ease; +} + +.edit-post-visual-editor .tz-magazine-block .tz-entry-title a:hover, +.edit-post-visual-editor .tz-magazine-block .tz-entry-title a:active { + color: #454545; + color: var(--title-hover-color); +} + +.edit-post-visual-editor .tz-magazine-block .tz-magazine-grid-columns-3 .tz-entry-title { + font-size: 20px; + font-size: 1.25rem; +} + +.edit-post-visual-editor .tz-magazine-block .tz-magazine-grid-columns-4 .tz-entry-title, +.edit-post-visual-editor .tz-magazine-block .tz-magazine-thumbnail-list .tz-entry-title { + font-size: 18px; + font-size: 1.125rem; +} + +.edit-post-visual-editor .tz-magazine-block .tz-entry-meta { + margin: 0.5rem 0 0; + color: #999; + color: var(--light-text-color); + font-size: 15px; + font-size: 0.9375rem; +} + +.edit-post-visual-editor .tz-magazine-block .tz-entry-meta > .tz-meta-field::after { + display: inline-block; + margin: 0 1rem; + color: #999; + color: var(--light-text-color); + content: "–"; +} + +.edit-post-visual-editor .tz-magazine-block .tz-entry-meta > .tz-meta-field:last-child::after { + display: none; +} + +.edit-post-visual-editor .tz-magazine-block .tz-entry-meta a:link, +.edit-post-visual-editor .tz-magazine-block .tz-entry-meta a:visited { + color: #999; + color: var(--light-text-color); + text-decoration: none; +} + +.edit-post-visual-editor .tz-magazine-block .tz-entry-meta a:hover, +.edit-post-visual-editor .tz-magazine-block .tz-entry-meta a:active { + color: #454545; + color: var(--text-color); +} + +.edit-post-visual-editor .tz-magazine-block .tz-entry-content { + margin-top: 1rem; + font-size: 16px; + font-size: 1rem; +} + +.edit-post-visual-editor .tz-magazine-block .tz-entry-content p { + font-size: 16px; + font-size: 1rem; +} + +.edit-post-visual-editor .tz-magazine-block .tz-more-link { + display: inline-block; + margin: 0; + padding: 0.6em 1.2em; + color: #fff; + color: var(--button-text-color); + background-color: #1177aa; + background-color: var(--button-color); + font-size: 15px; + font-size: 0.9375rem; +} + +.edit-post-visual-editor .tz-magazine-block .tz-more-link:link, +.edit-post-visual-editor .tz-magazine-block .tz-more-link:visited { + color: #fff; + color: var(--button-text-color); + text-decoration: none; + transition: all 0.15s ease; +} + +.edit-post-visual-editor .tz-magazine-block .tz-more-link:hover, +.edit-post-visual-editor .tz-magazine-block .tz-more-link:active { + color: #fff; + color: var(--button-hover-text-color); + background-color: #454545; + background-color: var(--button-hover-color); +} + +.edit-post-visual-editor .tz-magazine-block .tz-more-link::after { + content: " »"; +} + +@media only screen and (min-width: 960px) { + .edit-post-visual-editor .tz-magazine-block .tz-entry-title { + font-size: 28px; + font-size: 1.75rem; + } + + .edit-post-visual-editor .tz-magazine-block .tz-magazine-grid-columns-3 .tz-entry-title { + font-size: 22px; + font-size: 1.375rem; + } + + .edit-post-visual-editor .tz-magazine-block .tz-magazine-grid-columns-4 .tz-entry-title, + .edit-post-visual-editor .tz-magazine-block .tz-magazine-thumbnail-list .tz-entry-title { + font-size: 20px; + font-size: 1.25rem; + } + + .edit-post-visual-editor .tz-magazine-block .tz-entry-content { + font-size: 17px; + font-size: 1.0625rem; + } + + .edit-post-visual-editor .tz-magazine-block .tz-entry-content p { + font-size: 17px; + font-size: 1.0625rem; + } +} diff --git a/assets/treville/css/safari-flexbox-fixes.css b/assets/treville/css/safari-flexbox-fixes.css new file mode 100755 index 0000000..adebc86 --- /dev/null +++ b/assets/treville/css/safari-flexbox-fixes.css @@ -0,0 +1,25 @@ +/* + * Safari Flexbox CSS Fixes + * + * @package Treville + */ + +/* Fix Flexbox issues for Safari 6.1-10.0 */ +@media screen and ( min-color-index: 0 ) and ( -webkit-min-device-pixel-ratio: 0 ) { + @media { + .widget-magazine-posts .magazine-grid .post-column, + .sidebar .widget-wrap { + margin-right: -1px; + } + } +} + +/* Fix Flexbox issues for Safari 10.1+ */ +@media not all and ( min-resolution: .001dpcm ) { + @media { + .widget-magazine-posts .magazine-grid .post-column, + .sidebar .widget-wrap { + margin-right: -1px; + } + } +} diff --git a/assets/treville/css/theme-info.css b/assets/treville/css/theme-info.css new file mode 100755 index 0000000..b5d6f4a --- /dev/null +++ b/assets/treville/css/theme-info.css @@ -0,0 +1,144 @@ +/* + * Theme Info CSS + * + * CSS Stylesheet for Theme Info page on Appearance -> Theme Info + * + * @package Treville + */ + +.theme-info-wrap { + position: relative; + margin: 25px 40px 0 20px; + max-width: 1050px; +} +.theme-info-wrap img { + max-width: 100%; +} + +/* Clearing Floats */ +.theme-info-wrap .clearfix:before, .theme-info-wrap .clearfix:after { + display: table; + content: " "; +} +.theme-info-wrap .clearfix:after { + clear: both; +} +.theme-info-wrap .clearfix { + *zoom: 1; /* For IE 6/7 only */ +} + +/* Columns */ +.theme-info-wrap .columns-wrapper { + margin-right: -4em; +} +.theme-info-wrap .columns-wrapper .column { + float: left; + box-sizing: border-box; + padding-right: 4em; +} +.theme-info-wrap .columns-wrapper .column-half { + width: 50%; +} +.theme-info-wrap .columns-wrapper .column-third { + width: 33.3333333333333%; +} +.theme-info-wrap .columns-wrapper .column-quarter { + width: 25%; +} + +/* Font Styles */ +.theme-info-wrap h3 { + margin: 1em 0 0.6em; + font-size: 1.8em; + line-height: 1.5em; +} +.theme-info-wrap h4 { + margin: 0.2em 0; + font-size: 1.4em; +} + +/* Theme Info Header */ +.theme-info-wrap h1 { + margin: 0.2em 0 0 0; + color: #333333; + font-weight: 400; + font-size: 3.0em; + line-height: 1.2em; +} +.theme-info-wrap .theme-description { + margin: 1em 0; + min-height: 60px; + color: #777777; + font-weight: 400; + font-size: 1.4em; + line-height: 1.6em; +} + +/* Important Links */ +.theme-info-wrap .important-links p strong { + margin-right: 1em; +} +.theme-info-wrap .important-links p a { + padding: 0 1em; +} +.theme-info-wrap .important-links p .social-icons { + float: right; +} +.theme-info-wrap .important-links p a span { + display: inline-block; + width: 24px; + height: 24px; + color: #333; + vertical-align: text-bottom; + text-decoration: inherit; + text-decoration: none; + font-weight: normal; + font-style: normal; + font-size: 24px; + font-family: 'Genericons'; + line-height: 1; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.theme-info-wrap .important-links p a .genericon-mail:hover { + color: #aaa; +} +.theme-info-wrap .important-links p a .genericon-facebook:hover { + color: #3b5998; +} +.theme-info-wrap .important-links p a .genericon-twitter:hover { + color: #00aced; +} + +/* Getting Started */ +#getting-started { + margin: 2em 0; +} +#getting-started .section { + margin: 2em 0 4em; +} +#getting-started .section .about { + color: #777777; + font-size: 1.2em; + line-height: 1.6em; +} + +/* More Features */ +#more-features .section { + margin: 1em 0 3em; +} +#more-features .section .about { + color: #777777; + font-size: 1.2em; + line-height: 1.6em; +} + +/* Theme Author */ +#theme-author { + margin: 1em 0; +} +#theme-author p { + color: #777777; + font-size: 1.2em; + line-height: 1.6em; +} diff --git a/assets/treville/icons/genericons-neue.svg b/assets/treville/icons/genericons-neue.svg new file mode 100755 index 0000000..d6cb1e2 --- /dev/null +++ b/assets/treville/icons/genericons-neue.svg @@ -0,0 +1,104 @@ +activity anchor aside attachment audio-mute audio bold book bug cart category chat checkmark close-alt close cloud-download cloud-upload cloud code cog collapse comment day document download edit ellipsis expand external fastforward feed flag fullscreen gallery heart help hide hierarchy home image info italic key link location lock mail menu microphone minus month move next notice paintbrush pause phone picture pinned play plugin plus previous print quote refresh reply rewind search send-to-phone send-to-tablet share show shuffle sitemap skip-ahead skip-back spam standard star-empty star-half star status stop subscribe subscribed summary tablet tag time top trash unapprove unsubscribe unzoom user video videocamera warning website week xpost zoom \ No newline at end of file diff --git a/assets/treville/js/customize-preview.js b/assets/treville/js/customize-preview.js new file mode 100755 index 0000000..1a23799 --- /dev/null +++ b/assets/treville/js/customize-preview.js @@ -0,0 +1,165 @@ +/** + * Customizer Live Preview + * + * Reloads changes on Theme Customizer Preview asynchronously for better usability + * + * @package Treville + */ + +( function( $ ) { + + // Site Title textfield. + wp.customize( 'blogname', function( value ) { + value.bind( function( to ) { + $( '.site-title a' ).text( to ); + } ); + } ); + + // Site Description textfield. + wp.customize( 'blogdescription', function( value ) { + value.bind( function( to ) { + $( '.site-description' ).text( to ); + } ); + } ); + + // Site Title checkbox. + wp.customize( 'romhackplaza_theme_options[site_title]', function( value ) { + value.bind( function( newval ) { + if ( false === newval ) { + hideElement( '.site-title' ); + } else { + showElement( '.site-title' ); + } + } ); + } ); + + // Site Description checkbox. + wp.customize( 'romhackplaza_theme_options[site_description]', function( value ) { + value.bind( function( newval ) { + if ( false === newval ) { + hideElement( '.site-description' ); + } else { + showElement( '.site-description' ); + } + } ); + } ); + + // Sidebar Position. + wp.customize( 'romhackplaza_theme_options[layout]', function( value ) { + value.bind( function( newval ) { + if ( 'left-sidebar' === newval && false === $( 'body' ).hasClass( 'no-sidebar' ) ) { + $( 'body' ).addClass( 'sidebar-left' ); + } else { + $( 'body' ).removeClass( 'sidebar-left' ); + } + } ); + } ); + + // Blog Title textfield. + wp.customize( 'romhackplaza_theme_options[blog_title]', function( value ) { + value.bind( function( to ) { + $( '.blog-header .blog-title' ).text( to ); + } ); + } ); + + // Blog Description textfield. + wp.customize( 'romhackplaza_theme_options[blog_description]', function( value ) { + value.bind( function( to ) { + $( '.blog-header .blog-description' ).text( to ); + } ); + } ); + + // Read More textfield. + wp.customize( 'romhackplaza_theme_options[read_more_text]', function( value ) { + value.bind( function( to ) { + $( 'a.more-link' ).text( to ); + } ); + } ); + + // Post Date checkbox. + wp.customize( 'romhackplaza_theme_options[meta_date]', function( value ) { + value.bind( function( newval ) { + if ( false === newval ) { + $( 'body' ).addClass( 'date-hidden' ); + } else { + $( 'body' ).removeClass( 'date-hidden' ); + } + } ); + } ); + + // Post Author checkbox. + wp.customize( 'romhackplaza_theme_options[meta_author]', function( value ) { + value.bind( function( newval ) { + if ( false === newval ) { + $( 'body' ).addClass( 'author-hidden' ); + } else { + $( 'body' ).removeClass( 'author-hidden' ); + } + } ); + } ); + + // Post Comments checkbox. + wp.customize( 'romhackplaza_theme_options[meta_comments]', function( value ) { + value.bind( function( newval ) { + if ( false === newval ) { + $( 'body' ).addClass( 'comments-hidden' ); + } else { + $( 'body' ).removeClass( 'comments-hidden' ); + } + } ); + } ); + + // Post Categories checkbox. + wp.customize( 'romhackplaza_theme_options[meta_category]', function( value ) { + value.bind( function( newval ) { + if ( false === newval ) { + hideElement( '.type-post .entry-footer .entry-categories' ); + } else { + showElement( '.type-post .entry-footer .entry-categories' ); + } + } ); + } ); + + // Post Tags checkbox. + wp.customize( 'romhackplaza_theme_options[meta_tags]', function( value ) { + value.bind( function( newval ) { + if ( false === newval ) { + hideElement( '.type-post .entry-footer .entry-tags' ); + } else { + showElement( '.type-post .entry-footer .entry-tags' ); + } + } ); + } ); + + // Post Navigation checkbox. + wp.customize( 'romhackplaza_theme_options[post_navigation]', function( value ) { + value.bind( function( newval ) { + if ( false === newval ) { + hideElement( '.type-post .post-navigation' ); + } else { + showElement( '.type-post .post-navigation' ); + } + } ); + } ); + + function hideElement( element ) { + $( element ).css({ + clip: 'rect(1px, 1px, 1px, 1px)', + position: 'absolute', + width: '1px', + height: '1px', + overflow: 'hidden' + }); + } + + function showElement( element ) { + $( element ).css({ + clip: 'auto', + position: 'relative', + width: 'auto', + height: 'auto', + overflow: 'visible' + }); + } + +} )( jQuery ); diff --git a/assets/treville/js/customizer-controls.js b/assets/treville/js/customizer-controls.js new file mode 100755 index 0000000..b6d2bb3 --- /dev/null +++ b/assets/treville/js/customizer-controls.js @@ -0,0 +1,52 @@ +/** + * Customizer Controls JS + * + * Adds Javascript for Customizer Controls. + * + * @package Treville + */ + +( function( wp, $ ) { + + // Based on https://make.xwp.co/2016/07/24/dependently-contextual-customizer-controls/ + wp.customize( 'custom_logo', function( setting ) { + setting.bind( function( value ) { + if ( '' !== value ) { + // Set retina logo option to false when a new logo image is uploaded. + wp.customize.instance( 'romhackplaza_theme_options[retina_logo]' ).set( false ); + } + }); + + var setupControl = function( control ) { + var setActiveState, isDisplayed; + isDisplayed = function() { + return '' !== setting.get(); + }; + setActiveState = function() { + control.active.set( isDisplayed() ); + }; + setActiveState(); + setting.bind( setActiveState ); + control.active.validate = isDisplayed; + }; + wp.customize.control( 'romhackplaza_theme_options[retina_logo_title]', setupControl ); + wp.customize.control( 'romhackplaza_theme_options[retina_logo]', setupControl ); + } ); + + wp.customize( 'romhackplaza_theme_options[blog_layout]', function( setting ) { + var setupControl = function( control ) { + var setActiveState, isDisplayed; + isDisplayed = function() { + return 'excerpt' === setting.get(); + }; + setActiveState = function() { + control.active.set( isDisplayed() ); + }; + setActiveState(); + setting.bind( setActiveState ); + control.active.validate = isDisplayed; + }; + wp.customize.control( 'romhackplaza_theme_options[excerpt_length]', setupControl ); + } ); + +})( this.wp, jQuery ); diff --git a/assets/treville/js/html5shiv.js b/assets/treville/js/html5shiv.js new file mode 100755 index 0000000..45ea723 --- /dev/null +++ b/assets/treville/js/html5shiv.js @@ -0,0 +1,326 @@ +/** +* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +;(function(window, document) { +/*jshint evil:true */ + /** version */ + var version = '3.7.3'; + + /** Preset options */ + var options = window.html5 || {}; + + /** Used to skip problem elements */ + var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i; + + /** Not all elements can be cloned in IE **/ + var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i; + + /** Detect whether the browser supports default html5 styles */ + var supportsHtml5Styles; + + /** Name of the expando, to work with multiple documents or to re-shiv one document */ + var expando = '_html5shiv'; + + /** The id for the the documents expando */ + var expanID = 0; + + /** Cached data for each document */ + var expandoData = {}; + + /** Detect whether the browser supports unknown elements */ + var supportsUnknownElements; + + (function() { + try { + var a = document.createElement('a'); + a.innerHTML = ''; + //if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles + supportsHtml5Styles = ('hidden' in a); + + supportsUnknownElements = a.childNodes.length == 1 || (function() { + // assign a false positive if unable to shiv + (document.createElement)('a'); + var frag = document.createDocumentFragment(); + return ( + typeof frag.cloneNode == 'undefined' || + typeof frag.createDocumentFragment == 'undefined' || + typeof frag.createElement == 'undefined' + ); + }()); + } catch(e) { + // assign a false positive if detection fails => unable to shiv + supportsHtml5Styles = true; + supportsUnknownElements = true; + } + + }()); + + /*--------------------------------------------------------------------------*/ + + /** + * Creates a style sheet with the given CSS text and adds it to the document. + * @private + * @param {Document} ownerDocument The document. + * @param {String} cssText The CSS text. + * @returns {StyleSheet} The style element. + */ + function addStyleSheet(ownerDocument, cssText) { + var p = ownerDocument.createElement('p'), + parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement; + + p.innerHTML = 'x'; + return parent.insertBefore(p.lastChild, parent.firstChild); + } + + /** + * Returns the value of `html5.elements` as an array. + * @private + * @returns {Array} An array of shived element node names. + */ + function getElements() { + var elements = html5.elements; + return typeof elements == 'string' ? elements.split(' ') : elements; + } + + /** + * Extends the built-in list of html5 elements + * @memberOf html5 + * @param {String|Array} newElements whitespace separated list or array of new element names to shiv + * @param {Document} ownerDocument The context document. + */ + function addElements(newElements, ownerDocument) { + var elements = html5.elements; + if(typeof elements != 'string'){ + elements = elements.join(' '); + } + if(typeof newElements != 'string'){ + newElements = newElements.join(' '); + } + html5.elements = elements +' '+ newElements; + shivDocument(ownerDocument); + } + + /** + * Returns the data associated to the given document + * @private + * @param {Document} ownerDocument The document. + * @returns {Object} An object of data. + */ + function getExpandoData(ownerDocument) { + var data = expandoData[ownerDocument[expando]]; + if (!data) { + data = {}; + expanID++; + ownerDocument[expando] = expanID; + expandoData[expanID] = data; + } + return data; + } + + /** + * returns a shived element for the given nodeName and document + * @memberOf html5 + * @param {String} nodeName name of the element + * @param {Document|DocumentFragment} ownerDocument The context document. + * @returns {Object} The shived element. + */ + function createElement(nodeName, ownerDocument, data){ + if (!ownerDocument) { + ownerDocument = document; + } + if(supportsUnknownElements){ + return ownerDocument.createElement(nodeName); + } + if (!data) { + data = getExpandoData(ownerDocument); + } + var node; + + if (data.cache[nodeName]) { + node = data.cache[nodeName].cloneNode(); + } else if (saveClones.test(nodeName)) { + node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode(); + } else { + node = data.createElem(nodeName); + } + + // Avoid adding some elements to fragments in IE < 9 because + // * Attributes like `name` or `type` cannot be set/changed once an element + // is inserted into a document/fragment + // * Link elements with `src` attributes that are inaccessible, as with + // a 403 response, will cause the tab/window to crash + // * Script elements appended to fragments will execute when their `src` + // or `text` property is set + return node.canHaveChildren && !reSkip.test(nodeName) && !node.tagUrn ? data.frag.appendChild(node) : node; + } + + /** + * returns a shived DocumentFragment for the given document + * @memberOf html5 + * @param {Document} ownerDocument The context document. + * @returns {Object} The shived DocumentFragment. + */ + function createDocumentFragment(ownerDocument, data){ + if (!ownerDocument) { + ownerDocument = document; + } + if(supportsUnknownElements){ + return ownerDocument.createDocumentFragment(); + } + data = data || getExpandoData(ownerDocument); + var clone = data.frag.cloneNode(), + i = 0, + elems = getElements(), + l = elems.length; + for(;i0,p="fade"===n.vars.animation,m=""!==n.vars.asNavFor,f={};$.data(t,"flexslider",n),f={init:function(){n.animating=!1,n.currentSlide=parseInt(n.vars.startAt?n.vars.startAt:0,10),isNaN(n.currentSlide)&&(n.currentSlide=0),n.animatingTo=n.currentSlide,n.atEnd=0===n.currentSlide||n.currentSlide===n.last,n.containerSelector=n.vars.selector.substr(0,n.vars.selector.search(" ")),n.slides=$(n.vars.selector,n),n.container=$(n.containerSelector,n),n.count=n.slides.length,n.syncExists=$(n.vars.sync).length>0,"slide"===n.vars.animation&&(n.vars.animation="swing"),n.prop=d?"top":"marginLeft",n.args={},n.manualPause=!1,n.stopped=!1,n.started=!1,n.startTimeout=null,n.transitions=!n.vars.video&&!p&&n.vars.useCSS&&function(){var e=document.createElement("div"),t=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var a in t)if(void 0!==e.style[t[a]])return n.pfx=t[a].replace("Perspective","").toLowerCase(),n.prop="-"+n.pfx+"-transform",!0;return!1}(),n.ensureAnimationEnd="",""!==n.vars.controlsContainer&&(n.controlsContainer=$(n.vars.controlsContainer).length>0&&$(n.vars.controlsContainer)),""!==n.vars.manualControls&&(n.manualControls=$(n.vars.manualControls).length>0&&$(n.vars.manualControls)),""!==n.vars.customDirectionNav&&(n.customDirectionNav=2===$(n.vars.customDirectionNav).length&&$(n.vars.customDirectionNav)),n.vars.randomize&&(n.slides.sort(function(){return Math.round(Math.random())-.5}),n.container.empty().append(n.slides)),n.doMath(),n.setup("init"),n.vars.controlNav&&f.controlNav.setup(),n.vars.directionNav&&f.directionNav.setup(),n.vars.keyboard&&(1===$(n.containerSelector).length||n.vars.multipleKeyboard)&&$(document).bind("keyup",function(e){var t=e.keyCode;if(!n.animating&&(39===t||37===t)){var a=39===t?n.getTarget("next"):37===t?n.getTarget("prev"):!1;n.flexAnimate(a,n.vars.pauseOnAction)}}),n.vars.mousewheel&&n.bind("mousewheel",function(e,t,a,i){e.preventDefault();var s=0>t?n.getTarget("next"):n.getTarget("prev");n.flexAnimate(s,n.vars.pauseOnAction)}),n.vars.pausePlay&&f.pausePlay.setup(),n.vars.slideshow&&n.vars.pauseInvisible&&f.pauseInvisible.init(),n.vars.slideshow&&(n.vars.pauseOnHover&&n.hover(function(){n.manualPlay||n.manualPause||n.pause()},function(){n.manualPause||n.manualPlay||n.stopped||n.play()}),n.vars.pauseInvisible&&f.pauseInvisible.isHidden()||(n.vars.initDelay>0?n.startTimeout=setTimeout(n.play,n.vars.initDelay):n.play())),m&&f.asNav.setup(),r&&n.vars.touch&&f.touch(),(!p||p&&n.vars.smoothHeight)&&$(window).bind("resize orientationchange focus",f.resize),n.find("img").attr("draggable","false"),setTimeout(function(){n.vars.start(n)},200)},asNav:{setup:function(){n.asNav=!0,n.animatingTo=Math.floor(n.currentSlide/n.move),n.currentItem=n.currentSlide,n.slides.removeClass(i+"active-slide").eq(n.currentItem).addClass(i+"active-slide"),s?(t._slider=n,n.slides.each(function(){var e=this;e._gesture=new MSGesture,e._gesture.target=e,e.addEventListener("MSPointerDown",function(e){e.preventDefault(),e.currentTarget._gesture&&e.currentTarget._gesture.addPointer(e.pointerId)},!1),e.addEventListener("MSGestureTap",function(e){e.preventDefault();var t=$(this),a=t.index();$(n.vars.asNavFor).data("flexslider").animating||t.hasClass("active")||(n.direction=n.currentItem=s&&t.hasClass(i+"active-slide")?n.flexAnimate(n.getTarget("prev"),!0):$(n.vars.asNavFor).data("flexslider").animating||t.hasClass(i+"active-slide")||(n.direction=n.currentItem'),n.pagingCount>1)for(var r=0;r":''+t+"","thumbnails"===n.vars.controlNav&&!0===n.vars.thumbCaptions){var c=s.attr("data-thumbcaption");""!==c&&void 0!==c&&(a+=''+c+"")}n.controlNavScaffold.append("
  • "+a+"
  • "),t++}n.controlsContainer?$(n.controlsContainer).append(n.controlNavScaffold):n.append(n.controlNavScaffold),f.controlNav.set(),f.controlNav.active(),n.controlNavScaffold.delegate("a, img",o,function(e){if(e.preventDefault(),""===l||l===e.type){var t=$(this),a=n.controlNav.index(t);t.hasClass(i+"active")||(n.direction=a>n.currentSlide?"next":"prev",n.flexAnimate(a,n.vars.pauseOnAction))}""===l&&(l=e.type),f.setToClearWatchedEvent()})},setupManual:function(){n.controlNav=n.manualControls,f.controlNav.active(),n.controlNav.bind(o,function(e){if(e.preventDefault(),""===l||l===e.type){var t=$(this),a=n.controlNav.index(t);t.hasClass(i+"active")||(a>n.currentSlide?n.direction="next":n.direction="prev",n.flexAnimate(a,n.vars.pauseOnAction))}""===l&&(l=e.type),f.setToClearWatchedEvent()})},set:function(){var e="thumbnails"===n.vars.controlNav?"img":"a";n.controlNav=$("."+i+"control-nav li "+e,n.controlsContainer?n.controlsContainer:n)},active:function(){n.controlNav.removeClass(i+"active").eq(n.animatingTo).addClass(i+"active")},update:function(e,t){n.pagingCount>1&&"add"===e?n.controlNavScaffold.append($('
  • '+n.count+"
  • ")):1===n.pagingCount?n.controlNavScaffold.find("li").remove():n.controlNav.eq(t).closest("li").remove(),f.controlNav.set(),n.pagingCount>1&&n.pagingCount!==n.controlNav.length?n.update(t,e):f.controlNav.active()}},directionNav:{setup:function(){var e=$('");n.customDirectionNav?n.directionNav=n.customDirectionNav:n.controlsContainer?($(n.controlsContainer).append(e),n.directionNav=$("."+i+"direction-nav li a",n.controlsContainer)):(n.append(e),n.directionNav=$("."+i+"direction-nav li a",n)),f.directionNav.update(),n.directionNav.bind(o,function(e){e.preventDefault();var t;(""===l||l===e.type)&&(t=$(this).hasClass(i+"next")?n.getTarget("next"):n.getTarget("prev"),n.flexAnimate(t,n.vars.pauseOnAction)),""===l&&(l=e.type),f.setToClearWatchedEvent()})},update:function(){var e=i+"disabled";1===n.pagingCount?n.directionNav.addClass(e).attr("tabindex","-1"):n.vars.animationLoop?n.directionNav.removeClass(e).removeAttr("tabindex"):0===n.animatingTo?n.directionNav.removeClass(e).filter("."+i+"prev").addClass(e).attr("tabindex","-1"):n.animatingTo===n.last?n.directionNav.removeClass(e).filter("."+i+"next").addClass(e).attr("tabindex","-1"):n.directionNav.removeClass(e).removeAttr("tabindex")}},pausePlay:{setup:function(){var e=$('
    ');n.controlsContainer?(n.controlsContainer.append(e),n.pausePlay=$("."+i+"pauseplay a",n.controlsContainer)):(n.append(e),n.pausePlay=$("."+i+"pauseplay a",n)),f.pausePlay.update(n.vars.slideshow?i+"pause":i+"play"),n.pausePlay.bind(o,function(e){e.preventDefault(),(""===l||l===e.type)&&($(this).hasClass(i+"pause")?(n.manualPause=!0,n.manualPlay=!1,n.pause()):(n.manualPause=!1,n.manualPlay=!0,n.play())),""===l&&(l=e.type),f.setToClearWatchedEvent()})},update:function(e){"play"===e?n.pausePlay.removeClass(i+"pause").addClass(i+"play").html(n.vars.playText):n.pausePlay.removeClass(i+"play").addClass(i+"pause").html(n.vars.pauseText)}},touch:function(){function e(e){e.stopPropagation(),n.animating?e.preventDefault():(n.pause(),t._gesture.addPointer(e.pointerId),T=0,c=d?n.h:n.w,f=Number(new Date),l=v&&u&&n.animatingTo===n.last?0:v&&u?n.limit-(n.itemW+n.vars.itemMargin)*n.move*n.animatingTo:v&&n.currentSlide===n.last?n.limit:v?(n.itemW+n.vars.itemMargin)*n.move*n.currentSlide:u?(n.last-n.currentSlide+n.cloneOffset)*c:(n.currentSlide+n.cloneOffset)*c)}function a(e){e.stopPropagation();var a=e.target._slider;if(a){var n=-e.translationX,i=-e.translationY;return T+=d?i:n,m=T,x=d?Math.abs(T)500)&&(e.preventDefault(),!p&&a.transitions&&(a.vars.animationLoop||(m=T/(0===a.currentSlide&&0>T||a.currentSlide===a.last&&T>0?Math.abs(T)/c+2:1)),a.setProps(l+m,"setTouch"))))}}function i(e){e.stopPropagation();var t=e.target._slider;if(t){if(t.animatingTo===t.currentSlide&&!x&&null!==m){var a=u?-m:m,n=a>0?t.getTarget("next"):t.getTarget("prev");t.canAdvance(n)&&(Number(new Date)-f<550&&Math.abs(a)>50||Math.abs(a)>c/2)?t.flexAnimate(n,t.vars.pauseOnAction):p||t.flexAnimate(t.currentSlide,t.vars.pauseOnAction,!0)}r=null,o=null,m=null,l=null,T=0}}var r,o,l,c,m,f,g,h,S,x=!1,y=0,b=0,T=0;s?(t.style.msTouchAction="none",t._gesture=new MSGesture,t._gesture.target=t,t.addEventListener("MSPointerDown",e,!1),t._slider=n,t.addEventListener("MSGestureChange",a,!1),t.addEventListener("MSGestureEnd",i,!1)):(g=function(e){n.animating?e.preventDefault():(window.navigator.msPointerEnabled||1===e.touches.length)&&(n.pause(),c=d?n.h:n.w,f=Number(new Date),y=e.touches[0].pageX,b=e.touches[0].pageY,l=v&&u&&n.animatingTo===n.last?0:v&&u?n.limit-(n.itemW+n.vars.itemMargin)*n.move*n.animatingTo:v&&n.currentSlide===n.last?n.limit:v?(n.itemW+n.vars.itemMargin)*n.move*n.currentSlide:u?(n.last-n.currentSlide+n.cloneOffset)*c:(n.currentSlide+n.cloneOffset)*c,r=d?b:y,o=d?y:b,t.addEventListener("touchmove",h,!1),t.addEventListener("touchend",S,!1))},h=function(e){y=e.touches[0].pageX,b=e.touches[0].pageY,m=d?r-b:r-y,x=d?Math.abs(m)t)&&(e.preventDefault(),!p&&n.transitions&&(n.vars.animationLoop||(m/=0===n.currentSlide&&0>m||n.currentSlide===n.last&&m>0?Math.abs(m)/c+2:1),n.setProps(l+m,"setTouch")))},S=function(e){if(t.removeEventListener("touchmove",h,!1),n.animatingTo===n.currentSlide&&!x&&null!==m){var a=u?-m:m,i=a>0?n.getTarget("next"):n.getTarget("prev");n.canAdvance(i)&&(Number(new Date)-f<550&&Math.abs(a)>50||Math.abs(a)>c/2)?n.flexAnimate(i,n.vars.pauseOnAction):p||n.flexAnimate(n.currentSlide,n.vars.pauseOnAction,!0)}t.removeEventListener("touchend",S,!1),r=null,o=null,m=null,l=null},t.addEventListener("touchstart",g,!1))},resize:function(){!n.animating&&n.is(":visible")&&(v||n.doMath(),p?f.smoothHeight():v?(n.slides.width(n.computedW),n.update(n.pagingCount),n.setProps()):d?(n.viewport.height(n.h),n.setProps(n.h,"setTotal")):(n.vars.smoothHeight&&f.smoothHeight(),n.newSlides.width(n.computedW),n.setProps(n.computedW,"setTotal")))},smoothHeight:function(e){if(!d||p){var t=p?n:n.viewport;e?t.animate({height:n.slides.eq(n.animatingTo).height()},e):t.height(n.slides.eq(n.animatingTo).height())}},sync:function(e){var t=$(n.vars.sync).data("flexslider"),a=n.animatingTo;switch(e){case"animate":t.flexAnimate(a,n.vars.pauseOnAction,!1,!0);break;case"play":t.playing||t.asNav||t.play();break;case"pause":t.pause()}},uniqueID:function(e){return e.filter("[id]").add(e.find("[id]")).each(function(){var e=$(this);e.attr("id",e.attr("id")+"_clone")}),e},pauseInvisible:{visProp:null,init:function(){var e=f.pauseInvisible.getHiddenProp();if(e){var t=e.replace(/[H|h]idden/,"")+"visibilitychange";document.addEventListener(t,function(){f.pauseInvisible.isHidden()?n.startTimeout?clearTimeout(n.startTimeout):n.pause():n.started?n.play():n.vars.initDelay>0?setTimeout(n.play,n.vars.initDelay):n.play()})}},isHidden:function(){var e=f.pauseInvisible.getHiddenProp();return e?document[e]:!1},getHiddenProp:function(){var e=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var t=0;tn.currentSlide?"next":"prev"),m&&1===n.pagingCount&&(n.direction=n.currentItemn.limit&&1!==n.visible?n.limit:S):h=0===n.currentSlide&&e===n.count-1&&n.vars.animationLoop&&"next"!==n.direction?u?(n.count+n.cloneOffset)*c:0:n.currentSlide===n.last&&0===e&&n.vars.animationLoop&&"prev"!==n.direction?u?0:(n.count+1)*c:u?(n.count-1-e+n.cloneOffset)*c:(e+n.cloneOffset)*c,n.setProps(h,"",n.vars.animationSpeed),n.transitions?(n.vars.animationLoop&&n.atEnd||(n.animating=!1,n.currentSlide=n.animatingTo),n.container.unbind("webkitTransitionEnd transitionend"),n.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(n.ensureAnimationEnd),n.wrapup(c)}),clearTimeout(n.ensureAnimationEnd),n.ensureAnimationEnd=setTimeout(function(){n.wrapup(c)},n.vars.animationSpeed+100)):n.container.animate(n.args,n.vars.animationSpeed,n.vars.easing,function(){n.wrapup(c)})}n.vars.smoothHeight&&f.smoothHeight(n.vars.animationSpeed)}},n.wrapup=function(e){p||v||(0===n.currentSlide&&n.animatingTo===n.last&&n.vars.animationLoop?n.setProps(e,"jumpEnd"):n.currentSlide===n.last&&0===n.animatingTo&&n.vars.animationLoop&&n.setProps(e,"jumpStart")),n.animating=!1,n.currentSlide=n.animatingTo,n.vars.after(n)},n.animateSlides=function(){!n.animating&&e&&n.flexAnimate(n.getTarget("next"))},n.pause=function(){clearInterval(n.animatedSlides),n.animatedSlides=null,n.playing=!1,n.vars.pausePlay&&f.pausePlay.update("play"),n.syncExists&&f.sync("pause")},n.play=function(){n.playing&&clearInterval(n.animatedSlides),n.animatedSlides=n.animatedSlides||setInterval(n.animateSlides,n.vars.slideshowSpeed),n.started=n.playing=!0,n.vars.pausePlay&&f.pausePlay.update("pause"),n.syncExists&&f.sync("play")},n.stop=function(){n.pause(),n.stopped=!0},n.canAdvance=function(e,t){var a=m?n.pagingCount-1:n.last;return t?!0:m&&n.currentItem===n.count-1&&0===e&&"prev"===n.direction?!0:m&&0===n.currentItem&&e===n.pagingCount-1&&"next"!==n.direction?!1:e!==n.currentSlide||m?n.vars.animationLoop?!0:n.atEnd&&0===n.currentSlide&&e===a&&"next"!==n.direction?!1:n.atEnd&&n.currentSlide===a&&0===e&&"next"===n.direction?!1:!0:!1},n.getTarget=function(e){return n.direction=e,"next"===e?n.currentSlide===n.last?0:n.currentSlide+1:0===n.currentSlide?n.last:n.currentSlide-1},n.setProps=function(e,t,a){var i=function(){var a=e?e:(n.itemW+n.vars.itemMargin)*n.move*n.animatingTo,i=function(){if(v)return"setTouch"===t?e:u&&n.animatingTo===n.last?0:u?n.limit-(n.itemW+n.vars.itemMargin)*n.move*n.animatingTo:n.animatingTo===n.last?n.limit:a;switch(t){case"setTotal":return u?(n.count-1-n.currentSlide+n.cloneOffset)*e:(n.currentSlide+n.cloneOffset)*e;case"setTouch":return u?e:e;case"jumpEnd":return u?e:n.count*e;case"jumpStart":return u?n.count*e:e;default:return e}}();return-1*i+"px"}();n.transitions&&(i=d?"translate3d(0,"+i+",0)":"translate3d("+i+",0,0)",a=void 0!==a?a/1e3+"s":"0s",n.container.css("-"+n.pfx+"-transition-duration",a),n.container.css("transition-duration",a)),n.args[n.prop]=i,(n.transitions||void 0===a)&&n.container.css(n.args),n.container.css("transform",i)},n.setup=function(e){if(p)n.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===e&&(r?n.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+n.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(n.currentSlide).css({opacity:1,zIndex:2}):0==n.vars.fadeFirstSlide?n.slides.css({opacity:0,display:"block",zIndex:1}).eq(n.currentSlide).css({zIndex:2}).css({opacity:1}):n.slides.css({opacity:0,display:"block",zIndex:1}).eq(n.currentSlide).css({zIndex:2}).animate({opacity:1},n.vars.animationSpeed,n.vars.easing)),n.vars.smoothHeight&&f.smoothHeight();else{var t,a;"init"===e&&(n.viewport=$('
    ').css({overflow:"hidden",position:"relative"}).appendTo(n).append(n.container),n.cloneCount=0,n.cloneOffset=0,u&&(a=$.makeArray(n.slides).reverse(),n.slides=$(a),n.container.empty().append(n.slides))),n.vars.animationLoop&&!v&&(n.cloneCount=2,n.cloneOffset=1,"init"!==e&&n.container.find(".clone").remove(),n.container.append(f.uniqueID(n.slides.first().clone().addClass("clone")).attr("aria-hidden","true")).prepend(f.uniqueID(n.slides.last().clone().addClass("clone")).attr("aria-hidden","true"))),n.newSlides=$(n.vars.selector,n),t=u?n.count-1-n.currentSlide+n.cloneOffset:n.currentSlide+n.cloneOffset,d&&!v?(n.container.height(200*(n.count+n.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){n.newSlides.css({display:"block"}),n.doMath(),n.viewport.height(n.h),n.setProps(t*n.h,"init")},"init"===e?100:0)):(n.container.width(200*(n.count+n.cloneCount)+"%"),n.setProps(t*n.computedW,"init"),setTimeout(function(){n.doMath(),n.newSlides.css({width:n.computedW,marginRight:n.computedM,"float":"left",display:"block"}),n.vars.smoothHeight&&f.smoothHeight()},"init"===e?100:0))}v||n.slides.removeClass(i+"active-slide").eq(n.currentSlide).addClass(i+"active-slide"),n.vars.init(n)},n.doMath=function(){var e=n.slides.first(),t=n.vars.itemMargin,a=n.vars.minItems,i=n.vars.maxItems;n.w=void 0===n.viewport?n.width():n.viewport.width(),n.h=e.height(),n.boxPadding=e.outerWidth()-e.width(),v?(n.itemT=n.vars.itemWidth+t,n.itemM=t,n.minW=a?a*n.itemT:n.w,n.maxW=i?i*n.itemT-t:n.w,n.itemW=n.minW>n.w?(n.w-t*(a-1))/a:n.maxWn.w?n.w:n.vars.itemWidth,n.visible=Math.floor(n.w/n.itemW),n.move=n.vars.move>0&&n.vars.moven.w?n.itemW*(n.count-1)+t*(n.count-1):(n.itemW+t)*n.count-n.w-t):(n.itemW=n.w,n.itemM=t,n.pagingCount=n.count,n.last=n.count-1),n.computedW=n.itemW-n.boxPadding,n.computedM=n.itemM},n.update=function(e,t){n.doMath(),v||(en.controlNav.length?f.controlNav.update("add"):("remove"===t&&!v||n.pagingCountn.last&&(n.currentSlide-=1,n.animatingTo-=1),f.controlNav.update("remove",n.last))),n.vars.directionNav&&f.directionNav.update()},n.addSlide=function(e,t){var a=$(e);n.count+=1,n.last=n.count-1,d&&u?void 0!==t?n.slides.eq(n.count-t).after(a):n.container.prepend(a):void 0!==t?n.slides.eq(t).before(a):n.container.append(a),n.update(t,"add"),n.slides=$(n.vars.selector+":not(.clone)",n),n.setup(),n.vars.added(n)},n.removeSlide=function(e){var t=isNaN(e)?n.slides.index($(e)):e;n.count-=1,n.last=n.count-1,isNaN(e)?$(e,n.slides).remove():d&&u?n.slides.eq(n.last).remove():n.slides.eq(e).remove(),n.doMath(),n.update(t,"remove"),n.slides=$(n.vars.selector+":not(.clone)",n),n.setup(),n.vars.removed(n)},f.init()},$(window).blur(function(t){e=!1}).focus(function(t){e=!0}),$.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,fadeFirstSlide:!0,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",customDirectionNav:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){}},$.fn.flexslider=function(e){if(void 0===e&&(e={}),"object"==typeof e)return this.each(function(){var t=$(this),a=e.selector?e.selector:".slides > li",n=t.find(a);1===n.length&&e.allowOneSlide===!0||0===n.length?(n.fadeIn(400),e.start&&e.start(t)):void 0===t.data("flexslider")&&new $.flexslider(this,e)});var t=$(this).data("flexslider");switch(e){case"play":t.play();break;case"pause":t.pause();break;case"stop":t.stop();break;case"next":t.flexAnimate(t.getTarget("next"),!0);break;case"prev":case"previous":t.flexAnimate(t.getTarget("prev"),!0);break;default:"number"==typeof e&&t.flexAnimate(e,!0)}}}(jQuery); \ No newline at end of file diff --git a/assets/treville/js/jquery.flexslider.js b/assets/treville/js/jquery.flexslider.js new file mode 100755 index 0000000..f44d18b --- /dev/null +++ b/assets/treville/js/jquery.flexslider.js @@ -0,0 +1,1195 @@ +/* + * jQuery FlexSlider v2.6.0 + * Copyright 2012 WooThemes + * Contributing Author: Tyler Smith + */ +; +(function ($) { + + var focused = true; + + //FlexSlider: Object Instance + $.flexslider = function(el, options) { + var slider = $(el); + + // making variables public + slider.vars = $.extend({}, $.flexslider.defaults, options); + + var namespace = slider.vars.namespace, + msGesture = window.navigator && window.navigator.msPointerEnabled && window.MSGesture, + touch = (( "ontouchstart" in window ) || msGesture || window.DocumentTouch && document instanceof DocumentTouch) && slider.vars.touch, + // depricating this idea, as devices are being released with both of these events + eventType = "click touchend MSPointerUp keyup", + watchedEvent = "", + watchedEventClearTimer, + vertical = slider.vars.direction === "vertical", + reverse = slider.vars.reverse, + carousel = (slider.vars.itemWidth > 0), + fade = slider.vars.animation === "fade", + asNav = slider.vars.asNavFor !== "", + methods = {}; + + // Store a reference to the slider object + $.data(el, "flexslider", slider); + + // Private slider methods + methods = { + init: function() { + slider.animating = false; + // Get current slide and make sure it is a number + slider.currentSlide = parseInt( ( slider.vars.startAt ? slider.vars.startAt : 0), 10 ); + if ( isNaN( slider.currentSlide ) ) { slider.currentSlide = 0; } + slider.animatingTo = slider.currentSlide; + slider.atEnd = (slider.currentSlide === 0 || slider.currentSlide === slider.last); + slider.containerSelector = slider.vars.selector.substr(0,slider.vars.selector.search(' ')); + slider.slides = $(slider.vars.selector, slider); + slider.container = $(slider.containerSelector, slider); + slider.count = slider.slides.length; + // SYNC: + slider.syncExists = $(slider.vars.sync).length > 0; + // SLIDE: + if (slider.vars.animation === "slide") { slider.vars.animation = "swing"; } + slider.prop = (vertical) ? "top" : "marginLeft"; + slider.args = {}; + // SLIDESHOW: + slider.manualPause = false; + slider.stopped = false; + //PAUSE WHEN INVISIBLE + slider.started = false; + slider.startTimeout = null; + // TOUCH/USECSS: + slider.transitions = !slider.vars.video && !fade && slider.vars.useCSS && (function() { + var obj = document.createElement('div'), + props = ['perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective']; + for (var i in props) { + if ( obj.style[ props[i] ] !== undefined ) { + slider.pfx = props[i].replace('Perspective','').toLowerCase(); + slider.prop = "-" + slider.pfx + "-transform"; + return true; + } + } + return false; + }()); + slider.ensureAnimationEnd = ''; + // CONTROLSCONTAINER: + if (slider.vars.controlsContainer !== "") slider.controlsContainer = $(slider.vars.controlsContainer).length > 0 && $(slider.vars.controlsContainer); + // MANUAL: + if (slider.vars.manualControls !== "") slider.manualControls = $(slider.vars.manualControls).length > 0 && $(slider.vars.manualControls); + + // CUSTOM DIRECTION NAV: + if (slider.vars.customDirectionNav !== "") slider.customDirectionNav = $(slider.vars.customDirectionNav).length === 2 && $(slider.vars.customDirectionNav); + + // RANDOMIZE: + if (slider.vars.randomize) { + slider.slides.sort(function() { return (Math.round(Math.random())-0.5); }); + slider.container.empty().append(slider.slides); + } + + slider.doMath(); + + // INIT + slider.setup("init"); + + // CONTROLNAV: + if (slider.vars.controlNav) { methods.controlNav.setup(); } + + // DIRECTIONNAV: + if (slider.vars.directionNav) { methods.directionNav.setup(); } + + // KEYBOARD: + if (slider.vars.keyboard && ($(slider.containerSelector).length === 1 || slider.vars.multipleKeyboard)) { + $(document).bind('keyup', function(event) { + var keycode = event.keyCode; + if (!slider.animating && (keycode === 39 || keycode === 37)) { + var target = (keycode === 39) ? slider.getTarget('next') : + (keycode === 37) ? slider.getTarget('prev') : false; + slider.flexAnimate(target, slider.vars.pauseOnAction); + } + }); + } + // MOUSEWHEEL: + if (slider.vars.mousewheel) { + slider.bind('mousewheel', function(event, delta, deltaX, deltaY) { + event.preventDefault(); + var target = (delta < 0) ? slider.getTarget('next') : slider.getTarget('prev'); + slider.flexAnimate(target, slider.vars.pauseOnAction); + }); + } + + // PAUSEPLAY + if (slider.vars.pausePlay) { methods.pausePlay.setup(); } + + //PAUSE WHEN INVISIBLE + if (slider.vars.slideshow && slider.vars.pauseInvisible) { methods.pauseInvisible.init(); } + + // SLIDSESHOW + if (slider.vars.slideshow) { + if (slider.vars.pauseOnHover) { + slider.hover(function() { + if (!slider.manualPlay && !slider.manualPause) { slider.pause(); } + }, function() { + if (!slider.manualPause && !slider.manualPlay && !slider.stopped) { slider.play(); } + }); + } + // initialize animation + //If we're visible, or we don't use PageVisibility API + if(!slider.vars.pauseInvisible || !methods.pauseInvisible.isHidden()) { + (slider.vars.initDelay > 0) ? slider.startTimeout = setTimeout(slider.play, slider.vars.initDelay) : slider.play(); + } + } + + // ASNAV: + if (asNav) { methods.asNav.setup(); } + + // TOUCH + if (touch && slider.vars.touch) { methods.touch(); } + + // FADE&&SMOOTHHEIGHT || SLIDE: + if (!fade || (fade && slider.vars.smoothHeight)) { $(window).bind("resize orientationchange focus", methods.resize); } + + slider.find("img").attr("draggable", "false"); + + // API: start() Callback + setTimeout(function(){ + slider.vars.start(slider); + }, 200); + }, + asNav: { + setup: function() { + slider.asNav = true; + slider.animatingTo = Math.floor(slider.currentSlide/slider.move); + slider.currentItem = slider.currentSlide; + slider.slides.removeClass(namespace + "active-slide").eq(slider.currentItem).addClass(namespace + "active-slide"); + if(!msGesture){ + slider.slides.on(eventType, function(e){ + e.preventDefault(); + var $slide = $(this), + target = $slide.index(); + var posFromLeft = $slide.offset().left - $(slider).scrollLeft(); // Find position of slide relative to left of slider container + if( posFromLeft <= 0 && $slide.hasClass( namespace + 'active-slide' ) ) { + slider.flexAnimate(slider.getTarget("prev"), true); + } else if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass(namespace + "active-slide")) { + slider.direction = (slider.currentItem < target) ? "next" : "prev"; + slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true); + } + }); + }else{ + el._slider = slider; + slider.slides.each(function (){ + var that = this; + that._gesture = new MSGesture(); + that._gesture.target = that; + that.addEventListener("MSPointerDown", function (e){ + e.preventDefault(); + if(e.currentTarget._gesture) { + e.currentTarget._gesture.addPointer(e.pointerId); + } + }, false); + that.addEventListener("MSGestureTap", function (e){ + e.preventDefault(); + var $slide = $(this), + target = $slide.index(); + if (!$(slider.vars.asNavFor).data('flexslider').animating && !$slide.hasClass('active')) { + slider.direction = (slider.currentItem < target) ? "next" : "prev"; + slider.flexAnimate(target, slider.vars.pauseOnAction, false, true, true); + } + }); + }); + } + } + }, + controlNav: { + setup: function() { + if (!slider.manualControls) { + methods.controlNav.setupPaging(); + } else { // MANUALCONTROLS: + methods.controlNav.setupManual(); + } + }, + setupPaging: function() { + var type = (slider.vars.controlNav === "thumbnails") ? 'control-thumbs' : 'control-paging', + j = 1, + item, + slide; + + slider.controlNavScaffold = $('
      '); + + if (slider.pagingCount > 1) { + for (var i = 0; i < slider.pagingCount; i++) { + slide = slider.slides.eq(i); + if ( undefined === slide.attr( 'data-thumb-alt' ) ) { slide.attr( 'data-thumb-alt', '' ); } + altText = ( '' !== slide.attr( 'data-thumb-alt' ) ) ? altText = ' alt="' + slide.attr( 'data-thumb-alt' ) + '"' : ''; + item = (slider.vars.controlNav === "thumbnails") ? '' : '' + j + ''; + if ( 'thumbnails' === slider.vars.controlNav && true === slider.vars.thumbCaptions ) { + var captn = slide.attr( 'data-thumbcaption' ); + if ( '' !== captn && undefined !== captn ) { item += '' + captn + ''; } + } + slider.controlNavScaffold.append('
    1. ' + item + '
    2. '); + j++; + } + } + + // CONTROLSCONTAINER: + (slider.controlsContainer) ? $(slider.controlsContainer).append(slider.controlNavScaffold) : slider.append(slider.controlNavScaffold); + methods.controlNav.set(); + + methods.controlNav.active(); + + slider.controlNavScaffold.delegate('a, img', eventType, function(event) { + event.preventDefault(); + + if (watchedEvent === "" || watchedEvent === event.type) { + var $this = $(this), + target = slider.controlNav.index($this); + + if (!$this.hasClass(namespace + 'active')) { + slider.direction = (target > slider.currentSlide) ? "next" : "prev"; + slider.flexAnimate(target, slider.vars.pauseOnAction); + } + } + + // setup flags to prevent event duplication + if (watchedEvent === "") { + watchedEvent = event.type; + } + methods.setToClearWatchedEvent(); + + }); + }, + setupManual: function() { + slider.controlNav = slider.manualControls; + methods.controlNav.active(); + + slider.controlNav.bind(eventType, function(event) { + event.preventDefault(); + + if (watchedEvent === "" || watchedEvent === event.type) { + var $this = $(this), + target = slider.controlNav.index($this); + + if (!$this.hasClass(namespace + 'active')) { + (target > slider.currentSlide) ? slider.direction = "next" : slider.direction = "prev"; + slider.flexAnimate(target, slider.vars.pauseOnAction); + } + } + + // setup flags to prevent event duplication + if (watchedEvent === "") { + watchedEvent = event.type; + } + methods.setToClearWatchedEvent(); + }); + }, + set: function() { + var selector = (slider.vars.controlNav === "thumbnails") ? 'img' : 'a'; + slider.controlNav = $('.' + namespace + 'control-nav li ' + selector, (slider.controlsContainer) ? slider.controlsContainer : slider); + }, + active: function() { + slider.controlNav.removeClass(namespace + "active").eq(slider.animatingTo).addClass(namespace + "active"); + }, + update: function(action, pos) { + if (slider.pagingCount > 1 && action === "add") { + slider.controlNavScaffold.append($('
    3. ' + slider.count + '
    4. ')); + } else if (slider.pagingCount === 1) { + slider.controlNavScaffold.find('li').remove(); + } else { + slider.controlNav.eq(pos).closest('li').remove(); + } + methods.controlNav.set(); + (slider.pagingCount > 1 && slider.pagingCount !== slider.controlNav.length) ? slider.update(pos, action) : methods.controlNav.active(); + } + }, + directionNav: { + setup: function() { + var directionNavScaffold = $(''); + + // CUSTOM DIRECTION NAV: + if (slider.customDirectionNav) { + slider.directionNav = slider.customDirectionNav; + // CONTROLSCONTAINER: + } else if (slider.controlsContainer) { + $(slider.controlsContainer).append(directionNavScaffold); + slider.directionNav = $('.' + namespace + 'direction-nav li a', slider.controlsContainer); + } else { + slider.append(directionNavScaffold); + slider.directionNav = $('.' + namespace + 'direction-nav li a', slider); + } + + methods.directionNav.update(); + + slider.directionNav.bind(eventType, function(event) { + event.preventDefault(); + var target; + + if (watchedEvent === "" || watchedEvent === event.type) { + target = ($(this).hasClass(namespace + 'next')) ? slider.getTarget('next') : slider.getTarget('prev'); + slider.flexAnimate(target, slider.vars.pauseOnAction); + } + + // setup flags to prevent event duplication + if (watchedEvent === "") { + watchedEvent = event.type; + } + methods.setToClearWatchedEvent(); + }); + }, + update: function() { + var disabledClass = namespace + 'disabled'; + if (slider.pagingCount === 1) { + slider.directionNav.addClass(disabledClass).attr('tabindex', '-1'); + } else if (!slider.vars.animationLoop) { + if (slider.animatingTo === 0) { + slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "prev").addClass(disabledClass).attr('tabindex', '-1'); + } else if (slider.animatingTo === slider.last) { + slider.directionNav.removeClass(disabledClass).filter('.' + namespace + "next").addClass(disabledClass).attr('tabindex', '-1'); + } else { + slider.directionNav.removeClass(disabledClass).removeAttr('tabindex'); + } + } else { + slider.directionNav.removeClass(disabledClass).removeAttr('tabindex'); + } + } + }, + pausePlay: { + setup: function() { + var pausePlayScaffold = $('
      '); + + // CONTROLSCONTAINER: + if (slider.controlsContainer) { + slider.controlsContainer.append(pausePlayScaffold); + slider.pausePlay = $('.' + namespace + 'pauseplay a', slider.controlsContainer); + } else { + slider.append(pausePlayScaffold); + slider.pausePlay = $('.' + namespace + 'pauseplay a', slider); + } + + methods.pausePlay.update((slider.vars.slideshow) ? namespace + 'pause' : namespace + 'play'); + + slider.pausePlay.bind(eventType, function(event) { + event.preventDefault(); + + if (watchedEvent === "" || watchedEvent === event.type) { + if ($(this).hasClass(namespace + 'pause')) { + slider.manualPause = true; + slider.manualPlay = false; + slider.pause(); + } else { + slider.manualPause = false; + slider.manualPlay = true; + slider.play(); + } + } + + // setup flags to prevent event duplication + if (watchedEvent === "") { + watchedEvent = event.type; + } + methods.setToClearWatchedEvent(); + }); + }, + update: function(state) { + (state === "play") ? slider.pausePlay.removeClass(namespace + 'pause').addClass(namespace + 'play').html(slider.vars.playText) : slider.pausePlay.removeClass(namespace + 'play').addClass(namespace + 'pause').html(slider.vars.pauseText); + } + }, + touch: function() { + var startX, + startY, + offset, + cwidth, + dx, + startT, + onTouchStart, + onTouchMove, + onTouchEnd, + scrolling = false, + localX = 0, + localY = 0, + accDx = 0; + + if(!msGesture){ + onTouchStart = function(e) { + if (slider.animating) { + e.preventDefault(); + } else if ( ( window.navigator.msPointerEnabled ) || e.touches.length === 1 ) { + slider.pause(); + // CAROUSEL: + cwidth = (vertical) ? slider.h : slider. w; + startT = Number(new Date()); + // CAROUSEL: + + // Local vars for X and Y points. + localX = e.touches[0].pageX; + localY = e.touches[0].pageY; + + offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 : + (carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) : + (carousel && slider.currentSlide === slider.last) ? slider.limit : + (carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide : + (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth; + startX = (vertical) ? localY : localX; + startY = (vertical) ? localX : localY; + + el.addEventListener('touchmove', onTouchMove, false); + el.addEventListener('touchend', onTouchEnd, false); + } + }; + + onTouchMove = function(e) { + // Local vars for X and Y points. + + localX = e.touches[0].pageX; + localY = e.touches[0].pageY; + + dx = (vertical) ? startX - localY : startX - localX; + scrolling = (vertical) ? (Math.abs(dx) < Math.abs(localX - startY)) : (Math.abs(dx) < Math.abs(localY - startY)); + + var fxms = 500; + + if ( ! scrolling || Number( new Date() ) - startT > fxms ) { + e.preventDefault(); + if (!fade && slider.transitions) { + if (!slider.vars.animationLoop) { + dx = dx/((slider.currentSlide === 0 && dx < 0 || slider.currentSlide === slider.last && dx > 0) ? (Math.abs(dx)/cwidth+2) : 1); + } + slider.setProps(offset + dx, "setTouch"); + } + } + }; + + onTouchEnd = function(e) { + // finish the touch by undoing the touch session + el.removeEventListener('touchmove', onTouchMove, false); + + if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) { + var updateDx = (reverse) ? -dx : dx, + target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev'); + + if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) { + slider.flexAnimate(target, slider.vars.pauseOnAction); + } else { + if (!fade) { slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); } + } + } + el.removeEventListener('touchend', onTouchEnd, false); + + startX = null; + startY = null; + dx = null; + offset = null; + }; + + el.addEventListener('touchstart', onTouchStart, false); + }else{ + el.style.msTouchAction = "none"; + el._gesture = new MSGesture(); + el._gesture.target = el; + el.addEventListener("MSPointerDown", onMSPointerDown, false); + el._slider = slider; + el.addEventListener("MSGestureChange", onMSGestureChange, false); + el.addEventListener("MSGestureEnd", onMSGestureEnd, false); + + function onMSPointerDown(e){ + e.stopPropagation(); + if (slider.animating) { + e.preventDefault(); + }else{ + slider.pause(); + el._gesture.addPointer(e.pointerId); + accDx = 0; + cwidth = (vertical) ? slider.h : slider. w; + startT = Number(new Date()); + // CAROUSEL: + + offset = (carousel && reverse && slider.animatingTo === slider.last) ? 0 : + (carousel && reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) : + (carousel && slider.currentSlide === slider.last) ? slider.limit : + (carousel) ? ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.currentSlide : + (reverse) ? (slider.last - slider.currentSlide + slider.cloneOffset) * cwidth : (slider.currentSlide + slider.cloneOffset) * cwidth; + } + } + + function onMSGestureChange(e) { + e.stopPropagation(); + var slider = e.target._slider; + if(!slider){ + return; + } + var transX = -e.translationX, + transY = -e.translationY; + + //Accumulate translations. + accDx = accDx + ((vertical) ? transY : transX); + dx = accDx; + scrolling = (vertical) ? (Math.abs(accDx) < Math.abs(-transX)) : (Math.abs(accDx) < Math.abs(-transY)); + + if(e.detail === e.MSGESTURE_FLAG_INERTIA){ + setImmediate(function (){ + el._gesture.stop(); + }); + + return; + } + + if (!scrolling || Number(new Date()) - startT > 500) { + e.preventDefault(); + if (!fade && slider.transitions) { + if (!slider.vars.animationLoop) { + dx = accDx / ((slider.currentSlide === 0 && accDx < 0 || slider.currentSlide === slider.last && accDx > 0) ? (Math.abs(accDx) / cwidth + 2) : 1); + } + slider.setProps(offset + dx, "setTouch"); + } + } + } + + function onMSGestureEnd(e) { + e.stopPropagation(); + var slider = e.target._slider; + if(!slider){ + return; + } + if (slider.animatingTo === slider.currentSlide && !scrolling && !(dx === null)) { + var updateDx = (reverse) ? -dx : dx, + target = (updateDx > 0) ? slider.getTarget('next') : slider.getTarget('prev'); + + if (slider.canAdvance(target) && (Number(new Date()) - startT < 550 && Math.abs(updateDx) > 50 || Math.abs(updateDx) > cwidth/2)) { + slider.flexAnimate(target, slider.vars.pauseOnAction); + } else { + if (!fade) { slider.flexAnimate(slider.currentSlide, slider.vars.pauseOnAction, true); } + } + } + + startX = null; + startY = null; + dx = null; + offset = null; + accDx = 0; + } + } + }, + resize: function() { + if (!slider.animating && slider.is(':visible')) { + if (!carousel) { slider.doMath(); } + + if (fade) { + // SMOOTH HEIGHT: + methods.smoothHeight(); + } else if (carousel) { //CAROUSEL: + slider.slides.width(slider.computedW); + slider.update(slider.pagingCount); + slider.setProps(); + } + else if (vertical) { //VERTICAL: + slider.viewport.height(slider.h); + slider.setProps(slider.h, "setTotal"); + } else { + // SMOOTH HEIGHT: + if (slider.vars.smoothHeight) { methods.smoothHeight(); } + slider.newSlides.width(slider.computedW); + slider.setProps(slider.computedW, "setTotal"); + } + } + }, + smoothHeight: function(dur) { + if (!vertical || fade) { + var $obj = (fade) ? slider : slider.viewport; + (dur) ? $obj.animate({"height": slider.slides.eq(slider.animatingTo).height()}, dur) : $obj.height(slider.slides.eq(slider.animatingTo).height()); + } + }, + sync: function(action) { + var $obj = $(slider.vars.sync).data("flexslider"), + target = slider.animatingTo; + + switch (action) { + case "animate": $obj.flexAnimate(target, slider.vars.pauseOnAction, false, true); break; + case "play": if (!$obj.playing && !$obj.asNav) { $obj.play(); } break; + case "pause": $obj.pause(); break; + } + }, + uniqueID: function($clone) { + // Append _clone to current level and children elements with id attributes + $clone.filter( '[id]' ).add($clone.find( '[id]' )).each(function() { + var $this = $(this); + $this.attr( 'id', $this.attr( 'id' ) + '_clone' ); + }); + return $clone; + }, + pauseInvisible: { + visProp: null, + init: function() { + var visProp = methods.pauseInvisible.getHiddenProp(); + if (visProp) { + var evtname = visProp.replace(/[H|h]idden/,'') + 'visibilitychange'; + document.addEventListener(evtname, function() { + if (methods.pauseInvisible.isHidden()) { + if(slider.startTimeout) { + clearTimeout(slider.startTimeout); //If clock is ticking, stop timer and prevent from starting while invisible + } else { + slider.pause(); //Or just pause + } + } + else { + if(slider.started) { + slider.play(); //Initiated before, just play + } else { + if (slider.vars.initDelay > 0) { + setTimeout(slider.play, slider.vars.initDelay); + } else { + slider.play(); //Didn't init before: simply init or wait for it + } + } + } + }); + } + }, + isHidden: function() { + var prop = methods.pauseInvisible.getHiddenProp(); + if (!prop) { + return false; + } + return document[prop]; + }, + getHiddenProp: function() { + var prefixes = ['webkit','moz','ms','o']; + // if 'hidden' is natively supported just return it + if ('hidden' in document) { + return 'hidden'; + } + // otherwise loop over all the known prefixes until we find one + for ( var i = 0; i < prefixes.length; i++ ) { + if ((prefixes[i] + 'Hidden') in document) { + return prefixes[i] + 'Hidden'; + } + } + // otherwise it's not supported + return null; + } + }, + setToClearWatchedEvent: function() { + clearTimeout(watchedEventClearTimer); + watchedEventClearTimer = setTimeout(function() { + watchedEvent = ""; + }, 3000); + } + }; + + // public methods + slider.flexAnimate = function(target, pause, override, withSync, fromNav) { + if (!slider.vars.animationLoop && target !== slider.currentSlide) { + slider.direction = (target > slider.currentSlide) ? "next" : "prev"; + } + + if (asNav && slider.pagingCount === 1) slider.direction = (slider.currentItem < target) ? "next" : "prev"; + + if (!slider.animating && (slider.canAdvance(target, fromNav) || override) && slider.is(":visible")) { + if (asNav && withSync) { + var master = $(slider.vars.asNavFor).data('flexslider'); + slider.atEnd = target === 0 || target === slider.count - 1; + master.flexAnimate(target, true, false, true, fromNav); + slider.direction = (slider.currentItem < target) ? "next" : "prev"; + master.direction = slider.direction; + + if (Math.ceil((target + 1)/slider.visible) - 1 !== slider.currentSlide && target !== 0) { + slider.currentItem = target; + slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide"); + target = Math.floor(target/slider.visible); + } else { + slider.currentItem = target; + slider.slides.removeClass(namespace + "active-slide").eq(target).addClass(namespace + "active-slide"); + return false; + } + } + + slider.animating = true; + slider.animatingTo = target; + + // SLIDESHOW: + if (pause) { slider.pause(); } + + // API: before() animation Callback + slider.vars.before(slider); + + // SYNC: + if (slider.syncExists && !fromNav) { methods.sync("animate"); } + + // CONTROLNAV + if (slider.vars.controlNav) { methods.controlNav.active(); } + + // !CAROUSEL: + // CANDIDATE: slide active class (for add/remove slide) + if (!carousel) { slider.slides.removeClass(namespace + 'active-slide').eq(target).addClass(namespace + 'active-slide'); } + + // INFINITE LOOP: + // CANDIDATE: atEnd + slider.atEnd = target === 0 || target === slider.last; + + // DIRECTIONNAV: + if (slider.vars.directionNav) { methods.directionNav.update(); } + + if (target === slider.last) { + // API: end() of cycle Callback + slider.vars.end(slider); + // SLIDESHOW && !INFINITE LOOP: + if (!slider.vars.animationLoop) { slider.pause(); } + } + + // SLIDE: + if (!fade) { + var dimension = (vertical) ? slider.slides.filter(':first').height() : slider.computedW, + margin, slideString, calcNext; + + // INFINITE LOOP / REVERSE: + if (carousel) { + margin = slider.vars.itemMargin; + calcNext = ((slider.itemW + margin) * slider.move) * slider.animatingTo; + slideString = (calcNext > slider.limit && slider.visible !== 1) ? slider.limit : calcNext; + } else if (slider.currentSlide === 0 && target === slider.count - 1 && slider.vars.animationLoop && slider.direction !== "next") { + slideString = (reverse) ? (slider.count + slider.cloneOffset) * dimension : 0; + } else if (slider.currentSlide === slider.last && target === 0 && slider.vars.animationLoop && slider.direction !== "prev") { + slideString = (reverse) ? 0 : (slider.count + 1) * dimension; + } else { + slideString = (reverse) ? ((slider.count - 1) - target + slider.cloneOffset) * dimension : (target + slider.cloneOffset) * dimension; + } + slider.setProps(slideString, "", slider.vars.animationSpeed); + if (slider.transitions) { + if (!slider.vars.animationLoop || !slider.atEnd) { + slider.animating = false; + slider.currentSlide = slider.animatingTo; + } + + // Unbind previous transitionEnd events and re-bind new transitionEnd event + slider.container.unbind("webkitTransitionEnd transitionend"); + slider.container.bind("webkitTransitionEnd transitionend", function() { + clearTimeout(slider.ensureAnimationEnd); + slider.wrapup(dimension); + }); + + // Insurance for the ever-so-fickle transitionEnd event + clearTimeout(slider.ensureAnimationEnd); + slider.ensureAnimationEnd = setTimeout(function() { + slider.wrapup(dimension); + }, slider.vars.animationSpeed + 100); + + } else { + slider.container.animate(slider.args, slider.vars.animationSpeed, slider.vars.easing, function(){ + slider.wrapup(dimension); + }); + } + } else { // FADE: + if (!touch) { + //slider.slides.eq(slider.currentSlide).fadeOut(slider.vars.animationSpeed, slider.vars.easing); + //slider.slides.eq(target).fadeIn(slider.vars.animationSpeed, slider.vars.easing, slider.wrapup); + + slider.slides.eq(slider.currentSlide).css({"zIndex": 1}).animate({"opacity": 0}, slider.vars.animationSpeed, slider.vars.easing); + slider.slides.eq(target).css({"zIndex": 2}).animate({"opacity": 1}, slider.vars.animationSpeed, slider.vars.easing, slider.wrapup); + + } else { + slider.slides.eq(slider.currentSlide).css({ "opacity": 0, "zIndex": 1 }); + slider.slides.eq(target).css({ "opacity": 1, "zIndex": 2 }); + slider.wrapup(dimension); + } + } + // SMOOTH HEIGHT: + if (slider.vars.smoothHeight) { methods.smoothHeight(slider.vars.animationSpeed); } + } + }; + slider.wrapup = function(dimension) { + // SLIDE: + if (!fade && !carousel) { + if (slider.currentSlide === 0 && slider.animatingTo === slider.last && slider.vars.animationLoop) { + slider.setProps(dimension, "jumpEnd"); + } else if (slider.currentSlide === slider.last && slider.animatingTo === 0 && slider.vars.animationLoop) { + slider.setProps(dimension, "jumpStart"); + } + } + slider.animating = false; + slider.currentSlide = slider.animatingTo; + // API: after() animation Callback + slider.vars.after(slider); + }; + + // SLIDESHOW: + slider.animateSlides = function() { + if (!slider.animating && focused ) { slider.flexAnimate(slider.getTarget("next")); } + }; + // SLIDESHOW: + slider.pause = function() { + clearInterval(slider.animatedSlides); + slider.animatedSlides = null; + slider.playing = false; + // PAUSEPLAY: + if (slider.vars.pausePlay) { methods.pausePlay.update("play"); } + // SYNC: + if (slider.syncExists) { methods.sync("pause"); } + }; + // SLIDESHOW: + slider.play = function() { + if (slider.playing) { clearInterval(slider.animatedSlides); } + slider.animatedSlides = slider.animatedSlides || setInterval(slider.animateSlides, slider.vars.slideshowSpeed); + slider.started = slider.playing = true; + // PAUSEPLAY: + if (slider.vars.pausePlay) { methods.pausePlay.update("pause"); } + // SYNC: + if (slider.syncExists) { methods.sync("play"); } + }; + // STOP: + slider.stop = function () { + slider.pause(); + slider.stopped = true; + }; + slider.canAdvance = function(target, fromNav) { + // ASNAV: + var last = (asNav) ? slider.pagingCount - 1 : slider.last; + return (fromNav) ? true : + (asNav && slider.currentItem === slider.count - 1 && target === 0 && slider.direction === "prev") ? true : + (asNav && slider.currentItem === 0 && target === slider.pagingCount - 1 && slider.direction !== "next") ? false : + (target === slider.currentSlide && !asNav) ? false : + (slider.vars.animationLoop) ? true : + (slider.atEnd && slider.currentSlide === 0 && target === last && slider.direction !== "next") ? false : + (slider.atEnd && slider.currentSlide === last && target === 0 && slider.direction === "next") ? false : + true; + }; + slider.getTarget = function(dir) { + slider.direction = dir; + if (dir === "next") { + return (slider.currentSlide === slider.last) ? 0 : slider.currentSlide + 1; + } else { + return (slider.currentSlide === 0) ? slider.last : slider.currentSlide - 1; + } + }; + + // SLIDE: + slider.setProps = function(pos, special, dur) { + var target = (function() { + var posCheck = (pos) ? pos : ((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo, + posCalc = (function() { + if (carousel) { + return (special === "setTouch") ? pos : + (reverse && slider.animatingTo === slider.last) ? 0 : + (reverse) ? slider.limit - (((slider.itemW + slider.vars.itemMargin) * slider.move) * slider.animatingTo) : + (slider.animatingTo === slider.last) ? slider.limit : posCheck; + } else { + switch (special) { + case "setTotal": return (reverse) ? ((slider.count - 1) - slider.currentSlide + slider.cloneOffset) * pos : (slider.currentSlide + slider.cloneOffset) * pos; + case "setTouch": return (reverse) ? pos : pos; + case "jumpEnd": return (reverse) ? pos : slider.count * pos; + case "jumpStart": return (reverse) ? slider.count * pos : pos; + default: return pos; + } + } + }()); + + return (posCalc * -1) + "px"; + }()); + + if (slider.transitions) { + target = (vertical) ? "translate3d(0," + target + ",0)" : "translate3d(" + target + ",0,0)"; + dur = (dur !== undefined) ? (dur/1000) + "s" : "0s"; + slider.container.css("-" + slider.pfx + "-transition-duration", dur); + slider.container.css("transition-duration", dur); + } + + slider.args[slider.prop] = target; + if (slider.transitions || dur === undefined) { slider.container.css(slider.args); } + + slider.container.css('transform',target); + }; + + slider.setup = function(type) { + // SLIDE: + if (!fade) { + var sliderOffset, arr; + + if (type === "init") { + slider.viewport = $('
      ').css({"overflow": "hidden", "position": "relative"}).appendTo(slider).append(slider.container); + // INFINITE LOOP: + slider.cloneCount = 0; + slider.cloneOffset = 0; + // REVERSE: + if (reverse) { + arr = $.makeArray(slider.slides).reverse(); + slider.slides = $(arr); + slider.container.empty().append(slider.slides); + } + } + // INFINITE LOOP && !CAROUSEL: + if (slider.vars.animationLoop && !carousel) { + slider.cloneCount = 2; + slider.cloneOffset = 1; + // clear out old clones + if (type !== "init") { slider.container.find('.clone').remove(); } + slider.container.append(methods.uniqueID(slider.slides.first().clone().addClass('clone')).attr('aria-hidden', 'true')) + .prepend(methods.uniqueID(slider.slides.last().clone().addClass('clone')).attr('aria-hidden', 'true')); + } + slider.newSlides = $(slider.vars.selector, slider); + + sliderOffset = (reverse) ? slider.count - 1 - slider.currentSlide + slider.cloneOffset : slider.currentSlide + slider.cloneOffset; + // VERTICAL: + if (vertical && !carousel) { + slider.container.height((slider.count + slider.cloneCount) * 200 + "%").css("position", "absolute").width("100%"); + setTimeout(function(){ + slider.newSlides.css({"display": "block"}); + slider.doMath(); + slider.viewport.height(slider.h); + slider.setProps(sliderOffset * slider.h, "init"); + }, (type === "init") ? 100 : 0); + } else { + slider.container.width((slider.count + slider.cloneCount) * 200 + "%"); + slider.setProps(sliderOffset * slider.computedW, "init"); + setTimeout(function(){ + slider.doMath(); + slider.newSlides.css({"width": slider.computedW, "marginRight" : slider.computedM, "float": "left", "display": "block"}); + // SMOOTH HEIGHT: + if (slider.vars.smoothHeight) { methods.smoothHeight(); } + }, (type === "init") ? 100 : 0); + } + } else { // FADE: + slider.slides.css({"width": "100%", "float": "left", "marginRight": "-100%", "position": "relative"}); + if (type === "init") { + if (!touch) { + //slider.slides.eq(slider.currentSlide).fadeIn(slider.vars.animationSpeed, slider.vars.easing); + if (slider.vars.fadeFirstSlide == false) { + slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).css({"opacity": 1}); + } else { + slider.slides.css({ "opacity": 0, "display": "block", "zIndex": 1 }).eq(slider.currentSlide).css({"zIndex": 2}).animate({"opacity": 1},slider.vars.animationSpeed,slider.vars.easing); + } + } else { + slider.slides.css({ "opacity": 0, "display": "block", "webkitTransition": "opacity " + slider.vars.animationSpeed / 1000 + "s ease", "zIndex": 1 }).eq(slider.currentSlide).css({ "opacity": 1, "zIndex": 2}); + } + } + // SMOOTH HEIGHT: + if (slider.vars.smoothHeight) { methods.smoothHeight(); } + } + // !CAROUSEL: + // CANDIDATE: active slide + if (!carousel) { slider.slides.removeClass(namespace + "active-slide").eq(slider.currentSlide).addClass(namespace + "active-slide"); } + + //FlexSlider: init() Callback + slider.vars.init(slider); + }; + + slider.doMath = function() { + var slide = slider.slides.first(), + slideMargin = slider.vars.itemMargin, + minItems = slider.vars.minItems, + maxItems = slider.vars.maxItems; + + slider.w = (slider.viewport===undefined) ? slider.width() : slider.viewport.width(); + slider.h = slide.height(); + slider.boxPadding = slide.outerWidth() - slide.width(); + + // CAROUSEL: + if (carousel) { + slider.itemT = slider.vars.itemWidth + slideMargin; + slider.itemM = slideMargin; + slider.minW = (minItems) ? minItems * slider.itemT : slider.w; + slider.maxW = (maxItems) ? (maxItems * slider.itemT) - slideMargin : slider.w; + slider.itemW = (slider.minW > slider.w) ? (slider.w - (slideMargin * (minItems - 1)))/minItems : + (slider.maxW < slider.w) ? (slider.w - (slideMargin * (maxItems - 1)))/maxItems : + (slider.vars.itemWidth > slider.w) ? slider.w : slider.vars.itemWidth; + + slider.visible = Math.floor(slider.w/(slider.itemW)); + slider.move = (slider.vars.move > 0 && slider.vars.move < slider.visible ) ? slider.vars.move : slider.visible; + slider.pagingCount = Math.ceil(((slider.count - slider.visible)/slider.move) + 1); + slider.last = slider.pagingCount - 1; + slider.limit = (slider.pagingCount === 1) ? 0 : + (slider.vars.itemWidth > slider.w) ? (slider.itemW * (slider.count - 1)) + (slideMargin * (slider.count - 1)) : ((slider.itemW + slideMargin) * slider.count) - slider.w - slideMargin; + } else { + slider.itemW = slider.w; + slider.itemM = slideMargin; + slider.pagingCount = slider.count; + slider.last = slider.count - 1; + } + slider.computedW = slider.itemW - slider.boxPadding; + slider.computedM = slider.itemM; + }; + + slider.update = function(pos, action) { + slider.doMath(); + + // update currentSlide and slider.animatingTo if necessary + if (!carousel) { + if (pos < slider.currentSlide) { + slider.currentSlide += 1; + } else if (pos <= slider.currentSlide && pos !== 0) { + slider.currentSlide -= 1; + } + slider.animatingTo = slider.currentSlide; + } + + // update controlNav + if (slider.vars.controlNav && !slider.manualControls) { + if ((action === "add" && !carousel) || slider.pagingCount > slider.controlNav.length) { + methods.controlNav.update("add"); + } else if ((action === "remove" && !carousel) || slider.pagingCount < slider.controlNav.length) { + if (carousel && slider.currentSlide > slider.last) { + slider.currentSlide -= 1; + slider.animatingTo -= 1; + } + methods.controlNav.update("remove", slider.last); + } + } + // update directionNav + if (slider.vars.directionNav) { methods.directionNav.update(); } + + }; + + slider.addSlide = function(obj, pos) { + var $obj = $(obj); + + slider.count += 1; + slider.last = slider.count - 1; + + // append new slide + if (vertical && reverse) { + (pos !== undefined) ? slider.slides.eq(slider.count - pos).after($obj) : slider.container.prepend($obj); + } else { + (pos !== undefined) ? slider.slides.eq(pos).before($obj) : slider.container.append($obj); + } + + // update currentSlide, animatingTo, controlNav, and directionNav + slider.update(pos, "add"); + + // update slider.slides + slider.slides = $(slider.vars.selector + ':not(.clone)', slider); + // re-setup the slider to accomdate new slide + slider.setup(); + + //FlexSlider: added() Callback + slider.vars.added(slider); + }; + slider.removeSlide = function(obj) { + var pos = (isNaN(obj)) ? slider.slides.index($(obj)) : obj; + + // update count + slider.count -= 1; + slider.last = slider.count - 1; + + // remove slide + if (isNaN(obj)) { + $(obj, slider.slides).remove(); + } else { + (vertical && reverse) ? slider.slides.eq(slider.last).remove() : slider.slides.eq(obj).remove(); + } + + // update currentSlide, animatingTo, controlNav, and directionNav + slider.doMath(); + slider.update(pos, "remove"); + + // update slider.slides + slider.slides = $(slider.vars.selector + ':not(.clone)', slider); + // re-setup the slider to accomdate new slide + slider.setup(); + + // FlexSlider: removed() Callback + slider.vars.removed(slider); + }; + + //FlexSlider: Initialize + methods.init(); + }; + + // Ensure the slider isn't focussed if the window loses focus. + $( window ).blur( function ( e ) { + focused = false; + }).focus( function ( e ) { + focused = true; + }); + + //FlexSlider: Default Settings + $.flexslider.defaults = { + namespace: "flex-", //{NEW} String: Prefix string attached to the class of every element generated by the plugin + selector: ".slides > li", //{NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril + animation: "fade", //String: Select your animation type, "fade" or "slide" + easing: "swing", //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported! + direction: "horizontal", //String: Select the sliding direction, "horizontal" or "vertical" + reverse: false, //{NEW} Boolean: Reverse the animation direction + animationLoop: true, //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end + smoothHeight: false, //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode + startAt: 0, //Integer: The slide that the slider should start on. Array notation (0 = first slide) + slideshow: true, //Boolean: Animate slider automatically + slideshowSpeed: 7000, //Integer: Set the speed of the slideshow cycling, in milliseconds + animationSpeed: 600, //Integer: Set the speed of animations, in milliseconds + initDelay: 0, //{NEW} Integer: Set an initialization delay, in milliseconds + randomize: false, //Boolean: Randomize slide order + fadeFirstSlide: true, //Boolean: Fade in the first slide when animation type is "fade" + thumbCaptions: false, //Boolean: Whether or not to put captions on thumbnails when using the "thumbnails" controlNav. + + // Usability features + pauseOnAction: true, //Boolean: Pause the slideshow when interacting with control elements, highly recommended. + pauseOnHover: false, //Boolean: Pause the slideshow when hovering over slider, then resume when no longer hovering + pauseInvisible: true, //{NEW} Boolean: Pause the slideshow when tab is invisible, resume when visible. Provides better UX, lower CPU usage. + useCSS: true, //{NEW} Boolean: Slider will use CSS3 transitions if available + touch: true, //{NEW} Boolean: Allow touch swipe navigation of the slider on touch-enabled devices + video: false, //{NEW} Boolean: If using video in the slider, will prevent CSS3 3D Transforms to avoid graphical glitches + + // Primary Controls + controlNav: true, //Boolean: Create navigation for paging control of each slide? Note: Leave true for manualControls usage + directionNav: true, //Boolean: Create navigation for previous/next navigation? (true/false) + prevText: "Previous", //String: Set the text for the "previous" directionNav item + nextText: "Next", //String: Set the text for the "next" directionNav item + + // Secondary Navigation + keyboard: true, //Boolean: Allow slider navigating via keyboard left/right keys + multipleKeyboard: false, //{NEW} Boolean: Allow keyboard navigation to affect multiple sliders. Default behavior cuts out keyboard navigation with more than one slider present. + mousewheel: false, //{UPDATED} Boolean: Requires jquery.mousewheel.js (https://github.com/brandonaaron/jquery-mousewheel) - Allows slider navigating via mousewheel + pausePlay: false, //Boolean: Create pause/play dynamic element + pauseText: "Pause", //String: Set the text for the "pause" pausePlay item + playText: "Play", //String: Set the text for the "play" pausePlay item + + // Special properties + controlsContainer: "", //{UPDATED} jQuery Object/Selector: Declare which container the navigation elements should be appended too. Default container is the FlexSlider element. Example use would be $(".flexslider-container"). Property is ignored if given element is not found. + manualControls: "", //{UPDATED} jQuery Object/Selector: Declare custom control navigation. Examples would be $(".flex-control-nav li") or "#tabs-nav li img", etc. The number of elements in your controlNav should match the number of slides/tabs. + customDirectionNav: "", //{NEW} jQuery Object/Selector: Custom prev / next button. Must be two jQuery elements. In order to make the events work they have to have the classes "prev" and "next" (plus namespace) + sync: "", //{NEW} Selector: Mirror the actions performed on this slider with another slider. Use with care. + asNavFor: "", //{NEW} Selector: Internal property exposed for turning the slider into a thumbnail navigation for another slider + + // Carousel Options + itemWidth: 0, //{NEW} Integer: Box-model width of individual carousel items, including horizontal borders and padding. + itemMargin: 0, //{NEW} Integer: Margin between carousel items. + minItems: 1, //{NEW} Integer: Minimum number of carousel items that should be visible. Items will resize fluidly when below this. + maxItems: 0, //{NEW} Integer: Maxmimum number of carousel items that should be visible. Items will resize fluidly when above this limit. + move: 0, //{NEW} Integer: Number of carousel items that should move on animation. If 0, slider will move all visible items. + allowOneSlide: true, //{NEW} Boolean: Whether or not to allow a slider comprised of a single slide + + // Callback API + start: function(){}, //Callback: function(slider) - Fires when the slider loads the first slide + before: function(){}, //Callback: function(slider) - Fires asynchronously with each slider animation + after: function(){}, //Callback: function(slider) - Fires after each slider animation completes + end: function(){}, //Callback: function(slider) - Fires when the slider reaches the last slide (asynchronous) + added: function(){}, //{NEW} Callback: function(slider) - Fires after a slide is added + removed: function(){}, //{NEW} Callback: function(slider) - Fires after a slide is removed + init: function() {} //{NEW} Callback: function(slider) - Fires after the slider is initially setup + }; + + //FlexSlider: Plugin Function + $.fn.flexslider = function(options) { + if (options === undefined) { options = {}; } + + if (typeof options === "object") { + return this.each(function() { + var $this = $(this), + selector = (options.selector) ? options.selector : ".slides > li", + $slides = $this.find(selector); + + if ( ( $slides.length === 1 && options.allowOneSlide === true ) || $slides.length === 0 ) { + $slides.fadeIn(400); + if (options.start) { options.start($this); } + } else if ($this.data('flexslider') === undefined) { + new $.flexslider(this, options); + } + }); + } else { + // Helper strings to quickly perform functions on the slider + var $slider = $(this).data('flexslider'); + switch (options) { + case "play": $slider.play(); break; + case "pause": $slider.pause(); break; + case "stop": $slider.stop(); break; + case "next": $slider.flexAnimate($slider.getTarget("next"), true); break; + case "prev": + case "previous": $slider.flexAnimate($slider.getTarget("prev"), true); break; + default: if (typeof options === "number") { $slider.flexAnimate(options, true); } + } + } + }; +})(jQuery); diff --git a/assets/treville/js/navigation.js b/assets/treville/js/navigation.js new file mode 100755 index 0000000..8caa66f --- /dev/null +++ b/assets/treville/js/navigation.js @@ -0,0 +1,130 @@ +/* global trevilleScreenReaderText */ +/** + * Theme Navigation + * + * @package Treville + */ + + (function() { + + // Create dropdown toggle button. + function createDropdownToggle() { + var dropdownToggle = document.createElement( 'button' ); + + // Add classes and aria attributes. + dropdownToggle.classList.add( 'dropdown-toggle' ); + dropdownToggle.setAttribute( 'aria-expanded', 'false' ); + + // Add icon to dropdown toggle. + var icon = new DOMParser().parseFromString( trevilleScreenReaderText.icon, 'text/html' ).body.firstElementChild; + dropdownToggle.appendChild( icon); + + // Add screenreader text. + var screenReaderText = document.createElement( 'span' ); + screenReaderText.classList.add( 'screen-reader-text' ); + screenReaderText.textContent = trevilleScreenReaderText.expand; + dropdownToggle.appendChild( screenReaderText ); + + return dropdownToggle.cloneNode(true); + } + + function initNavigation( containerClass, naviClass, menuToggleClass ) { + var container = document.querySelector( containerClass ); + var navigation = document.querySelector( naviClass ); + + // Return early if navigation is missing. + if ( navigation === null || container === null ) { + return; + } + + // Enable menuToggle. + (function() { + var menuToggle = document.querySelector( menuToggleClass ); + + // Return early if menuToggle is missing. + if ( menuToggle === null ) { + return; + } + + // Add an initial value for the attribute. + menuToggle.setAttribute( 'aria-expanded', 'false' ); + + // Menu Toggle click event. + menuToggle.addEventListener( 'click', function() { + container.classList.toggle( 'toggled-on' ); + menuToggle.setAttribute( 'aria-expanded', container.classList.contains( 'toggled-on' ) ); + }); + })(); + + // Enable dropdownToggles that displays child menu items. + (function() { + + // Insert dropdown toggles in navigation menu. + navigation.querySelectorAll( '.menu-item-has-children > a, .page_item_has_children > a' ).forEach( function( menuItem ) { + menuItem.after( createDropdownToggle() ); + }); + + // Set the active submenu dropdown toggle button initial state. + navigation.querySelectorAll( '.current-menu-ancestor > button' ).forEach( function( activeToggle ) { + activeToggle.classList.add( 'toggled-on' ); + activeToggle.setAttribute( 'aria-expanded', 'true' ); + activeToggle.querySelector( '.screen-reader-text' ).textContent = trevilleScreenReaderText.collapse; + }); + + // Set the active submenu initial state. + navigation.querySelectorAll( '.current-menu-ancestor > .sub-menu' ).forEach( function( activeSubmenu ) { + activeSubmenu.classList.add( 'toggled-on' ); + }); + + // Dropdown Toggles click events. + navigation.querySelectorAll( '.dropdown-toggle' ).forEach( function( dropdownItem ) { + dropdownItem.addEventListener( 'click', function() { + dropdownItem.classList.toggle( 'toggled-on' ); + dropdownItem.setAttribute( 'aria-expanded', dropdownItem.classList.contains( 'toggled-on' ) ); + dropdownItem.querySelector( '.screen-reader-text' ).textContent = dropdownItem.classList.contains( 'toggled-on' ) ? trevilleScreenReaderText.collapse : trevilleScreenReaderText.expand; + dropdownItem.nextElementSibling.classList.toggle( 'toggled-on' ); + }); + }); + })(); + + // Toggle focus class to allow keyboard navigation. + (function() { + + function toggleFocusClass( menuItem ) { + + // Loop through all parent elements up to the menus root. + var parent = menuItem.parentNode; + while ( ! parent.classList.contains( 'menu' ) ) { + + // Check if we pass any li elements which have submenus. + if ( parent.classList.contains( 'menu-item-has-children' ) ) { + parent.classList.toggle( 'focus' ); + } + + parent = parent.parentNode; + } + } + + navigation.querySelectorAll( '.menu-item-has-children a, .page_item_has_children a' ).forEach( function( menuItem ) { + menuItem.addEventListener( 'focus', function() { + toggleFocusClass( menuItem ); + }); + menuItem.addEventListener( 'blur', function() { + toggleFocusClass( menuItem ); + }); + }); + + })(); + } + + document.addEventListener( 'DOMContentLoaded', function() { + + // Init Main Navigation. + initNavigation( '.primary-navigation-wrap', '.main-navigation', '.mobile-menu-toggle' ); + + // Init Top Navigation. + initNavigation( '.secondary-navigation', '.top-navigation', '.mobile-menu-toggle' ); + + } ); + +}() ); diff --git a/assets/treville/js/slider.js b/assets/treville/js/slider.js new file mode 100755 index 0000000..f133f9f --- /dev/null +++ b/assets/treville/js/slider.js @@ -0,0 +1,23 @@ +/** + * Flexslider Setup + * + * Adds the Flexslider Plugin for the Featured Post Slideshow + * + * @package Treville + */ + +jQuery( document ).ready(function($) { + + /* Add flexslider to #post-slider div */ + $( "#post-slider" ).flexslider({ + animation: treville_slider_params.animation, + slideshowSpeed: treville_slider_params.speed, + namespace: "zeeflex-", + selector: ".zeeslides > li", + smoothHeight: true, + pauseOnHover: true, + controlNav: false, + controlsContainer: ".post-slider-controls" + }); + +}); diff --git a/assets/treville/js/svgxuse.js b/assets/treville/js/svgxuse.js new file mode 100755 index 0000000..245217c --- /dev/null +++ b/assets/treville/js/svgxuse.js @@ -0,0 +1,230 @@ +/*! + * @copyright Copyright (c) 2017 IcoMoon.io + * @license Licensed under MIT license + * See https://github.com/Keyamoon/svgxuse + * @version 1.2.6 + */ +/*jslint browser: true */ +/*global XDomainRequest, MutationObserver, window */ +(function () { + "use strict"; + if (typeof window !== "undefined" && window.addEventListener) { + var cache = Object.create(null); // holds xhr objects to prevent multiple requests + var checkUseElems; + var tid; // timeout id + var debouncedCheck = function () { + clearTimeout(tid); + tid = setTimeout(checkUseElems, 100); + }; + var unobserveChanges = function () { + return; + }; + var observeChanges = function () { + var observer; + window.addEventListener("resize", debouncedCheck, false); + window.addEventListener("orientationchange", debouncedCheck, false); + if (window.MutationObserver) { + observer = new MutationObserver(debouncedCheck); + observer.observe(document.documentElement, { + childList: true, + subtree: true, + attributes: true + }); + unobserveChanges = function () { + try { + observer.disconnect(); + window.removeEventListener("resize", debouncedCheck, false); + window.removeEventListener("orientationchange", debouncedCheck, false); + } catch (ignore) {} + }; + } else { + document.documentElement.addEventListener("DOMSubtreeModified", debouncedCheck, false); + unobserveChanges = function () { + document.documentElement.removeEventListener("DOMSubtreeModified", debouncedCheck, false); + window.removeEventListener("resize", debouncedCheck, false); + window.removeEventListener("orientationchange", debouncedCheck, false); + }; + } + }; + var createRequest = function (url) { + // In IE 9, cross origin requests can only be sent using XDomainRequest. + // XDomainRequest would fail if CORS headers are not set. + // Therefore, XDomainRequest should only be used with cross origin requests. + function getOrigin(loc) { + var a; + if (loc.protocol !== undefined) { + a = loc; + } else { + a = document.createElement("a"); + a.href = loc; + } + return a.protocol.replace(/:/g, "") + a.host; + } + var Request; + var origin; + var origin2; + if (window.XMLHttpRequest) { + Request = new XMLHttpRequest(); + origin = getOrigin(location); + origin2 = getOrigin(url); + if (Request.withCredentials === undefined && origin2 !== "" && origin2 !== origin) { + Request = XDomainRequest || undefined; + } else { + Request = XMLHttpRequest; + } + } + return Request; + }; + var xlinkNS = "http://www.w3.org/1999/xlink"; + checkUseElems = function () { + var base; + var bcr; + var fallback = ""; // optional fallback URL in case no base path to SVG file was given and no symbol definition was found. + var hash; + var href; + var i; + var inProgressCount = 0; + var isHidden; + var Request; + var url; + var uses; + var xhr; + function observeIfDone() { + // If done with making changes, start watching for chagnes in DOM again + inProgressCount -= 1; + if (inProgressCount === 0) { // if all xhrs were resolved + unobserveChanges(); // make sure to remove old handlers + observeChanges(); // watch for changes to DOM + } + } + function attrUpdateFunc(spec) { + return function () { + if (cache[spec.base] !== true) { + spec.useEl.setAttributeNS(xlinkNS, "xlink:href", "#" + spec.hash); + if (spec.useEl.hasAttribute("href")) { + spec.useEl.setAttribute("href", "#" + spec.hash); + } + } + }; + } + function onloadFunc(xhr) { + return function () { + var body = document.body; + var x = document.createElement("x"); + var svg; + xhr.onload = null; + x.innerHTML = xhr.responseText; + svg = x.getElementsByTagName("svg")[0]; + if (svg) { + svg.setAttribute("aria-hidden", "true"); + svg.style.position = "absolute"; + svg.style.width = 0; + svg.style.height = 0; + svg.style.overflow = "hidden"; + body.insertBefore(svg, body.firstChild); + } + observeIfDone(); + }; + } + function onErrorTimeout(xhr) { + return function () { + xhr.onerror = null; + xhr.ontimeout = null; + observeIfDone(); + }; + } + unobserveChanges(); // stop watching for changes to DOM + // find all use elements + uses = document.getElementsByTagName("use"); + for (i = 0; i < uses.length; i += 1) { + try { + bcr = uses[i].getBoundingClientRect(); + } catch (ignore) { + // failed to get bounding rectangle of the use element + bcr = false; + } + href = uses[i].getAttribute("href") + || uses[i].getAttributeNS(xlinkNS, "href") + || uses[i].getAttribute("xlink:href"); + if (href && href.split) { + url = href.split("#"); + } else { + url = ["", ""]; + } + base = url[0]; + hash = url[1]; + isHidden = bcr && bcr.left === 0 && bcr.right === 0 && bcr.top === 0 && bcr.bottom === 0; + if (bcr && bcr.width === 0 && bcr.height === 0 && !isHidden) { + // the use element is empty + // if there is a reference to an external SVG, try to fetch it + // use the optional fallback URL if there is no reference to an external SVG + if (fallback && !base.length && hash && !document.getElementById(hash)) { + base = fallback; + } + if (uses[i].hasAttribute("href")) { + uses[i].setAttributeNS(xlinkNS, "xlink:href", href); + } + if (base.length) { + // schedule updating xlink:href + xhr = cache[base]; + if (xhr !== true) { + // true signifies that prepending the SVG was not required + setTimeout(attrUpdateFunc({ + useEl: uses[i], + base: base, + hash: hash + }), 0); + } + if (xhr === undefined) { + Request = createRequest(base); + if (Request !== undefined) { + xhr = new Request(); + cache[base] = xhr; + xhr.onload = onloadFunc(xhr); + xhr.onerror = onErrorTimeout(xhr); + xhr.ontimeout = onErrorTimeout(xhr); + xhr.open("GET", base); + xhr.send(); + inProgressCount += 1; + } + } + } + } else { + if (!isHidden) { + if (cache[base] === undefined) { + // remember this URL if the use element was not empty and no request was sent + cache[base] = true; + } else if (cache[base].onload) { + // if it turns out that prepending the SVG is not necessary, + // abort the in-progress xhr. + cache[base].abort(); + delete cache[base].onload; + cache[base] = true; + } + } else if (base.length && cache[base]) { + setTimeout(attrUpdateFunc({ + useEl: uses[i], + base: base, + hash: hash + }), 0); + } + } + } + uses = ""; + inProgressCount += 1; + observeIfDone(); + }; + var winLoad; + winLoad = function () { + window.removeEventListener("load", winLoad, false); // to prevent memory leaks + tid = setTimeout(checkUseElems, 0); + }; + if (document.readyState !== "complete") { + // The load event fires when all resources have finished loading, which allows detecting whether SVG use elements are empty. + window.addEventListener("load", winLoad, false); + } else { + // No need to add a listener if the document is already loaded, initialize immediately. + winLoad(); + } + } +}()); diff --git a/back_treville.php b/back_treville.php new file mode 100755 index 0000000..d8afe1b --- /dev/null +++ b/back_treville.php @@ -0,0 +1,51 @@ +=8.1" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/contracts", + "name": "symfony/contracts" + }, + "branch-alias": { + "dev-main": "3.6-dev" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-25T14:21:43+00:00" + }, + { + "name": "symfony/polyfill-ctype", + "version": "v1.33.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", + "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", + "shasum": "" + }, + "require": { + "php": ">=7.2" + }, + "provide": { + "ext-ctype": "*" + }, + "suggest": { + "ext-ctype": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-09-09T11:45:10+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.33.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", + "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", + "shasum": "" + }, + "require": { + "ext-iconv": "*", + "php": ">=7.2" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "thanks": { + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2024-12-23T08:48:59+00:00" + }, + { + "name": "timber/timber", + "version": "v2.3.3", + "source": { + "type": "git", + "url": "https://github.com/timber/timber.git", + "reference": "7a87ac27c0b9deedffe419388b63a0c95d8798ca" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/timber/timber/zipball/7a87ac27c0b9deedffe419388b63a0c95d8798ca", + "reference": "7a87ac27c0b9deedffe419388b63a0c95d8798ca", + "shasum": "" + }, + "require": { + "php": "^8.1", + "twig/twig": "^3.19" + }, + "require-dev": { + "ergebnis/composer-normalize": "^2.28", + "php-parallel-lint/php-parallel-lint": "^1.3", + "php-stubs/wp-cli-stubs": "^2.0", + "phpro/grumphp": "^2.0", + "phpstan/extension-installer": "^1.1", + "phpstan/phpstan": "^2", + "phpunit/phpunit": "^9.0", + "rector/rector": "^2.0", + "squizlabs/php_codesniffer": "^3.0", + "symplify/easy-coding-standard": "^12", + "szepeviktor/phpstan-wordpress": "^2", + "twig/cache-extra": "^3.17", + "wpackagist-plugin/advanced-custom-fields": "^6.0", + "wpackagist-plugin/co-authors-plus": "^3.6", + "yoast/wp-test-utils": "^1.2" + }, + "suggest": { + "php-coveralls/php-coveralls": "^2.0 for code coverage", + "twig/cache-extra": "For using the cache tag in Twig" + }, + "type": "library", + "autoload": { + "psr-4": { + "Timber\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Erik van der Bas", + "email": "erik@basedonline.nl", + "homepage": "https://basedonline.nl" + }, + { + "name": "Lukas Gächter", + "email": "lukas.gaechter@mind.ch", + "homepage": "https://www.mind.ch" + }, + { + "name": "Nicolas Lemoine", + "email": "nico@n5s.dev", + "homepage": "https://n5s.dev" + }, + { + "name": "Jared Novack", + "email": "jared@upstatement.com", + "homepage": "https://upstatement.com" + }, + { + "name": "Timber Community", + "homepage": "https://github.com/timber/timber" + } + ], + "description": "Create WordPress themes with beautiful OOP code and the Twig Template Engine", + "homepage": "https://timber.upstatement.com", + "keywords": [ + "templating", + "themes", + "timber", + "twig", + "wordpress" + ], + "support": { + "docs": "https://timber.github.io/docs/", + "issues": "https://github.com/timber/timber/issues", + "source": "https://github.com/timber/timber" + }, + "funding": [ + { + "url": "https://github.com/timber", + "type": "github" + }, + { + "url": "https://opencollective.com/timber", + "type": "open_collective" + } + ], + "time": "2025-09-24T14:07:33+00:00" + }, + { + "name": "twig/twig", + "version": "v3.21.1", + "source": { + "type": "git", + "url": "https://github.com/twigphp/Twig.git", + "reference": "285123877d4dd97dd7c11842ac5fb7e86e60d81d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/285123877d4dd97dd7c11842ac5fb7e86e60d81d", + "reference": "285123877d4dd97dd7c11842ac5fb7e86e60d81d", + "shasum": "" + }, + "require": { + "php": ">=8.1.0", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-mbstring": "^1.3" + }, + "require-dev": { + "phpstan/phpstan": "^2.0", + "psr/container": "^1.0|^2.0", + "symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0" + }, + "type": "library", + "autoload": { + "files": [ + "src/Resources/core.php", + "src/Resources/debug.php", + "src/Resources/escaper.php", + "src/Resources/string_loader.php" + ], + "psr-4": { + "Twig\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Twig Team", + "role": "Contributors" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" + } + ], + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "https://twig.symfony.com", + "keywords": [ + "templating" + ], + "support": { + "issues": "https://github.com/twigphp/Twig/issues", + "source": "https://github.com/twigphp/Twig/tree/v3.21.1" + }, + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/twig/twig", + "type": "tidelift" + } + ], + "time": "2025-05-03T07:21:55+00:00" + }, + { + "name": "wptt/webfont-loader", + "version": "v1.1.4", + "source": { + "type": "git", + "url": "https://github.com/WPTT/webfont-loader.git", + "reference": "d5a7150f4e1a90c566e2e64aeae0876743be48b9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/WPTT/webfont-loader/zipball/d5a7150f4e1a90c566e2e64aeae0876743be48b9", + "reference": "d5a7150f4e1a90c566e2e64aeae0876743be48b9", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "composer/installers": "~1.0", + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", + "php-parallel-lint/php-parallel-lint": "^1.2", + "wptrt/wpthemereview": "^0.2.1" + }, + "type": "package", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Contributors", + "homepage": "https://github.com/WPTT/font-loader/graphs/contributors" + } + ], + "description": "Locally host webfonts.", + "homepage": "https://github.com/WPTT/font-loader", + "keywords": [ + "wordpress" + ], + "support": { + "issues": "https://github.com/WPTT/font-loader/issues", + "source": "https://github.com/WPTT/font-loader" + }, + "time": "2024-10-14T05:00:02+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": {}, + "prefer-stable": false, + "prefer-lowest": false, + "platform": {}, + "platform-dev": {}, + "plugin-api-version": "2.6.0" +} diff --git a/functions.php b/functions.php new file mode 100755 index 0000000..93193b8 --- /dev/null +++ b/functions.php @@ -0,0 +1,15 @@ +post_name . '.twig', + 'pages/generic.twig', + ]; + + Timber::render($templates_list, Timber::context()); + +} \ No newline at end of file diff --git a/src/Theme.php b/src/Theme.php new file mode 100755 index 0000000..911c693 --- /dev/null +++ b/src/Theme.php @@ -0,0 +1,329 @@ +settings = new Theme\Settings(); + $this->children['page_theme_info'] = new Theme\Pages\Theme_Info(); + $this->children['customizer'] = new Theme\Customizer(); + $this->children['template_context'] = new Theme\Template_Context(); + + } + + /** + * Check if the RomhackPlaza plugin is enabled or not. + * @return bool + */ + private function _is_plugin_enabled(): bool { + + return class_exists( 'RomhackPlaza\Plugin' ) || defined( 'ROMHACKPLAZA' ); + + } + + /** + * Set the static value if Romhackplaza plugin is enabled. + * @return void + */ + public function plugin_enabled() { + + $this->main_plugin_enabled = $this->_is_plugin_enabled(); + + } + + /** + * Restore default theme if RomhackPlaza plugin is not enabled. + * @return void + */ + public function disable_theme() { + + if ( !$this->main_plugin_enabled ) { + + switch_theme( WP_DEFAULT_THEME ); + unset( $_GET['activated'] ); + add_action( 'admin_notices', function(){ + echo '

      '; + echo 'RomhackPlaza theme requires RomhackPlaza plugin to be installed and active. The default theme is applied.'; + echo '

      '; + }); + + } + + } + + /** + * Setup Wordpress theme settings. + * @return void + */ + public function setup() { + + // Check if RomhackPlaza plugin is enabled. + $this->plugin_enabled(); + $this->disable_theme(); + + foreach( self::THEME_SUPPORTS as $theme_support ) + \add_theme_support( $theme_support ); + + \add_theme_support( 'html5', [ 'comment-form', 'comment-list', 'gallery', 'caption' ] ); + + \set_post_thumbnail_size( 900, 480, true ); + + \register_nav_menus( [ + 'secondary' => esc_html__( 'Top Navigation', 'romhackplaza' ), + 'primary' => esc_html__( 'Main Navigation', 'romhackplaza' ), + ] ); + + \add_theme_support( 'custom-background', + apply_filters( 'RomhackPlaza\\Theme\\Setup\\custom-background', + [ 'default-color' => 'dddddd' ] + ) + ); + + \add_theme_support( 'custom-logo', + apply_filters( 'RomhackPlaza\\Theme\\Setup\\custom-logo', + [ + 'height' => 50, + 'width' => 250, + 'flex-height' => true, + 'flex-width' => true, + ] + ) + ); + + /* + Not used : + + \add_theme_support('custom-header', + apply_filters( 'RomhackPlaza\\Theme\\Setup\\custom-header', [ + 'header-text' => false, + 'width' => 1920, + 'height' => 480, + 'flex-height' => true, + ] + ) + ); + */ + + $GLOBALS['content_width'] = apply_filters( 'romhackPlaza\\Theme\\Setup\\content-width', 900 ); + + /* + * --- Image sizes --- + * /!\ : Keep Treville names for backward compatibility. + */ + add_image_size( 'treville-slider-image', 2560, 640, true ); + add_image_size( 'treville-thumbnail-small', 130, 100, true ); + add_image_size( 'treville-thumbnail-medium', 360, 200, true ); + add_image_size( 'treville-thumbnail-large', 450, 250, true ); + + $this->setup_extenders(); + + } + + /** + * Register widgets areas uses. + * @return void + */ + public function register_widgets_areas() { + + $this->children['widget_area_sidebar'] = new Widget_Area( + [ + 'name' => esc_html__( 'Sidebar', 'romhackplaza' ), + 'id' => 'sidebar-1', + 'description' => esc_html__( 'Appears on posts and pages except the full width template.', 'romhackplaza' ), + 'before_widget' => '
      ', + 'before_title' => '

      ', + 'after_title' => '

      ', + ] + )->register(); + + $this->children['widget_area_magazine_homepage'] = new Widget_Area( + [ + 'name' => esc_html__( 'Magazine Homepage', 'romhackplaza' ), + 'id' => 'magazine-homepage', + 'description' => esc_html__( 'Appears on blog index and Magazine Homepage template. You can use the Magazine widgets here.', 'romhackplaza' ), + 'before_widget' => '
      ', + 'after_widget' => '
      ', + 'before_title' => '

      ', + 'after_title' => '

      ', + ] + )->register(); + + } + + /** + * Register JS/CSS scripts/stylesheets used by the theme. + * @return void + */ + public function register_scripts_stylesheets() { + + $this->children['script_main_css'] = new Script( + Script_Type::CSS, + 'romhackplaza-css', + get_stylesheet_uri(), + [], + wp_get_theme()->get( 'Version' ) + )->enqueue(); + + $this->children['script_treville_css'] = new Script( + Script_Type::CSS, + 'treville-stylesheet', + get_stylesheet_directory_uri() . '/treville.css', + [], + '2.2.0' + )->enqueue(); + + $this->children['script_css_safari_fixes'] = new Script( + Script_Type::CSS, + 'romhackplaza-safari-fixes', + get_template_directory_uri() . '/assets/treville/css/safari-flexbox-fixes.css', + [], + '20200420' + )->enqueue(); + + $this->children['script_js_html5shiv'] = new Script( + Script_Type::JS, + 'html5shiv', + get_stylesheet_directory_uri() . '/assets/treville/js/html5shiv.js', + [], + '3.7.3' + )->enqueue()->add_data( 'conditional', 'lt IE 9' ); + + $treville_l10n = array( + 'expand' => esc_html__( 'Expand child menu', 'romhackplaza' ), + 'collapse' => esc_html__( 'Collapse child menu', 'romhackplaza' ), + 'icon' => Theme\Snippets::svg_icon( 'expand' ), + ); + + $this->children['script_js_navigation'] = new Script( + Script_Type::JS, + 'romhackplaza-navigation', + get_stylesheet_directory_uri() . '/assets/treville/js/navigation.js', + [], + '20220224', + args: true + )->enqueue()->add_localize( 'trevilleScreenReaderText', $treville_l10n ); + + if( \RomhackPlaza\Backwards\treville_is_amp() ) + $this->children['script_css_svgxuse'] = new Script( + Script_Type::JS, + 'romhackplaza-svgxuse', + get_stylesheet_directory_uri() . '/assets/treville/js/svgxuse.js', + [], + '1.2.6' + )->enqueue(); + + } + + /** + * Get fonts with wptt loader. + * Based on fonts used in Treville. + * @return void + */ + public function register_fonts(){ + + $fonts = [ + 'Gudea:400,400italic,700,700italic', + 'Magra:400,400italic,700,700italic', + ]; + + $query_args = array( + 'family' => urlencode( implode( '|', $fonts ) ), + 'subset' => urlencode( 'latin,latin-ext' ), + 'display' => urlencode( 'swap' ), + ); + + $fonts_url = add_query_arg( $query_args, '//fonts.googleapis.com/css' ); + + $stylesheet_url = \wptt_get_webfont_url( $fonts_url ); + + $this->children['script_fonts'] = new Script( + Script_Type::CSS, + 'romhackplaza-fonts', + $stylesheet_url, + [], + '20201110' + )->enqueue(); + + } + + /** + * Change Image Sizes name. + * + * @param $sizes + * @return array + */ + public function image_size_names( $sizes ): array{ + + return array_merge( $sizes, [ + 'post-thumbnail' => __( 'Post thumbnail', 'romhackplaza' ), + 'treville-thumbnail-large' => __( 'Treville thumbnail Large', 'romhackplaza' ), + 'treville-thumbnail-small' => __( 'Treville thumbnail Small', 'romhackplaza' ), + ] ); + + } + + public function setup_extenders(): Theme { + + $this->children['extend_nav_menu'] = new Extenders\Nav_Menu(); + $this->children['extend_css'] = new Extenders\Site_Settings_CSS(); + $this->children['extend_excerpt'] = new Extenders\Excerpt(); + $this->children['extend_timber_twig'] = new Extenders\Timber_Twig(); + + return $this; + + } + +} \ No newline at end of file diff --git a/src/Theme/Customizer.php b/src/Theme/Customizer.php new file mode 100644 index 0000000..c142451 --- /dev/null +++ b/src/Theme/Customizer.php @@ -0,0 +1,150 @@ +add_panel( + 'romhackplaza_options_panel', + [ + 'priority' => 69, + 'capability' => 'edit_theme_options', + 'theme_supports' => '', + 'title' => esc_html__( 'Theme Options', 'romhackplaza' ), + ] + + ); + + $wp_customize->get_control( 'background_color' )->section = 'background_image'; + $wp_customize->get_control( 'background_image' )->title = esc_html__( 'Background', 'romhackplaza' ); + + } + + public function custom_preview_css() { + + // Keep Treville name for backwards compatibility. + new Script( + Script_Type::CSS, + 'treville-customizer-css', + get_template_directory_uri() . '/assets/treville/css/customizer.css', + [], + '20200410' + )->enqueue(); + + new Script( + Script_Type::CSS, + 'treville-pro-customizer-css', + get_template_directory_uri() . '/assets/treville-pro/css/customizer.css', + [], + '20210212' + )->enqueue(); + + } + + public function custom_preview_js() { + + // Keep Treville name for backwards compatibility. + new Script( + Script_Type::JS, + 'treville-customizer-preview', + get_stylesheet_directory_uri() . '/assets/treville/js/customizer-preview.js', + [ 'customize-preview' ], + '20200410', + args: true + )->enqueue(); + + new Script( + Script_Type::JS, + 'treville-pro-customizer-js', + get_stylesheet_directory_uri() . '/assets/treville-pro/js/customizer-preview.js', + [ 'customize-preview' ], + '20210309', + args: true + )->enqueue(); + + } + + public function custom_controls_js() { + + // Keep Treville name for backwards compatibility. + new Script( + Script_Type::JS, + 'treville-customizer-controls', + get_stylesheet_directory_uri() . '/assets/treville/js/customizer-controls.js', + [], + '20200410', + args: true + )->enqueue(); + + } + + // --- Check Functions --- + + /** + * Verify if checkbox is correctly checked or not. + * From Treville. + * + * @param $checked + * @return bool + */ + public static function sanitize_checkbox( $checked ): bool { + return isset( $checked ) && true === $checked; + } + + /** + * Verify if select or radio is correctly checked or not. + * From Treville. + * + * @param $input + * @param $setting + * @return string + */ + public static function sanitize_select( $input, $setting ): string { + + $input = sanitize_key( $input ); + $choices = $setting->manager->get_control( $setting->id )->choices; + return ( array_key_exists( $input, $choices ) ? $input : $setting->default ); + + } + + /** + * Check if the post content is the excerpt for the theme. + * @param $control + * @return bool + */ + public static function post_content_equals_excerpt( $control ): bool{ + return $control->manager->get_setting( 'romhackplaza_theme_options[post_content]' )->value() === 'excerpt'; + } + + public static function active_slider( $control ): bool { + return $control->manager->get_setting( 'romhackplaza_theme_options[slider_active]' )->value() === 'active'; + } + +} \ No newline at end of file diff --git a/src/Theme/Customizer/Abstract_Section.php b/src/Theme/Customizer/Abstract_Section.php new file mode 100644 index 0000000..afaded0 --- /dev/null +++ b/src/Theme/Customizer/Abstract_Section.php @@ -0,0 +1,23 @@ +add_section( + + 'romhackplaza_section_blog', + [ + 'title' => __( 'Blog Settings', 'romhackplaza' ), + 'priority' => 25, + 'panel' => 'romhackplaza_options_panel', + + ] + + ); + + $wp_customize->add_setting( + 'romhackplaza_theme_options[blog_title]', + [ + 'default' => '', + 'type' => 'option', + 'transport' => 'postMessage', + 'sanitize_callback' => 'wp_kses_post', + ] + ); + + $wp_customize->add_control( + 'romhackplaza_theme_options[blog_title]', + [ + 'label' => esc_html__( 'Blog Title', 'romhackplaza' ), + 'section' => 'romhackplaza_section_blog', + 'settings' => 'romhackplaza_theme_options[blog_title]', + 'type' => 'text', + 'priority' => 10, + ] + ); + + $wp_customize->selective_refresh->add_partial( + 'romhackplaza_theme_options[blog_title]', + array( + 'selector' => '.blog-header .blog-title', + 'render_callback' => [ $this, 'partial_blog_title' ], + 'fallback_refresh' => false, + ) + ); + + $wp_customize->add_setting( + 'romhackplaza_theme_options[blog_description]', + [ + 'default' => '', + 'type' => 'option', + 'transport' => 'postMessage', + 'sanitize_callback' => 'wp_kses_post', + ] + ); + + $wp_customize->add_control( + 'romhackplaza_theme_options[blog_description]', + [ + 'label' => esc_html__( 'Blog Description', 'romhackplaza' ), + 'section' => 'romhackplaza_section_blog', + 'settings' => 'romhackplaza_theme_options[blog_description]', + 'type' => 'textarea', + 'priority' => 20, + ] + ); + + $wp_customize->selective_refresh->add_partial( + 'romhackplaza_theme_options[blog_description]', + array( + 'selector' => '.blog-header .blog-description', + 'render_callback' => [ $this, 'partial_blog_description' ], + 'fallback_refresh' => false, + ) + ); + + $wp_customize->add_setting( + 'romhackplaza_theme_options[blog_layout]', + array( + 'default' => 'excerpt', + 'type' => 'option', + 'transport' => 'postMessage', + 'sanitize_callback' => [ Customizer::class, 'sanitize_select' ], + ) + ); + + $wp_customize->add_control( + 'romhackplaza_theme_options[blog_layout]', + array( + 'label' => esc_html__( 'Blog Layout', 'romhackplaza' ), + 'section' => 'romhackplaza_section_blog', + 'settings' => 'romhackplaza_theme_options[blog_layout]', + 'type' => 'radio', + 'priority' => 30, + 'choices' => array( + 'index' => esc_html__( 'Display full posts', 'romhackplaza' ), + 'excerpt' => esc_html__( 'Display post excerpts', 'romhackplaza' ), + ), + ) + ); + + $wp_customize->add_setting( + 'romhackplaza_theme_options[excerpt_length]', + array( + 'default' => 50, + 'type' => 'option', + 'transport' => 'postMessage', + 'sanitize_callback' => 'absint', + ) + ); + + $wp_customize->add_control( + 'romhackplaza_theme_options[excerpt_length]', + array( + 'label' => esc_html__( 'Excerpt Length', 'romhackplaza' ), + 'section' => 'romhackplaza_section_blog', + 'settings' => 'romhackplaza_theme_options[excerpt_length]', + 'type' => 'text', + 'priority' => 40, + ) + ); + + $wp_customize->selective_refresh->add_partial( + 'romhackplaza_blog_layout_partial', + array( + 'selector' => '.site-main .post-wrapper', + 'settings' => array( + 'romhackplaza_theme_options[blog_layout]', + 'romhackplaza_theme_options[excerpt_length]', + ), + 'render_callback' => [ $this, 'partial_blog_layout' ], + 'fallback_refresh' => false, + ) + ); + + $wp_customize->add_setting( + 'romhackplaza_theme_options[read_more_text]', + array( + 'default' => esc_html__( 'Continue reading', 'romhackplaza' ), + 'type' => 'option', + 'transport' => 'postMessage', + 'sanitize_callback' => 'sanitize_text_field', + ) + ); + + $wp_customize->add_control( + 'romhackplaza_theme_options[read_more_text]', + array( + 'label' => esc_html__( 'Read More Text', 'romhackplaza' ), + 'section' => 'romhackplaza_section_blog', + 'settings' => 'romhackplaza_theme_options[read_more_text]', + 'type' => 'text', + 'priority' => 50, + ) + ); + + $wp_customize->add_control( + new Control\Header( + $wp_customize, + 'romhackplaza_theme_options[blog_magazine_widgets_title]', + array( + 'label' => esc_html__( 'Magazine Widgets', 'romhackplaza' ), + 'section' => 'romhackplaza_section_blog', + 'settings' => array(), + 'priority' => 60, + ) + ) + ); + + $wp_customize->add_setting( + 'romhackplaza_theme_options[blog_magazine_widgets]', + array( + 'default' => true, + 'type' => 'option', + 'transport' => 'refresh', + 'sanitize_callback' => [ Customizer::class, 'sanitize_checkbox' ], + ) + ); + + $wp_customize->add_control( + 'romhackplaza_theme_options[blog_magazine_widgets]', + array( + 'label' => esc_html__( 'Display Magazine widgets on blog index', 'romhackplaza' ), + 'section' => 'romhackplaza_section_blog', + 'settings' => 'romhackplaza_theme_options[blog_magazine_widgets]', + 'type' => 'checkbox', + 'priority' => 70, + ) + ); + + } + + /** + * Callback for partial blog_title setting. + * @return void + */ + public function partial_blog_title(){ + + global $_romhackplaza_theme; + $_romhackplaza_theme->settings->refresh(); + echo $_romhackplaza_theme->settings( 'blog_title' ) + |> wp_kses_post( ... ); + } + + /** + * Callback for partial blog_description setting. + * @return void + */ + public function partial_blog_description(){ + + global $_romhackplaza_theme; + $_romhackplaza_theme->settings->refresh(); // Make sure that settings are the new ones. + echo $_romhackplaza_theme->settings( 'blog_description' ) + |> wp_kses_post( ... ); + + } + + public function partial_blog_layout() { + // TODO : CUSTOMIZE REFRESH BLOG LAYOUT + /* + * while ( have_posts() ) { + the_post(); + get_template_part( 'template-parts/content', esc_attr( treville_get_option( 'blog_layout' ) ) ); + } + */ + } + +} \ No newline at end of file diff --git a/src/Theme/Customizer/Control/Category_Dropdown.php b/src/Theme/Customizer/Control/Category_Dropdown.php new file mode 100644 index 0000000..e295ed0 --- /dev/null +++ b/src/Theme/Customizer/Control/Category_Dropdown.php @@ -0,0 +1,35 @@ + false ) ); + if ( ! empty( $categories ) ) { ?> + + + + + get_setting( 'blogname' )->transport = 'postMessage'; + $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; + + $wp_customize->selective_refresh->add_partial( + 'blogname', + array( + 'selector' => '.site-title a', + 'render_callback' => fn() => bloginfo( 'name' ), + ) + ); + + $wp_customize->selective_refresh->add_partial( + 'blogdescription', + array( + 'selector' => '.site-description', + 'render_callback' => fn() => bloginfo( 'description' ), + ) + ); + + $wp_customize->add_control( + new Control\Header( + $wp_customize, + 'romhackplaza_theme_options[retina_logo_title]', + array( + 'label' => esc_html__( 'Retina Logo', 'romhackplaza' ), + 'section' => 'title_tagline', + 'settings' => array(), + 'priority' => 8, + ) + ) + ); + + $wp_customize->add_setting( + 'romhackplaza_theme_options[retina_logo]', + array( + 'default' => false, + 'type' => 'option', + 'transport' => 'refresh', + 'sanitize_callback' => [Customizer::class, 'sanitize_checkbox'], + ) + ); + + $wp_customize->add_control( + 'romhackplaza_theme_options[retina_logo]', + array( + 'label' => esc_html__( 'Scale down logo image for retina displays', 'romhackplaza' ), + 'section' => 'title_tagline', + 'settings' => 'romhackplaza_theme_options[retina_logo]', + 'type' => 'checkbox', + 'priority' => 9, + ) + ); + + $wp_customize->add_setting( + 'romhackplaza_theme_options[site_title]', + array( + 'default' => true, + 'type' => 'option', + 'transport' => 'postMessage', + 'sanitize_callback' => [ Customizer::class, 'sanitize_checkbox' ], + ) + ); + $wp_customize->add_control( + 'romhackplaza_theme_options[site_title]', + array( + 'label' => esc_html__( 'Display Site Title', 'romhackplaza' ), + 'section' => 'title_tagline', + 'settings' => 'romhackplaza_theme_options[site_title]', + 'type' => 'checkbox', + 'priority' => 10, + ) + ); + + $wp_customize->add_setting( + 'romhackplaza_theme_options[site_description]', + array( + 'default' => true, + 'type' => 'option', + 'transport' => 'postMessage', + 'sanitize_callback' => [ Customizer::class, 'sanitize_checkbox' ], + ) + ); + $wp_customize->add_control( + 'romhackplaza_theme_options[site_description]', + array( + 'label' => esc_html__( 'Display Tagline', 'romhackplaza' ), + 'section' => 'title_tagline', + 'settings' => 'romhackplaza_theme_options[site_description]', + 'type' => 'checkbox', + 'priority' => 11, + ) + ); + + } + +} \ No newline at end of file diff --git a/src/Theme/Customizer/General.php b/src/Theme/Customizer/General.php new file mode 100644 index 0000000..60c762e --- /dev/null +++ b/src/Theme/Customizer/General.php @@ -0,0 +1,56 @@ +add_section( + + 'romhackplaza_section_general', + [ + 'title' => __( 'General Settings', 'romhackplaza' ), + 'priority' => 10, + 'panel' => 'romhackplaza_options_panel', + + ] + + ); + + $wp_customize->add_setting( + 'romhackplaza_theme_options[layout]', + [ + 'default' => 'right-sidebar', + 'type' => 'option', + 'transport' => 'postMessage', + 'sanitize_callback' => [ Customizer::class, 'sanitize_select' ], + ] + ); + + $wp_customize->add_control( + 'romhackplaza_theme_options[layout]', + [ + 'label' => __( 'Layout', 'romhackplaza' ), + 'section' => 'romhackplaza_section_general', + 'settings' => 'romhackplaza_theme_options[layout]', + 'type' => 'radio', + 'priority' => 10, + 'choices' => [ + 'left-sidebar' => esc_html__( 'Left Sidebar', 'romhackplaza' ), + 'right-sidebar' => esc_html__( 'Right Sidebar', 'romhackplaza' ), + ] + ] + ); + + } + +} \ No newline at end of file diff --git a/src/Theme/Customizer/Post.php b/src/Theme/Customizer/Post.php new file mode 100644 index 0000000..d9df571 --- /dev/null +++ b/src/Theme/Customizer/Post.php @@ -0,0 +1,276 @@ +add_section( + + 'romhackplaza_section_post', + [ + 'title' => __( 'Post Settings', 'romhackplaza' ), + 'priority' => 30, + 'panel' => 'romhackplaza_options_panel', + + ] + + ); + + $wp_customize->add_control( + new Control\Header( + $wp_customize, + 'romhackplaza_theme_options[post_meta_headline]', + array( + 'label' => esc_html__( 'Post Details', 'romhackplaza' ), + 'section' => 'romhackplaza_section_post', + 'settings' => array(), + 'priority' => 10, + ) + ) + ); + + $wp_customize->add_setting( + 'romhackplaza_theme_options[meta_date]', + array( + 'default' => true, + 'type' => 'option', + 'transport' => 'postMessage', + 'sanitize_callback' => [Customizer::class, 'sanitize_checkbox' ], + ) + ); + + $wp_customize->add_control( + 'romhackplaza_theme_options[meta_date]', + array( + 'label' => esc_html__( 'Display date', 'romhackplaza' ), + 'section' => 'romhackplaza_section_post', + 'settings' => 'romhackplaza_theme_options[meta_date]', + 'type' => 'checkbox', + 'priority' => 20, + ) + ); + + $wp_customize->add_setting( + 'romhackplaza_theme_options[meta_author]', + array( + 'default' => true, + 'type' => 'option', + 'transport' => 'postMessage', + 'sanitize_callback' => [Customizer::class, 'sanitize_checkbox' ], + ) + ); + + $wp_customize->add_control( + 'romhackplaza_theme_options[meta_author]', + array( + 'label' => esc_html__( 'Display author', 'romhackplaza' ), + 'section' => 'romhackplaza_section_post', + 'settings' => 'romhackplaza_theme_options[meta_author]', + 'type' => 'checkbox', + 'priority' => 30, + ) + ); + + $wp_customize->add_setting( + 'romhackplaza_theme_options[meta_comments]', + array( + 'default' => true, + 'type' => 'option', + 'transport' => 'postMessage', + 'sanitize_callback' => [Customizer::class, 'sanitize_checkbox' ], + ) + ); + + $wp_customize->add_control( + 'romhackplaza_theme_options[meta_comments]', + array( + 'label' => esc_html__( 'Display comments', 'romhackplaza' ), + 'section' => 'romhackplaza_section_post', + 'settings' => 'romhackplaza_theme_options[meta_comments]', + 'type' => 'checkbox', + 'priority' => 40, + ) + ); + + $wp_customize->add_control( + new Control\Header( + $wp_customize, + 'romhackplaza_theme_options[single_post_headline]', + array( + 'label' => esc_html__( 'Single Posts', 'romhackplaza' ), + 'section' => 'romhackplaza_section_post', + 'settings' => array(), + 'priority' => 50, + ) + ) + ); + + $wp_customize->add_setting( + 'romhackplaza_theme_options[meta_category]', + array( + 'default' => true, + 'type' => 'option', + 'transport' => 'postMessage', + 'sanitize_callback' => [Customizer::class, 'sanitize_checkbox' ], + ) + ); + + $wp_customize->add_control( + 'romhackplaza_theme_options[meta_category]', + array( + 'label' => esc_html__( 'Display categories', 'romhackplaza' ), + 'section' => 'romhackplaza_section_post', + 'settings' => 'romhackplaza_theme_options[meta_category]', + 'type' => 'checkbox', + 'priority' => 60, + ) + ); + + $wp_customize->add_setting( + 'romhackplaza_theme_options[meta_tags]', + array( + 'default' => true, + 'type' => 'option', + 'transport' => 'postMessage', + 'sanitize_callback' => [Customizer::class, 'sanitize_checkbox' ], + ) + ); + + $wp_customize->add_control( + 'romhackplaza_theme_options[meta_tags]', + array( + 'label' => esc_html__( 'Display tags', 'romhackplaza' ), + 'section' => 'romhackplaza_section_post', + 'settings' => 'romhackplaza_theme_options[meta_tags]', + 'type' => 'checkbox', + 'priority' => 70, + ) + ); + + $wp_customize->add_setting( + 'romhackplaza_theme_options[post_navigation]', + array( + 'default' => true, + 'type' => 'option', + 'transport' => 'postMessage', + 'sanitize_callback' => [Customizer::class, 'sanitize_checkbox' ], + ) + ); + + $wp_customize->add_control( + 'romhackplaza_theme_options[post_navigation]', + array( + 'label' => esc_html__( 'Display previous/next post', 'romhackplaza' ), + 'section' => 'romhackplaza_section_post', + 'settings' => 'romhackplaza_theme_options[post_navigation]', + 'type' => 'checkbox', + 'priority' => 80, + ) + ); + + $wp_customize->add_setting( + 'romhackplaza_theme_options[author_bio]', + array( + 'default' => false, + 'type' => 'option', + 'transport' => 'postMessage', + 'sanitize_callback' => [Customizer::class, 'sanitize_checkbox' ], + ) ); + + $wp_customize->add_control( + 'romhackplaza_theme_options[author_bio]', + array( + 'label' => __( 'Display Author Bio', 'romhackplaza' ), + 'section' => 'romhackplaza_section_post', + 'settings' => 'romhackplaza_theme_options[author_bio]', + 'type' => 'checkbox', + 'priority' => 85, + ) ); + + $wp_customize->add_control( + new Control\Header( + $wp_customize, + 'romhackplaza_theme_options[featured_images]', + array( + 'label' => esc_html__( 'Featured Images', 'romhackplaza' ), + 'section' => 'romhackplaza_section_post', + 'settings' => array(), + 'priority' => 90, + ) + ) + ); + + $wp_customize->add_setting( + 'romhackplaza_theme_options[post_image_archives]', + array( + 'default' => true, + 'type' => 'option', + 'transport' => 'postMessage', + 'sanitize_callback' => [ Customizer::class, 'sanitize_checkbox' ], + ) + ); + + $wp_customize->add_control( + 'romhackplaza_theme_options[post_image_archives]', + array( + 'label' => esc_html__( 'Display images on blog and archives', 'romhackplaza' ), + 'section' => 'romhackplaza_section_post', + 'settings' => 'romhackplaza_theme_options[post_image_archives]', + 'type' => 'checkbox', + 'priority' => 100, + ) + ); + + $wp_customize->selective_refresh->add_partial( + 'romhackplaza_theme_options[post_image_archives]', + array( + 'selector' => '.site-main .post-wrapper', + 'render_callback' => [ $this, 'partial_blog_layout'], + 'fallback_refresh' => false, + ) + ); + + $wp_customize->add_setting( + 'romhackplaza_theme_options[post_image_single]', + array( + 'default' => true, + 'type' => 'option', + 'transport' => 'refresh', + 'sanitize_callback' => [ Customizer::class, 'sanitize_checkbox' ], + ) + ); + + $wp_customize->add_control( + 'romhackplaza_theme_options[post_image_single]', + array( + 'label' => esc_html__( 'Display image on single posts', 'romhackplaza' ), + 'section' => 'romhackplaza_section_post', + 'settings' => 'romhackplaza_theme_options[post_image_single]', + 'type' => 'checkbox', + 'priority' => 110, + ) + ); + + } + + public function partial_blog_layout() { + // TODO : CUSTOMIZE REFRESH BLOG LAYOUT + /* + * while ( have_posts() ) { + the_post(); + get_template_part( 'template-parts/content', esc_attr( treville_get_option( 'blog_layout' ) ) ); + } + */ + } + +} \ No newline at end of file diff --git a/src/Theme/Customizer/Slider.php b/src/Theme/Customizer/Slider.php new file mode 100644 index 0000000..ca5ec3e --- /dev/null +++ b/src/Theme/Customizer/Slider.php @@ -0,0 +1,21 @@ +can_extend() ) + return; + + $this->extend(); + + } + + /** + * Alias for Wordpress function. + * @param $name + * @param $callback + * @param $priority + * @param $accepted_args + * @return void + */ + protected function add_filter( $name, $callback, $priority = 10, $accepted_args = 1 ) { + add_filter( $name, $callback, $priority, $accepted_args ); + } + + /** + * Alias for Wordpress function. + * @param $name + * @param $callback + * @param $priority + * @param $accepted_args + * @return void + */ + protected function add_action( $name, $callback, $priority = 10, $accepted_args = 1 ) { + add_action( $name, $callback, $priority, $accepted_args ); + } + + /** + * Check if the extender can be launched. + * @return bool + */ + abstract protected function can_extend(): bool; + + /** + * The Extender. + * @return void + */ + abstract protected function extend(): void; + +} \ No newline at end of file diff --git a/src/Theme/Extenders/Excerpt.php b/src/Theme/Extenders/Excerpt.php new file mode 100644 index 0000000..b98183a --- /dev/null +++ b/src/Theme/Extenders/Excerpt.php @@ -0,0 +1,50 @@ +add_filter( 'excerpt_length', [ $this, 'excerpt_length' ] ); + $this->add_filter( 'excerpt_more', [ $this, 'excerpt_more' ] ); + } + + /** + * Change excerpt length for default posts + * + * @param int $length Length of excerpt in number of words. + * @return int + */ + public function excerpt_length( $length ): int { + + if( is_admin() ) + return $length; // Keep default for admin value. + + global $_romhackplaza_theme; + $excerpt_length = $_romhackplaza_theme->settings->get( 'excerpt_length' ); + + if( $excerpt_length != false && $excerpt_length >= 0 ) + return absint( $excerpt_length ); + + return $_romhackplaza_theme->settings->get_default( 'excerpt_length' ); + + } + + /** + * Excerpt more text. + * @param $more + * @return string + */ + public function excerpt_more( $more ): string { + + return is_admin() ? $more : ''; + + } + +} \ No newline at end of file diff --git a/src/Theme/Extenders/Nav_Menu.php b/src/Theme/Extenders/Nav_Menu.php new file mode 100644 index 0000000..55259a2 --- /dev/null +++ b/src/Theme/Extenders/Nav_Menu.php @@ -0,0 +1,39 @@ +add_filter( 'nav_menu_item_title', [ $this, 'add_expand' ], 10, 4 ); + + } + + /** + * @param string $title The menu item's title. + * @param object $item The current menu item. + * @param array $args An array of wp_nav_menu() arguments. + * @param int $depth Depth of menu item. Used for padding. + * @return string $title The menu item's title with dropdown icon. + */ + public function add_expand( $title, $item, $args, $depth ): string { + + if( $args->theme_location === 'primary' || $args->theme_location === 'secondary' ) { + foreach ( $item->classes as $value ) { + if( $value === 'menu-item-has-children' || $value === 'page_item_has_children' ) + $title .= Snippets::svg_icon( 'expand' ); + } + } + + return $title; + + } + +} \ No newline at end of file diff --git a/src/Theme/Extenders/Site_Settings_CSS.php b/src/Theme/Extenders/Site_Settings_CSS.php new file mode 100644 index 0000000..b2cf3f8 --- /dev/null +++ b/src/Theme/Extenders/Site_Settings_CSS.php @@ -0,0 +1,100 @@ +add_filter( 'body_class', [ $this, 'new_css_classes' ] ); + $this->add_filter( 'wp_enqueue_scripts', [ $this, 'hide_elements' ], 11 ); + $this->add_filter( 'wp_enqueue_scripts', [ $this, 'retina_logo' ], 11 ); + + } + + public function new_css_classes( $classes ): array { + + global $_romhackplaza_theme; + + if( $_romhackplaza_theme->settings->get( 'layout' ) == 'left-sidebar' ) + $classes[] = 'sidebar-left'; + + if( !is_active_sidebar( 'sidebar-1' ) ) + $classes[] = 'no-sidebar'; + + if( $_romhackplaza_theme->settings->get( 'meta_date' ) ) + $classes[] = 'date-hidden'; + + if( $_romhackplaza_theme->settings->get( 'meta_author' ) ) + $classes[] = 'author-hidden'; + + if( $_romhackplaza_theme->settings->get( 'meta_comments' ) ) + $classes[] = 'comments-hidden'; + + if( \RomhackPlaza\Backwards\treville_is_amp() ) + $classes[] = 'is-amp-page'; + + return $classes; + + } + + public function hide_elements() { + + global $_romhackplaza_theme; + $elements = []; + + if( $_romhackplaza_theme->settings->get( 'site_title' ) === false ) + $elements[] = '.site-title'; + + if( $_romhackplaza_theme->settings->get( 'site_description' ) === false ) + $elements[] = '.site-description'; + + if( $_romhackplaza_theme->settings->get( 'meta_category' ) === false ) + $elements[] = '.type-post .entry-footer .entry-categories'; + + if( $_romhackplaza_theme->settings->get( 'meta_tags' ) === false ) + $elements[] = '.type-post .entry-footer .entry-tags'; + + if( $_romhackplaza_theme->settings->get( 'post_navigation' ) === false ) + $elements[] = '.type-post .post-navigation'; + + if( $_romhackplaza_theme->settings->get( 'author_bio' ) === false ) + $elements[] = '.single-post .type-post .entry-author'; + + if( empty( $elements ) ) + return; + + $classes = implode( ', ', $elements ); + $custom_css = $classes . ' { position: absolute; clip: rect(1px, 1px, 1px, 1px); width: 1px; height: 1px; overflow: hidden; }'; + + $_romhackplaza_theme->children['script_main_css'] + ->add_data( $custom_css ); + + } + + /** + * Apply CSS for Retina logo. + * @return void + */ + public function retina_logo() { + + global $_romhackplaza_theme; + if( !has_custom_logo() || $_romhackplaza_theme->settings->get( 'retina_logo' ) === false ) + return; + + $logo = wp_get_attachment_image_src( get_theme_mod( 'custom_logo' ), 'full' ); + $custom_css = '.site-branding .custom-logo { width: ' . absint( floor( $logo[1] / 2 ) ) . 'px; }'; + + $_romhackplaza_theme->children['script_main_css'] + ->add_data( $custom_css ); + + } + +} \ No newline at end of file diff --git a/src/Theme/Extenders/Timber_Twig.php b/src/Theme/Extenders/Timber_Twig.php new file mode 100644 index 0000000..a28c188 --- /dev/null +++ b/src/Theme/Extenders/Timber_Twig.php @@ -0,0 +1,29 @@ +add_filter( 'timber/context', [ $this, 'essential_context' ], 5 ); + + } + + public function essential_context( $context ) { + + $context['menu']['primary'] = Timber::get_menu( 'primary' ); + $context['menu']['secondary'] = Timber::get_menu( 'secondary' ); + $context['wp_sidebar'] = Timber::get_widgets( 'sidebar-1' ); + + return $context; + + } +} \ No newline at end of file diff --git a/src/Theme/Page_Access.php b/src/Theme/Page_Access.php new file mode 100644 index 0000000..b189cd5 --- /dev/null +++ b/src/Theme/Page_Access.php @@ -0,0 +1,61 @@ +setup(); + add_action( 'admin_menu', [ $this,'add_page' ] ); + if( method_exists( $this,'scripts' ) ) + add_action( 'admin_enqueue_scripts', [ $this, 'scripts' ] ); + + } + + /** + * Add page to the admin menu with provided fields. + * @return void + */ + public function add_page(): void { + + add_theme_page( + $this->page_title, + $this->menu_title, + $this->capability, + $this->page_slug, + [ $this, 'content' ], + $this->position + ); + + } + + /** + * Must have fill fields defined for the page. (Like add_menu_page()) + * @return void + */ + abstract protected function setup(): void; + + /** + * Must contain the page content. + * @return void + */ + abstract public function content(): void; + + /** + * Can also define a scripts() method. + */ + +} diff --git a/src/Theme/Pages/Theme_Info.php b/src/Theme/Pages/Theme_Info.php new file mode 100644 index 0000000..a388716 --- /dev/null +++ b/src/Theme/Pages/Theme_Info.php @@ -0,0 +1,180 @@ +page_title = sprintf( + esc_html__( 'Welcome to %1$s %2$s', 'romhackplaza' ), + $theme->display( 'Name' ), + $theme->display( 'Version' ) + ); + $this->menu_title = esc_html__( 'Theme Info', 'romhackplaza' ); + $this->capability = 'edit_theme_options'; + $this->page_slug = 'romhackplaza_theme'; + + } + + /** + * Just take original Treville page for now... + * @return void + */ + public function content(): void { + + // Get theme details. + $theme = wp_get_theme(); + ?> + +
      + +

      display( 'Name' ), $theme->display( 'Version' ) ); ?>

      + +
      display( 'Description' ); ?>
      + +
      + +
      + +
      + +

      display( 'Name' ) ); ?>

      + +
      + +
      + +
      +

      + +

      + +

      +

      + + + +

      +
      + +
      +

      + +

      + display( 'Name' ) ); ?> +

      +

      + +

      +
      + +
      + +
      + + + +
      + +
      + +
      + +
      + +
      + +

      + +
      + +
      + +
      +

      + +

      + +

      +

      + + + +

      +
      + +
      + +
      + +
      +

      + +

      + +

      +

      + + + +

      +
      + +
      + +
      + +
      + +
      + +
      + +

      + display( 'Name' ), + 'ThemeZee', + '' . esc_html__( 'rate it', 'treville' ) . '' + ); + ?> +

      + +
      + +
      + enqueue(); + + } + +} \ No newline at end of file diff --git a/src/Theme/Script.php b/src/Theme/Script.php new file mode 100755 index 0000000..a8936df --- /dev/null +++ b/src/Theme/Script.php @@ -0,0 +1,135 @@ +type = $type; + $this->handle = $handle; + $this->source = $source; + $this->deps = $deps; + + /** + * Edit version number. + * Like if we want to put plugin/theme version number. + * + * @since 0.0.1a + * + * @param string|bool - Current version number or false + * @return string|bool + */ + $this->version = apply_filters( 'RomhackPlaza\\Theme\\Scripts\\Version', $version ); + + $this->media = $media; + $this->args = $args; + + return $this; + + } + + /** + * Enqueue current script. + * @return $this + */ + public function enqueue(): Script { + + switch ( $this->type ) { + case Script_Type::JS: + wp_enqueue_script( $this->handle, $this->source, $this->deps, $this->version, $this->args ); + break; + case Script_Type::CSS: + wp_enqueue_style( $this->handle, $this->source, $this->deps, $this->version, $this->media ); + break; + } + + return $this; + + } + + /** + * Add some data to the script. + * + * @param string $key__or_css_data + * @param string $value + * @return $this + */ + public function add_data( string $key__or_css_data, string $value = "" ): Script{ + + if ( $this->type == Script_Type::JS && $value != "" ) + wp_script_add_data( $this->handle, $key__or_css_data, $value ); + else if( $this->type == Script_Type::CSS ) + wp_add_inline_style( $this->handle, $key__or_css_data ); + + return $this; + + } + + /** + * Add localisation to the script. + * @param string $object_name + * @param array $l10n + * @return $this + */ + public function add_localize( string $object_name, array $l10n ): Script{ + if ( $this->type == Script_Type::JS ) + wp_localize_script( $this->handle, $object_name, $l10n ); + return $this; + } + +} \ No newline at end of file diff --git a/src/Theme/Script_Type.php b/src/Theme/Script_Type.php new file mode 100644 index 0000000..222fd9e --- /dev/null +++ b/src/Theme/Script_Type.php @@ -0,0 +1,6 @@ +defaults = [ + 'retina_logo' => false, + 'site_title' => true, + 'site_description' => true, + 'layout' => 'right-sidebar', + 'blog_title' => '', + 'blog_description' => '', + 'blog_layout' => 'excerpt', + 'excerpt_length' => 50, + 'read_more_text' => esc_html__( 'Continue reading', 'romhackplaza' ), + 'blog_magazine_widgets' => true, + 'meta_date' => true, + 'meta_author' => true, + 'meta_comments' => true, + 'meta_category' => true, + 'meta_tags' => true, + 'post_navigation' => true, + 'post_image_archives' => true, + 'post_image_single' => true, + 'slider_active' => false, + 'slider_category' => 0, + 'slider_limit' => 8, + 'slider_animation' => 'slide', + 'slider_speed' => 7000, + 'header_search' => true, + 'author_bio' => false, + 'scroll_to_top' => false, + 'footer_text' => '', + 'credit_link' => true, + 'primary_color' => '#1177aa', + 'secondary_color' => '#005e91', + 'tertiary_color' => '#004477', + 'accent_color' => '#11aa44', + 'highlight_color' => '#aa1d11', + 'light_gray_color' => '#e5e5e5', + 'gray_color' => '#999999', + 'dark_gray_color' => '#454545', + 'header_color' => '#454545', + 'navi_color' => '#ffffff', + 'link_color' => '#1177aa', + 'link_hover_color' => '#454545', + 'button_color' => '#1177aa', + 'button_hover_color' => '#454545', + 'title_color' => '#1177aa', + 'title_hover_color' => '#454545', + 'border_color' => '#1177aa', + 'widget_title_color' => '#454545', + 'footer_widgets_color' => '#454545', + 'footer_color' => '#454545', + 'text_font' => 'Gudea', + 'title_font' => 'Magra', + 'title_is_bold' => false, + 'title_is_uppercase' => false, + 'navi_font' => 'Magra', + 'navi_is_bold' => false, + 'navi_is_uppercase' => true, + 'widget_title_font' => 'Magra', + 'widget_title_is_bold' => false, + 'widget_title_is_uppercase' => true, + ]; + + $this->refresh(); + + } + + public function __invoke( string $option_name ): mixed + { + return $this->get( $option_name ); + } + + /** + * Refresh array of options. + * @return void + */ + public function refresh(): void { + + $this->options = wp_parse_args( + get_option( 'romhackplaza_theme_options', array() ), + $this->defaults + ); + + } + + /** + * Get an option. + * @param string $option_name + * @return mixed - False if the option name doesn't exist. + */ + public function get( string $option_name ): mixed { + + if( isset( $this->options[ $option_name ] ) ) + return $this->options[ $option_name ]; + + return false; + + } + + /** + * Get a default option. + * @param string $option_name + * @return mixed - False if the option name doesn't exist. + */ + public function get_default( string $option_name ): mixed { + if( isset( $this->defaults[ $option_name ] ) ) + return $this->defaults[ $option_name ]; + return false; + } + +} \ No newline at end of file diff --git a/src/Theme/Snippets.php b/src/Theme/Snippets.php new file mode 100644 index 0000000..2781d7e --- /dev/null +++ b/src/Theme/Snippets.php @@ -0,0 +1,24 @@ +'; + $svg .= ' '; + $svg .= ''; + + return $svg; + + } + + +} \ No newline at end of file diff --git a/src/Theme/Template_Context.php b/src/Theme/Template_Context.php new file mode 100644 index 0000000..9c90e69 --- /dev/null +++ b/src/Theme/Template_Context.php @@ -0,0 +1,82 @@ + get_current_user_id(), + 'orderby' => 'date', + 'order' => 'DESC', + 'number' => 100 + ]; + + if( isset( $_GET['show'] ) && sanitize_text_field( $_GET['show'] ) === 'unreaded' ) + $args['readed'] = 1; + + $context['notifications'] = User_Notifications::get( $args ); + + $context['notifications'] = array_map( function( $notif ){ + + // Change every types to their pretty name. + $notif['type_id'] = $notif['type']; + $notif['type'] = User_Notifications::type_name( $notif['type'] ); + return $notif; + + }, $context['notifications'] ); + + new Script( + Script_Type::JS, + 'romhackplaza-manage-notifications', + ROMHACKPLAZA_PLUGIN_URI . '/assets/js/manage-notifications.js', + [], + '20260104', + args: [ 'defer' => true, 'in_footer' => true ] + ) + ->enqueue() + ->add_localize( + '_romhackplaza_manage_notifications', + [ + 'manage_url' => admin_url( 'admin-ajax.php' ), + 'mark_as_read_nonce' => wp_create_nonce( Format::format_nonce_name( $_romhackplaza->children['ajax_notifications_unread']->request_name ) ), + 'reply_nonce' => wp_create_nonce( Format::format_nonce_name( $_romhackplaza->children['ajax_notifications_reply']->request_name ) ) + ] + ); + + new Modal( + 'notifications', "", "" + )->render(); + + } + + return $context; + } + +} \ No newline at end of file diff --git a/src/Theme/Widget_Area.php b/src/Theme/Widget_Area.php new file mode 100755 index 0000000..a4c6f7f --- /dev/null +++ b/src/Theme/Widget_Area.php @@ -0,0 +1,54 @@ +name = $wp_args['name'] ?? null; + $this->id = $wp_args['id'] ?? null; + $this->wp_args = $wp_args; + + return $this; + + } + + /** + * Register widget area with WP function. + * /!\ Must be called with 'widgets_init' hook. + * + * @return Widget_Area - Itself. + */ + public function register(): Widget_Area { + + register_sidebar( $this->wp_args ); + + return $this; + + } + +} \ No newline at end of file diff --git a/style.css b/style.css new file mode 100755 index 0000000..f2ab92a --- /dev/null +++ b/style.css @@ -0,0 +1,2008 @@ +/** + * Theme Name: RomhackPlaza + * Theme URI: https://example.com + * Description: Based on Treville theme by ThemeZee. Used for the Romhackplaza website. + * Version: 0.0.1c + * Author: Benjamin, Spike (romhacks.org), ThemeZee (Original) + * Text Domain: romhackplaza + * Domain Path: /languages + * Tested up to: 6.8.3 + * Requires at least: 6.8 + * Requires PHP: 8.5 + * License: GNU General Public License v2.0 or later + * License URI: https://www.gnu.org/licenses/gpl-2.0.html + */ + +/* --- TOC --- + 0. NO CATEGORY + I. COLORS + II. FULL LARGE & GENERAL STYLE + III. HEADER + IV. POST CONTENT + A. HORIZONTAL SCROLL GALLERY + B. NEWS POST IMAGES + C. ENTRY STATUS HEADER + V. DOWNLOAD TABLE FROM EXTERNAL SERVER + VI. SIDEBAR + VII. GRIDS + A. BIG GRID & GENERAL ELEMENTS. + B. LIST GRID + C. SMALL GRID + D. DRAFT GRID + VIII. ROLE TAGS + IX. USER PAGE & LISTING + X. SUBMIT PAGE + XI. FOOTER + XII. CONTACT FORM + XIII. INPUT + XIV. FACET WP + A. PAGINATION + B. FILTERS + XV. STICKY ENTRIES + XVI. ANNOUNCEMENTS + XVII. WIDGETS + XVIII. QUICK TOOLS + XIX. HOVER TITLE + XX. REVIEWS + --- TOC --- */ + +/* --- + 0. NO CATEGORY. + --- */ + +#comments, #reviews { + + box-shadow: none; +} + +.modifications-wrapper label { + + margin: 0; +} + +.view-file-content { /* MUST BE MOVED ON FORM PAGES CSS */ + + color: #000 !important; + text-decoration: none !important; + +} + +/* --- + I. COLORS + --- */ + +:root { /* Dark mode */ + + --header-background-color: #1f1f1f; + --navi-background-color: #282828; + --navi-color: #d2d2d2; + --separator-line: #292a2d; + --separator-line-rgba: #292a2d99; + --page-background-color: #1f1f1f; + --widget-background-color: #1f1f1f; + --widget-title-color: #fff; + --text-color: #d2d2d2; + --title-color: #d2d2d2; + --background: #292a2d; + --grid-background: #545455; + --sticky-text: #d2d2d2; + --post-excerpt: #2e2e2e; + --field-background: #2e2e2e; + --reviews-background: #292a2d; + --reviews-text: #d1d1d1; + --tab-background-active: #c5c5c5; + --tab-background-inactive: #7a7a7a; + --switch-border-radius: 10px 10px 10px 10px; + +} + +.light-mode { + + --header-background-color: #454545; + --navi-color: #454545; + --navi-background-color: #fff; + --separator-line: #e3e3e3; + --separator-line-rgba: #e3e3e399; + --page-background-color: #fff; + --widget-background-color: #fff; + --widget-title-color: #454545; + --text-color: #454545; + --title-color: #1177aa; + --background: #ddd; + --grid-background: #a8a8a8; + --sticky-text: #fff; + --post-excerpt: #cfcfcf; + --field-background: #ffffff; + --reviews-background: #292a2d; + --reviews-text: #d1d1d1; + --tab-background-active: #292a2d; + --tab-background-inactive: #c5c5c5; + --switch-border-radius: 10px 10px 0px 0px; + +} + +pre { + + color: #454545; +} + +/* --- + II. FULL LARGE & GENERAL STYLE + --- */ + +#content, .container { + + margin-left: 3%; + margin-right: 3%; + max-width: 94%; +} + +button, .meta-categories a, .more-link, input[type="submit"] { + + border-radius: 5px !important; +} + +/* --- + III. HEADER + --- */ + +.dark-light { + + background-color: transparent; + color: var( --text-color ); + margin-left: 1%; + +} + +#entriesDropdown, #viewModeDropdown { + + background-color: transparent; + color: var( --text-color ); + margin-left: 0.5%; + border: 0px; + +} + +#entriesDropdown:hover, #viewModeDropdown:hover { + + cursor: pointer; +} + +#entriesDropdown option, #viewModeDropdown option { + + background-color: var(--page-background-color); + border-color: var( --page-background-color); +} + +#rhpz-menu-avatar { + + border-radius:50%;object-fit:cover;margin-right:8px;vertical-align:middle;top:50%;left:0;margin-top:-24px;width:auto;height:auto;max-width:48px;position:absolute;min-width:32px; +} + +.rhpz-menu-wrapper a{ + + position:relative;padding-left:54px !important; +} + +/* --- + IV. POST CONTENT + --- */ + +.entry-meta { + + margin-bottom: 1.5%; + +} + +.meta-comments { + + margin-right: 1.5em; + +} + +.entry-author p { + + margin: 0px; +} + +.post-image { + margin-bottom: 25px; + margin-top: 0; + position: relative; + image-rendering: pixelated; +} + +.post-image > a, +.post-image img { + display: block; + margin: auto; +} + +.post-details { + + margin-left: 5%; + display: flex; + align-items: center; + justify-content: space-between; + width: auto; + +} + +.post-details .post-image { + + flex-shrink: 0; + margin-bottom: 20px; + max-width: 50%; +} + +.post-details-content { + + display: flex; + flex-grow: 1; + margin-left: 5%; + flex-direction: column; + margin-right: 2%; + +} + +.edit-button { + font-size: 14px !important; + display: block; + float: right; + padding: 5px; + background-color: rgba( 219, 127, 0, 0.4 ); + color: var( --text-color ) !important; + border-radius: 3px; + text-decoration: none; + width: 32px; + text-align: center; +} + +.edit-entry-button { + font-size: 16px !important; + display: inline-block; + padding: 6px; + background-color: #db7f00; + color: white !important; + border: none; + border-radius: 5px; + text-decoration: none; + transition: background-color 0.3s ease; +} + +.edit-entry-button:hover, .edit-button:hover { + + background-color: var( --grid-background ); + cursor: pointer; + color: var( --text-color ); +} + +.edit-entry-button:hover, +.edit-entry-button:focus { + background-color: #db7f00; + color: white !important; + text-decoration: none; +} + +.edit-entry-button i { + margin-left: 5px; + font-size: 20px !important; +} + +.row { + + border-bottom: 1px solid var( --separator-line ); + padding: 5px 0; + display: flex; + flex-wrap: wrap; + +} + +.hashes { + + margin-top: 10px; + margin-bottom: 10px; + border-top: 1px solid var( --separator-line ); + border-bottom: 1px solid var( --separator-line ); +} + +.team-info, .external-links { + + margin-top: 10px; + margin-bottom: 10px; + border-bottom: 1px solid var( --separator-line ); +} + +.external-links-new { + + margin-top: 10px; + margin-bottom: 10px; +} + +.video-container { + max-width: 800px; + margin: 0 auto; + width: 100%; +} + +.video-container iframe { + width: 100%; + height: 450px; + border: 0; +} + +#shareLink { + + display: flex; + justify-content: end; + align-items: end; +} + +.file-section > div { + text-align: center; +} + +#get-download-links { + display: block; + margin-left: auto; + margin-right: auto; + color: white; + padding: 15px 32px; + font-size: 16px; + border: none; + border-radius: 5px; + cursor: pointer; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); + transition: all 0.3s; + font-weight: bold; + text-transform: uppercase; + margin-top: 20px; +} + +#get-download-links:hover { + background-color: #884f00; + box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); +} + + +#get-download-links:active { + background-color: #397d34; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); + transform: translateY(2px); +} + +#get-download-links:before { + content: '\f019'; + font-family: 'fontawesome'; + padding-right: 8px; +} + +.entry-content { + + word-wrap: break-word; +} + +.entry-excerpt { + + word-wrap: break-word; + background-color: var( --post-excerpt ); + padding: 3%; + margin: 5%; + margin-right: 8%; + width: 60%; + display: inline-block; +} + +.entry-toc { + + word-wrap: break-word; + padding: 3%; + padding-top: 0%; + margin: 0% 0% 5% 0%; + width: auto; + display: inline-block; +} + +@media screen and ( max-width: 75em ) { + + #content { + + padding: 0 !important; + padding-top: 1.5em !important; + } + + .post-details { + + margin-top: 1.5em; + flex-direction: column; + width: 100%; + margin-left: 0; + } + + .post-details-content { + + margin-left: 0; + margin-right: 0; + } +} + +.button-right-widget { + + display:block; + float: right; + color: var( --text-color ); + cursor: pointer; +} + +.entry-content .search-field { + + background-color: var( --page-background-color ); + color: var( --text-color ); +} + +::placeholder { + + color: var( --text-color ) !important; + opacity: 1; +} + + /* ---/--- + IV.A. HORIZONTAL SCROLL GALLERY. + ---/--- */ + +.horizontal-scroll-gallery.featured-posts { + overflow-y: hidden; + margin-bottom: 30px; +} + +.horizontal-scroll-gallery.featured-posts .thumbnail { + position: relative; + overflow: hidden; + margin-right: 15px; +} + +.horizontal-scroll-gallery.featured-posts .thumbnail img { + display: block; + width: 100%; + height: auto; + object-fit: cover; +} + +.horizontal-scroll-gallery.featured-posts .thumbnail .top-info { + position: absolute; + top: 0; + left: 0; + right: 0; + background-color: rgba(0, 0, 0, 0.5); + color: white; + display: flex; + justify-content: space-between; + padding: 5px; + font-size: 12px; +} + +.horizontal-scroll-gallery.featured-posts .thumbnail .post-title { + position: absolute; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(0, 0, 0, 0.5); + color: white; + text-align: center; + padding: 5px 0; + font-size: 14px; +} + +.horizontal-scroll-gallery.featured-posts .thumbnail a { + display: block; + text-decoration: none; +} + +.horizontal-scroll-gallery { + cursor: grab; + display: flex; + flex-wrap: nowrap; + overflow-x: auto; + -webkit-overflow-scrolling: touch; /* Allows momentum scrolling on iOS devices */ + gap: 10px; + padding: 10px 0; + height: 250px; +} +.thumbnail { + flex: 0 0 auto; + position: relative; + display: block; + height: 100%; + width: auto; +} + +.thumbnail img { + height: 100%; + width: auto; + object-fit: contain; + display: block; + image-rendering: pixelated; +} + +/* Optional: Styling the scrollbar for Webkit browsers */ +.horizontal-scroll-gallery::-webkit-scrollbar { + height: 10px; +} + +.horizontal-scroll-gallery::-webkit-scrollbar-track { + background: #f1f1f1; +} + +.horizontal-scroll-gallery::-webkit-scrollbar-thumb { + background: #888; +} + +.horizontal-scroll-gallery::-webkit-scrollbar-thumb:hover { + background: #555; +} + + +/* Style the modal */ +.modal { + display: none; /* Hidden by default */ + position: fixed; /* Stay in place */ + z-index: 1000; /* Sit on top */ + padding-top: 100px; /* Location of the box */ + left: 0; + top: 0; + width: 100%; /* Full width */ + height: 100%; /* Full height */ + overflow: auto; /* Enable scroll if needed */ + background-color: rgb(0,0,0); /* Fallback color */ + background-color: rgba(0,0,0,0.9); /* Black w/ opacity */ +} + +/* Modal Content (Image) */ + +.modal { + display: none; /* Hidden by default */ + position: fixed; /* Stay in place */ + z-index: 1000; /* Sit on top */ + left: 0; + top: 0; + width: 100%; /* Full width */ + height: 100%; /* Full height */ + overflow: auto; /* Enable scroll if needed */ + background-color: rgba(0,0,0,0.9); /* Black w/ opacity */ +} + +/* Modal Content (Image) */ +.modal-content { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + max-width: 90vw; /* viewport width */ + max-height: 90vh; /* he viewport height */ + min-width: 50vw; /* Minimum width to ensure smaller images are also displayed larger */ + min-height: 50vh; /* Minimum height for the same reason */ + width: auto; /* auto to maintain the aspect ratio */ + height: auto; /* auto to maintain the aspect ratio */ + image-rendering: pixelated; +} + +@media (max-width: 850px) { + .modal-content { + min-width: 80vw; /* Increase min-width for smaller screens */ + min-height: 30vh; /* Decrease min-height for smaller screens */ + max-height: 80vh; + } +} + +/* Caption of Modal Image */ +#caption { + text-align: center; + color: #ccc; + padding: 10px 0; + position: absolute; /* Position relative to the modal */ + bottom: 10px; /* Stick to the bottom of the modal, 10px above the bottom edge */ + left: 0; + right: 0; + height: auto; /* Let the height be determined by content */ + background-color: rgba(0, 0, 0, 0.5); /* Optional: semi-transparent background */ +} + + +/* The Close Button */ +.close { + position: absolute; + top: 10px; /* Adjust as necessary */ + right: 25px; /* Adjust as necessary */ + color: #f1f1f1; + font-size: 40px; + font-weight: bold; + transition: 0.3s; +} + +.close:hover, +.close:focus { + color: #bbb; + text-decoration: none; + cursor: pointer; +} + + +/* Navigation Arrows */ +.prev, .next { + cursor: pointer; + position: fixed; /* Fixed position relative to the viewport */ + top: 50%; + width: auto; + padding: 16px; + margin-top: -50px; /* Adjust if the arrows appear too high or too low */ + color: white; + font-weight: bold; + font-size: 30px; /* Increase font size for visibility */ + transition: 0.6s ease; + user-select: none; + z-index: 2000; /* Ensure arrows are above other elements */ +} + +/* Style the "Next" arrow */ +.next { + right: 20px; /* Adjust distance from the right edge */ +} + +/* Style the "Previous" arrow */ +.prev { + left: 20px; /* Adjust distance from the left edge */ +} + +.prev:hover, .next:hover { + background-color: rgba(0,0,0,0.8); +} + +/* END GALLERY */ + +/* index carousel */ +.horizontal-scroll-gallery.featured-posts { + overflow-y: hidden; + margin-bottom: 30px; +} + +.horizontal-scroll-gallery.featured-posts .thumbnail { + position: relative; /* Keep relative for absolute positioning of children */ + overflow: hidden; + margin-right: 15px; +} + +.horizontal-scroll-gallery.featured-posts .thumbnail img { + display: block; + width: 100%; + height: auto; /* Adjust height as needed */ + object-fit: cover; +} + +.horizontal-scroll-gallery.featured-posts .thumbnail .top-info { + position: absolute; + top: 0; + left: 0; + right: 0; + background-color: rgba(0, 0, 0, 0.5); /* Single semi-transparent background for top strip */ + color: white; + display: flex; + justify-content: space-between; /* Adjusts children spacing */ + padding: 5px; + font-size: 12px; /* Adjust font size as needed */ +} + +.horizontal-scroll-gallery.featured-posts .thumbnail .post-title { + position: absolute; + bottom: 0; + left: 0; + right: 0; + background-color: rgba(0, 0, 0, 0.5); + color: white; + text-align: center; + padding: 5px 0; + font-size: 14px; +} + +.horizontal-scroll-gallery.featured-posts .thumbnail a { + display: block; + text-decoration: none; +} + + /* ---/--- + IV.B. NEWS POST IMAGE. + ---/--- */ + +.news-post-images { + + display: block; + margin-bottom: 15px; +} + +.news-post-image { + + display: inline-block; + margin-right: 10px; +} + + +.external-links-news{ + + margin-top: 1%; +} + + /* ---/--- + IV.C. ENTRY STATUS HEADER. + ---/--- */ + +.entry-status-header { + + display: flex; + align-items: center; + background-color: rgba(36, 207, 223, 0.4); + margin-left: 17.5%; + margin-right: 17.5%; + margin-bottom: 2%; + padding: 1% 1.5% 1% 1.5%; + box-shadow: 0 2px 5px rgba(0,0,0,0.1); + border-radius: 8px; + +} + +.entry-status-header.rhpz { + + background-color: rgba( 219, 127, 0, 0.4 ); + +} + +.entry-status-header.correct { + + background-color: rgba( 60, 159, 101, 0.4 ); + +} + +.entry-status-header.warning { + + background-color: rgba( 244, 255, 0, 0.4 ); + +} + +.entry-status-header.danger { + + background-color: rgba( 255, 0, 0, 0.4 ); + +} + +.entry-status-header-icon { + + flex: 1; + display: flex; + justify-content: center; + align-items: center; + font-size: 72px; + color: var( --text-color ); + +} + +.entry-status-header-text { + + flex: 3; + padding: 35px; + +} + +.entry-status-header-title { + + margin: 0; + font-weight: bold; + font-size: 1.25em; + +} + +.entry-status-header-content { + + margin: 10px 0 0 0; + color: var( --text-color ); + +} + +/* --- + V. DOWNLOAD TABLE FROM EXTERNAL SERVER + --- */ + +.responsive-table { + width: 100%; + border-collapse: collapse; + table-layout: fixed; +} + +.responsive-table th, +.responsive-table td { + border: 1px solid #ddd; + padding: 8px; + text-align: left; + overflow: hidden; + text-overflow: ellipsis; +} + +.responsive-table td:last-child, +.responsive-table th:last-child { + text-align: right; + white-space: nowrap; + width: 20%; +} + +.responsive-table td:not(:first-child):not(:last-child), +.responsive-table th:not(:first-child):not(:last-child) { + width: 20%; + text-align: right; + white-space: nowrap; +} + +@media (max-width: 768px) { + .responsive-table { + overflow-x: auto; + display: block; + } +} + +/* --- + VI. SIDEBAR + --- */ + +.sidebar-post { + + margin-top: 10px; + margin-bottom: 10px; + border-bottom: 1px solid var( --separator-line ); + display: flex; + align-items: center; + justify-content: space-between; + width: auto; +} + +.sidebar-post-content { + + display: flex; + flex-grow: 1; + margin-left: 5%; + flex-direction: column; + margin-right: 2%; + +} + +/* --- + VII. GRIDS + --- */ + + /* ---/--- + VII.A. BIG GRID & GENERAL ELEMENTS. + ---/--- */ + +.posts-biggrid { + display: grid; + grid-template-columns: repeat(5, 1fr); + gap: 10px; +} + +.posts-biggrid .article-biggrid { + background: var(--page-background-color); + border-radius: 10px; + padding: 10px; +} + +@media (max-width: 850px) { + .posts-biggrid { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 5px; + + } +} + +.posts-biggrid .article-biggrid h2.post-title a { + font-size: 19px; + text-decoration: none; + line-height: 1.3; +} +.posts-biggrid .article-biggrid .post-taxonomies { + font-size: 15px; +} +.posts-biggrid .article-biggrid .post-categories { + font-size: 0.7rem; +} +.posts-biggrid .post-taxonomies dl { + display: flex; + flex-direction: column; +} + +.posts .post-image img { + width: 100%; + height: auto; + +} + +.post { + + display: flex; + flex-direction: column; + justify-content: space-between; + margin-bottom: 30px; + min-height: 500px; +} + +.post-categories { + margin-bottom: 9px; + font-size: 0.8rem; + line-height: 120%; + font-weight: 900; + text-transform: uppercase; + letter-spacing: 1px; + color: #777; +} + +.post-categories a { text-decoration: none; } +.post-categories a:hover { text-decoration: underline; } + +.post-title { + /* font-family: 'Merriweather', Georgia, serif; */ + font-size: 1.5em; + line-height: 135%; + font-weight: 900; + letter-spacing: -0.01em; + margin: 0; + -ms-word-break: break-word; + word-break: break-word; +} + +.post-title a { + display: block; + color: var(--text-color); +} + +.post-title a:hover { + color: var(--text-color); + text-decoration: underline; +} + +.post-meta { + color: #888; + font-size: 0.9em; + font-weight: 700; + line-height: 120%; + margin: 6px 0 0 0; + +} + +.post-taxonomies { + margin-top: auto; + word-break: break-word; + overflow-wrap: break-word; + hyphens: auto; +} + +.post-taxonomies dl { + display: grid; + grid-template-columns: max-content 1fr; + column-gap: 10px; + margin: 10px 0 0; +} + +.post-taxonomies dt, .post-taxonomies dd { + margin: 0; + padding: 0px 0; +} + +.post-taxonomies dt { + grid-column: 1 / 2; +} + +.post-taxonomies dd { + grid-column: 2 / 3; + margin-left: 0; +} + + /* ---/--- + VII.B. LIST GRID. + ---/--- */ + +.posts-list { + display: flex; + flex-direction: column; + width: 100%; +} + + +.article-listed { + display: flex; + gap: 10px; + flex-wrap: wrap; + border-radius: 10px; + padding: 15px; + background: var(--page-background-color); + margin: 1% 0; +} + +.article-listed > div { + flex: 1; +} + +.article-listed > div:first-child { + flex-basis: 100%; +} + +.article-listed h2 { + font-size: 16px; +} + +.posts-list h2.post-title a { + text-decoration: none; +} + +.original-title-list { + font-size: .9em; + display: block; + color: #777; + margin-bottom: 5px; + font-style: italic; + max-width: 90%; + word-wrap: break-word; +} + + /* ---/--- + VII.C. SMALL GRID. + ---/--- */ + +.posts-smallgrid { + display: grid; + grid-template-columns: repeat(7, 1fr); + gap: 10px; +} + +@media (max-width: 850px) { + .posts-smallgrid { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 5px; + + } + .posts-smallgrid dt.hack-status, + .posts-smallgrid dt.language { + display: none; + } +} + +.posts-smallgrid .article-smallgrid h2.post-title a { + font-size: 16px; + text-decoration: none; + line-height: 1.3; +} +.posts-smallgrid .article-smallgrid .post-taxonomies { + font-size: 15px; +} +.posts-smallgrid .article-smallgrid .post-categories { + font-size: 0.7rem; +} +.posts-smallgrid .post-taxonomies dl { + display: flex; + flex-direction: column; +} + + /* ---/--- + VII.D. DRAFT GRID. + ---/--- */ + +.draft-posts-list { + list-style-type: none; + padding: 0; +} + +.draft-posts-list li { + margin-bottom: 20px; + border-bottom: 1px solid #ddd; + padding-bottom: 15px; +} + +.draft-posts-list h2 { + margin: 0 0 10px 0; + color: #333; +} + +.draft-posts-list a { + color: #0073aa; + text-decoration: none; + margin-right: 10px; +} + +.draft-posts-list a:hover { + text-decoration: underline; +} +.delete-entry a { + color:red; +} + +/* --- + VIII. ROLE TAGS + --- */ + +.role-tag { + color: #ffffff; + border: none; + margin: 9px auto 2px auto; + border-radius: 3px; + font-size: 11px; + line-height: 14px; + text-align: center; + padding: 1px 5px; + cursor: default; + align-items: center; + justify-content: center; +} + +.role-tag.Admin { + background-color: #dd3333; +} +.role-tag.Verified, .role-tag.Verifié { + background-color: #1e73be; +} +.role-tag.Member, .role-tag.Membre { + background-color: #325a15; +} +.role-tag.Mod, .role-tag.Modérateur { + background-color: #dd9933; +} +.role-tag.Read-only, .role-tag.Banni { + background-color: #a8a8a8; +} +.role-tag.Bot { + background-color: #8f53b8; +} + +/* --- + IX. USER PAGE & LISTING + --- */ + +.status-help, .blue-box { + border: 1px solid #007BFF; + background-color: #E9F5FF; + padding: 15px; + margin-bottom: 40px; + border-radius: 5px; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); +} + +.status-help strong, .blue-box strong { + display: block; + color: #0056b3; + margin-bottom: 10px; +} + +.status-help ul, .blue-box ul { + list-style-type: none; + padding-left: 0; + margin-top: 0; +} + +.status-help ul li, .blue-box ul li { + margin-bottom: 5px; + line-height: 1.5; + color: #333; +} + +.users-table { + display: table; + width: 100%; +} + +.users-table .user-row { + display: table-row; +} + +.users-table .user-avatar, +.users-table .user-website, +.users-table .user-role, +.users-table .user-name { + display: table-cell; + padding: 5px; + border-bottom: 1px solid #ddd; +} + +.users-table select { + + color: #454545; +} + +.users-table .user-avatar img { + max-width: 50px; + max-height: auto; +} + +/* --- + X. SUBMIT PAGE + --- */ + +.submit-container { + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 30px; + padding: 20px; + margin: auto; +} + +.submit-container a { + + color: #454545; + text-decoration: none; +} + +.submit-container .box { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + height: 100px; + font-size: 18px; + font-weight: bold; + border-radius: 10px; + box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); + text-decoration: none; + color: #333; + transition: transform 0.3s, box-shadow 0.3s; + cursor: pointer; + overflow: hidden; +} + +.submit-container.box.translation { background-color: #e7f4d9; } +.submit-container.box.romhack { background-color: #d5e1fc; } +.submit-container.box.homebrew { background-color: #ffeaf0; } +.submit-container.box.utility { background-color: #fff8d5; } +.submit-container.box.document { background-color: #f3eaff; } +.submit-container.box.news { background-color: #f0f0f0; } +.submit-container.box.lua-script { background-color: #eed6c5; } +.submit-container.box.tutorial { background-color: #d1c9ba; } + +.submit-container.box:hover { + transform: translateY(-5px); + box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15); +} + +.submit-container.box:hover::after { + content: ""; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(255, 255, 255, 0.3); + z-index: 1; + transition: background-color 0.3s; +} + +@media screen and ( max-width: 800px ) { + + .submit-container { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 15px; + padding: 20px; + margin: auto; + } + +} + +/* --- + XI. FOOTER + --- */ + +.footer-menu { + color: var(--text-color); + padding: 20px; + display: flex; + flex-wrap: wrap; + justify-content: space-around; +} + +.footer-column { + flex: 1; + min-width: 200px; + margin: 10px; +} + +.footer-column h4 { + font-size: 1.2em; + margin-bottom: 10px; + padding-bottom: 10px; + color: #fff; + border-bottom: 2px solid #fff; +} + +.footer-column ul { + list-style: none; + padding: 0; +} + +.footer-column ul li a { + color: #fff; + text-decoration: none; + transition: color 0.3s ease; +} + +.footer-column ul li a:hover { + color: #ddd; +} + +/* --- + XII. CONTACT FORM + --- */ + +.contact-form form { + background-color: var(--background-accent); + color: var(--text-color); + margin: 0 auto; + padding: 20px; + border-radius: 8px; + box-shadow: 0 2px 4px rgb(0 0 0 / 53%); +} + +.contact-form label { + display: block; + margin-bottom: 5px; + font-weight: bold; + color: var(--text-color); +} + +.contact-form input[type="text"], +.contact-form input[type="email"], +.contact-form select#subject, +.contact-form textarea { + width: 100%; + padding: 8px; + margin-bottom: 20px; + border: 1px solid #ccc; + border-radius: 4px; + color: #454545; +} + +.contact-form textarea { + height: 300px; + resize: vertical; +} + +.contact-form input[type="submit"] { + color: white; + padding: 10px 15px; + border: none; + border-radius: 4px; + cursor: pointer; + transition: background-color 0.3s; +} + +.contact-form input[type="submit"]:hover { + background-color: #0cb4ea; +} + +.contact-form .g-recaptcha { + margin-bottom: 20px; +} + +.contact-form .message { + padding: 10px; + margin-bottom: 20px; + text-align: center; +} + +.contact-form .success { + background-color: #d4edda; + color: #155724; + border: 1px solid #c3e6cb; +} + +.contact-form .error { + background-color: #f8d7da; + color: #721c24; + border: 1px solid #f5c6cb; +} + +/* --- + XIII. INPUT. + --- */ + +input[type="text"]:focus, +input[type="tel"]:focus, +input[type="email"]:focus, +input[type="url"]:focus, +input[type="password"]:focus, +input[type="search"]:focus, +textarea:focus { + border: 1px solid; + border-color: var(--medium-border-color); + color: #454545; +} + +custom-select { + display: block; + width: 100%; + height: 28px; + outline-color: #444; + background-color: var( --field-background); + color: var( --text-color); + border: 0; + border-radius: 5px; + padding: 5px; +} + +.form-field-basic{ + + background-color:var(--post-excerpt) !important; + color:var(--text-color) !important; + width:100%; + margin-bottom:2%; + border-radius:10px; +} + +/* --- + XIV. FACET WP. + --- */ + + /* ---/--- + XIV.A. PAGINATION. + ---/--- */ + +.facetwp-facet-pagination { + margin-top: 20px; + text-align: center; +} + +.facetwp-pager a:not(.dots) { + margin: 0 5px; + padding: 5px 10px; + border: 1px solid #ddd; + display: inline-block; +} + +.facetwp-pager .facetwp-page { + color: #fff +} + +.facetwp-page:not(.active):not(.dots):hover { + + background-color: var(--button-color); + color: var(--button-text-color); +} + +.facetwp-page:not(.active):not(.dots) { + + background-color: var(--button-hover-color); +} + +.facetwp-page.active { + + background-color: var( --link-color); +} + + /* ---/--- + XIV.B. FILTERS. + ---/--- */ + +.facet-all { + display: flex; + flex-wrap: wrap; + gap: 10px; + margin: 20px 0; + padding: 0; +} + +.facet-wrap { + flex: 1 1 auto; + width: 200px; + box-sizing: border-box; +} + +.facet-label { + display: block; + font-weight: bold; + margin-bottom: 5px; +} + +.facetwp-facet select { + width: 100%; + max-width: 200px; + overflow: hidden; + text-overflow: ellipsis; + background-color: #f0f0f0; + border: 1px solid #ccc; + border-radius: 4px; + padding: 8px 12px; + font-size: 16px; + color: #333; +} + +.facetwp-facet input, #custom-search { + width: 100%; + max-width: 200px; + overflow: hidden; + text-overflow: ellipsis; + background-color: #f0f0f0; + border: 1px solid #ccc; + border-radius: 4px; + font-size: 16px; + color: #333; +} + +.facetwp-dropdown select { + width: 100%; +} + +.fs-label-wrap { + + width: 100%; + max-width: 200px; + overflow: hidden; + text-overflow: ellipsis; + background-color: #f0f0f0 !important; + border: 1px solid #ccc !important; + border-radius: 4px; + padding: 4px 4px; + font-size: 16px; + color: #333; +} + +.fs-option-label { + + color: #333 !important; +} + +/* --- + XV. STICKY ENTRIES. + --- */ + +.sticky-entries-container { + + padding: 3% 1.5% !important; +} + +.sticky-entries { + + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 5px; + align-content: center; +} + + + +.sticky-entry { + + padding: 20% 20%; + background-position: center; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + +} + +.sticky-entry a { + + color: var( --sticky-text); + text-align: center; + font-weight: 700; + font-size: 18px; +} + +.sticky-entry a:hover { + + text-decoration: underline; +} + +@media screen and ( max-width: 600px ) { + + .sticky-entries { + + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 5px; + align-content: center; + } +} + +/* --- + XV. ANNOUNCEMENTS + --- */ + +.home-announce { + + border-radius: 5px; + padding: 1% 4% 2% 4%; + color: #000; + margin-bottom: 1%; +} + +.news { + + background-color: #d68078; + +} + +.youtube { + + background-color: #d6c878; +} + +.info { + + background-color: #a9d4ec; +} + + +.home-announce h4 { + + font-size: 24px; + text-decoration: underline; +} + +/* --- + XVII. WIDGETS + --- */ + +.widget_hide_show_button { + + background-color: var( --widget-background-color ); + border-radius: 3px; + font-size: 14px; + padding: 5px; + +} + +.widget_hide_show_button:hover { + + background-color: var( --grid-background ); + cursor: pointer; + +} + +.site_stats_table { + + border-collapse: collapse; + text-align: center; + font-size: 14px; + width: 100%; + table-layout: fixed; + +} + +.site_stats_table td { + + justify-content: center; + border: 1px solid var( --separator-line); + padding: 10px; + +} + +.site_stats_table td i { + display: inline-block; + vertical-align: middle; + line-height: 1; +} + +.site_stats_table td > * { + + display: block; + text-align: center; + max-width: 100px; + max-height: 100px; +} + +.site_stats_table tr:first-child td { + border-top: none; +} + +.site_stats_table tr:last-child td { + border-bottom: none; +} + +.site_stats_table td:first-child { + border-left: none; +} + +.site_stats_table td:last-child { + border-right: none; +} + +.site_stats_table .icon { + color: var( --text-color ); + font-size: 36px; +} + +.site_stats_table .title { + font-weight: 900; + font-size: 16px; +} + +/* --- + XVIII. QUICK TOOLS + --- */ + +.single-quick-tools { + + padding: 5px 0; + display: flex; + flex-wrap: wrap; + justify-content: flex-end; + gap: 5px; + text-decoration: none !important; + +} + +.single-quick-tools.left-side { + + justify-content: flex-start; + +} + +.single-quick-tools a { + + text-decoration: none; + color: var( --text-color ) !important; +} + +.single-quick-tools-button { + + background-color: var( --widget-background-color ); + border-radius: 3px; + font-size: 14px; + padding: 5px; + width: 32px; + text-align: center; + +} + +.single-quick-tools-button.correct { + + background-color: rgba( 60, 159, 101, 0.4 ); + +} + +.single-quick-tools-button.warning { + + background-color: rgba( 244, 255, 0, 0.4 ); + color: #454545; + +} + +.single-quick-tools-button.danger { + + background-color: rgba( 255, 0, 0, 0.4 ); + +} + +.single-quick-tools-button.rhpz { + + background-color: rgba( 219, 127, 0, 0.4 ); + +} + +.single-quick-tools-button:hover, .single-quick-tools-button.danger:hover { + + background-color: var( --grid-background ); + cursor: pointer; + color: var( --text-color ); + +} + +/* --- + XIX. HOVER TITLE. + --- */ + +.hv_title { + position: relative; + cursor: help; +} + +.hv_title::after { + content: attr(data-hv-title); + position: absolute; + bottom: 125%; + left: 50%; + transform: translateX(-50%); + background-color: var( --separator-line-rgba ); + color: var( --text-color); + padding: 5px 8px; + border-radius: 4px; + font-size: 0.7rem; + opacity: 0; + pointer-events: none; + transition: opacity 0.2s; + white-space: nowrap; + text-transform: none !important; + font-variant-caps: normal !important; +} + +.hv_title:hover::after { + opacity: 1; +} + +/* --- + XX. REVIEWS + --- */ + +.reviews_container { + + max-width: inherit; + margin: 0px 20px 20px 20px; + padding: 20px; + border-radius: 10px; + background-color: var( --reviews-background ); + color: var( --reviews-text ); + font-style: normal; + +} + +.reviews_title { + + padding-top: 8px; + padding-bottom: 16px; + +} + +.reviews_float_right, .float_right { + + float: right; + +} + +.reviews_float_left, .float_left { + + float: left; + +} + +.reviews_bottom_bar, .bottom_bar { + + border-bottom: 1px solid var( --separator-line ); + +} + +.reviews_post_box { + + background-color: var( --page-background-color ); + padding: 10px; + margin-top: 15px; + border-radius: 10px; + overflow: auto; + +} + +.reviews_post_title { + + color: var( --text-color ); + font-size: 1.4em; + font-weight: 700; + margin-bottom: 0; + letter-spacing: -0.01em; + word-break: break-word; + display: block; + text-align: center; + +} + +.reviews_post_details { + + font-size: 0.7em; + font-weight: 900; + text-transform: uppercase; + letter-spacing: 1px; + color: #777; + display: block; + text-align: center; + margin-bottom: 5px; + margin-top: 3px; + +} + +.reviews_post_parent_details { + + display: flex; + align-items: center; + +} + +.reviews_parent_title { + + font-size: 0.7em; + font-weight: 900; + text-transform: uppercase; + letter-spacing: 1px; + color: #777; + display: inline-block; + margin-left: 5px; + text-align: left; + text-decoration: underline; + +} + +.reviews_rating { + + color: yellow; + display: block; + font-size: 22px; + text-align: center; + margin-bottom: 20px; + +} + +.reviews_actions { + + display: block; + float: right; + +} + +.reviews_form_label { + + margin-top: 15px; + margin-bottom: 15px; + display: block; + +} + +.reviews_switch { + display: inline-block; + border-radius: var( --switch-border-radius ); + padding: 20px; + color: var( --separator-line ); + margin-right: 6px; +} + +.active_switch { + + background-color: var( --tab-background-active ); + text-decoration: underline; + +} + +.inactive_switch { + background-color: var( --tab-background-inactive ); +} +.inactive_switch:hover { + text-decoration: underline; + cursor: pointer; +} + +#review-post-text { + color: var( --text-color ); + text-indent: 0.5cm; +} + +#comments-reviews-switch { + display: block; + margin: 40px 6px 0 40px; +} + +#review-write-title { + width: 100%; +} + +#review-write-parent, #review-write-title:focus { + color: #454545; +} + +#review-write-submit { + + display: block; + margin-top: 15px; + margin-bottom: 15px; + background-color: #3498DB; + font-size: 16px; + color: #fff !important; + border: none; + padding: 10px 20px; + border-radius: 5px; + cursor: pointer; + transition: background-color 0.2s; + text-decoration: none; + +} + +#review-write-submit:hover { + background-color: #2980B9; +} \ No newline at end of file diff --git a/treville.css b/treville.css new file mode 100755 index 0000000..64cfd6f --- /dev/null +++ b/treville.css @@ -0,0 +1,4426 @@ +@charset "UTF-8"; + +/* +Theme Name: Treville +Theme URI: https://themezee.com/themes/treville/ +Author: ThemeZee +Author URI: https://themezee.com +Description: An elegant Blogging & Magazine WordPress Theme with subtle colors and great typography. Treville supports two navigation menus, advanced post settings and a post slider with fullscreen images! +Version: 2.2.0 +Requires at least: 5.2 +Tested up to: 6.7 +Requires PHP: 5.6 +AMP: true +License: GNU General Public License v2 or later +License URI: http://www.gnu.org/licenses/gpl-2.0.html +Text Domain: treville +Tags: two-columns, blog, news, custom-background, custom-header, custom-logo, custom-menu, grid-layout, entertainment, editor-style, block-styles, rtl-language-support, featured-image-header, featured-images, flexible-header, custom-colors, full-width-template, sticky-post, threaded-comments, translation-ready, theme-options, one-column, left-sidebar, right-sidebar, three-columns + +This theme, like WordPress, is licensed under the GPL. +Use it to make something cool, have fun, and share what you've learned with others. + +Treville is based on Underscores http://underscores.me/, (C) 2012-2015 Automattic, Inc. + +Normalizing styles have been helped along thanks to the fine work of +Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normalize.css/ +*/ + +/*-------------------------------------------------------------- +>>> TABLE OF CONTENTS: +---------------------------------------------------------------- +# - CSS Variables +# - Normalize +# - Typography +# - Elements +# - Forms +# - Accessibility +# - Alignments +# - Clearings +# - Site Layout +# - Header +# - Navigation +# - Social Icons Menu +# - Posts and pages +# - Archives and Blog Layouts +# - Blocks +# - Featured Posts +# - Widgets +# - Magazine Widgets +# - Comments +# - Media +# - Footer +# - Plugins +# - Media Queries for Typography +# - Media Queries for Layout +# - Media Queries for Navigation +# - Media Queries for Featured Posts +# - Media Queries for Media +# - Theme Options +--------------------------------------------------------------*/ + +/*-------------------------------------------------------------- +# - CSS Variables +--------------------------------------------------------------*/ +:root { + --primary-color: #1177aa; + --secondary-color: #005e91; + --tertiary-color: #004477; + --accent-color: #11aa44; + --highlight-color: #aa1d11; + --light-gray-color: #e5e5e5; + --gray-color: #999; + --dark-gray-color: #454545; + --text-color: #454545; + --medium-text-color: #666; + --light-text-color: #999; + --dark-border-color: #454545; + --medium-border-color: rgba(0, 0, 0, 0.3); + --light-border-color: rgba(0, 0, 0, 0.15); + --link-color: #1177aa; + --link-hover-color: #454545; + --button-color: #1177aa; + --button-text-color: #fff; + --button-hover-color: #454545; + --button-hover-text-color: #fff; + --header-background-color: #454545; + --header-text-color: #fff; + --site-title-color: #fff; + --site-title-hover-color: rgba(255, 255, 255, 0.5); + --top-navi-color: #fff; + --top-navi-hover-color: rgba(255, 255, 255, 0.5); + --top-navi-border-color: rgba(255, 255, 255, 0.1); + --navi-background-color: #fff; + --navi-color: #454545; + --navi-hover-color: rgba(0, 0, 0, 0.5); + --navi-border-color: rgba(0, 0, 0, 0.2); + --page-background-color: #fff; + --page-border-color: rgba(0, 0, 0, 0.2); + --content-border-color: #1177aa; + --title-color: #1177aa; + --title-hover-color: #454545; + --widget-background-color: #fff; + --widget-border-color: rgba(0, 0, 0, 0.2); + --widget-title-color: #454545; + --footer-background-color: #454545; + --footer-text-color: #ddd; + --footer-link-color: #fff; + --footer-link-hover-color: rgba(255, 255, 255, 0.5); + --text-font: "Gudea", arial, helvetica, sans-serif; + --title-font: "Magra", arial, helvetica, sans-serif; + --navi-font: "Magra", arial, helvetica, sans-serif; + --widget-title-font: "Magra", arial, helvetica, sans-serif; + --title-font-weight: normal; + --navi-font-weight: normal; + --widget-title-font-weight: normal; + --title-text-transform: none; + --navi-text-transform: uppercase; + --widget-title-text-transform: uppercase; + --text-line-height: 1.75; + --title-line-height: 1.4; +} + +/*-------------------------------------------------------------- +# - Normalize +--------------------------------------------------------------*/ +html { + font-family: sans-serif; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} + +body { + margin: 0; +} + +article, +aside, +details, +figcaption, +figure, +footer, +header, +main, +menu, +nav, +section, +summary { + display: block; +} + +audio, +canvas, +progress, +video { + display: inline-block; + vertical-align: baseline; +} + +audio:not([controls]) { + display: none; + height: 0; +} + +[hidden], +template { + display: none; +} + +a { + background-color: transparent; +} + +a:active, +a:hover { + outline: 0; +} + +abbr[title] { + border-bottom: 1px dotted; +} + +b, +strong { + font-weight: 700; +} + +dfn { + font-style: italic; +} + +mark { + background: #ff0; + color: #000; +} + +small { + font-size: 80%; +} + +sub, +sup { + position: relative; + vertical-align: baseline; + font-size: 75%; + line-height: 0; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +img { + border: 0; +} + +svg:not(:root) { + overflow: hidden; +} + +figure { + margin: 1em 0; +} + +hr { + box-sizing: content-box; + height: 0; +} + +code, +kbd, +pre, +samp { + font-size: 1em; + font-family: monospace; +} + +button, +input, +optgroup, +select, +textarea { + margin: 0; + color: inherit; + font: inherit; +} + +button { + overflow: visible; +} + +button, +select { + text-transform: none; +} + +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + cursor: pointer; + -webkit-appearance: button; + appearance: button; +} + +button[disabled], +html input[disabled] { + cursor: default; +} + +button::-moz-focus-inner, +input::-moz-focus-inner { + padding: 0; + border: 0; +} + +input { + line-height: normal; +} + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; + padding: 0; +} + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +input[type="search"] { + box-sizing: content-box; + -webkit-appearance: textfield; + appearance: textfield; +} + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +fieldset { + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; + border: 1px solid #c0c0c0; +} + +legend { + padding: 0; + border: 0; +} + +textarea { + overflow: auto; +} + +optgroup { + font-weight: 700; +} + +table { + border-spacing: 0; + border-collapse: collapse; +} + +td, +th { + padding: 0; +} + +/*-------------------------------------------------------------- +# - Typography +--------------------------------------------------------------*/ +body, +button, +input, +select, +textarea { + color: #454545; + color: var(--text-color); + font-size: 17px; + font-size: 1.0625rem; + font-family: Gudea, arial, helvetica, sans-serif; + font-family: var(--text-font); + line-height: 1.75; + line-height: var(--text-line-height); +} + +h1, +h2, +h3, +h4, +h5, +h6 { + clear: both; + margin-top: 0.75em; + margin-bottom: 0.75em; + line-height: 1.4; + line-height: var(--title-line-height); +} + +h1 { + font-size: 36px; + font-size: 2.25rem; +} + +h2 { + font-size: 28px; + font-size: 1.75rem; +} + +h3 { + font-size: 24px; + font-size: 1.5rem; +} + +h4 { + font-size: 22px; + font-size: 1.375rem; +} + +h5 { + font-size: 20px; + font-size: 1.25rem; +} + +h6 { + font-size: 19px; + font-size: 1.1875rem; +} + +p { + margin-top: 1.5em; + margin-bottom: 1.5em; +} + +dfn, +cite, +em, +i { + font-style: italic; +} + +address { + margin: 0 0 1.5em; +} + +pre { + overflow: auto; + margin-top: 1.5em; + margin-bottom: 1.5em; + padding: 1.5em; + max-width: 100%; + border: 1px solid #e5e5e5; + background: #f5f5f5; + font-size: 15px; + font-size: 0.9375rem; + font-family: "Courier 10 Pitch", Courier, monospace; + line-height: 1.6; +} + +code, +kbd, +tt, +var { + font-size: 15px; + font-size: 0.9375rem; + font-family: Monaco, Consolas, "Andale Mono", "DejaVu Sans Mono", monospace; +} + +abbr, +acronym { + border-bottom: 1px dotted #666; + cursor: help; +} + +mark, +ins { + text-decoration: none; +} + +big { + font-size: 125%; +} + +/*-------------------------------------------------------------- +# - Elements +--------------------------------------------------------------*/ +html { + box-sizing: border-box; +} + +/* Inherit box-sizing to make it easier to change the property for components that leverage other behavior; see http://css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice/ */ +*, +*::before, +*::after { + box-sizing: inherit; +} + +body { + background: #ddd; /* Fallback for when there is no custom background color defined. */ +} + +blockquote { + margin: 1.5em 0; + padding: 0 1.25em 0.25em; + border-left: 4px solid; + border-color: #1177aa; + border-color: var(--link-color); + color: #666; + color: var(--medium-text-color); + font-style: normal; + font-size: 18px; + font-size: 1.125rem; +} + +blockquote cite, +blockquote small { + display: block; + margin-top: 1em; + color: #454545; + color: var(--text-color); + font-size: 16px; + font-size: 1rem; + line-height: 1.75; +} + +blockquote cite::before, +blockquote small::before { + content: "— "; +} + +blockquote em, +blockquote i, +blockquote cite { + font-style: normal; +} + +blockquote > :last-child { + margin-bottom: 0.5em; +} + +hr { + margin-top: 1.5em; + margin-bottom: 1.5em; + height: 1px; + border: 0; + background-color: rgba(0, 0, 0, 0.15); + background-color: var(--light-border-color); +} + +ul, +ol { + margin: 1.5em 0; + padding: 0 0 0 1.25em; +} + +ul { + list-style: disc; +} + +ol { + list-style: decimal; +} + +li > ul, +li > ol { + margin-bottom: 0; + margin-left: 1.5em; +} + +dt { + font-weight: 700; +} + +dd { + margin: 0 0 1.5em; +} + +img { + max-width: 100%; /* Adhere to container width. */ + height: auto; /* Make sure images are scaled correctly. */ +} + +table { + margin-top: 1.5em; + margin-bottom: 1.5em; + width: 100%; + border: none; + table-layout: auto; +} + +th, +td { + padding: 0.3em 0.6em; + border: 1px solid; + border-color: rgba(0, 0, 0, 0.15); + border-color: var(--light-border-color); +} + +th { + font-weight: 400; + text-align: initial; + background: rgba(0, 0, 0, 0.05); +} + +tfoot td { + background: rgba(0, 0, 0, 0.05); +} + +a { + color: #1177aa; + color: var(--link-color); + text-decoration: none; +} + +a:link, +a:visited { + color: #1177aa; + color: var(--link-color); +} + +a:hover, +a:focus, +a:active { + color: #454545; + color: var(--link-hover-color); +} + +a:focus { + outline: thin dotted; +} + +a:hover, +a:active { + outline: 0; +} + +/*-------------------------------------------------------------- +# - Forms +--------------------------------------------------------------*/ +button, +input[type="button"], +input[type="reset"], +input[type="submit"] { + margin: 0; + padding: 0.6em 1em; + border: none; + background-color: #1177aa; + background-color: var(--button-color); + color: #fff; + color: var(--button-text-color); + text-decoration: none; + font-size: 17px; + font-size: 1.0625rem; + -webkit-transition: all 0.2s ease; + transition: all 0.2s ease; +} + +button:hover, +input[type="button"]:hover, +input[type="reset"]:hover, +input[type="submit"]:hover, +button:focus, +input[type="button"]:focus, +input[type="reset"]:focus, +input[type="submit"]:focus, +button:active, +input[type="button"]:active, +input[type="reset"]:active, +input[type="submit"]:active { + background-color: #454545; + background-color: var(--button-hover-color); + color: #fff; + color: var(--button-hover-text-color); +} + +input[type="text"], +input[type="tel"], +input[type="email"], +input[type="url"], +input[type="password"], +input[type="search"], +textarea { + padding: 0.3em 0.6em; + max-width: 100%; + border: 1px solid; + border-color: rgba(0, 0, 0, 0.15); + border-color: var(--light-border-color); + color: #666; + color: var(--medium-text-color); +} + +input[type="text"]:focus, +input[type="tel"]:focus, +input[type="email"]:focus, +input[type="url"]:focus, +input[type="password"]:focus, +input[type="search"]:focus, +textarea:focus { + border: 1px solid; + border-color: rgba(0, 0, 0, 0.3); + border-color: var(--medium-border-color); + color: #454545; + color: var(--text-color); +} + +textarea { + width: 100%; +} + +/* Search Form */ +.search-form { + display: flex; + margin: 0; + padding: 0; +} + +.search-form label { + flex-grow: 1; +} + +.search-form .search-field { + display: inline-block; + box-sizing: border-box; + margin: 0; + padding: 0.8rem; + min-width: 100px; + width: 100%; + -webkit-appearance: none; + line-height: 1; +} + +.search-form .search-submit { + display: flex; + margin-left: -1px; + padding: 0.8rem 1rem; + align-items: center; +} + +.search-form .search-submit .icon-search { + width: 20px; + height: 20px; + fill: currentcolor; +} + +/*-------------------------------------------------------------- +# - Accessibility +--------------------------------------------------------------*/ + +/* Text meant only for screen readers. */ +.screen-reader-text { + position: absolute !important; + overflow: hidden; + clip: rect(1px, 1px, 1px, 1px); + width: 1px; + height: 1px; +} + +.screen-reader-text:hover, +.screen-reader-text:active, +.screen-reader-text:focus { + top: 5px; + left: 5px; + z-index: 100000; /* Above WP toolbar. */ + display: block; + clip: auto !important; + padding: 15px 23px 14px; + width: auto; + height: auto; + border-radius: 3px; + background-color: #f1f1f1; + box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6); + color: #21759b; + text-decoration: none; + font-weight: 700; + font-size: 14px; + font-size: 0.875rem; + line-height: normal; +} + +/*-------------------------------------------------------------- +# - Alignments +--------------------------------------------------------------*/ +.alignleft { + float: left; + margin-right: 1.5em; +} + +.alignright { + float: right; + margin-left: 1.5em; +} + +.aligncenter { + display: block; + clear: both; + margin-right: auto; + margin-left: auto; + text-align: center; +} + +/*-------------------------------------------------------------- +# - Clearings +--------------------------------------------------------------*/ +.clearfix::before, +.clearfix::after, +.post-navigation .nav-links::before, +.post-navigation .nav-links::after, +.comment-navigation::before, +.comment-navigation::after { + display: table; + content: ""; +} + +.clearfix::after, +.post-navigation .nav-links::after, +.comment-navigation::after { + clear: both; +} + +/*-------------------------------------------------------------- +# - Site Layout +--------------------------------------------------------------*/ +.site { + margin: 0; + width: 100%; +} + +.container { + margin: 0 auto; + padding: 0 2em; + max-width: 1180px; + width: 100%; +} + +.site-content { + padding-top: 2em; +} + +.content-area { + float: left; + box-sizing: border-box; + padding-right: 2rem; + width: 70%; +} + +.sidebar { + float: right; + width: 30%; +} + +/* No Sidebar & Centered Layout Template */ +.no-sidebar .content-area, +.site-content .centered-content-area { + float: none; + margin: 0 auto; + padding: 0; + max-width: 880px; + width: 100%; +} + +/* Fullwidth Template */ +.site-content .fullwidth-content-area { + float: none; + margin: 0; + padding: 0; + width: 100%; + max-width: 100%; +} + +/*-------------------------------------------------------------- +# - Header +--------------------------------------------------------------*/ +.site-header { + background-color: #454545; + background-color: var(--header-background-color); + color: #fff; + color: var(--header-text-color); +} + +.header-main { + display: flex; + flex-wrap: wrap; + align-items: center; +} + +.site-branding { + display: flex; + margin: 1em 1em 1em 0.5em; + padding: 0; + max-width: 100%; + align-items: center; +} + +.site-branding a:link, +.site-branding a:visited, +.site-branding a:hover { + padding: 0; + border: none; + text-decoration: none; +} + +.site-title { + display: inline-block; + margin: 0; + padding: 0; + color: #fff; + color: var(--site-title-color); + text-decoration: none; + font-size: 32px; + font-size: 2rem; + font-family: Magra, arial, helvetica, sans-serif; + font-family: var(--title-font); + font-weight: 400; + font-weight: var(--title-font-weight); + text-transform: none; + text-transform: var(--title-text-transform); + line-height: 1.75; + line-height: var(--text-line-height); +} + +.site-title a:link, +.site-title a:visited { + color: #fff; + color: var(--site-title-color); + -webkit-transition: all 0.2s ease; + transition: all 0.2s ease; +} + +.site-title a:hover, +.site-title a:active { + color: rgba(255, 255, 255, 0.5); + color: var(--site-title-hover-color); +} + +.site-branding .custom-logo-link { + margin-right: 1em; +} + +.site-branding .custom-logo { + margin: 0.25em 0; + padding: 0; + max-width: 100%; + height: auto; + border: none; + vertical-align: top; +} + +.site-description { + margin: 0.25rem 0 0 1.2rem; + padding: 0 0 0 1.2rem; + border-left: 1px solid rgba(255, 255, 255, 0.2); + font-size: 13px; + font-size: 0.8125rem; +} + +/* Custom Header Image */ +.header-image { + text-align: center; +} + +.header-image img { + max-width: 2500px; + width: 100%; + height: auto; + vertical-align: top; +} + +/*-------------------------------------------------------------- +# - Main Navigation +--------------------------------------------------------------*/ + +/* Mobile Navigation Toggle */ +.mobile-menu-toggle { + display: flex; + margin: 0; + margin-left: auto; + padding: 1em; + border: none; + background: none; + color: #fff; + color: var(--top-navi-color); + text-decoration: none; + font-size: 17px; + font-size: 1.0625rem; + text-align: left; + transition: all 0.2s ease; + align-items: center; +} + +.mobile-menu-toggle:focus { + outline: thin dotted; + color: #fff; + color: var(--top-navi-color); + background: none; +} + +.mobile-menu-toggle:hover, +.mobile-menu-toggle:active { + color: rgba(255, 255, 255, 0.5); + color: var(--top-navi-hover-color); + background: none; + cursor: pointer; +} + +.mobile-menu-toggle .icon { + margin: 0; + width: 28px; + height: 28px; + vertical-align: top; + fill: #fff; + fill: var(--top-navi-color); + transition: fill 0.2s ease; +} + +.mobile-menu-toggle:hover .icon, +.mobile-menu-toggle:active .icon { + fill: rgba(255, 255, 255, 0.5); + fill: var(--top-navi-hover-color); +} + +.mobile-menu-toggle[aria-expanded="true"] .icon-menu, +.mobile-menu-toggle[aria-expanded="false"] .icon-close { + display: none; +} + +.mobile-menu-toggle[aria-expanded="true"] .icon-close { + display: inline-block; +} + +/* Primary Navigation */ +.primary-navigation-wrap { + background-color: #fff; + background-color: var(--navi-background-color); +} + +.primary-navigation { + position: relative; + width: 100%; +} + +.main-navigation ul { + margin: 0; + padding: 0; + color: #454545; + color: var(--navi-color); + list-style: none; + font-size: 15px; + font-size: 0.9375rem; + font-family: Magra, arial, helvetica, sans-serif; + font-family: var(--navi-font); + font-weight: 400; + font-weight: var(--navi-font-weight); + text-transform: uppercase; + text-transform: var(--navi-text-transform); +} + +/* Hide the menu on small screens when JavaScript is available. */ +.main-navigation ul, +.main-navigation .menu-item-has-children > a > .icon, +.main-navigation ul a > .icon { + display: none; +} + +.primary-navigation-wrap.toggled-on { + border-bottom: 1px solid; + border-color: rgba(0, 0, 0, 0.2); + border-color: var(--navi-border-color); +} + +.primary-navigation-wrap.toggled-on .main-navigation > ul.menu { + display: block; +} + +/* Menu Items Styling */ +.main-navigation ul li { + position: relative; + margin: 0; +} + +.main-navigation ul a { + display: block; + margin: 0; + padding: 1.2em; + border-top: 1px solid; + border-color: rgba(0, 0, 0, 0.2); + border-color: var(--navi-border-color); + text-decoration: none; +} + +.main-navigation > ul > li:first-child > a { + border-top: none; +} + +.main-navigation ul a, +.main-navigation ul a:link, +.main-navigation ul a:visited { + color: #454545; + color: var(--navi-color); + text-decoration: none; + transition: all 0.2s ease; +} + +.main-navigation ul a:hover, +.main-navigation ul a:active, +.main-navigation ul a:focus { + color: rgba(0, 0, 0, 0.5); + color: var(--navi-hover-color); +} + +.main-navigation ul li.current-menu-item > a { + text-decoration: underline; +} + +/* Submenus */ +.main-navigation ul ul { + font-size: 13px; + font-size: 0.8125rem; +} + +.is-amp-page .main-navigation ul button.toggled-on + ul, +.main-navigation ul ul.toggled-on { + display: block; +} + +.main-navigation ul ul a { + padding-left: 3em; +} + +.main-navigation ul ul ul a { + padding-left: 4.5em; +} + +.main-navigation ul ul ul ul a { + padding-left: 6em; +} + +/* Submenu Dropdown Toggles */ +.main-navigation .dropdown-toggle { + position: absolute; + display: block; + top: 0; + right: 0; + padding: 1em 1.2em; + background: none; + border: none; +} + +.main-navigation .dropdown-toggle:focus { + outline: thin dotted; + color: #454545; + color: var(--navi-color); + background: none; +} + +.main-navigation .dropdown-toggle:hover, +.main-navigation .dropdown-toggle:active { + background: none; +} + +.main-navigation .dropdown-toggle .icon { + margin: 0.2em 0 0; + width: 24px; + height: 24px; + vertical-align: top; + fill: #454545; + fill: var(--navi-color); + transition: fill 0.2s ease; +} + +.main-navigation .dropdown-toggle:hover .icon, +.main-navigation .dropdown-toggle:active .icon, +.main-navigation .dropdown-toggle:focus .icon { + fill: rgba(0, 0, 0, 0.5); + fill: var(--navi-hover-color); +} + +.main-navigation .dropdown-toggle.toggled-on .icon { + -ms-transform: rotate(-180deg); /* IE 9 */ + -webkit-transform: rotate(-180deg); /* Chrome, Safari, Opera */ + transform: rotate(-180deg); +} + +.main-navigation ul ul .dropdown-toggle { + padding: 0.75em 1em; +} + +.main-navigation ul ul .dropdown-toggle .icon { + width: 20px; + height: 20px; +} + +/*-------------------------------------------------------------- +# - Top Navigation +--------------------------------------------------------------*/ +.secondary-navigation { + position: relative; + width: 100%; +} + +.secondary-navigation.toggled-on { + border-top: 4px solid; + border-color: rgba(255, 255, 255, 0.1); + border-color: var(--top-navi-border-color); +} + +.top-navigation ul { + margin: 0; + padding: 0; + color: #fff; + color: var(--top-navi-color); + list-style: none; + font-size: 15px; + font-size: 0.9375rem; +} + +/* Hide the menu on small screens when JavaScript is available. */ +.top-navigation ul, +.top-navigation .menu-item-has-children > a > .icon, +.top-navigation ul a > .icon { + display: none; +} + +.secondary-navigation.toggled-on .top-navigation > ul.menu { + display: block; +} + +/* Menu Items Styling */ +.top-navigation ul li { + position: relative; + margin: 0; +} + +.top-navigation ul a { + display: block; + margin: 0; + padding: 1em 1.2em; + border-bottom: 1px solid; + border-color: rgba(255, 255, 255, 0.1); + border-color: var(--top-navi-border-color); + text-decoration: none; +} + +.top-navigation ul a, +.top-navigation ul a:link, +.top-navigation ul a:visited { + color: #fff; + color: var(--top-navi-color); + text-decoration: none; + transition: all 0.2s ease; +} + +.top-navigation ul a:hover, +.top-navigation ul a:active, +.top-navigation ul a:focus { + color: rgba(255, 255, 255, 0.5); + color: var(--top-navi-hover-color); +} + +.top-navigation ul li.current-menu-item > a { + text-decoration: underline; +} + +/* Submenus */ +.top-navigation ul ul { + font-size: 14px; + font-size: 0.875rem; +} + +.is-amp-page .top-navigation ul button.toggled-on + ul, +.top-navigation ul ul.toggled-on { + display: block; +} + +.top-navigation ul ul a { + padding-left: 2.5em; +} + +.top-navigation ul ul ul a { + padding-left: 4em; +} + +.top-navigation ul ul ul ul a { + padding-left: 5.5em; +} + +/* Submenu Dropdown Toggles */ +.top-navigation .dropdown-toggle { + position: absolute; + display: block; + top: 0; + right: 0; + padding: 0.8em 1.2em; + background: none; + border: none; +} + +.top-navigation .dropdown-toggle:focus { + outline: thin dotted; + color: #fff; + color: var(--top-navi-color); + background: none; +} + +.top-navigation .dropdown-toggle:hover, +.top-navigation .dropdown-toggle:active { + background: none; +} + +.top-navigation .dropdown-toggle .icon { + margin: 0.25em 0 0; + width: 22px; + height: 22px; + vertical-align: top; + fill: #fff; + fill: var(--top-navi-color); + transition: fill 0.2s ease; +} + +.top-navigation .dropdown-toggle:hover .icon, +.top-navigation .dropdown-toggle:active .icon, +.top-navigation .dropdown-toggle:focus .icon { + fill: rgba(255, 255, 255, 0.5); + fill: var(--top-navi-hover-color); +} + +.top-navigation .dropdown-toggle.toggled-on .icon { + -ms-transform: rotate(-180deg); /* IE 9 */ + -webkit-transform: rotate(-180deg); /* Chrome, Safari, Opera */ + transform: rotate(-180deg); +} + +.top-navigation ul ul .dropdown-toggle { + padding: 0.7em 1em; +} + +.top-navigation ul ul .dropdown-toggle .icon { + margin: 0.35em 0 0; + width: 18px; + height: 18px; +} + +/*-------------------------------------------------------------- +# - Posts and pages +--------------------------------------------------------------*/ +.type-post, +.type-page, +.type-attachment, +.comments-area, +.comment-respond, +.site-main > article:not(.type-post):not(.type-page):not(.type-attachment), +.post-wrapper > article:not(.type-post):not(.type-page):not(.type-attachment) { + margin: 0 0 2rem; + padding: 0; + max-width: 100%; + background-color: #fff; + background-color: var(--page-background-color); + border: 1px solid rgba(0, 0, 0, 0.2); + border: 1px solid var(--page-border-color); + border-top: none; + box-shadow: inset 0 2px #1177aa; + box-shadow: inset 0 2px var(--content-border-color); +} + +.entry-header { + padding: 1em 1.5em 0; +} + +.page-title, +.entry-title { + margin: 0.15em 0 0.2em; + padding: 0; + color: #1177aa; + color: var(--title-color); + -ms-word-wrap: break-word; + word-wrap: break-word; + font-size: 40px; + font-size: 2.5rem; + font-family: Magra, arial, helvetica, sans-serif; + font-family: var(--title-font); + font-weight: 400; + font-weight: var(--title-font-weight); + text-transform: none; + text-transform: var(--title-text-transform); + line-height: 1.4; + line-height: var(--title-line-height); +} + +.entry-title a:link, +.entry-title a:visited { + color: #1177aa; + color: var(--title-color); + text-decoration: none; + -webkit-transition: all 0.2s ease; + transition: all 0.2s ease; +} + +.entry-title a:hover, +.entry-title a:active { + color: #454545; + color: var(--title-hover-color); +} + +.post-content { + padding: 0.5em 1.5em 1.5em; +} + +.wp-post-image { + margin: 1.5em 0 0.5em; + vertical-align: top; +} + +.entry-content p:first-child { + margin-top: 0.5em; +} + +.entry-content p:last-child { + margin-bottom: 0; +} + +.entry-content a { + text-decoration: underline; +} + +.sticky { + padding-top: 6px; + box-shadow: inset 0 8px #1177aa; + box-shadow: inset 0 8px var(--title-color); +} + +/* Page Links | wp_link_pages() */ +.page-links { + margin: 0; + word-spacing: 1em; + font-weight: 700; +} + +/* Error 404: Not Found Template */ +.error404 .not-found .widget { + padding: 0; + border: none; + box-shadow: none; +} + +/* Entry Meta */ +.entry-meta { + margin: 0.25em 0 0; + padding: 0; + color: #999; + color: var(--light-text-color); + font-size: 15px; + font-size: 0.9375rem; + font-family: Magra, arial, helvetica, sans-serif; + font-family: var(--title-font); + text-transform: uppercase; +} + +.entry-meta .meta-date, +.entry-meta .meta-author { + margin-right: 1.5em; +} + +.entry-meta a:link, +.entry-meta a:visited { + color: #999; + color: var(--light-text-color); +} + +.entry-meta a:hover, +.entry-meta a:active { + color: #666; + color: var(--medium-text-color); +} + +.entry-meta span .icon { + margin: 0.3em 0.4em 0 0; + width: 18px; + height: 18px; + vertical-align: top; + fill: currentcolor; +} + +/* Entry Categories */ +.entry-categories { + margin: 2em 0 0; + font-size: 14px; + font-size: 0.875rem; + font-weight: 700; + text-transform: uppercase; +} + +.entry-categories .meta-categories a { + display: inline-block; + float: left; + margin: 0 2px 2px 0; + padding: 0.4em 0.8em; + background-color: #1177aa; + background-color: var(--button-color); + text-decoration: none; + text-transform: uppercase; + font-size: 14px; + font-size: 0.875rem; +} + +.entry-categories .meta-categories a:link, +.entry-categories .meta-categories a:visited { + color: #fff; + color: var(--button-text-color); +} + +.entry-categories .meta-categories a:hover, +.entry-categories .meta-categories a:active { + background-color: #454545; + background-color: var(--button-hover-color); + color: #fff; + color: var(--button-hover-text-color); +} + +/* Hide post meta if they are deactivated in settings */ +body.date-hidden .type-post .entry-meta .meta-date, +body.author-hidden .type-post .entry-meta .meta-author, +body.comments-hidden .type-post .entry-meta .meta-comments, +body.date-hidden .post-slider .entry-meta .meta-date, +body.author-hidden .post-slider .entry-meta .meta-author { + position: absolute; + clip: rect(1px, 1px, 1px, 1px); +} + +body.date-hidden.author-hidden.comments-hidden .content-area .type-post .entry-meta, +body.date-hidden.author-hidden .post-slider .entry-meta { + display: none; +} + +/* Entry Tags & Tagcloud Widget */ +.entry-tags { + margin: 1em 0 0; +} + +.widget_tag_cloud .tagcloud, +.entry-tags .meta-tags { + font-size: 14px; + font-size: 0.875rem; +} + +.widget_tag_cloud .tagcloud::before, +.widget_tag_cloud .tagcloud::after, +.entry-tags .meta-tags::before, +.entry-tags .meta-tags::after { + display: table; + content: ""; +} + +.widget_tag_cloud .tagcloud::after, +.entry-tags .meta-tags::after { + clear: both; +} + +.widget_tag_cloud .tagcloud a, +.entry-tags .meta-tags a { + display: inline-block; + float: left; + margin: 0 2px 2px 0; + padding: 0.2em 0.5em; + background-color: #454545; + background-color: var(--button-hover-color); + text-decoration: none; + text-transform: uppercase; + font-size: 13px !important; + font-size: 0.8125rem !important; + font-weight: 400; +} + +.widget_tag_cloud .tagcloud a:link, +.widget_tag_cloud .tagcloud a:visited, +.entry-tags .meta-tags a:link, +.entry-tags .meta-tags a:visited { + color: #fff !important; + color: var(--button-hover-text-color) !important; +} + +.widget_tag_cloud .tagcloud a:hover, +.widget_tag_cloud .tagcloud a:active, +.entry-tags .meta-tags a:hover, +.entry-tags .meta-tags a:active { + background-color: #1177aa; + background-color: var(--button-color); + color: #fff; + color: var(--button-text-color); +} + +/* Read more Link */ +.more-link { + display: inline-block; + margin: 0; + padding: 0.5em 1em; + background-color: #1177aa; + background-color: var(--button-color); + color: #fff; + color: var(--button-text-color); + text-transform: uppercase; + text-decoration: none; + font-size: 14px; + font-size: 0.875rem; + font-weight: 700; +} + +.more-link:link, +.more-link:visited { + color: #fff; + color: var(--button-text-color); +} + +.more-link:hover, +.more-link:active { + background-color: #454545; + background-color: var(--button-hover-color); + color: #fff; + color: var(--button-hover-text-color); + text-decoration: none; +} + +.more-link::after { + content: " »"; +} + +.entry-content > .more-link { + text-decoration: none; +} + +/* Post Navigation */ +.post-navigation { + margin: 0; + padding: 1.5rem; + border-top: 1px solid; + border-color: rgba(0, 0, 0, 0.15); + border-color: var(--light-border-color); + font-size: 15px; + font-size: 0.9375rem; +} + +.post-navigation .nav-links .nav-previous { + float: left; + box-sizing: border-box; + padding-right: 0.5em; + max-width: 50%; +} + +.post-navigation .nav-links .nav-next { + float: right; + box-sizing: border-box; + padding-left: 0.5em; + max-width: 50%; +} + +.post-navigation .nav-links .nav-link-text { + display: block; + color: #454545; + color: var(--text-color); +} + +.post-navigation .nav-links .nav-previous .nav-link-text::before { + margin-right: 3px; + content: "«"; +} + +.post-navigation .nav-links .nav-next .nav-link-text::after { + margin-left: 4px; + content: "»"; +} + +.post-navigation .nav-links .entry-title { + font-size: 17px; + font-size: 1.0625rem; +} + +.post-navigation .nav-links a:hover .entry-title { + color: #454545; + color: var(--title-hover-color); +} + +/*-------------------------------------------------------------- +# - Archives and Blog Layouts +--------------------------------------------------------------*/ + +/* Archives and Search Heading */ +.page-header { + margin: 0 0 2em 0; + padding: 0; + background-color: #fff; + background-color: var(--page-background-color); + border: 1px solid; + border-color: rgba(0, 0, 0, 0.2); + border-color: var(--page-border-color); + border-top: none; +} + +.page-header .archive-title { + display: block; + margin: 0; + padding: 0.75em 1em; + color: #454545; + color: var(--widget-title-color); + box-shadow: inset 0 2px #1177aa; + box-shadow: inset 0 2px var(--title-color); + -ms-word-wrap: break-word; + word-wrap: break-word; + font-size: 15px; + font-size: 0.9375rem; + font-family: Magra, arial, helvetica, sans-serif; + font-family: var(--widget-title-font); + font-weight: 400; + font-weight: var(--widget-title-font-weight); + text-transform: uppercase; + text-transform: var(--widget-title-text-transform); + line-height: 1.4; + line-height: var(--title-line-height); +} + +.blog-description, +.archive-description { + border-top: 1px solid; + border-color: rgba(0, 0, 0, 0.15); + border-color: var(--light-border-color); + padding: 0.75em 1em; +} + +.blog-description:empty { + display: none; +} + +.archive-description p:first-child { + margin-top: 0; +} + +.archive-description p:last-child { + margin-bottom: 0; +} + +.search-form-wrap { + border-top: 1px solid; + border-color: rgba(0, 0, 0, 0.2); + border-color: var(--page-border-color); + padding: 1.5em; +} + +/* Theme Pagination */ +.pagination { + margin: 0 0 2em; +} + +.pagination a, +.pagination .current { + display: inline-block; + margin: 3px 3px 3px 0; + padding: 0.2em 0.8em; + background-color: #454545; + background-color: var(--button-hover-color); + color: #fff; + color: var(--button-hover-text-color); + text-align: center; + text-decoration: none; +} + +.pagination a:link, +.pagination a:visited { + color: #fff; + color: var(--button-hover-text-color); +} + +.pagination a:hover, +.pagination a:active, +.pagination .current { + background-color: #1177aa; + background-color: var(--button-color); + color: #fff; + color: var(--button-text-color); +} + +/* Infinite Scroll Pagination */ +.infinite-scroll .pagination { + display: none; +} + +.infinite-scroll #infinite-handle, +.infinite-scroll .infinite-loader { + width: 100%; + text-align: center; + margin-right: 2em; +} + +.infinite-scroll .infinite-loader .spinner { + bottom: -0.5em; + left: auto; + padding-right: 2em; + margin: 0 auto; +} + +.infinite-scroll #infinite-handle span { + display: inline-block; + margin: 0 0 2em; + padding: 0.4em 1em; + background-color: #1177aa; + background-color: var(--button-color); + color: #fff; + color: var(--button-text-color); + text-decoration: none; + font-size: 16px; + font-size: 1rem; + font-weight: 700; +} + +.infinite-scroll #infinite-handle span:hover { + background-color: #454545; + background-color: var(--button-hover-color); + color: #fff; + color: var(--button-hover-text-color); +} + +/*-------------------------------------------------------------- +# - Blocks +--------------------------------------------------------------*/ + +/* Block Spacing */ +.wp-block-audio, +.wp-block-button, +.wp-block-buttons, +.wp-block-columns, +.wp-block-embed, +.wp-block-image, +.wp-block-gallery, +.wp-block-cover, +.wp-block-table { + margin-bottom: 1.5em; +} + +/* Paragraph Block */ +p.has-background { + padding: 1rem 1.25rem; +} + +.has-drop-cap:not(:focus)::first-letter { + font-size: 4.5rem; + line-height: 0.7; + font-weight: 700; +} + +/* Code Block */ +.wp-block-code { + border-radius: 3px; +} + +/* Separator Block */ +.wp-block-separator { + border: none; +} + +.wp-block-separator:not(.is-style-wide):not(.is-style-dots), +.wp-block-separator.has-background:not(.is-style-wide):not(.is-style-dots) { + margin-left: auto; + margin-right: auto; + max-width: 6rem; + height: 4px; +} + +/* Table Block */ +.wp-block-table table { + margin: 0; +} + +.wp-block-table.is-style-stripes { + border-bottom: none; +} + +.wp-block-table.is-style-stripes tbody tr:nth-child(odd) { + background: rgba(0, 0, 0, 0.05); +} + +.wp-block-table.is-style-stripes thead { + border-bottom: 2px solid; +} + +.wp-block-table.is-style-stripes tfoot { + border-top: 2px solid; +} + +.wp-block-table.is-style-stripes thead, +.wp-block-table.is-style-stripes tfoot { + border-color: #454545; + border-color: var(--text-color); +} + +.wp-block-table.is-style-stripes thead th, +.wp-block-table.is-style-stripes tfoot td { + background: none; +} + +/* Buttons Block */ +.wp-block-buttons .wp-block-button { + margin: 0 0.5rem 0 0; +} + +.wp-block-buttons .wp-block-button:last-child { + margin-right: 0; +} + +/* Button Block */ +.wp-block-button { + font-size: 17px; + font-size: 1.0625rem; +} + +.wp-block-button.aligncenter { + text-align: center; +} + +.wp-block-button__link { + margin: 0; + padding: 0.6em 1em; + border: none; + border-radius: 0; + color: inherit; + font-size: inherit; + text-decoration: none; + transition: all 0.2s ease; +} + +.wp-block-button__link:link, +.wp-block-button__link:visited { + color: inherit; + text-decoration: none; +} + +.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-text-color), +.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-text-color):link, +.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-text-color):visited { + color: #fff; + color: var(--button-text-color); +} + +.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-background) { + background-color: #1177aa; + background-color: var(--button-color); +} + +.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-text-color):not(.has-background):hover, +.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.has-text-color):not(.has-background):active { + background-color: #454545; + background-color: var(--button-hover-color); +} + +.wp-block-button:not(.is-style-outline) .wp-block-button__link.has-text-color:hover, +.wp-block-button:not(.is-style-outline) .wp-block-button__link.has-text-color:active, +.wp-block-button:not(.is-style-outline) .wp-block-button__link.has-background:hover, +.wp-block-button:not(.is-style-outline) .wp-block-button__link.has-background:active { + text-decoration: underline; +} + +/* Outline Style */ +.wp-block-button.is-style-outline .wp-block-button__link { + padding: calc(0.6em - 2px) calc(1em - 2px); + background-color: transparent !important; +} + +.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color), +.wp-block-button__link.is-style-outline:not(.has-text-color), +.wp-block-cover .wp-block-button.is-style-outline .wp-block-button__link, +.wp-block-media-text .wp-block-button.is-style-outline .wp-block-button__link { + color: inherit; +} + +.wp-block-button.is-style-outline .wp-block-button__link:hover, +.wp-block-button.is-style-outline .wp-block-button__link:active { + text-decoration: underline; +} + +.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color):hover, +.wp-block-button.is-style-outline .wp-block-button__link:not(.has-text-color):active { + color: inherit; +} + +/* Quote Block */ +.wp-block-quote.has-text-align-center:not(.is-style-large), +.wp-block-quote.has-text-align-right:not(.is-style-large) { + padding-left: 0; + border-left: 0; +} + +.wp-block-quote.has-text-align-right:not(.is-style-large) { + padding-right: 1.25em; + border-right: 3px solid; + border-color: #1177aa; + border-color: var(--link-color); +} + +.wp-block-quote.is-style-large { + padding: 0; + border: none; + font-size: 28px; + font-size: 1.75rem; +} + +.wp-block-quote.is-style-large p { + font-size: inherit; + font-style: inherit; + line-height: inherit; +} + +.wp-block-quote.is-style-large cite { + text-align: inherit; + font-size: 16px; + font-size: 1rem; +} + +/* Pullquote Block */ +.wp-block-pullquote { + margin-top: 1.5em; + margin-bottom: 1.5em; + padding: 0; + border-bottom: 4px solid; + border-top: 4px solid; + border-color: rgba(0, 0, 0, 0.15); + border-color: var(--light-border-color); +} + +.wp-block-pullquote blockquote { + border: none; + padding: 0; + font-size: 28px; + font-size: 1.75rem; +} + +.wp-block-pullquote p { + font-size: inherit; + line-height: inherit; +} + +.wp-block-pullquote blockquote > p:last-of-type { + margin-bottom: 0; +} + +.wp-block-pullquote.alignleft p, +.wp-block-pullquote.alignright p { + font-size: 0.75em; +} + +.wp-block-pullquote blockquote cite { + color: #454545; + color: var(--text-color); +} + +.wp-block-pullquote.is-style-solid-color { + padding: 1px 2rem; +} + +.wp-block-pullquote.is-style-solid-color blockquote { + margin-left: 0; + margin-right: 0; + max-width: 100%; +} + +.wp-block-pullquote.is-style-solid-color blockquote p { + font-size: inherit; +} + +.wp-block-pullquote.is-style-solid-color blockquote cite { + color: inherit; +} + +/* Audio */ +.wp-block-audio audio { + width: 100%; +} + +/* Image Block */ +.wp-block-image img { + vertical-align: top; +} + +/* Cover Block */ +.wp-block-cover, +.wp-block-cover-image { + width: auto; +} + +.wp-block-cover > .wp-block-cover__inner-container > *:first-child, +.wp-block-cover-image > .wp-block-cover__inner-container > *:first-child { + margin-top: 0; +} + +.wp-block-cover > .wp-block-cover__inner-container > *:last-child, +.wp-block-cover-image > .wp-block-cover__inner-container > *:last-child { + margin-bottom: 0; +} + +/* Gallery Block */ +.wp-block-gallery { + justify-content: center; +} + +/* Video Embed Block */ +.wp-block-embed-vimeo.alignfull iframe { + width: 100%; +} + +/* Group Block */ +.wp-block-group.has-background { + padding: 1.5em; +} + +.wp-block-group.has-background > .wp-block-group__inner-container > *:first-child { + margin-top: 0; +} + +.wp-block-group.has-background > .wp-block-group__inner-container > *:last-child { + margin-bottom: 0; +} + +/* Columns Block */ +div.wp-block-columns { + gap: 1.5em; +} + +/* Column Block */ +.wp-block-column.has-background { + padding: 1.5em; + box-sizing: border-box; +} + +.wp-block-column.has-background > *:first-child { + margin-top: 0; +} + +.wp-block-column.has-background > *:last-child { + margin-bottom: 0; +} + +/* Latest Posts */ +.wp-block-latest-posts.wp-block-latest-posts__list { + margin-top: 1.5em; + margin-bottom: 1.5em; + padding: 0; +} + +.wp-block-latest-posts.wp-block-latest-posts__list li { + margin-top: 0.5rem; +} + +.wp-block-latest-posts__post-date, +.wp-block-latest-posts__post-author { + color: #999; + color: var(--light-text-color); + font-size: 15px; + font-size: 0.9375rem; +} + +/* Search Block */ +.wp-block-search .wp-block-search__label { + width: auto; +} + +/* Block Text Colors */ +.has-primary-color, +.wp-block-button__link.has-primary-color { + color: #1177aa; + color: var(--primary-color); +} + +.has-secondary-color, +.wp-block-button__link.has-secondary-color { + color: #005e91; + color: var(--secondary-color); +} + +.has-tertiary-color, +.wp-block-button__link.has-tertiary-color { + color: #004477; + color: var(--tertiary-color); +} + +.has-accent-color, +.wp-block-button__link.has-accent-color { + color: #11aa44; + color: var(--accent-color); +} + +.has-highlight-color, +.wp-block-button__link.has-highlight-color { + color: #aa1d11; + color: var(--highlight-color); +} + +.has-white-color, +.wp-block-button__link.has-white-color { + color: #fff; +} + +.has-light-gray-color, +.wp-block-button__link.has-light-gray-color { + color: #e5e5e5; + color: var(--light-gray-color); +} + +.has-gray-color, +.wp-block-button__link.has-gray-color { + color: #999; + color: var(--gray-color); +} + +.has-dark-gray-color, +.wp-block-button__link.has-dark-gray-color { + color: #454545; + color: var(--dark-gray-color); +} + +.has-black-color, +.wp-block-button__link.has-black-color { + color: #000; +} + +/* Block Background Colors */ +.has-primary-background-color, +.has-primary-background-color[class] { + background-color: #1177aa; + background-color: var(--primary-color); +} + +.has-secondary-background-color, +.has-secondary-background-color[class] { + background-color: #005e91; + background-color: var(--secondary-color); +} + +.has-tertiary-background-color, +.has-tertiary-background-color[class] { + background-color: #004477; + background-color: var(--tertiary-color); +} + +.has-accent-background-color, +.has-accent-background-color[class] { + background-color: #11aa44; + background-color: var(--accent-color); +} + +.has-highlight-background-color, +.has-highlight-background-color[class] { + background-color: #aa1d11; + background-color: var(--highlight-color); +} + +.has-white-background-color, +.has-white-background-color[class] { + background-color: #fff; +} + +.has-light-gray-background-color, +.has-light-gray-background-color[class] { + background-color: #e5e5e5; + background-color: var(--light-gray-color); +} + +.has-gray-background-color, +.has-gray-background-color[class] { + background-color: #999; + background-color: var(--gray-color); +} + +.has-dark-gray-background-color, +.has-dark-gray-background-color[class] { + background-color: #454545; + background-color: var(--dark-gray-color); +} + +.has-black-background-color, +.has-black-background-color[class] { + background-color: #000; +} + +/* Block Font Sizes */ +.has-small-font-size { + font-size: 16px; +} + +.has-medium-font-size { + font-size: 24px; +} + +.has-large-font-size { + font-size: 36px; +} + +.has-extra-large-font-size { + font-size: 48px; +} + +.has-huge-font-size { + font-size: 64px; +} + +/*-------------------------------------------------------------- +# - Widgets +--------------------------------------------------------------*/ +.widget { + margin: 0 0 2rem; + padding: 1rem 1.5rem 1.5rem; + max-width: 100%; + background-color: #fff; + background-color: var(--widget-background-color); + border: 1px solid rgba(0, 0, 0, 0.2); + border: 1px solid var(--widget-border-color); + border-top: none; + box-shadow: inset 0 2px #1177aa; + box-shadow: inset 0 2px var(--content-border-color); + -ms-word-wrap: break-word; + word-wrap: break-word; + font-size: 16px; + font-size: 1rem; +} + +.widget-header { + margin: -1rem -1.5rem 1.5em; + box-shadow: inset 0 2px #1177aa; + box-shadow: inset 0 2px var(--content-border-color); +} + +.widget-title, +.is-style-widget-title { + display: block; + margin: 0; + padding: 0.75em 1em; + color: #454545; + color: var(--widget-title-color); + border-bottom: 1px solid; + border-color: rgba(0, 0, 0, 0.15); + border-color: var(--light-border-color); + -ms-word-wrap: break-word; + word-wrap: break-word; + font-size: 15px; + font-size: 0.9375rem; + font-family: Magra, arial, helvetica, sans-serif; + font-family: var(--widget-title-font); + font-weight: 400; + font-weight: var(--widget-title-font-weight); + text-transform: uppercase; + text-transform: var(--widget-title-text-transform); + line-height: 1.4; + line-height: var(--title-line-height); +} + +.is-style-widget-title { + margin: -1rem -1.5rem 1.5em; + box-shadow: inset 0 2px #1177aa; + box-shadow: inset 0 2px var(--content-border-color); +} + +.widget-title a:link, +.widget-title a:visited { + color: #454545; + color: var(--widget-title-color); +} + +.widget-title a:hover, +.widget-title a:active { + text-decoration: underline; +} + +.widget ul { + margin: 0; + padding: 0; + list-style: square inside; + color: #999; + color: var(--light-text-color); +} + +.widget ul .children, +.widget ul .sub-menu { + margin: 0.5em 0 0.5em 1em; + padding: 0; +} + +/* Make sure select elements fit in widgets. */ +.widget select { + max-width: 100%; +} + +/* Theme Calendar Widget */ +.widget_calendar { + font-size: 14px; + font-size: 0.875rem; +} + +.widget_calendar table { + margin: 0; +} + +.widget_calendar table caption { + padding: 0 0 1em; +} + +.widget_calendar table thead tr { + background: #f5f5f5; +} + +.widget_calendar table tr td { + text-align: center; +} + +.widget_calendar table tbody tr td a { + font-weight: 700; +} + +.widget_calendar table tfoot tr td { + padding-top: 1em; + border: none; +} + +.widget_calendar table tfoot tr #prev { + text-align: left; +} + +.widget_calendar table tfoot tr #next { + text-align: right; +} + +/*-------------------------------------------------------------- +# - Magazine Widgets +--------------------------------------------------------------*/ +.widget-magazine-posts { + margin-bottom: -1.5em; +} + +.widget-magazine-posts .widget-header { + margin-bottom: 1.5em; +} + +/* Magazine Post Reset */ +.widget-magazine-posts .type-post { + margin: 0 0 1.5em 0; + padding: 0; + background: none; + border: 1px solid; + border-color: rgba(0, 0, 0, 0.15); + border-color: var(--light-border-color); + box-shadow: none; +} + +.widget-magazine-posts .type-post .entry-header { + padding: 0; +} + +.widget-magazine-posts .type-post .wp-post-image { + margin: 0; +} + +.widget-magazine-posts .type-post .post-content { + padding: 0.75em 1em 1em; +} + +.widget-magazine-posts .type-post .entry-meta { + padding: 0; + border: none; + font-size: 13px; + font-size: 0.8125rem; +} + +.widget-magazine-posts .type-post .entry-meta span::before { + font-size: 18px; +} + +/* Magazine Large Post Styling */ +.widget-magazine-posts .large-post .entry-title { + font-size: 18px; + font-size: 1.125rem; +} + +/* Magazine Medium Post Styling */ +.widget-magazine-posts .medium-post .entry-title { + font-size: 15px; + font-size: 0.9375rem; +} + +.widget-magazine-posts .medium-post .post-content { + padding: 0.5em 1em; +} + +/* Magazine Small Post Styling */ +.widget-magazine-posts .small-post { + display: block; + float: left; + box-sizing: border-box; + width: 100%; + margin: 0 0 1em; +} + +.widget-magazine-posts .small-post .wp-post-image { + float: left; + margin: 0; + max-width: 30%; +} + +.widget-magazine-posts .small-post .post-content { + float: right; + width: 70%; + padding: 0.5em 1em; +} + +.widget-magazine-posts .small-post .entry-title { + font-size: 15px; + font-size: 0.9375rem; +} + +/* Magazine Posts Columns Widget */ +.treville-magazine-columns-widget { + padding: 0; + border: none; + background: none; + box-shadow: none; +} + +.treville-magazine-columns-widget .widget-magazine-posts { + margin-bottom: 0; +} + +.widget-magazine-columns .magazine-column-left { + float: left; + box-sizing: border-box; + padding-right: 1em; + width: 50%; +} + +.widget-magazine-columns .magazine-column-right { + float: right; + box-sizing: border-box; + padding-left: 1em; + width: 50%; +} + +.widget-magazine-columns .magazine-column .magazine-column-content { + margin: 0; + padding: 1rem 1.5rem 0.5rem; + max-width: 100%; + background: #fff; + border: 1px solid rgba(0, 0, 0, 0.2); + border: 1px solid var(--page-border-color); + border-top: none; + box-shadow: inset 0 2px #1177aa; + box-shadow: inset 0 2px var(--content-border-color); + -ms-word-wrap: break-word; + word-wrap: break-word; +} + +/* Magazine Grid Widget */ +.widget-magazine-posts .magazine-grid { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + margin-right: -1.5em; +} + +.widget-magazine-posts .magazine-grid .post-column { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + box-sizing: border-box; + padding-right: 1.5em; +} + +.widget-magazine-posts .magazine-grid-two-columns .post-column { + width: 50%; +} + +.widget-magazine-posts .magazine-grid-three-columns .post-column { + width: 33.3333333333%; +} + +.widget-magazine-posts .magazine-grid .post-column .type-post { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-direction: column; + flex-direction: column; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; +} + +.widget-magazine-posts .magazine-grid .post-column .type-post .post-content { + flex-grow: 1; + -webkit-box-flex: 1; + -ms-flex-positive: 1; +} + +/*-------------------------------------------------------------- +# - Comments +--------------------------------------------------------------*/ +.comments-area, +.comment-respond { + padding: 1rem 1.5rem; +} + +/* Comment Header */ +.comments-header, +.comment-reply-title { + margin: -1rem -1.5rem 1.5em; + box-shadow: inset 0 2px #1177aa; + box-shadow: inset 0 2px var(--title-color); +} + +.comments-header .comments-title, +.comment-reply-title { + margin: 0; + padding: 0.75em 1em; + color: #454545; + color: var(--widget-title-color); + border-bottom: 1px solid; + border-color: rgba(0, 0, 0, 0.15); + border-color: var(--light-border-color); + -ms-word-wrap: break-word; + word-wrap: break-word; + font-size: 15px; + font-size: 0.9375rem; + font-family: Magra, arial, helvetica, sans-serif; + font-family: var(--widget-title-font); + font-weight: 400; + font-weight: var(--widget-title-font-weight); + text-transform: uppercase; + text-transform: var(--widget-title-text-transform); + line-height: 1.4; + line-height: var(--title-line-height); +} + +.comment-reply-title { + display: block; + margin: -1rem -1.5rem 1.5em; +} + +/* Comment List */ +.comment-list { + margin: 0; + padding: 0; + list-style: none; +} + +.comment { + margin: 0 0 1.5em; + padding: 1.5em 0 0; + border-top: 1px solid; + border-color: rgba(0, 0, 0, 0.15); + border-color: var(--light-border-color); + -ms-word-wrap: break-word; + word-wrap: break-word; +} + +.comment.depth-1:first-child { + padding: 0; + border-top: none; +} + +.comment-meta { + float: left; + padding: 0; + width: 100%; +} + +.comment-meta .comment-author img { + float: left; + margin-right: 1em; +} + +.bypostauthor { + display: block; +} + +.comment-meta .comment-metadata { + margin-top: 0.3em; + font-size: 14px; + font-size: 0.875rem; +} + +.comment-meta .comment-metadata a { + margin-right: 1em; +} + +.comment-content { + clear: left; + padding: 0.2em 0 0; +} + +.comment-content a { + word-wrap: break-word; +} + +.comment ol.children { + margin: 1.5em 0 0; + list-style: none; +} + +/* Comment Pagination */ +.comment-navigation { + margin: 0 0 1.5em; + padding: 0; + font-size: 14px; + font-size: 0.875rem; +} + +.comment-navigation .nav-previous { + float: left; +} + +.comment-navigation .nav-next { + float: right; +} + +.comment-navigation .nav-previous a::before { + margin-right: 3px; + content: "«"; +} + +.comment-navigation .nav-next a::after { + margin-left: 4px; + content: "»"; +} + +/* Comment Form */ +.comment-form { + padding: 0; +} + +.comment-form label { + display: inline-block; + min-width: 150px; + font-weight: 700; + font-size: 15px; + font-size: 0.9375rem; +} + +.comment-form textarea { + margin-top: 0.4em; +} + +.comment-form .form-submit { + margin-bottom: 0.5em; +} + +.comment-form input[type="checkbox"] + label { + display: inline; + padding: 0 5px; +} + +/* Comment Reply */ +.comment .comment-respond { + margin-top: 1.5em; + border: 1px solid; + border-color: rgba(0, 0, 0, 0.15); + border-color: var(--light-border-color); + box-shadow: none; +} + +.comment-reply-title small a { + float: right; + margin: -0.5rem -0.5rem 0 0; + padding: 0.75em 1em; + font-weight: 400; + font-size: 13px; + font-size: 0.8125rem; + text-transform: none; +} + +/*-------------------------------------------------------------- +# - Media +--------------------------------------------------------------*/ +.page-content .wp-smiley, +.entry-content .wp-smiley, +.comment-content .wp-smiley { + margin-top: 0; + margin-bottom: 0; + padding: 0; + border: none; +} + +/* Make sure embeds and iframes fit their containers. */ +embed, +iframe, +object, +figure, +img, +picture { + max-width: 100%; +} + +/*-------------------------------------------------------------- +## 16.1 - Captions +--------------------------------------------------------------*/ +figcaption, +.wp-caption, +.wp-block-embed figcaption, +.wp-block-image figcaption, +.wp-block-audio figcaption, +.wp-block-table figcaption { + font-size: 13px; + font-size: 0.8125rem; +} + +.wp-block-embed figcaption, +.wp-block-image figcaption, +.wp-block-audio figcaption, +.wp-block-table figcaption, +.wp-block-gallery > figcaption { + margin: 0.5rem 0 1.5rem; + max-width: 100%; + width: auto !important; + text-align: center; +} + +.wp-block-table figcaption { + margin-bottom: 0; +} + +.wp-caption img[class*="wp-image-"] { + display: block; + margin: 0 auto; +} + +.wp-caption .wp-caption-text { + margin: 0.5em 0; +} + +/*-------------------------------------------------------------- +## 16.2 - Galleries +--------------------------------------------------------------*/ +.gallery { + margin-bottom: 1.25em; +} + +.gallery-item { + display: inline-block; + box-sizing: border-box; + margin: 0; + padding: 0 1em 0.75em 0; + width: 100%; + vertical-align: top; + text-align: center; +} + +.gallery-columns-2 .gallery-item { + max-width: 50%; +} + +.gallery-columns-3 .gallery-item { + max-width: 33.33%; +} + +.gallery-columns-4 .gallery-item { + max-width: 25%; +} + +.gallery-columns-5 .gallery-item { + max-width: 20%; +} + +.gallery-columns-6 .gallery-item { + max-width: 16.66%; +} + +.gallery-columns-7 .gallery-item { + max-width: 14.28%; +} + +.gallery-columns-8 .gallery-item { + max-width: 12.5%; +} + +.gallery-columns-9 .gallery-item { + max-width: 11.11%; +} + +.gallery-caption { + display: block; + font-size: 13px; + font-size: 0.8125rem; + margin-bottom: 0.75em; +} + +/*-------------------------------------------------------------- +# - Footer +--------------------------------------------------------------*/ +.footer-wrap { + background-color: #454545; + background-color: var(--footer-background-color); +} + +.site-footer { + color: #ddd; + color: var(--footer-text-color); + font-size: 15px; + font-size: 0.9375rem; +} + +.site-footer .site-info { + float: left; + padding: 2.5em 0; +} + +.site-footer a:link, +.site-footer a:visited { + color: #fff; + color: var(--footer-link-color); + text-decoration: underline; +} + +.site-footer a:hover, +.site-footer a:focus, +.site-footer a:active { + text-decoration: none; +} + +/*-------------------------------------------------------------- +# - Plugins +--------------------------------------------------------------*/ + +/* Breadcrumbs */ +.breadcrumbs { + margin: 0; + padding: 0.5em 0; + background: #fff; + border-bottom: 1px solid rgba(0, 0, 0, 0.2); + -ms-word-wrap: break-word; + word-wrap: break-word; +} + +.breadcrumbs-container { + color: #454545; + font-size: 14px; + font-size: 0.875rem; +} + +.breadcrumbs .trail-browse, +.breadcrumbs .trail-items, +.breadcrumbs .trail-items li { + display: inline; + margin: 0; + padding: 0; +} + +.breadcrumbs .trail-browse { + margin-right: 0.5em; + font-weight: 400; + font-size: 14px; + font-size: 0.875rem; +} + +.breadcrumbs .trail-items { + list-style: none; +} + +.breadcrumbs .trail-items li::after { + padding: 0 0.5em; + content: "»"; /* Raquo */ +} + +.trail-separator-slash .trail-items li::after { + content: "/"; +} + +.trail-separator-dash .trail-items li::after { + content: "–"; +} + +.trail-separator-bull .trail-items li::after { + content: "•"; +} + +.trail-separator-arrow-bracket .trail-items li::after { + content: ">"; +} + +.trail-separator-raquo .trail-items li::after { + content: "»"; +} + +.trail-separator-single-arrow .trail-items li::after { + content: "→"; +} + +.trail-separator-double-arrow .trail-items li::after { + content: "⇒"; +} + +.breadcrumbs .trail-items li:last-of-type::after { + display: none; +} + +:root { + --tz-column-gap: 1.5em; +} + +.tz-magazine-block .tz-magazine-post { + margin: 0 0 1.5em 0; + padding: 0; + border: none; + background: none; + box-shadow: none; +} + +.tz-magazine-block .tz-entry-image { + margin: 0 0 1em; +} + +.tz-magazine-block .tz-entry-image .wp-post-image { + margin: 0; +} + +.tz-magazine-block .tz-entry-header { + padding: 0; +} + +.tz-magazine-block .tz-entry-title { + font-size: 22px; + font-size: 1.375rem; +} + +.tz-magazine-block .tz-magazine-grid-columns-3 .tz-entry-title { + font-size: 18px; + font-size: 1.125rem; +} + +.tz-magazine-block .tz-magazine-grid-columns-4 .tz-entry-title, +.tz-magazine-block .tz-magazine-thumbnail-list .tz-entry-title { + font-size: 16px; + font-size: 1rem; +} + +.tz-magazine-block .tz-entry-meta { + margin: 0.4em 0; + padding: 0; + border: none; + font-size: 14px; + font-size: 0.875rem; +} + +.tz-magazine-block .tz-entry-meta .tz-meta-field { + margin-right: 1em; +} + +.tz-magazine-block .tz-meta-field a { + text-decoration: none; +} + +.tz-magazine-block .tz-entry-content { + margin-top: 1em; + font-size: 16px; + font-size: 1rem; +} + +.tz-magazine-block .tz-read-more { + margin-top: 0; +} + +.tz-magazine-block .tz-more-link { + text-decoration: none; +} + +/* Related Posts */ +.related-posts { + margin: 0 0 2em; +} + +.related-posts-title { + margin: 0; + padding: 0.75em 1em; + color: #454545; + color: var(--widget-title-color); + border-bottom: 1px solid; + border-color: rgba(0, 0, 0, 0.15); + border-color: var(--light-border-color); + -ms-word-wrap: break-word; + word-wrap: break-word; + font-size: 15px; + font-size: 0.9375rem; + font-family: Magra, arial, helvetica, sans-serif; + font-family: var(--widget-title-font); + font-weight: 400; + font-weight: var(--widget-title-font-weight); + text-transform: uppercase; + text-transform: var(--widget-title-text-transform); + line-height: 1.4; + line-height: var(--title-line-height); +} + +.related-posts article { + margin: 0; + padding: 0 0 0.5rem; + background: none; + border: 1px solid rgba(0, 0, 0, 0.1); + box-shadow: none; +} + +.related-posts article .wp-post-image { + margin: 0; +} + +.related-posts article .entry-header { + margin: 0; + padding: 0.5rem 1rem 0; +} + +.related-posts article .entry-meta { + display: block; + margin: 0; + padding: 0 1rem; + font-size: 12px; + font-size: 0.75rem; +} + +ul.related-posts-list { + margin: 1.5em 1.5em 0; + padding: 0; + list-style: none; +} + +.related-posts-list li { + margin: 0 0 1.5em; + padding: 0; + list-style: none; + border: 1px solid rgba(0, 0, 0, 0.1); +} + +.related-posts-list li .wp-post-image { + float: left; + display: block; + margin: 0 1em 0 0; + padding: 0; + max-width: 25%; + height: auto; + border: none; +} + +.related-posts-list li .entry-header { + display: inline-block; + margin-top: 0.5em; + padding: 0; +} + +.related-posts-list li .entry-title { + display: block; + font-size: 20px; + font-size: 1.25rem; +} + +.related-posts-list li .entry-meta { + display: block; + margin: 0 0 0.5em; + padding: 0; + font-size: 12px; + font-size: 0.75rem; +} + +.related-posts-grid { + margin: 1.5em 1.5em 0; +} + +.related-posts-columns { + margin-right: -1.5em; +} + +.related-posts-columns .related-post-column { + float: left; + box-sizing: border-box; + margin-bottom: 1.5em; + padding-right: 1.5em; +} + +.related-posts-two-columns .related-post-column { + width: 50%; +} + +.related-posts-three-columns .related-post-column { + width: 33.3333333333%; +} + +.related-posts-four-columns .related-post-column { + width: 25%; +} + +.related-posts-two-columns .related-post-column:nth-child(2n+1) { + clear: left; +} + +.related-posts-three-columns .related-post-column:nth-child(3n+1) { + clear: left; +} + +.related-posts-four-columns .related-post-column:nth-child(4n+1) { + clear: left; +} + +.related-posts-two-columns .related-post-column .entry-title { + font-size: 18px; + font-size: 1.125rem; +} + +.related-posts-three-columns .related-post-column .entry-title { + font-size: 16px; + font-size: 1rem; +} + +.related-posts-four-columns .related-post-column .entry-title { + font-size: 15px; + font-size: 0.9375rem; +} + +.related-posts-four-columns .related-post-column .entry-meta .meta-date, +.related-posts-four-columns .related-post-column .entry-meta .meta-author { + display: block; +} + +@media only screen and (max-width: 80em) { + + /* Columns */ + .related-posts-two-columns .related-post-column .entry-title { + font-size: 17px; + font-size: 1.0625rem; + } +} + +@media only screen and (max-width: 70em) { + + /* Columns */ + .related-posts-two-columns .related-post-column .entry-title { + font-size: 16px; + font-size: 1rem; + } +} + +@media only screen and (max-width: 50em) { + + /* Columns */ + .related-posts-four-columns .related-post-column { + width: 50%; + } + + .related-posts-four-columns .related-post-column:nth-child(2n+1) { + clear: left; + } + + .related-posts-two-columns .related-post-column .entry-title, + .related-posts-three-columns .related-post-column .entry-title, + .related-posts-four-columns .related-post-column .entry-title { + font-size: 15px; + font-size: 0.9375rem; + } + + .related-posts-four-columns .related-post-column .entry-meta .meta-date, + .related-posts-four-columns .related-post-column .entry-meta .meta-author { + display: inline; + } + + /* List */ + .related-posts-list li .entry-header { + margin-top: 0.25em; + } + + .related-posts-list li .entry-title { + font-size: 18px; + font-size: 1.125rem; + } +} + +@media only screen and (max-width: 40em) { + + /* List */ + .related-posts-list li .wp-post-image { + max-width: 30%; + } + + .related-posts-list li .entry-header { + margin-top: 0.25em; + } + + .related-posts-list li .entry-title { + font-size: 16px; + font-size: 1rem; + } +} + +@media only screen and (max-width: 35em) { + + /* Columns */ + .related-posts-three-columns { + margin: 0; + } + + .related-posts-three-columns .related-post-column { + float: none; + padding-right: 0; + width: 100%; + } + + .related-posts-three-columns .related-post-column .entry-title { + font-size: 17px; + font-size: 1.0625rem; + } + + /* List */ + .related-posts-list li .wp-post-image { + float: none; + margin: 0; + max-width: 100%; + } + + .related-posts-list li .entry-header { + margin: 0; + padding: 0.5rem 1rem; + } + + .related-posts-list li .entry-title { + font-size: 17px; + font-size: 1.0625rem; + } + + .related-posts-list li .entry-meta { + display: block; + margin: -0.5rem 0 0; + padding: 0 1rem 0.5rem; + } +} + +@media only screen and (max-width: 25em) { + + /* Columns */ + .related-posts-two-columns, + .related-posts-four-columns { + margin: 0; + } + + .related-posts-two-columns .related-post-column, + .related-posts-four-columns .related-post-column { + float: none; + padding-right: 0; + width: 100%; + } + + .related-posts-three-columns .related-post-column .entry-title { + font-size: 15px; + font-size: 0.9375rem; + } + + .related-posts-list li .entry-title { + font-size: 15px; + font-size: 0.9375rem; + } +} + +@media only screen and (max-width: 20em) { + .related-posts .entry-meta .meta-date, + .related-posts .entry-meta .meta-author { + display: block; + margin: 0; + } + + .related-posts-four-columns .related-post-column .entry-meta .meta-date::after { + display: none; + } +} + +/* Widget Bundle */ +.tzwb-clearfix::before, +.tzwb-clearfix::after { + display: table; + content: " "; +} + +.tzwb-clearfix::after { + clear: both; +} + +.tzwb-posts-list li { + clear: left; + margin-bottom: 0.75em; + padding: 0; + list-style: none; +} + +.tzwb-posts-list .tzwb-excerpt p { + margin: 0; + padding: 0; +} + +.tzwb-posts-list .wp-post-image { + float: left; + margin: 0.3em 0.8em 1em 0; + max-width: 90px; + height: auto; +} + +.tzwb-posts-list .tzwb-entry-meta { + margin: 0; + padding: 0; + border-top: none; + font-size: 12px; + font-size: 0.75rem; +} + +.tzwb-comments-list li { + clear: left; + margin-bottom: 0.75em; + padding: 0; + list-style: none; +} + +.tzwb-comments-list .avatar { + float: left; + margin: 0.3em 0.8em 0.8em 0; +} + +.tzwb-comments-list .tzwb-comment-content { + font-style: italic; +} + +.tzwb-comments-list .tzwb-comment-date { + color: #999; + color: var(--light-text-color); + font-size: 12px; + font-size: 0.75rem; +} + +.tzwb-tabbed-content .tzwb-tabnavi-wrap { + overflow: auto; + margin: 0; + padding: 0; + list-style: none; +} + +.tzwb-tabbed-content .tzwb-tabnavi { + position: relative; + float: left; + width: 100%; + list-style: none; + list-style-position: outside; +} + +.tzwb-tabbed-content .tzwb-tabnavi li { + position: relative; + float: left; + margin: 0 2px 2px 0; + padding: 0; + list-style: none; +} + +.tzwb-tabbed-content .tzwb-tabnavi li a { + display: block; + margin: 0; + padding: 0.4em 0.8em; + text-decoration: none; + font-size: 14px; + font-size: 0.875rem; + font-weight: 700; + text-transform: uppercase; +} + +.tzwb-tabbed-content .tzwb-tabnavi li a:link, +.tzwb-tabbed-content .tzwb-tabnavi li a:visited { + background-color: #454545; + background-color: var(--button-hover-color); + color: #fff; + color: var(--button-hover-text-color); + -webkit-transition: all 0.2s ease; + transition: all 0.2s ease; +} + +.tzwb-tabbed-content .tzwb-tabnavi li a:hover, +.tzwb-tabbed-content .tzwb-tabnavi li a:active { + background-color: #1177aa; + background-color: var(--button-color); + color: #fff; + color: var(--button-text-color); + text-decoration: none; +} + +.tzwb-tabbed-content .tzwb-tabnavi li a.current-tab { + background-color: #1177aa; + background-color: var(--button-color); + color: #fff; + color: var(--button-text-color); +} + +.tzwb-tabbed-content .tzwb-tabcontent { + margin: 1em 0 0 0; + padding: 0; +} + +.tzwb-social-icons .social-icons-menu { + display: flex; + flex-flow: row wrap; + margin: 0; + padding: 0; + border: none; + list-style: none; + line-height: 1; +} + +.tzwb-social-icons .social-icons-menu li { + margin: 0 2px 2px 0; +} + +.tzwb-social-icons .social-icons-menu li a { + display: flex; + padding: 0.75em; + background-color: #1177aa; + background-color: var(--button-color); + color: #fff; + color: var(--button-text-color); +} + +.tzwb-social-icons .social-icons-menu li a:hover { + background-color: #454545; + background-color: var(--button-hover-color); + color: #fff; + color: var(--button-hover-text-color); + text-decoration: none; +} + +.tzwb-social-icons .social-icons-menu .icon { + margin: 0; + width: 20px; + height: 20px; + vertical-align: middle; + fill: currentcolor; +} + +/* + * jQuery FlexSlider v2.5.0 + * http://www.woothemes.com/flexslider/ + * + * Copyright 2012 WooThemes + * Free to use under the GPLv2 and later license. + * http://www.gnu.org/licenses/gpl-2.0.html + * + * Contributing author: Tyler Smith (@mbmufffin) + * + * @package Treville + */ + +/* RESETS */ +.zeeflex-container a:hover, +.zeeflex-slider a:hover, +.zeeflex-container a:focus, +.zeeflex-slider a:focus { + outline: none; +} + +.zeeslides, +.zeeslides > li, +.zeeflex-control-nav, +.zeeflex-direction-nav { + margin: 0; + padding: 0; + list-style: none; +} + +.zeeflex-pauseplay span { + text-transform: capitalize; +} + +/* BASE STYLES */ +.zeeflexslider { + margin: 0; + padding: 0; +} + +.zeeflexslider .zeeslides > li { + display: none; +} + +.zeeflexslider .zeeslides img { + display: block; + width: 100%; +} + +.zeeflexslider .zeeslides::after { + display: block; + visibility: hidden; + clear: both; + height: 0; + content: " "; + line-height: 0; +} + +html[xmlns] .zeeflexslider .zeeslides { + display: block; +} + +* html .zeeflexslider .zeeslides { + height: 1%; +} + +.no-js .zeeflexslider .zeeslides > li:first-child { + display: block; +} + +/* Treville Slider Theme */ +.post-slider-container { + overflow: hidden; + margin: 0 auto; + max-width: 2560px; +} + +.post-slider-wrap { + position: relative; +} + +.post-slider, +.zeeflexslider .zeeslides { + zoom: 1; +} + +.post-slider .zeeslide { + position: relative; +} + +.zeeflex-viewport { + max-height: 2000px; +} + +.post-slider .zeeslide .slide-image-wrap { + margin: 0; + padding: 0; + background: #e5e5e5; +} + +.post-slider .zeeslide .slide-image { + margin: auto; + padding: 0; + max-width: 100%; + max-height: 640px; + width: auto; + height: auto; + vertical-align: top; +} + +.post-slider .zeeslide .slide-post { + position: absolute; + bottom: 0; + overflow: hidden; + width: 100%; +} + +.post-slider .zeeslide .slide-content { + box-sizing: border-box; + width: 50%; + padding: 1em 1.5em 1.5em; + margin-bottom: 2em; + background: #fff; + -ms-word-wrap: break-word; + word-wrap: break-word; +} + +.post-slider .zeeslide .slide-content .slide-title { + font-size: 28px; + font-size: 1.75rem; +} + +.post-slider-controls { + clear: left; +} + +/* Direction Nav */ +.post-slider-controls .zeeflex-direction-nav { + position: absolute; + right: 1.5em; + bottom: 1.5em; + *height: 0; +} + +.post-slider-controls .zeeflex-direction-nav a { + position: absolute; + z-index: 10; + display: flex; + justify-content: center; + align-items: center; + margin: -40px 0 0 -80px; + width: 40px; + height: 40px; + background: #fff; + color: #303030; + text-align: left; + font-size: 0; + cursor: pointer; +} + +.post-slider-controls .zeeflex-direction-nav a:hover { + color: #1177aa; + color: var(--link-color); + text-decoration: none; +} + +.post-slider-controls .zeeflex-direction-nav a::before { + display: inline-block; + vertical-align: text-bottom; + text-decoration: inherit; +} + +.post-slider-controls .zeeflex-direction-nav a.zeeflex-next::before { + content: ">"; + font-size: 22px; + font-weight: 700; +} + +.post-slider-controls .zeeflex-direction-nav a.zeeflex-prev::before { + content: "<"; + font-size: 22px; + font-weight: 700; +} + +.post-slider-controls .zeeflex-direction-nav .zeeflex-next { + left: 41px; +} + +/* Media Queries */ +@media only screen and (max-width: 82em) { + .post-slider .zeeslide .slide-content { + width: 40%; + } +} + +@media only screen and (max-width: 72em) { + .post-slider .zeeslide .slide-content { + width: 50%; + } +} + +@media only screen and (max-width: 62em) { + .post-slider .zeeslide .slide-content { + padding: 0.5em 1em; + } + + .post-slider .zeeslide .slide-content .entry-content { + display: none; + } +} + +@media only screen and (max-width: 52em) { + .post-slider .zeeslide .slide-content .entry-meta { + display: none; + } +} + +@media only screen and (max-width: 42em) { + .post-slider .zeeslide .slide-content { + bottom: 1em; + left: 1em; + } + + .post-slider-controls .zeeflex-direction-nav { + right: 1em; + bottom: 1em; + } + + .post-slider .zeeslide .slide-content .slide-title { + font-size: 24px; + font-size: 1.5rem; + } +} + +@media only screen and (max-width: 32em) { + .post-slider .zeeslide .slide-content { + bottom: 0.5em; + left: 0.5em; + } + + .post-slider-controls .zeeflex-direction-nav { + right: 0.5em; + bottom: 0.5em; + } + + .post-slider .zeeslide .slide-content .slide-title { + font-size: 20px; + font-size: 1.25rem; + } +} + +@media only screen and (max-width: 22em) { + .post-slider .zeeslide .slide-content { + padding: 0.2em 0.5em; + } + + .post-slider .zeeslide .slide-content .slide-title { + font-size: 16px; + font-size: 1rem; + } +} + +/*-------------------------------------------------------------- +# - Media Queries for Typography +--------------------------------------------------------------*/ +@media only screen and (max-width: 70em) { + .page-title, + .entry-title { + font-size: 36px; + font-size: 2.25rem; + } +} + +@media only screen and (max-width: 60em) { + .page-title, + .entry-title { + font-size: 40px; + font-size: 2.5rem; + } +} + +@media only screen and (max-width: 50em) { + .site-title { + font-size: 28px; + font-size: 1.75rem; + } + + .page-title, + .entry-title { + font-size: 36px; + font-size: 2.25rem; + } +} + +@media only screen and (max-width: 40em) { + .page-title, + .entry-title { + font-size: 32px; + font-size: 2rem; + } +} + +@media only screen and (max-width: 30em) { + .site-title { + font-size: 24px; + font-size: 1.5rem; + } + + .page-title, + .entry-title { + font-size: 28px; + font-size: 1.75rem; + } +} + +@media only screen and (max-width: 20em) { + .page-title, + .entry-title { + font-size: 24px; + font-size: 1.5rem; + } +} + +/*-------------------------------------------------------------- +# - Media Queries for Layout +--------------------------------------------------------------*/ +@media only screen and (max-width: 75em) { + .container { + padding: 0 1.5em; + } + + .site-content { + padding-top: 1.5em; + } + + .content-area { + padding-right: 1.5rem; + } + + .widget, + .page-header, + .type-post, + .type-page, + .type-attachment, + .pagination, + .comments-area, + .site-main > article:not(.type-post):not(.type-page):not(.type-attachment), + .post-wrapper > article:not(.type-post):not(.type-page):not(.type-attachment) { + margin-bottom: 1.5rem; + } + + .infinite-scroll #infinite-handle, + .infinite-scroll .infinite-loader { + margin-right: 1.5em; + } +} + +@media only screen and (max-width: 60em) { + .content-area, + .site-content .content-fullwidth { + float: none; + padding: 0; + width: 100%; + } + + .sidebar { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-wrap: wrap; + flex-wrap: wrap; + float: none; + margin-right: -1.5em; + padding: 0; + width: auto; + } + + .sidebar .widget-wrap { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + float: right; + box-sizing: border-box; + padding-right: 1.5em; + width: 50%; + } + + .sidebar .widget-wrap .widget { + width: 100%; + } + + .sidebar .widget-wrap:nth-child(2n+1) { + clear: left; + } + + .site-footer .site-info { + float: none; + text-align: center; + padding: 2em 0; + } +} + +@media only screen and (max-width: 50em) { + .site-description { + padding-left: 0; + border-left: none; + } +} + +@media only screen and (max-width: 40em) { + .infinite-scroll #infinite-handle, + .infinite-scroll .infinite-loader { + margin-right: 0; + } + + .wp-post-image { + margin-top: 1em; + } + + .site-footer { + padding: 0; + } +} + +@media only screen and (max-width: 35em) { + .sidebar { + margin-right: 0; + } + + .sidebar .widget-wrap { + float: none; + padding-right: 0; + width: 100%; + } +} + +@media only screen and (max-width: 30em) { + .header-main { + padding: 0 1em; + } + + .site-description { + display: none; + } + + .post-navigation { + padding: 1rem 1.5rem; + font-size: 14px; + font-size: 0.875rem; + } + + .post-navigation .nav-links .entry-title { + font-size: 16px; + font-size: 1rem; + } + + .post-navigation .nav-links .nav-previous, + .post-navigation .nav-links .nav-next { + float: none; + padding: 0; + max-width: 100%; + } + + .post-navigation .nav-links .nav-next { + text-align: right; + } + + .post-navigation .nav-links a { + display: block; + margin-bottom: 0.5em; + } +} + +@media only screen and (max-width: 20em) { + .entry-meta .meta-date, + .entry-meta .meta-author, + .entry-meta .meta-category, + .entry-meta .meta-comments { + display: block; + } + + .post-content { + padding: 0.25em 1.25em 1.25em; + } +} + +/*-------------------------------------------------------------- +# - Media Queries for Navigation +--------------------------------------------------------------*/ +@media only screen and (min-width: 60em) { + .mobile-menu-toggle, + .top-navigation .dropdown-toggle, + .main-navigation .dropdown-toggle { + display: none; + } + + .main-navigation ul, + .main-navigation ul ul { + display: block; + } + + .header-main { + flex-wrap: nowrap; + } + + /* Main Navigation */ + .primary-navigation-wrap { + border-bottom: 1px solid; + border-color: rgba(0, 0, 0, 0.2); + border-color: var(--navi-border-color); + } + + .primary-navigation { + display: flex; + width: auto; + align-items: center; + } + + #masthead .main-navigation > ul.menu { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-flow: row wrap; + flex-flow: row wrap; + margin: 0 -0.5em; + border-bottom: none; + } + + .main-navigation > ul, + .main-navigation > ul > li > a { + border: none; + } + + /* Dropdown Menus */ + .main-navigation ul ul { + position: absolute; + left: -999em; + top: 100%; + z-index: 99999; + border: 1px solid; + border-top: 4px solid; + border-color: rgba(0, 0, 0, 0.2); + border-color: var(--navi-border-color); + background-color: #fff; + background-color: var(--navi-background-color); + } + + .main-navigation ul li:hover > ul, + .main-navigation ul li.focus > ul { + right: auto; + left: 0; + } + + .main-navigation ul ul li a { + width: 16rem; + } + + .main-navigation ul ul ul { + left: -999em; + margin-top: -4px; + top: 0; + } + + .main-navigation ul ul li:hover > ul, + .main-navigation ul ul li.focus > ul { + right: auto; + left: 100%; + } + + .main-navigation ul ul li a, + .main-navigation ul ul ul li a, + .main-navigation ul ul ul ul li a { + padding: 1em; + } + + /* Dropdown Icons */ + .main-navigation .menu-item-has-children > a > .icon { + position: relative; + display: inline-block; + left: 0.5rem; + top: 0.1rem; + width: 13px; + height: 13px; + fill: #454545; + fill: var(--navi-color); + transition: fill 0.2s ease; + } + + .main-navigation ul ul .menu-item-has-children > a > .icon { + position: absolute; + left: auto; + right: 1em; + top: 50%; + margin-top: -0.4rem; + -webkit-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + transform: rotate(-90deg); + } + + .main-navigation ul .menu-item-has-children > a:hover > .icon { + fill: rgba(0, 0, 0, 0.5); + fill: var(--navi-hover-color); + } + + /* Top Navigation */ + .top-navigation ul, + .top-navigation ul ul { + display: block; + } + + .secondary-navigation { + display: flex; + margin-left: auto; + width: auto; + align-items: center; + } + + #masthead .top-navigation > ul.menu { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -ms-flex-flow: row wrap; + flex-flow: row wrap; + margin: 0; + border-bottom: none; + } + + .secondary-navigation.toggled-on, + .top-navigation > ul > li > a { + border: none; + } + + /* Dropdown Menus */ + .top-navigation ul ul { + position: absolute; + left: -999em; + top: 100%; + z-index: 99999; + border-top: 4px solid; + border-color: rgba(255, 255, 255, 0.1); + border-color: var(--top-navi-border-color); + background-color: #454545; + background-color: var(--header-background-color); + } + + .top-navigation ul li:hover > ul, + .top-navigation ul li.focus > ul { + right: 0; + left: auto; + } + + .top-navigation ul ul li a { + width: 16rem; + } + + .top-navigation ul ul ul { + left: -999em; + margin-top: -4px; + top: 0; + } + + .top-navigation ul ul li:hover > ul, + .top-navigation ul ul li.focus > ul { + right: 100%; + left: auto; + } + + .top-navigation ul ul li a, + .top-navigation ul ul ul li a, + .top-navigation ul ul ul ul li a { + padding: 1em; + } + + /* Dropdown Icons */ + .top-navigation .menu-item-has-children > a > .icon { + position: relative; + display: inline-block; + left: 0.5rem; + top: 0.05rem; + width: 12px; + height: 12px; + fill: #fff; + fill: var(--top-navi-color); + transition: fill 0.2s ease; + } + + .top-navigation ul ul .menu-item-has-children > a > .icon { + position: absolute; + left: auto; + right: 1em; + top: 50%; + margin-top: -0.4rem; + -webkit-transform: rotate(-90deg); + -ms-transform: rotate(-90deg); + transform: rotate(-90deg); + } + + .top-navigation ul .menu-item-has-children > a:hover > .icon { + fill: rgba(255, 255, 255, 0.5); + fill: var(--top-navi-hover-color); + } +} + +/*-------------------------------------------------------------- +## - Media Queries for Blocks +--------------------------------------------------------------*/ + +/*-------------------------------------------------------------- +# - Media Queries for Magazine widgets +--------------------------------------------------------------*/ +@media only screen and (max-width: 75em) { + .widget-magazine-columns .magazine-column-left { + padding-right: 0.75rem; + } + + .widget-magazine-columns .magazine-column-right { + padding-left: 0.75rem; + } +} + +@media only screen and (max-width: 60em) { + .widget-magazine-posts .large-post .entry-title { + font-size: 20px; + font-size: 1.25rem; + } +} + +@media only screen and (max-width: 50em) { + .widget-magazine-posts .large-post .entry-title { + font-size: 18px; + font-size: 1.125rem; + } +} + +@media only screen and (max-width: 45em) { + .widget-magazine-posts .small-post .entry-title { + font-size: 14px; + font-size: 0.875rem; + } +} + +@media only screen and (max-width: 40em) { + + /* Magazine Post Widgets */ + .widget-magazine-posts .magazine-grid-three-columns .post-column { + width: 50%; + } + + .widget-magazine-posts .large-post .entry-title { + font-size: 15px; + font-size: 0.9375rem; + } + + .widget-magazine-posts .large-post .post-content { + padding: 0.5em 1em; + } + + .widget-magazine-posts .large-post .entry-meta { + display: none; + } + + .widget-magazine-posts .small-post .entry-title { + font-size: 13px; + font-size: 0.8125rem; + } +} + +@media only screen and (max-width: 35em) { + .widget-magazine-posts .small-post .entry-title { + font-size: 15px; + font-size: 0.9375rem; + } + + /* Magazine Columns Widget */ + .widget-magazine-columns .magazine-column-left, + .widget-magazine-columns .magazine-column-right { + float: none; + padding: 0; + width: 100%; + } + + .widget-magazine-columns .magazine-column-left { + margin-bottom: 1.5em; + } + + .widget-magazine-columns .large-post .entry-title { + font-size: 18px; + font-size: 1.125rem; + } + + .widget-magazine-columns .large-post .entry-meta { + display: block; + } +} + +@media only screen and (max-width: 30em) { + + /* Magazine Post Widgets */ + .widget-magazine-posts .magazine-grid-two-columns, + .widget-magazine-posts .magazine-grid-three-columns { + display: block; + margin-right: 0; + } + + .widget-magazine-posts .magazine-grid-two-columns .post-column, + .widget-magazine-posts .magazine-grid-three-columns .post-column { + display: block; + padding-right: 0; + width: 100%; + } + + .widget-magazine-posts .large-post .entry-title, + .widget-magazine-posts .medium-post .entry-title { + font-size: 17px; + font-size: 1.0625rem; + } + + .widget-magazine-posts .large-post .entry-meta { + display: block; + } +} + +@media only screen and (max-width: 25em) { + .widget-magazine-posts .type-post { + border: none; + box-shadow: none; + } + + .widget-magazine-posts .type-post .post-content { + padding: 0.5em 0 0; + } + + .widget-magazine-posts .large-post .entry-title, + .widget-magazine-posts .medium-post .entry-title { + font-size: 16px; + font-size: 1rem; + } + + .widget-magazine-posts .small-post .entry-title { + font-size: 14px; + font-size: 0.875rem; + } + + .widget-magazine-posts .small-post .post-content { + padding: 0 0 0 0.75em; + } +} + +@media only screen and (max-width: 20em) { + .widget-magazine-posts .large-post .entry-title, + .widget-magazine-posts .medium-post .entry-title { + font-size: 15px; + font-size: 0.9375rem; + } + + .widget-magazine-posts .small-post .entry-title { + font-size: 13px; + font-size: 0.8125rem; + } +} + +/*-------------------------------------------------------------- +# - Media Queries for Media +--------------------------------------------------------------*/ +@media only screen and (max-width: 50em) { + + /* Gallery */ + .gallery-item { + padding: 0 0.75em 0.5em 0; + } + + .gallery-columns-6 .gallery-item, + .gallery-columns-7 .gallery-item, + .gallery-columns-8 .gallery-item, + .gallery-columns-9 .gallery-item { + max-width: 25%; + } +} + +@media only screen and (max-width: 30em) { + .alignright, + .alignleft { + float: none; + margin: 1em 0; + } + + /* Gallery */ + .gallery-columns-4 .gallery-item, + .gallery-columns-5 .gallery-item, + .gallery-columns-6 .gallery-item, + .gallery-columns-7 .gallery-item, + .gallery-columns-8 .gallery-item, + .gallery-columns-9 .gallery-item { + max-width: 50%; + } +} + +/*-------------------------------------------------------------- +# - Theme Options +--------------------------------------------------------------*/ + +/* Sidebar Left Layout */ +.sidebar-left .content-area { + float: right; + padding-right: 0; + padding-left: 2rem; +} + +.sidebar-left .sidebar { + float: left; +} + +@media only screen and (max-width: 80em) { + .sidebar-left .content-area { + padding-right: 0; + padding-left: 1.5em; + } +} + +@media only screen and (max-width: 60em) { + .sidebar-left .content-area { + padding: 0; + } +} + +/* Do not add left sidebar styles if there are no widgets */ +.no-sidebar .content-area { + float: none; + padding: 0; + width: 100%; +} diff --git a/views/404.twig b/views/404.twig new file mode 100644 index 0000000..a2be08f --- /dev/null +++ b/views/404.twig @@ -0,0 +1,21 @@ +{% extends 'base.twig' %} + +{% block page %} + +
      + +
      +

      {{ __( 'Oops, this page doesn\'t exist', 'romhackplaza' )|esc_html }}

      +
      + +
      +
      + +

      {{ __( "It seems like you have tried to open a page that doesn't exist. It could have been deleted, moved, or it never existed at all. Either way, you're welcome to search for what you are looking for with the search form in the navbar.", 'romhackplaza') }}

      + +
      +
      + +
      + +{% endblock %} \ No newline at end of file diff --git a/views/base.twig b/views/base.twig new file mode 100644 index 0000000..347e92d --- /dev/null +++ b/views/base.twig @@ -0,0 +1,115 @@ + + + + + {% block head %} + + + + + + {{ fn( 'wp_head' ) }} + {% endblock %} + + + + + {% block body %} + + {% do action('wp_body_open') %} + +
      + + + + + + {# Add Header image here if needed... #} + {# Add Slider if needed #} + +
      + +
      +
      + + {% block page %} + {% endblock %} + +
      +
      + + {% block sidebar %} + + {% if wp_sidebar %} + + + + {% endif %} + + {% endblock %} + +
      + + + +
      + + {{ fn( 'wp_footer') }} + + {% endblock %} + + + \ No newline at end of file diff --git a/views/capability_required.twig b/views/capability_required.twig new file mode 100644 index 0000000..da6430c --- /dev/null +++ b/views/capability_required.twig @@ -0,0 +1,14 @@ +{% extends "pages/generic.twig" %} + +{% block page_content %} + + {{ __( 'You do not have permission to view the content on this page.', 'romhackplaza') }}
      + {{ why }} + + {% if not user %} + +

      Please log in or register.

      + + {% endif %} + +{% endblock %} \ No newline at end of file diff --git a/views/index.twig b/views/index.twig new file mode 100755 index 0000000..f7b9833 --- /dev/null +++ b/views/index.twig @@ -0,0 +1,5 @@ +{% extends 'base.twig' %} + +{% block page %} + {% include 'pieces/posts/author-bio.twig' %} +{% endblock %} \ No newline at end of file diff --git a/views/pages/generic.twig b/views/pages/generic.twig new file mode 100644 index 0000000..4fdc377 --- /dev/null +++ b/views/pages/generic.twig @@ -0,0 +1,26 @@ +{% extends 'base.twig' %} + +{% block page %} + +
      +
      +

      {{ post.title }}

      +
      + + {{ fn('the_post_thumbnail') }} + +
      +
      + + {% block page_content %} + + {{ post.content }} + + {% endblock %} + +
      +
      + +
      + +{% endblock %} diff --git a/views/pages/notifications.twig b/views/pages/notifications.twig new file mode 100644 index 0000000..6a13973 --- /dev/null +++ b/views/pages/notifications.twig @@ -0,0 +1,68 @@ +{% extends 'pages/generic.twig' %} + +{% block page_content %} + + {% for notif in notifications %} + + {% set sender = get_user( notif.sender ) %} + +
      +
      + + {% if notif.readed != 1 %} +
      + {{ __( 'New', 'romhackplaza' ) }} +
      + {% endif %} + +
      + {{ sender.name }} +
      +
      + {{ notif.type }} +
      +

      + + {% if notif.auto == 1 %} + {{ __( 'Automatic notification', 'romhackplaza' ) }} - + {% endif %} + + {{ notif.date|date }} ({{ notif.id }}) + +

      +
      + {{ notif.content }} +
      +
      + + +
      + + {% else %} + + {{ __( "You don't have any notifications.", 'romhackplaza') }} + + {% endfor %} + +{% endblock %} \ No newline at end of file diff --git a/views/pages/submission-generic.twig b/views/pages/submission-generic.twig new file mode 100644 index 0000000..787719d --- /dev/null +++ b/views/pages/submission-generic.twig @@ -0,0 +1,85 @@ +{% extends 'pages/generic.twig' %} +{% set accordion_opened = false %} + +{% block page_content %} + +
      + + {% if submission_result != "" %} + + {% include 'pieces/submissions/result-message.twig' %} + + {% elseif submission_post_id != 0 %} {# Edition #} + + {% set entry = get_post( submission_post_id ) %} + + {% if entry and entry.post_type == post_type %} + + {% if submission_can_edit %} {# Is the author or a staff member. #} + + {% if entry.status != "locked" or submission_can_bypass_locked %} + + {% if ( entry.status != "trashed" and entry.status != "private" ) or submission_can_bypass_trashed_private %} + + {% if not submission_public_edit_disabled %} + + {# Finally you can edit your entry ! #} + {{ fn( 'do_action', 'RomhackPlaza\\Extenders\\Submissions\\Get_A_File_Server', entry.id ) }} + {% include "pieces/submissions/form-base-begin.twig" %} + {% block form_edit %} + {% endblock %} + {% include "pieces/submissions/form-base-end.twig" %} + + {% else %} + + {% if submission_can_bypass_trashed_private %} {# Administrator #} + + {# TODO: Must include Quick tools pieces #} + + {% endif %} + + {{ __( "Sorry, you cannot edit this entry as it has been blocked by an administrator.") }} + + {% include "pieces/submissions/message-by-team.twig" %} + + {% endif %} + + {% else %} + + {{ __( "You don't have permission to edit this entry. (Entry trashed.)", 'romhackplaza' ) }} + + {% endif %} + + {% else %} + + {{ __( "You don't have permission to edit this entry. (Entry locked by a staff member)", 'romhackplaza' ) }} + + {% include "pieces/submissions/message-by-team.twig" %} + + {% endif %} + + {% else %} + + {{ __( "You don't have permission to edit this entry.", 'romhackplaza' ) }} + + {% endif %} + + {% else %} + + {{ __( "Post ID doesn't exist.", 'romhackplaza' ) }} + + {% endif %} + + {% else %} {# New entry #} + + {{ function( 'do_action', "RomhackPlaza\\Extenders\\Submissions\\Get_A_File_Server", '0' ) }} + {% include "pieces/submissions/form-base-begin.twig" %} + {% block form_create %} + {% endblock %} + {% include "pieces/submissions/form-base-end.twig" %} + + {% endif %} + +
      + +{% endblock %} \ No newline at end of file diff --git a/views/pages/submit-translation.twig b/views/pages/submit-translation.twig new file mode 100644 index 0000000..695026b --- /dev/null +++ b/views/pages/submit-translation.twig @@ -0,0 +1,85 @@ +{% extends "pages/submission-generic.twig" %} + +{% block form_create %} + + {% set accordion_opened = true %} + + {% submission_accordion "download-files" %} + {% include "pieces/submissions/fields/file-uploader.twig" %} + {% end_submission_accordion %} + + {% submission_accordion "about-translation" %} + {% include "pieces/submissions/fields/entry-title.twig" %} + {% include "pieces/submissions/fields/version-number.twig" %} + {% include "pieces/submissions/fields/hack-status.twig" %} + {% include "pieces/submissions/fields/release-date.twig" %} + {% include "pieces/submissions/fields/languages.twig" %} + {% include "pieces/submissions/fields/post-content.twig" %} + {% end_submission_accordion %} + + {% set accordion_opened = false %} + + {% submission_accordion "game-information" %} + {% include "pieces/submissions/fields/game.twig" %} + {% include "pieces/submissions/fields/platform.twig" %} + {% include "pieces/submissions/fields/genre.twig" %} + {% include "pieces/submissions/fields/hashes.twig" %} + {% end_submission_accordion %} + + {% submission_accordion "attachments" %} + {% include "pieces/submissions/fields/acf-attachments.twig" %} + {% end_submission_accordion %} + + {% submission_accordion "team-information" %} + {% include "pieces/submissions/fields/authors.twig" %} + {% include "pieces/submissions/fields/credits.twig" %} + {% end_submission_accordion %} + + {% submission_accordion "extra-links" %} + {% include "pieces/submissions/fields/extra-links.twig" %} + {% end_submission_accordion %} + + {% include "pieces/submissions/fields/save-as-draft.twig" %} + +{% endblock %} + +{% block form_edit %} + + {% set accordion_opened = false %} + + {% submission_accordion "download-files" %} + {% include "pieces/submissions/fields/file-uploader.twig" %} + {% end_submission_accordion %} + + {% submission_accordion "about-translation" %} + {% include "pieces/submissions/fields/entry-title.twig" %} + {% include "pieces/submissions/fields/version-number.twig" %} + {% include "pieces/submissions/fields/hack-status.twig" %} + {% include "pieces/submissions/fields/release-date.twig" %} + {% include "pieces/submissions/fields/languages.twig" %} + {% include "pieces/submissions/fields/post-content.twig" %} + {% end_submission_accordion %} + + {% submission_accordion "game-information" %} + {% include "pieces/submissions/fields/game.twig" %} + {% include "pieces/submissions/fields/platform.twig" %} + {% include "pieces/submissions/fields/genre.twig" %} + {% include "pieces/submissions/fields/hashes.twig" %} + {% end_submission_accordion %} + + {% submission_accordion "attachments" %} + {% include "pieces/submissions/fields/acf-attachments.twig" %} + {% end_submission_accordion %} + + {% submission_accordion "team-information" %} + {% include "pieces/submissions/fields/authors.twig" %} + {% include "pieces/submissions/fields/credits.twig" %} + {% end_submission_accordion %} + + {% submission_accordion "extra-links" %} + {% include "pieces/submissions/fields/extra-links.twig" %} + {% end_submission_accordion %} + + {% include "pieces/submissions/fields/save-as-draft.twig" %} + +{% endblock %} \ No newline at end of file diff --git a/views/pieces/menus/primary.twig b/views/pieces/menus/primary.twig new file mode 100644 index 0000000..55c94fb --- /dev/null +++ b/views/pieces/menus/primary.twig @@ -0,0 +1,33 @@ +{% if menu.primary %} + +
      + +
      + + + +
      + +
      + +{% endif %} \ No newline at end of file diff --git a/views/pieces/menus/secondary.twig b/views/pieces/menus/secondary.twig new file mode 100644 index 0000000..a9edaf1 --- /dev/null +++ b/views/pieces/menus/secondary.twig @@ -0,0 +1,40 @@ +{% if menu.primary or menu.secondary %} + + + +{% endif %} + +{% if menu.secondary %} + +
      + + + +
      + +{% endif %} \ No newline at end of file diff --git a/views/pieces/posts/author-bio.twig b/views/pieces/posts/author-bio.twig new file mode 100644 index 0000000..64c1706 --- /dev/null +++ b/views/pieces/posts/author-bio.twig @@ -0,0 +1,22 @@ +{% if theme_setting( 'author_bio' ) or conditional_tag.is_customize_preview %} + + + +{% endif %} \ No newline at end of file diff --git a/views/pieces/posts/grids/classic.twig b/views/pieces/posts/grids/classic.twig new file mode 100644 index 0000000..cc73cc3 --- /dev/null +++ b/views/pieces/posts/grids/classic.twig @@ -0,0 +1,23 @@ +
      + +
      + + +

      {{ post.title }}

      +
      + +
      + + {{ fn( 'the_post_thumbnail' ) }} + +
      + +
      + + {{ post.content }} + +
      + +
      + +
      \ No newline at end of file diff --git a/views/pieces/submissions/fields/acf-attachments.twig b/views/pieces/submissions/fields/acf-attachments.twig new file mode 100644 index 0000000..5079ab3 --- /dev/null +++ b/views/pieces/submissions/fields/acf-attachments.twig @@ -0,0 +1,10 @@ + + {{ __( "Main Image:", 'romhackplaza' ) }} + + + {{ __( "This will show up on the index and on top of the entry. A screenshot or custom cover is prefered else all hacks of same game will look the same.", 'romhackplaza' ) }} + +
      +{% if can_acf %} + {{ function( 'acf_form', attachments_settings ) }} +{% endif %} \ No newline at end of file diff --git a/views/pieces/submissions/fields/authors.twig b/views/pieces/submissions/fields/authors.twig new file mode 100644 index 0000000..a9c42e2 --- /dev/null +++ b/views/pieces/submissions/fields/authors.twig @@ -0,0 +1,11 @@ + + + {{ __( "Person or Group who created this, if it's you add/select yourself.", 'romhackplaza' ) }} + + \ No newline at end of file diff --git a/views/pieces/submissions/fields/credits.twig b/views/pieces/submissions/fields/credits.twig new file mode 100644 index 0000000..689764e --- /dev/null +++ b/views/pieces/submissions/fields/credits.twig @@ -0,0 +1,7 @@ + + + {{ __( "Optional.", 'romhackplaza') }} + + \ No newline at end of file diff --git a/views/pieces/submissions/fields/entry-title.twig b/views/pieces/submissions/fields/entry-title.twig new file mode 100644 index 0000000..a521ded --- /dev/null +++ b/views/pieces/submissions/fields/entry-title.twig @@ -0,0 +1,10 @@ + +{% if post_type == "translations" %} + {{ __( "If the translation has a custom title. If not, leave it blank and the game title will be taken.", 'romhackplaza' ) }} +{% endif %} + \ No newline at end of file diff --git a/views/pieces/submissions/fields/extra-links.twig b/views/pieces/submissions/fields/extra-links.twig new file mode 100644 index 0000000..7f6bda8 --- /dev/null +++ b/views/pieces/submissions/fields/extra-links.twig @@ -0,0 +1,12 @@ + +{{ __( 'Optional.', 'romhackplaza' ) }} +{{ __( "Project entry on site/blog/forum/GitHub.", 'romhackplaza' ) }} + + + +{{ __( 'Optional.', 'romhackplaza' ) }} + \ No newline at end of file diff --git a/views/pieces/submissions/fields/file-uploader.twig b/views/pieces/submissions/fields/file-uploader.twig new file mode 100644 index 0000000..637d591 --- /dev/null +++ b/views/pieces/submissions/fields/file-uploader.twig @@ -0,0 +1,32 @@ + + {{ __( "Files", 'romhackplaza' ) }} + + + {{ __( "For patches, .zip is prefered. .7z/.rar accepted. To enable online patcher, your patch need to be compressed in a ZIP file", 'romhackplaza' ) }} + +
      + + +
      + +
      +
      + +{% if submission_can_bypass_trashed_private %} +
      + {{ __( "Chosen server: ", 'romhackplaza' ) }} +
      +{% endif %} +
      + + {{ __( "Current Files", 'romhackplaza' ) }} + +
      \ No newline at end of file diff --git a/views/pieces/submissions/fields/game.twig b/views/pieces/submissions/fields/game.twig new file mode 100644 index 0000000..0ff542b --- /dev/null +++ b/views/pieces/submissions/fields/game.twig @@ -0,0 +1,7 @@ + +{{ __( "Search your game (give it a second).", 'romhackplaza' ) }} + \ No newline at end of file diff --git a/views/pieces/submissions/fields/genre.twig b/views/pieces/submissions/fields/genre.twig new file mode 100644 index 0000000..4239736 --- /dev/null +++ b/views/pieces/submissions/fields/genre.twig @@ -0,0 +1,11 @@ + + \ No newline at end of file diff --git a/views/pieces/submissions/fields/hack-status.twig b/views/pieces/submissions/fields/hack-status.twig new file mode 100644 index 0000000..1710976 --- /dev/null +++ b/views/pieces/submissions/fields/hack-status.twig @@ -0,0 +1,9 @@ +
      + {{ __( "Status:", 'romhackplaza' ) }} + {% for term in terms_status %} +
      + + +
      + {% endfor %} +
      \ No newline at end of file diff --git a/views/pieces/submissions/fields/hashes.twig b/views/pieces/submissions/fields/hashes.twig new file mode 100644 index 0000000..1f6d492 --- /dev/null +++ b/views/pieces/submissions/fields/hashes.twig @@ -0,0 +1,13 @@ + +{{ __( "Hash of original, unpatched rom. Calculate it here or paste it directly below.", "romhackplaza" ) }} + +
      + +
      +
      + + \ No newline at end of file diff --git a/views/pieces/submissions/fields/languages.twig b/views/pieces/submissions/fields/languages.twig new file mode 100644 index 0000000..db35309 --- /dev/null +++ b/views/pieces/submissions/fields/languages.twig @@ -0,0 +1,17 @@ + +
      + +
      + {% for term in terms_language %} +
      + +
      + {% endfor %} +
      +
      \ No newline at end of file diff --git a/views/pieces/submissions/fields/platform.twig b/views/pieces/submissions/fields/platform.twig new file mode 100644 index 0000000..5a3ff6f --- /dev/null +++ b/views/pieces/submissions/fields/platform.twig @@ -0,0 +1,11 @@ + + \ No newline at end of file diff --git a/views/pieces/submissions/fields/post-content.twig b/views/pieces/submissions/fields/post-content.twig new file mode 100644 index 0000000..ba772b1 --- /dev/null +++ b/views/pieces/submissions/fields/post-content.twig @@ -0,0 +1,4 @@ + +{{ fn( 'wp_editor', value_post_content, "postContent", post_content_settings ) }} \ No newline at end of file diff --git a/views/pieces/submissions/fields/release-date.twig b/views/pieces/submissions/fields/release-date.twig new file mode 100644 index 0000000..672d814 --- /dev/null +++ b/views/pieces/submissions/fields/release-date.twig @@ -0,0 +1,15 @@ + +{{ __( "If only initial release exist, the release date.", "romhackplaza" ) }} + + \ No newline at end of file diff --git a/views/pieces/submissions/fields/save-as-draft.twig b/views/pieces/submissions/fields/save-as-draft.twig new file mode 100644 index 0000000..ebd5cd5 --- /dev/null +++ b/views/pieces/submissions/fields/save-as-draft.twig @@ -0,0 +1,4 @@ +
      + + +
      \ No newline at end of file diff --git a/views/pieces/submissions/fields/version-number.twig b/views/pieces/submissions/fields/version-number.twig new file mode 100644 index 0000000..679daa7 --- /dev/null +++ b/views/pieces/submissions/fields/version-number.twig @@ -0,0 +1,8 @@ + + \ No newline at end of file diff --git a/views/pieces/submissions/form-base-begin.twig b/views/pieces/submissions/form-base-begin.twig new file mode 100644 index 0000000..8f4267b --- /dev/null +++ b/views/pieces/submissions/form-base-begin.twig @@ -0,0 +1,9 @@ +
      + + {% if submission_post_id != 0 %} + + + {% endif %} + + + \ No newline at end of file diff --git a/views/pieces/submissions/form-base-end.twig b/views/pieces/submissions/form-base-end.twig new file mode 100644 index 0000000..4dbea4c --- /dev/null +++ b/views/pieces/submissions/form-base-end.twig @@ -0,0 +1,4 @@ + {{ submission_save_nonce }} + + +
      \ No newline at end of file diff --git a/views/pieces/submissions/message-by-team.twig b/views/pieces/submissions/message-by-team.twig new file mode 100644 index 0000000..39c4149 --- /dev/null +++ b/views/pieces/submissions/message-by-team.twig @@ -0,0 +1,5 @@ +{% if submission_queue_status != "" %} + + {{ __( "Message by team:", 'romhackplaza' ) }} {{ submission_queue_status }} + +{% endif %} \ No newline at end of file diff --git a/views/pieces/submissions/result-message.twig b/views/pieces/submissions/result-message.twig new file mode 100644 index 0000000..1adccd9 --- /dev/null +++ b/views/pieces/submissions/result-message.twig @@ -0,0 +1,33 @@ +{% if submission_post_id == 0 %} + + {{ __( "No valid post ID provided.", "romhackplaza" ) }} + +{% elseif submission_result == "edit-successful" %} + + {{ __( "Your changes were recorded successfully!", "romhackplaza" ) }} + + {% include "pieces/submissions/result-what-now.twig" %} + +{% elseif submission_result == "submit-successful" %} + + {{ __( "Your entry was recorded!", 'romhackplaza' ) }} + + {% if submission_author_is_verified %} + + {{ __( "Since you are verified, your submission can be seen on the home page or on the my drafts page if you chose not to publish it.", 'romhackplaza' ) }} + + {% else %} + + {{ __("Since you are not a verified member, your submission is pending review by a staff member. You can see it on the submissions queue.") }} +
      + {{ __( "We'll get to it as soon as possible.", 'romhackplaza' ) }} +
      + {{ __( "To avoid wait times, you can also ", "romhackplaza" ) }}{{ __( "become verified", 'romhackplaza') }}. + + {% endif %} + +{% else %} + + {{ __( "Do you want a coffee?", "romhackplaza" ) }} + +{% endif %} \ No newline at end of file diff --git a/views/pieces/submissions/result-what-now.twig b/views/pieces/submissions/result-what-now.twig new file mode 100644 index 0000000..a07ebeb --- /dev/null +++ b/views/pieces/submissions/result-what-now.twig @@ -0,0 +1,23 @@ +{% set new_post = get_post( submission_post_id ) %} + + + +

      {{ __( "What now?", 'romhackplaza' ) }}

      + \ No newline at end of file diff --git a/views/single.twig b/views/single.twig new file mode 100755 index 0000000..6e82288 --- /dev/null +++ b/views/single.twig @@ -0,0 +1 @@ +

      {post.title}

      \ No newline at end of file