Start Theme Repo

This commit is contained in:
2026-01-29 19:10:03 +01:00
commit 101179e994
84 changed files with 14654 additions and 0 deletions

4
.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
.env
.idea
node_modules
vendor

3
404.php Normal file
View File

@@ -0,0 +1,3 @@
<?php
\Timber\Timber::render( '404.twig', \Timber\Timber::context() );

View File

@@ -0,0 +1,75 @@
/*
* Customizer CSS
*
* Adjusts styling for theme option controls in the Customizer
*
* @package Treville Pro
*/
#customize-control-treville_theme_options-footer_text {
margin-top: 16px;
}
#customize-control-treville_theme_options-header_search_title,
#customize-control-treville_theme_options-scroll_top_title {
margin-bottom: 0;
}
#customize-control-treville_theme_options-footer_text textarea {
height: 4em;
}
/* Custom Font Control */
.customize-control-treville_pro_custom_font {
margin-top: 24px;
}
#customize-control-text_font {
margin-top: 0;
}
.customize-control-treville_pro_custom_font .actions .button.previous {
margin-right: 4px;
}
.customize-control-treville_pro_custom_font .actions .button.standard {
float: right;
}
.customize-control-treville_pro_custom_font select {
width: 100%;
}
.customize-control-treville_pro_custom_font div:hover {
cursor: default;
}
.customize-control-treville_pro_custom_font .actions .button:hover {
cursor: pointer;
}
/* Typography Checkbox Controls */
#sub-accordion-section-treville_pro_section_typography .customize-control-checkbox {
margin-bottom: 0;
}
/* Magazine Sections */
.adding-magazine-widget #available-widgets #available-widgets-list [id*='widget-tpl-treville-magazine-sidebar'] {
display: none !important;
}
.adding-magazine-widget #available-widgets [id*='widget-tpl-treville-magazine-horizontal-box'] .widget-top::before {
background-image: url( '../images/magazine-horizontal-box.png' );
}
.adding-magazine-widget #available-widgets [id*='widget-tpl-treville-magazine-vertical-box'] .widget-top::before {
background-image: url( '../images/magazine-vertical-box.png' );
}
.adding-magazine-widget #available-widgets [id*='widget-tpl-treville-magazine-list'] .widget-top::before {
background-image: url( '../images/magazine-list.png' );
}
.adding-magazine-widget #available-widgets [id*='widget-tpl-treville-magazine-single'] .widget-top::before {
background-image: url( '../images/magazine-single.png' );
}

View File

@@ -0,0 +1,420 @@
/**
* Customizer JS
*
* Reloads changes on Theme Customizer Preview asynchronously for better usability
*
* @package Treville Pro
*/
( function( $ ) {
/* Author Bio checkbox */
wp.customize( 'romhackplaza_theme_options[author_bio]', function( value ) {
value.bind( function( newval ) {
if ( false === newval ) {
hideElement( '.single-post .type-post .entry-author' );
} else {
showElement( '.single-post .type-post .entry-author' );
}
} );
} );
/* Primary Color Option */
wp.customize( 'romhackplaza_theme_options[primary_color]', function( value ) {
value.bind( function( newval ) {
document.documentElement.style.setProperty( '--primary-color', newval );
} );
} );
/* Secondary Color Option */
wp.customize( 'romhackplaza_theme_options[secondary_color]', function( value ) {
value.bind( function( newval ) {
document.documentElement.style.setProperty( '--secondary-color', newval );
} );
} );
/* Tertiary Color Option */
wp.customize( 'romhackplaza_theme_options[tertiary_color]', function( value ) {
value.bind( function( newval ) {
document.documentElement.style.setProperty( '--tertiary-color', newval );
} );
} );
/* Accent Color Option */
wp.customize( 'romhackplaza_theme_options[accent_color]', function( value ) {
value.bind( function( newval ) {
document.documentElement.style.setProperty( '--accent-color', newval );
} );
} );
/* Highlight Color Option */
wp.customize( 'romhackplaza_theme_options[highlight_color]', function( value ) {
value.bind( function( newval ) {
document.documentElement.style.setProperty( '--highlight-color', newval );
} );
} );
/* Light Gray Color Option */
wp.customize( 'romhackplaza_theme_options[light_gray_color]', function( value ) {
value.bind( function( newval ) {
document.documentElement.style.setProperty( '--light-gray-color', newval );
} );
} );
/* Gray Color Option */
wp.customize( 'romhackplaza_theme_options[gray_color]', function( value ) {
value.bind( function( newval ) {
document.documentElement.style.setProperty( '--gray-color', newval );
} );
} );
/* Dark Gray Color Option */
wp.customize( 'romhackplaza_theme_options[dark_gray_color]', function( value ) {
value.bind( function( newval ) {
document.documentElement.style.setProperty( '--dark-gray-color', newval );
} );
} );
/* Header Color Option */
wp.customize( 'romhackplaza_theme_options[header_color]', function( value ) {
value.bind( function( newval ) {
var text_color, hover_color, border_color;
if( isColorLight( newval ) ) {
text_color = '#151515';
hover_color = 'rgba(0, 0, 0, 0.5)';
border_color = 'rgba(0, 0, 0, 0.1)';
} else {
text_color = '#fff';
hover_color = 'rgba(255, 255, 255, 0.5)';
border_color = 'rgba(255, 255, 255, 0.1)';
}
document.documentElement.style.setProperty( '--header-background-color', newval );
document.documentElement.style.setProperty( '--header-text-color', text_color );
document.documentElement.style.setProperty( '--site-title-color', text_color );
document.documentElement.style.setProperty( '--site-title-hover-color', hover_color );
document.documentElement.style.setProperty( '--top-navi-color', text_color );
document.documentElement.style.setProperty( '--top-navi-hover-color', hover_color );
document.documentElement.style.setProperty( '--top-navi-border-color', border_color );
} );
} );
/* Main Navigation Color Option */
wp.customize( 'romhackplaza_theme_options[navi_color]', function( value ) {
value.bind( function( newval ) {
var text_color, hover_color, border_color;
if( isColorDark( newval ) ) {
text_color = '#fff';
hover_color = 'rgba(255, 255, 255, 0.5)';
border_color = 'rgba(255, 255, 255, 0.2)';
} else {
text_color = '#454545';
hover_color = 'rgba(0, 0, 0, 0.5)';
border_color = 'rgba(0, 0, 0, 0.2)';
}
document.documentElement.style.setProperty( '--navi-background-color', newval );
document.documentElement.style.setProperty( '--navi-color', text_color );
document.documentElement.style.setProperty( '--navi-hover-color', hover_color );
document.documentElement.style.setProperty( '--navi-border-color', border_color );
} );
} );
/* Link Color Option */
wp.customize( 'romhackplaza_theme_options[link_color]', function( value ) {
value.bind( function( newval ) {
document.documentElement.style.setProperty( '--link-color', newval );
} );
} );
/* Link Color Hover Option */
wp.customize( 'romhackplaza_theme_options[link_hover_color]', function( value ) {
value.bind( function( newval ) {
document.documentElement.style.setProperty( '--link-hover-color', newval );
} );
} );
/* Button Color Option */
wp.customize( 'romhackplaza_theme_options[button_color]', function( value ) {
value.bind( function( newval ) {
var text_color;
if( isColorLight( newval ) ) {
text_color = '#151515';
} else {
text_color = '#fff';
}
document.documentElement.style.setProperty( '--button-color', newval );
document.documentElement.style.setProperty( '--button-text-color', text_color );
} );
} );
/* Button Color Hover Option */
wp.customize( 'romhackplaza_theme_options[button_hover_color]', function( value ) {
value.bind( function( newval ) {
var text_color;
if( isColorLight( newval ) ) {
text_color = '#151515';
} else {
text_color = '#fff';
}
document.documentElement.style.setProperty( '--button-hover-color', newval );
document.documentElement.style.setProperty( '--button-hover-text-color', text_color );
} );
} );
/* Title Color Option */
wp.customize( 'romhackplaza_theme_options[title_color]', function( value ) {
value.bind( function( newval ) {
document.documentElement.style.setProperty( '--title-color', newval );
} );
} );
/* Title Hover Option */
wp.customize( 'romhackplaza_theme_options[title_hover_color]', function( value ) {
value.bind( function( newval ) {
document.documentElement.style.setProperty( '--title-hover-color', newval );
} );
} );
/* Border Color Option */
wp.customize( 'romhackplaza_theme_options[border_color]', function( value ) {
value.bind( function( newval ) {
document.documentElement.style.setProperty( '--content-border-color', newval );
} );
} );
/* Widget Title Color Option */
wp.customize( 'romhackplaza_theme_options[widget_title_color]', function( value ) {
value.bind( function( newval ) {
document.documentElement.style.setProperty( '--widget-title-color', newval );
} );
} );
/* Footer Widgets Color Option */
wp.customize( 'romhackplaza_theme_options[footer_widgets_color]', function( value ) {
value.bind( function( newval ) {
var title_color, text_color, link_color, link_hover_color, border_color;
if( isColorLight( newval ) ) {
title_color = 'rgba(0, 0, 0, 0.025)';
text_color = '#151515';
link_color = '#151515';
link_hover_color = 'rgba(0, 0, 0, 0.5)';
border_color = 'rgba(0, 0, 0, 0.05)';
} else {
title_color = 'rgba(255, 255, 255, 0.025)';
text_color = '#fff';
link_color = 'rgba(255, 255, 255, 0.5)';
link_hover_color = '#fff';
border_color = 'rgba(255, 255, 255, 0.05)';
}
document.documentElement.style.setProperty( '--footer-widgets-background-color', newval );
document.documentElement.style.setProperty( '--footer-widgets-title-color', title_color );
document.documentElement.style.setProperty( '--footer-widgets-text-color', text_color );
document.documentElement.style.setProperty( '--footer-widgets-link-color', link_color );
document.documentElement.style.setProperty( '--footer-widgets-link-hover-color', link_hover_color );
document.documentElement.style.setProperty( '--footer-widgets-border-color', border_color );
} );
} );
/* Footer Color Option */
wp.customize( 'romhackplaza_theme_options[footer_color]', function( value ) {
value.bind( function( newval ) {
var text_color, link_color, link_hover_color;
if( isColorLight( newval ) ) {
text_color = 'rgba(0, 0, 0, 0.6)';
link_color = '#151515';
link_hover_color = 'rgba(0, 0, 0, 0.6)';
} else {
text_color = '#ddd';
link_color = '#fff';
link_hover_color = 'rgba(255, 255, 255, 0.5)';
}
document.documentElement.style.setProperty( '--footer-background-color', newval );
document.documentElement.style.setProperty( '--footer-text-color', text_color );
document.documentElement.style.setProperty( '--footer-link-color', link_color );
document.documentElement.style.setProperty( '--footer-link-hover-color', link_hover_color );
} );
} );
/* Text Font */
wp.customize( 'romhackplaza_theme_options[text_font]', function( value ) {
value.bind( function( newval ) {
// Load Font in Customizer.
loadCustomFont( newval, 'text-font' );
// Set Font.
var systemFont = '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif';
var newFont = newval === 'SystemFontStack' ? systemFont : newval;
// Set CSS.
document.documentElement.style.setProperty( '--text-font', newFont );
} );
} );
/* Title Font */
wp.customize( 'romhackplaza_theme_options[title_font]', function( value ) {
value.bind( function( newval ) {
// Load Font in Customizer.
loadCustomFont( newval, 'title-font' );
// Set Font.
var systemFont = '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif';
var newFont = newval === 'SystemFontStack' ? systemFont : newval;
// Set CSS.
document.documentElement.style.setProperty( '--title-font', newFont );
} );
} );
/* Title Font Weight */
wp.customize( 'romhackplaza_theme_options[title_is_bold]', function( value ) {
value.bind( function( newval ) {
var fontWeight = newval ? 'bold' : 'normal';
document.documentElement.style.setProperty( '--title-font-weight', fontWeight );
} );
} );
/* Title Text Transform */
wp.customize( 'romhackplaza_theme_options[title_is_uppercase]', function( value ) {
value.bind( function( newval ) {
var textTransform = newval ? 'uppercase' : 'none';
document.documentElement.style.setProperty( '--title-text-transform', textTransform );
} );
} );
/* Navi Font */
wp.customize( 'romhackplaza_theme_options[navi_font]', function( value ) {
value.bind( function( newval ) {
// Load Font in Customizer.
loadCustomFont( newval, 'navi-font' );
// Set Font.
var systemFont = '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif';
var newFont = newval === 'SystemFontStack' ? systemFont : newval;
// Set CSS.
document.documentElement.style.setProperty( '--navi-font', newFont );
} );
} );
/* Navi Font Weight */
wp.customize( 'romhackplaza_theme_options[navi_is_bold]', function( value ) {
value.bind( function( newval ) {
var fontWeight = newval ? 'bold' : 'normal';
document.documentElement.style.setProperty( '--navi-font-weight', fontWeight );
} );
} );
/* Navi Text Transform */
wp.customize( 'romhackplaza_theme_options[navi_is_uppercase]', function( value ) {
value.bind( function( newval ) {
var textTransform = newval ? 'uppercase' : 'none';
document.documentElement.style.setProperty( '--navi-text-transform', textTransform );
} );
} );
/* Widget Title Font */
wp.customize( 'romhackplaza_theme_options[widget_title_font]', function( value ) {
value.bind( function( newval ) {
// Load Font in Customizer.
loadCustomFont( newval, 'widget-title-font' );
// Set Font.
var systemFont = '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif';
var newFont = newval === 'SystemFontStack' ? systemFont : newval;
// Set CSS.
document.documentElement.style.setProperty( '--widget-title-font', newFont );
} );
} );
/* Widget Title Font Weight */
wp.customize( 'romhackplaza_theme_options[widget_title_is_bold]', function( value ) {
value.bind( function( newval ) {
var fontWeight = newval ? 'bold' : 'normal';
document.documentElement.style.setProperty( '--widget-title-font-weight', fontWeight );
} );
} );
/* Widget Title Text Transform */
wp.customize( 'romhackplaza_theme_options[widget_title_is_uppercase]', function( value ) {
value.bind( function( newval ) {
var textTransform = newval ? 'uppercase' : 'none';
document.documentElement.style.setProperty( '--widget-title-text-transform', textTransform );
} );
} );
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'
});
}
function hexdec( hexString ) {
hexString = ( hexString + '' ).replace( /[^a-f0-9]/gi, '' );
return parseInt( hexString, 16 );
}
function getColorBrightness( hexColor ) {
// Remove # string.
hexColor = hexColor.replace( '#', '' );
// Convert into RGB.
var r = hexdec( hexColor.substring( 0, 2 ) );
var g = hexdec( hexColor.substring( 2, 4 ) );
var b = hexdec( hexColor.substring( 4, 6 ) );
return ( ( ( r * 299 ) + ( g * 587 ) + ( b * 114 ) ) / 1000 );
}
function isColorLight( hexColor ) {
return ( getColorBrightness( hexColor ) > 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 = "<link id='treville-pro-custom-" + type + "' href='" + fontFileURL + "' rel='stylesheet' type='text/css'>";
var checkLink = $( "head" ).find( "#treville-pro-custom-" + type ).length;
if (checkLink > 0) {
$( "head" ).find( "#treville-pro-custom-" + type ).remove();
}
$( "head" ).append( fontStylesheet );
}
} )( jQuery );

View File

@@ -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' );
}

View File

@@ -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;
}

File diff suppressed because it is too large Load Diff

View File

@@ -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;
}
}
}

View File

@@ -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;
}

View File

@@ -0,0 +1,104 @@
<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><symbol viewBox="0 0 16 16" id="activity"><title>activity</title> <path d="M10,11.8L8.5,7.7l-1.6,3.7c-0.3,0.8-1.4,0.8-1.8,0.1L3.9,9l-1.1,1.6L1.2,9.4l2-3c0.4-0.6,1.4-0.6,1.7,0.1l1,2.1
l1.7-4c0.3-0.8,1.5-0.8,1.8,0l1.6,4l2.1-5.9l1.8,0.6l-3,8.5C11.6,12.7,10.4,12.7,10,11.8z"/> </symbol><symbol viewBox="0 0 16 16" id="anchor"><title>anchor</title> <path d="M12,8v2.5c0,0.8-0.7,1.5-1.5,1.5S9,11.3,9,10.5V9h1c0.3,0,0.5-0.2,0.5-0.5S10.3,8,10,8H9V5.8c0.7-0.3,1.1-1,1.1-1.8
c0-1.1-0.9-2-2-2c-1.1,0-2,0.9-2,2c0,0.7,0.4,1.3,0.9,1.7V8H6C5.7,8,5.5,8.2,5.5,8.5S5.7,9,6,9h1v1.5C7,11.3,6.3,12,5.5,12
S4,11.3,4,10.5V8c-1.1,0-2,0.9-2,2v0.5C2,12.4,3.6,14,5.5,14c1,0,1.9-0.4,2.5-1.1c0.6,0.6,1.5,1.1,2.5,1.1c1.9,0,3.5-1.6,3.5-3.5V10
C14,8.9,13.1,8,12,8z M8,3.5c0.3,0,0.5,0.2,0.5,0.5S8.3,4.5,8,4.5S7.5,4.3,7.5,4S7.7,3.5,8,3.5z"/> </symbol><symbol viewBox="0 0 16 16" id="aside"><title>aside</title> <path d="M11,3H5C3.9,3,3,3.9,3,5v6c0,1.1,0.9,2,2,2h5l3-3V5C13,3.9,12.1,3,11,3z M10,8c-1.1,0-2,0.9-2,2v1.5H5
c-0.3,0-0.5-0.2-0.5-0.5V5c0-0.3,0.2-0.5,0.5-0.5h6c0.3,0,0.5,0.2,0.5,0.5v3H10z"/> </symbol><symbol viewBox="0 0 16 16" id="attachment"><title>attachment</title> <path d="M9.2,1C7.5,1,6,2.5,6,4.2V10c0,1.1,0.9,2,2,2s2-0.9,2-2V5H8.5v5c0,0.3-0.2,0.5-0.5,0.5S7.5,10.3,7.5,10V4.2
c0-1,0.8-1.8,1.8-1.8S11,3.3,11,4.2v6.2c0,1.7-1.3,3-3,3s-3-1.3-3-3V5H3.5v5.5C3.5,13,5.5,15,8,15s4.5-2,4.5-4.5V4.2
C12.5,2.5,11,1,9.2,1z"/> </symbol><symbol viewBox="0 0 16 16" id="audio-mute"><title>audio-mute</title> <path d="M7.3,2.7L4,6H2v4h2l3.3,3.3C7.9,13.9,9,13.5,9,12.6V3.4C9,2.5,7.9,2.1,7.3,2.7z"/> </symbol><symbol viewBox="0 0 16 16" id="audio"><title>audio</title> <path d="M7.3,2.7L4,6H2v4h2l3.3,3.3C7.9,13.9,9,13.5,9,12.6V3.4C9,2.5,7.9,2.1,7.3,2.7z M13,3l-0.7,0.7C13.3,4.8,14,6.3,14,8
s-0.7,3.2-1.8,4.2l0.7,0.7c1.3-1.3,2.1-3,2.1-5C15,6,14.2,4.3,13,3z M11.5,4.5l-0.7,0.7C11.6,5.9,12,6.9,12,8s-0.5,2.1-1.2,2.8
l0.7,0.7C12.4,10.6,13,9.4,13,8S12.4,5.4,11.5,4.5z"/> </symbol><symbol viewBox="0 0 16 16" id="bold"><title>bold</title> <path d="M12,5c0-1.7-1.4-3-3-3H4v5v2v5h5c1.6,0,3-1.3,3-3v-1c0-0.8-0.3-1.5-0.8-2C11.7,7.5,12,6.8,12,6V5z M6,4h3c0.5,0,1,0.5,1,1v1
c0,0.5-0.5,1-1,1H6V4z M10,11c0,0.5-0.5,1-1,1H6V9h3h0c0.5,0,1,0.5,1,1V11z"/> </symbol><symbol viewBox="0 0 16 16" id="book"><title>book</title> <path d="M10,3H8v5L7,7L6,8V3H4v10h6c1.1,0,2-0.9,2-2V5C12,3.9,11.1,3,10,3z"/> </symbol><symbol viewBox="0 0 16 16" id="bug"><title>bug</title> <path d="M8,2.5C6.6,2.5,5.5,3.6,5.5,5h5C10.5,3.6,9.4,2.5,8,2.5z M13,8.5h-1V7.4l0.7-0.7c0.4-0.4,0.4-1,0-1.4
s-1-0.4-1.4,0L10.6,6H5.4L4.7,5.3c-0.4-0.4-1-0.4-1.4,0s-0.4,1,0,1.4L4,7.4v1.1H3c-0.6,0-1,0.4-1,1c0,0.6,0.4,1,1,1h1.1
c0,0.3,0.1,0.6,0.2,0.8l-1,1c-0.4,0.4-0.4,1,0,1.4s1,0.4,1.4,0L5.4,13C6.1,13.6,7,14,8,14s1.9-0.4,2.6-1l0.7,0.7
c0.2,0.2,0.5,0.3,0.7,0.3s0.5-0.1,0.7-0.3c0.4-0.4,0.4-1,0-1.4l-1-1c0.1-0.3,0.2-0.5,0.2-0.8H13c0.6,0,1-0.4,1-1
C14,8.9,13.6,8.5,13,8.5z"/> </symbol><symbol viewBox="0 0 16 16" id="cart"><title>cart</title> <path d="M11,12c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1S11.6,12,11,12z M5,12c-0.6,0-1,0.4-1,1s0.4,1,1,1s1-0.4,1-1
S5.6,12,5,12z M11,10H5V9h5.6c0.8,0,1.5-0.5,1.9-1.3L14,4H5V3c0-0.6-0.4-1-1-1H2v1h2v7c0,0.6,0.4,1,1,1h6h1C12,10.4,11.6,10,11,10z"/> </symbol><symbol viewBox="0 0 16 16" id="category"><title>category</title> <path d="M13,5H8L7.3,3.6C7.1,3.2,6.8,3,6.4,3H3C2.5,3,2,3.5,2,4v2v6c0,0.6,0.5,1,1,1h10c0.6,0,1-0.4,1-1V6C14,5.4,13.6,5,13,5z"/> </symbol><symbol viewBox="0 0 16 16" id="chat"><title>chat</title> <path d="M7,3H3C1.9,3,1,3.9,1,5v7l2.4-2.4C3.8,9.2,4.3,9,4.8,9H6V8c0-1.7,1.3-3,3-3C9,3.9,8.1,3,7,3z M13,6H9
C7.9,6,7,6.9,7,8v2c0,1.1,0.9,2,2,2h2.2c0.5,0,1,0.2,1.4,0.6L15,15V8C15,6.9,14.1,6,13,6z"/> </symbol><symbol viewBox="0 0 16 16" id="checkmark"><title>checkmark</title> <polygon points="13.3,3.3 6.5,10.1 3.7,7.3 2.3,8.7 6.5,12.9 14.7,4.7 "/> </symbol><symbol viewBox="0 0 16 16" id="close-alt"><title>close-alt</title> <polygon points="14.7,2.7 13.3,1.3 8,6.6 2.7,1.3 1.3,2.7 6.6,8 1.3,13.3 2.7,14.7 8,9.4 13.3,14.7 14.7,13.3 9.4,8
"/> </symbol><symbol viewBox="0 0 16 16" id="close"><title>close</title> <polygon points="12.7,4.7 11.3,3.3 8,6.6 4.7,3.3 3.3,4.7 6.6,8 3.3,11.3 4.7,12.7 8,9.4 11.3,12.7 12.7,11.3 9.4,8
"/> </symbol><symbol viewBox="0 0 16 16" id="cloud-download"><title>cloud-download</title> <path d="M9,11H7v2H5l3,3l3-3H9V11z M13,8h-0.2C12.9,7.7,13,7.4,13,7c0-1.7-1.3-3-3-3C8.8,4,7.8,4.7,7.3,5.7C6.8,5.3,6.2,5,5.5,5
C4.1,5,3,6.1,3,7.5C3,7.7,3,7.8,3,8h0c-1.1,0-2,0.9-2,2s0.9,2,2,2h3v-2h4v2h3c1.1,0,2-0.9,2-2S14.1,8,13,8z"/> </symbol><symbol viewBox="0 0 16 16" id="cloud-upload"><title>cloud-upload</title> <path d="M13,8h-0.2C12.9,7.7,13,7.4,13,7c0-1.7-1.3-3-3-3C8.8,4,7.8,4.7,7.3,5.7C6.8,5.3,6.2,5,5.5,5C4.1,5,3,6.1,3,7.5V8
c-1.1,0-2,0.9-2,2s0.9,2,2,2h4v-2H5l3-3l3,3H9v2h4c1.1,0,2-0.9,2-2S14.1,8,13,8z"/> </symbol><symbol viewBox="0 0 16 16" id="cloud"><title>cloud</title> <path d="M13,8h-0.2C12.9,7.7,13,7.4,13,7c0-1.7-1.3-3-3-3C8.8,4,7.8,4.7,7.3,5.7C6.8,5.3,6.2,5,5.5,5C4.1,5,3,6.1,3,7.5
C3,7.7,3,7.8,3.1,8H3c-1.1,0-2,0.9-2,2s0.9,2,2,2h10c1.1,0,2-0.9,2-2S14.1,8,13,8z"/> </symbol><symbol viewBox="0 0 16 16" id="code"><title>code</title> <polygon points="5.3,12.7 0.6,8 5.3,3.3 6.7,4.7 3.4,8 6.7,11.3 "/> <polygon points="10.7,12.7 9.3,11.3 12.6,8 9.3,4.7 10.7,3.3 15.4,8 "/> </symbol><symbol viewBox="0 0 16 16" id="cog"><title>cog</title> <path d="M13,8c0-0.4-0.1-0.8-0.1-1.1L14,6.1c0.4-0.3,0.5-0.9,0.3-1.3l-0.3-0.6c-0.3-0.5-0.8-0.6-1.3-0.4l-1.2,0.5
C11,3.8,10.3,3.4,9.6,3.2L9.3,1.8C9.3,1.3,8.8,1,8.4,1H7.7c-0.5,0-0.9,0.4-1,0.9L6.5,3.2C5.8,3.5,5.2,3.8,4.6,4.3L3.4,3.8
c-0.5-0.2-1,0-1.3,0.4L1.8,4.8C1.5,5.3,1.6,5.8,2,6.1l1.1,0.8C3.1,7.2,3,7.6,3,8c0,0.4,0.1,0.8,0.1,1.1L2,9.9
c-0.4,0.3-0.5,0.9-0.3,1.3l0.3,0.6c0.3,0.5,0.8,0.6,1.3,0.4l1.2-0.5c0.5,0.5,1.2,0.9,1.9,1.1l0.3,1.4c0.1,0.5,0.5,0.8,1,0.8h0.7
c0.5,0,1-0.4,1-0.9l0.1-1.3c0.7-0.2,1.4-0.6,1.9-1.1l1.2,0.5c0.5,0.2,1,0,1.3-0.4l0.3-0.6c0.2-0.4,0.1-1-0.3-1.3l-1.1-0.8
C12.9,8.8,13,8.4,13,8z M8,10.5c-1.4,0-2.5-1.1-2.5-2.5S6.6,5.5,8,5.5s2.5,1.1,2.5,2.5S9.4,10.5,8,10.5z"/> </symbol><symbol viewBox="0 0 16 16" id="collapse"><title>collapse</title> <polygon points="8,4.6 1.3,11.3 2.7,12.7 8,7.4 13.3,12.7 14.7,11.3 "/> </symbol><symbol viewBox="0 0 16 16" id="comment"><title>comment</title> <g> <path d="M12,4H4C2.9,4,2,4.9,2,6v8l2.4-2.4C4.8,11.2,5.3,11,5.8,11H12c1.1,0,2-0.9,2-2V6C14,4.9,13.1,4,12,4z"/> </g> </symbol><symbol viewBox="0 0 16 16" id="day"><title>day</title> <path d="M12,3h-1V2H9v1H7V2H5v1H4C2.9,3,2,3.9,2,5v6c0,1.1,0.9,2,2,2h8c1.1,0,2-0.9,2-2V5C14,3.9,13.1,3,12,3z M9,11H8V6.2L7.2,6.5
L6.8,5.5L9,4.8V11z"/> </symbol><symbol viewBox="0 0 16 16" id="document"><title>document</title> <path d="M10,1H5C3.9,1,3,1.9,3,3v9c0,1.1,0.9,2,2,2h6c1.1,0,2-0.9,2-2V4L10,1z M11.5,12c0,0.3-0.2,0.5-0.5,0.5H5
c-0.3,0-0.5-0.2-0.5-0.5V3c0-0.3,0.2-0.5,0.5-0.5h3V4c0,1.1,0.9,2,2,2h1.5V12z"/> </symbol><symbol viewBox="0 0 16 16" id="download"><title>download</title> <path d="M11,7H9V3H7v4H5l3,3L11,7z M3,11v2h10v-2H3z"/> </symbol><symbol viewBox="0 0 16 16" id="edit"><title>edit</title> <g> <path d="M12.6,6.9l0.5-0.5c0.8-0.8,0.8-2,0-2.8l-0.7-0.7c-0.8-0.8-2-0.8-2.8,0L9.1,3.4L12.6,6.9z"/> <polygon points="8.4,4.1 2,10.5 2,14 5.5,14 11.9,7.6 "/> </g> </symbol><symbol viewBox="0 0 16 16" id="ellipsis"><title>ellipsis</title> <path d="M2,6.2C1,6.2,0.2,7,0.2,8S1,9.8,2,9.8S3.8,9,3.8,8S3,6.2,2,6.2z M14,6.2c-1,0-1.8,0.8-1.8,1.8S13,9.8,14,9.8S15.8,9,15.8,8
S15,6.2,14,6.2z M8,6.2C7,6.2,6.2,7,6.2,8S7,9.8,8,9.8S9.8,9,9.8,8S9,6.2,8,6.2z"/> </symbol><symbol viewBox="0 0 16 16" id="expand"><title>expand</title> <polygon points="8,12.7 1.3,6 2.7,4.6 8,9.9 13.3,4.6 14.7,6 "/> </symbol><symbol viewBox="0 0 16 16" id="external"><title>external</title> <path d="M8,3v2h1.6L6.3,8.3l1.4,1.4L11,6.4V8h2V3H8z M11.5,11c0,0.3-0.2,0.5-0.5,0.5H5c-0.3,0-0.5-0.2-0.5-0.5V5
c0-0.3,0.2-0.5,0.5-0.5h2V3H5C3.9,3,3,3.9,3,5v6c0,1.1,0.9,2,2,2h6c1.1,0,2-0.9,2-2V9h-1.5V11z"/> </symbol><symbol viewBox="0 0 16 16" id="fastforward"><title>fastforward</title> <path d="M14.9,7.1L9.5,3.9C8.8,3.5,8,4,8,4.8v2.5c0,0-0.1-0.1-0.1-0.1L2.5,3.9C1.8,3.5,1,4,1,4.8v6.5c0,0.8,0.8,1.3,1.5,0.9l5.4-3.2
c0,0,0.1,0,0.1-0.1v2.5c0,0.8,0.8,1.3,1.5,0.9l5.4-3.2C15.6,8.5,15.6,7.5,14.9,7.1z"/> </symbol><symbol viewBox="0 0 16 16" id="feed"><title>feed</title> <g enable-background="new "> <path d="M2,6v2c3.3,0,6,2.7,6,6h2C10,9.6,6.4,6,2,6z M2,2v2c5.5,0,10,4.5,10,10h2C14,7.4,8.6,2,2,2z M3.5,11C2.7,11,2,11.7,2,12.5
S2.7,14,3.5,14S5,13.3,5,12.5S4.3,11,3.5,11z"/> </g> </symbol><symbol viewBox="0 0 16 16" id="flag"><title>flag</title> <path d="M9.4,4.4L8.6,3.6C8.2,3.2,7.7,3,7.2,3H5H3v11h2v-4h2.2c0.5,0,1,0.2,1.4,0.6l0.8,0.8c0.4,0.4,0.9,0.6,1.4,0.6H13V5h-2.2
C10.3,5,9.8,4.8,9.4,4.4z"/> </symbol><symbol viewBox="0 0 16 16" id="fullscreen"><title>fullscreen</title> <path d="M10,2v2h3v3h2V2H10z M1,7h2V4h3V2H1V7z M13,12h-3v2h5V9h-2V12z M3,9H1v5h5v-2H3V9z"/> </symbol><symbol viewBox="0 0 16 16" id="gallery"><title>gallery</title> <path d="M12,10V4c0-1.1-0.9-2-2-2H4C2.9,2,2,2.9,2,4v6c0,1.1,0.9,2,2,2h6C11.1,12,12,11.1,12,10z M5.5,7l1.1,1.6l1.5-2.4L10,10H4
L5.5,7z M13,5v8H7H5c0,1.1,0.9,2,2,2h6c1.1,0,2-0.9,2-2V7C15,5.9,14.1,5,13,5z"/> </symbol><symbol viewBox="0 0 16 16" id="heart"><title>heart</title> <path d="M8,13L2.9,8.2C1.8,7.1,1.7,5.2,2.7,4c1-1.2,2.8-1.3,4-0.2L8,5l1.3-1.2c1.2-1.1,3-1,4,0.2c1.1,1.2,1,3.1-0.2,4.2L8,13z"/> </symbol><symbol viewBox="0 0 16 16" id="help"><title>help</title> <path d="M8,2C4.7,2,2,4.7,2,8s2.7,6,6,6s6-2.7,6-6S11.3,2,8,2z M8,12c-0.6,0-1-0.4-1-1s0.4-1,1-1s1,0.4,1,1S8.6,12,8,12z M9.5,8.5
C8.8,8.7,8.8,9.1,8.8,9.2H7.2c0-1,0.6-1.8,1.8-2.2c0.7-0.2,0.7-0.7,0.7-0.8c0-0.4-0.3-0.8-0.8-0.8H7c-0.4,0-0.8,0.3-0.8,0.8H4.8
C4.8,5,5.8,4,7,4h2c1.2,0,2.2,1,2.2,2.2C11.2,7.3,10.6,8.1,9.5,8.5z"/> </symbol><symbol viewBox="0 0 16 16" id="hide"><title>hide</title> <path d="M14.8,7.6C14.4,7,14,6.4,13.5,5.9L12.4,7c0.3,0.3,0.6,0.6,0.8,1c-1,1.5-2.7,2.5-4.5,2.7l-1.5,1.5c0.3,0,0.6,0.1,0.8,0.1
c2.8,0,5.4-1.5,6.8-3.9L15,8L14.8,7.6z M12.3,2.3l-1.8,1.8C9.7,3.9,8.9,3.7,8,3.7c-2.8,0-5.4,1.5-6.8,3.9L1,8l0.2,0.4
c0.6,1,1.4,1.9,2.4,2.6l-1.3,1.3l1.4,1.4l10-10L12.3,2.3z M5.5,7.5c0,0.5,0.1,0.9,0.3,1.2L4.8,9.8C4,9.4,3.3,8.8,2.8,8
c0.9-1.4,2.3-2.3,3.9-2.6C6,5.8,5.5,6.6,5.5,7.5z"/> </symbol><symbol viewBox="0 0 16 16" id="hierarchy"><title>hierarchy</title> <path d="M2,5h2V3H2V5z M6,3v2h8V3H6z M2,9h2V7H2V9z M11,7H6v2h5V7z M2,13h2v-2H2V13z M6,13h7v-2H6V13z"/> </symbol><symbol viewBox="0 0 16 16" id="home"><title>home</title> <path d="M7.4,3.5l-4,3.2C3.1,6.9,3,7.2,3,7.5V13h3.5v-2.5C6.5,9.7,7.2,9,8,9h0c0.8,0,1.5,0.7,1.5,1.5V13H13V7.5
c0-0.3-0.1-0.6-0.4-0.8l-4-3.2C8.3,3.2,7.7,3.2,7.4,3.5z"/> </symbol><symbol viewBox="0 0 16 16" id="image"><title>image</title> <path d="M13,5h-2l-1-2H6L5,5H3C2.4,5,2,5.4,2,6v6c0,0.5,0.4,1,1,1h10c0.5,0,1-0.4,1-1V6C14,5.4,13.6,5,13,5z M8,12c-1.7,0-3-1.3-3-3
s1.3-3,3-3s3,1.3,3,3S9.7,12,8,12z M8,7C6.9,7,6,7.9,6,9s0.9,2,2,2s2-0.9,2-2S9.1,7,8,7z"/> </symbol><symbol viewBox="0 0 16 16" id="info"><title>info</title> <path d="M8,2C4.7,2,2,4.7,2,8s2.7,6,6,6c3.3,0,6-2.7,6-6S11.3,2,8,2z M8,4c0.6,0,1,0.4,1,1S8.6,6,8,6C7.4,6,7,5.6,7,5S7.4,4,8,4z
M10,12H6v-1h1.2V8h-1V7h2.5v4H10V12z"/> </symbol><symbol viewBox="0 0 16 16" id="italic"><title>italic</title> <polygon points="11.7,4 12.1,2 6.1,2 5.7,4 7.7,4 6.3,12 4.3,12 3.9,14 9.9,14 10.3,12 8.3,12 9.7,4 "/> </symbol><symbol viewBox="0 0 16 16" id="key"><title>key</title> <path d="M15,7H8.9C8.4,5.3,6.9,4,5,4C2.8,4,1,5.8,1,8c0,2.2,1.8,4,4,4c1.9,0,3.4-1.3,3.9-3H12v2h2V9h1V7z M5,10c-1.1,0-2-0.9-2-2
c0-1.1,0.9-2,2-2s2,0.9,2,2C7,9.1,6.1,10,5,10z"/> </symbol><symbol viewBox="0 0 16 16" id="link"><title>link</title> <path d="M13,4h-3C8.9,4,8,4.9,8,6v0.8H7V6c0-1.1-0.9-2-2-2H2C0.9,4,0,4.9,0,6v3c0,1.1,0.9,2,2,2h3c1.1,0,2-0.9,2-2V8.2h1V9
c0,1.1,0.9,2,2,2h3c1.1,0,2-0.9,2-2V6C15,4.9,14.1,4,13,4z M5.5,9c0,0.3-0.2,0.5-0.5,0.5H2C1.7,9.5,1.5,9.3,1.5,9V6
c0-0.3,0.2-0.5,0.5-0.5h3c0.3,0,0.5,0.2,0.5,0.5v0.8H5c-0.4,0-0.8,0.3-0.8,0.8S4.6,8.2,5,8.2h0.5V9z M13.5,9c0,0.3-0.2,0.5-0.5,0.5
h-3C9.7,9.5,9.5,9.3,9.5,9V8.2H10c0.4,0,0.8-0.3,0.8-0.8S10.4,6.8,10,6.8H9.5V6c0-0.3,0.2-0.5,0.5-0.5h3c0.3,0,0.5,0.2,0.5,0.5V9z"/> </symbol><symbol viewBox="0 0 16 16" id="location"><title>location</title> <path d="M11.5,3.5c-2-2-5.1-2-7.1,0c-2,2-2,5.1,0,7.1L8,14.1l3.5-3.5C13.5,8.6,13.5,5.4,11.5,3.5z M9.4,8.4c-0.8,0.8-2,0.8-2.8,0
c-0.8-0.8-0.8-2,0-2.8c0.8-0.8,2-0.8,2.8,0C10.2,6.4,10.2,7.6,9.4,8.4z"/> </symbol><symbol viewBox="0 0 16 16" id="lock"><title>lock</title> <path d="M12,8V6c0-2.2-1.8-4-4-4S4,3.8,4,6v2C3.4,8,3,8.4,3,9v4c0,0.6,0.4,1,1,1h8c0.6,0,1-0.4,1-1V9C13,8.4,12.6,8,12,8z M6,8V6
c0-1.1,0.9-2,2-2s2,0.9,2,2v2H6z"/> </symbol><symbol viewBox="0 0 16 16" id="mail"><title>mail</title> <g> <path d="M12,3H4C2.9,3,2,3.9,2,5v5c0,1.1,0.9,2,2,2h8c1.1,0,2-0.9,2-2V5C14,3.9,13.1,3,12,3z M13,6.2L8,9.1L3,6.2V5l5,2.9L13,5V6.2
z"/> </g> </symbol><symbol viewBox="0 0 16 16" id="menu"><title>menu</title> <path d="M0,14h16v-2H0V14z M0,2v2h16V2H0z M0,9h16V7H0V9z"/> </symbol><symbol viewBox="0 0 16 16" id="microphone"><title>microphone</title> <path d="M8,10c1.1,0,2-0.9,2-2V4c0-1.1-0.9-2-2-2S6,2.9,6,4v4C6,9.1,6.9,10,8,10z M11,8c0,1.7-1.3,3-3,3S5,9.7,5,8H3
c0,2.4,1.7,4.4,4,4.9V15h2v-2.1c2.3-0.5,4-2.5,4-4.9C13,8,11,8,11,8z"/> </symbol><symbol viewBox="0 0 16 16" id="minus"><title>minus</title> <rect x="3" y="7" width="10" height="2"/> </symbol><symbol viewBox="0 0 16 16" id="month"><title>month</title> <path d="M12,3h-1V2H9v1H7V2H5v1H4C2.9,3,2,3.9,2,5v6c0,1.1,0.9,2,2,2h8c1.1,0,2-0.9,2-2V5C14,3.9,13.1,3,12,3z M9,7
c0,0.4-0.2,0.7-0.4,1C8.8,8.3,9,8.6,9,9v0.5C9,10.3,8.3,11,7.5,11h-1C5.7,11,5,10.3,5,9.5V9h1v0.5C6,9.8,6.2,10,6.5,10h1
C7.8,10,8,9.8,8,9.5V9c0-0.3-0.2-0.5-0.5-0.5H7v-1h0.5C7.8,7.5,8,7.3,8,7V6.5C8,6.2,7.8,6,7.5,6h-1C6.2,6,6,6.2,6,6.5V7H5V6.5
C5,5.7,5.7,5,6.5,5h1C8.3,5,9,5.7,9,6.5V7z M11,11h-1V5h1V11z"/> </symbol><symbol viewBox="0 0 16 16" id="move"><title>move</title> <polygon points="12.5,5.5 12.5,7 9,7 9,3.5 10.5,3.5 8,1 5.5,3.5 7,3.5 7,7 3.5,7 3.5,5.5 1,8 3.5,10.5 3.5,9 7,9 7,12.5 5.5,12.5
8,15 10.5,12.5 9,12.5 9,9 12.5,9 12.5,10.5 15,8 "/> </symbol><symbol viewBox="0 0 16 16" id="next"><title>next</title> <polygon points="3,7 9.6,7 7.3,4.7 8.7,3.3 13.4,8 8.7,12.7 7.3,11.3 9.6,9 3,9 "/> </symbol><symbol viewBox="0 0 16 16" id="notice"><title>notice</title> <path d="M8,2C4.7,2,2,4.7,2,8s2.7,6,6,6s6-2.7,6-6S11.3,2,8,2z M8,12c-0.6,0-1-0.4-1-1s0.4-1,1-1s1,0.4,1,1S8.6,12,8,12z M8.8,9H7.2
L7,4h2L8.8,9z"/> </symbol><symbol viewBox="0 0 16 16" id="paintbrush"><title>paintbrush</title> <path d="M14.1,1.9c-0.6-0.6-1.5-0.6-2.1,0l-6,6L8.1,10l6-6C14.6,3.5,14.6,2.5,14.1,1.9z M6.5,9.7C5.7,8.8,4.6,8.6,3.8,9.1
C3,9.5,2.6,10.4,2.6,11.3c-0.1,0.9-0.7,1.6-1.6,2c0.5,0.7,2.2,1.2,4.2,0.5S7.5,10.9,6.5,9.7z"/> </symbol><symbol viewBox="0 0 16 16" id="pause"><title>pause</title> <path d="M4,13h3V3H4V13z M9,3v10h3V3H9z"/> </symbol><symbol viewBox="0 0 16 16" id="phone"><title>phone</title> <path d="M10,1H6C4.9,1,4,1.9,4,3v10c0,1.1,0.9,2,2,2h4c1.1,0,2-0.9,2-2V3C12,1.9,11.1,1,10,1z M8.5,14h-1
C7.2,14,7,13.8,7,13.5S7.2,13,7.5,13h1C8.8,13,9,13.2,9,13.5S8.8,14,8.5,14z M11,12H5V3h6V12z"/> </symbol><symbol viewBox="0 0 16 16" id="picture"><title>picture</title> <path d="M12,2H4C2.9,2,2,2.9,2,4v8c0,1.1,0.9,2,2,2h8c1.1,0,2-0.9,2-2V4C14,2.9,13.1,2,12,2z M4,11l2-4l1.5,3l2-4l2.5,5H4z"/> </symbol><symbol viewBox="0 0 16 16" id="pinned"><title>pinned</title> <path d="M12,8c0-0.5-0.5-1-1-1h-0.6l-0.3-3C10.6,3.9,11,3.5,11,3c0-0.5-0.5-1-1-1H6C5.5,2,5,2.5,5,3c0,0.5,0.4,0.9,0.9,1L5.6,7H5
C4.5,7,4,7.5,4,8v1h3v6l2-1V9h3V8z"/> </symbol><symbol viewBox="0 0 16 16" id="play"><title>play</title> <path d="M3,12.2V3.8C3,3,3.8,2.5,4.5,2.9l7.1,4.2c0.6,0.4,0.6,1.3,0,1.7l-7.1,4.2C3.8,13.5,3,13,3,12.2z"/> </symbol><symbol viewBox="0 0 16 16" id="plugin"><title>plugin</title> <path d="M11,6.5V3c0-0.6-0.4-1-1-1S9,2.4,9,3v3.5H7V3c0-0.6-0.4-1-1-1S5,2.4,5,3v3.5H3V10c0,1.1,0.9,2,2,2h2v3l2-0.5V12h2
c1.1,0,2-0.9,2-2V6.5H11z"/> </symbol><symbol viewBox="0 0 16 16" id="plus"><title>plus</title> <polygon points="13,7 9,7 9,3 7,3 7,7 3,7 3,9 7,9 7,13 9,13 9,9 13,9 "/> </symbol><symbol viewBox="0 0 16 16" id="previous"><title>previous</title> <polygon points="13,7 6.4,7 8.7,4.7 7.3,3.3 2.6,8 7.3,12.7 8.7,11.3 6.4,9 13,9 "/> </symbol><symbol viewBox="0 0 16 16" id="print"><title>print</title> <g> <rect x="5" y="3" width="6" height="2.5"/> <path d="M11,6H5C3.9,6,3,6.9,3,8v3h2v3h6v-3h2V8C13,6.9,12.1,6,11,6z M10,13H6v-3h4V13z M11,8.8c-0.4,0-0.8-0.3-0.8-0.8
s0.3-0.8,0.8-0.8s0.8,0.3,0.8,0.8S11.4,8.8,11,8.8z"/> </g> </symbol><symbol viewBox="0 0 16 16" id="quote"><title>quote</title> <path d="M2,9h3c0,1.1-0.9,2-2,2v2c2.2,0,4-1.8,4-4V4H2V9z M9,4v5h3c0,1.1-0.9,2-2,2v2c2.2,0,4-1.8,4-4V4H9z"/> </symbol><symbol viewBox="0 0 16 16" id="refresh"><title>refresh</title> <path d="M3.8,3.8C2.7,4.9,2,6.3,2,8c0,3,2.2,5.4,5,5.9v-2.1c-1.7-0.4-3-2-3-3.9c0-1.1,0.5-2.1,1.2-2.8L7,7V2H2L3.8,3.8z M14,8
c0-3-2.2-5.4-5-5.9v2.1c1.7,0.4,3,2,3,3.9c0,1.1-0.5,2.1-1.2,2.8L9.1,9.1C9.1,9.1,9,9,9,9v5h5c0,0-0.8-0.8-1.8-1.8
C13.3,11.1,14,9.7,14,8z"/> </symbol><symbol viewBox="0 0 16 16" id="reply"><title>reply</title> <path d="M10,6H8V3L3,8l5,5v-3h2c1,0,2,0.4,2.8,1.2l1.2,1.2V10C14,7.8,12.2,6,10,6z"/> </symbol><symbol viewBox="0 0 16 16" id="rewind"><title>rewind</title> <path d="M1.1,7.1l5.4-3.2C7.2,3.5,8,4,8,4.8v2.5c0,0,0.1-0.1,0.1-0.1l5.4-3.2C14.2,3.5,15,4,15,4.8v6.5c0,0.8-0.8,1.3-1.5,0.9
L8.1,8.9c0,0-0.1,0-0.1-0.1v2.5c0,0.8-0.8,1.3-1.5,0.9L1.1,8.9C0.4,8.5,0.4,7.5,1.1,7.1z"/> </symbol><symbol viewBox="0 0 16 16" id="search"><title>search</title> <path d="M14.7,13.3L11,9.6c0.6-0.9,1-2,1-3.1C12,3.5,9.5,1,6.5,1S1,3.5,1,6.5S3.5,12,6.5,12c1.2,0,2.2-0.4,3.1-1l3.7,3.7L14.7,13.3z
M2.5,6.5c0-2.2,1.8-4,4-4s4,1.8,4,4s-1.8,4-4,4S2.5,8.7,2.5,6.5z"/> </symbol><symbol viewBox="0 0 16 16" id="send-to-phone"><title>send-to-phone</title> <path d="M6,10l3-3L6,4v2H2v2h4V10z M10,1H6C4.9,1,4,1.9,4,3v2h1V3h6v9H5V9H4v4c0,1.1,0.9,2,2,2h4c1.1,0,2-0.9,2-2V3
C12,1.9,11.1,1,10,1z M8.5,14h-1C7.2,14,7,13.8,7,13.5S7.2,13,7.5,13h1C8.8,13,9,13.2,9,13.5S8.8,14,8.5,14z"/> </symbol><symbol viewBox="0 0 16 16" id="send-to-tablet"><title>send-to-tablet</title> <g> <path d="M5,10l3-3L5,4v2H0v2h5V10z"/> </g> <path d="M12,0H4C2.9,0,2,0.9,2,2v3h1.5V2h9v11h-9V9H2v5c0,1.1,0.9,2,2,2h8c1.1,0,2-0.9,2-2V2C14,0.9,13.1,0,12,0z
M8.5,15h-1C7.2,15,7,14.8,7,14.5S7.2,14,7.5,14h1C8.8,14,9,14.2,9,14.5S8.8,15,8.5,15z"/> </symbol><symbol viewBox="0 0 16 16" id="share"><title>share</title> <path d="M7,4.4V10h2V4.4l1.1,1.1l1.4-1.4L8,0.6L4.5,4.1l1.4,1.4L7,4.4z M12,6h-2v1.5h2c0.3,0,0.5,0.2,0.5,0.5v4
c0,0.3-0.2,0.5-0.5,0.5H4c-0.3,0-0.5-0.2-0.5-0.5V8c0-0.3,0.2-0.5,0.5-0.5h2V6H4C2.9,6,2,6.9,2,8v4c0,1.1,0.9,2,2,2h8
c1.1,0,2-0.9,2-2V8C14,6.9,13.1,6,12,6z"/> </symbol><symbol viewBox="0 0 16 16" id="show"><title>show</title> <path d="M14.8,7.6c-1.4-2.4-4-3.9-6.8-3.9c-2.8,0-5.4,1.5-6.8,3.9L1,8l0.2,0.4c1.4,2.4,4,3.9,6.8,3.9c2.8,0,5.4-1.5,6.8-3.9L15,8
L14.8,7.6z M8,10.8c-2.1,0-4-1.1-5.2-2.8c0.9-1.4,2.3-2.3,3.9-2.6C6,5.8,5.5,6.6,5.5,7.5C5.5,8.9,6.6,10,8,10s2.5-1.1,2.5-2.5
c0-0.9-0.5-1.7-1.2-2.1c1.6,0.3,3,1.3,3.9,2.6C12,9.7,10.1,10.8,8,10.8z"/> </symbol><symbol viewBox="0 0 16 16" id="shuffle"><title>shuffle</title> <path d="M12,10h-0.9c-0.3,0-0.6-0.2-0.8-0.4L7.4,5.3C6.9,4.5,5.9,4,4.9,4H2v2h2.9c0.3,0,0.6,0.2,0.8,0.4l2.8,4.2
c0.6,0.8,1.5,1.3,2.5,1.3H12v1.5l2.5-2.5L12,8.5V10z M10.2,6.4C10.4,6.2,10.7,6,11.1,6H12v1.5L14.5,5L12,2.5V4h-0.9
c-1,0-1.9,0.5-2.5,1.3l1.2,1.8L10.2,6.4z M5.8,9.6C5.6,9.8,5.3,10,4.9,10H2v2h2.9c1,0,1.9-0.5,2.5-1.3L6.2,8.9L5.8,9.6z"/> </symbol><symbol viewBox="0 0 16 16" id="sitemap"><title>sitemap</title> <path d="M14,11.3V10c0-1.7-1.3-3-3-3H9V4.7c0.6-0.3,1-1,1-1.7c0-1.1-0.9-2-2-2S6,1.9,6,3c0,0.7,0.4,1.4,1,1.7V7H5c-1.7,0-3,1.3-3,3
v1.3c-0.6,0.3-1,1-1,1.7c0,1.1,0.9,2,2,2s2-0.9,2-2c0-0.7-0.4-1.4-1-1.7V10c0-0.6,0.4-1,1-1h2v2.3c-0.6,0.3-1,1-1,1.7
c0,1.1,0.9,2,2,2s2-0.9,2-2c0-0.7-0.4-1.4-1-1.7V9h2c0.6,0,1,0.4,1,1v1.3c-0.6,0.3-1,1-1,1.7c0,1.1,0.9,2,2,2s2-0.9,2-2
C15,12.3,14.6,11.6,14,11.3z M8,2.2c0.4,0,0.8,0.3,0.8,0.8S8.4,3.8,8,3.8C7.6,3.8,7.2,3.4,7.2,3S7.6,2.2,8,2.2z M3,13.8
c-0.4,0-0.8-0.3-0.8-0.8s0.3-0.8,0.8-0.8s0.8,0.3,0.8,0.8S3.4,13.8,3,13.8z M8,13.8c-0.4,0-0.8-0.3-0.8-0.8s0.3-0.8,0.8-0.8
c0.4,0,0.8,0.3,0.8,0.8S8.4,13.8,8,13.8z M13,13.8c-0.4,0-0.8-0.3-0.8-0.8s0.3-0.8,0.8-0.8s0.8,0.3,0.8,0.8S13.4,13.8,13,13.8z"/> </symbol><symbol viewBox="0 0 16 16" id="skip-ahead"><title>skip-ahead</title> <path d="M4.5,2.9L10,6.2V3h3v10h-3V9.7L4.5,13C3.8,13.5,3,13,3,12.2V3.8C3,3,3.8,2.5,4.5,2.9z"/> </symbol><symbol viewBox="0 0 16 16" id="skip-back"><title>skip-back</title> <path d="M11.5,2.9L6,6.2V3H3v10h3V9.7l5.5,3.3c0.7,0.5,1.5,0,1.5-0.8V3.8C13,3,12.2,2.5,11.5,2.9z"/> </symbol><symbol viewBox="0 0 16 16" id="spam"><title>spam</title> <path d="M11,2H5L2,5v6l3,3h6l3-3V5L11,2z M8,12c-0.6,0-1-0.4-1-1s0.4-1,1-1s1,0.4,1,1S8.6,12,8,12z M8.8,9H7.2L7,4h2L8.8,9z"/> </symbol><symbol viewBox="0 0 16 16" id="standard"><title>standard</title> <path d="M6,6h4V5H6V6z M6,8h2V7H6V8z M11,2H5C3.9,2,3,2.9,3,4v8c0,1.1,0.9,2,2,2h5l3-3V4C13,2.9,12.1,2,11,2z M11.5,9H10
c-1.1,0-2,0.9-2,2v1.5H5c-0.3,0-0.5-0.2-0.5-0.5V4c0-0.3,0.2-0.5,0.5-0.5h6c0.3,0,0.5,0.2,0.5,0.5V9z"/> </symbol><symbol viewBox="0 0 16 16" id="star-empty"><title>star-empty</title> <path d="M8,5l0.7,1.5L9,7.3l0.9,0.1l1.6,0.2l-1.2,1.1L9.6,9.2l0.2,0.8l0.3,1.6l-1.4-0.8L8,10.4l-0.7,0.4l-1.4,0.8l0.3-1.6l0.2-0.8
L5.7,8.7L4.5,7.6l1.6-0.2L7,7.3l0.4-0.8L8,5 M8,1.3L6,5.9L1,6.4l3.7,3.3l-1,4.9L8,12.2l4.3,2.5l-1-4.9L15,6.4l-5-0.5L8,1.3L8,1.3z"/> </symbol><symbol viewBox="0 0 16 16" id="star-half"><title>star-half</title> <path d="M15,6.4l-5-0.5L8,1.3L6,5.9L1,6.4l3.7,3.3l-1,4.9L8,12.2l4.3,2.5l-1-4.9L15,6.4z M9.8,10.1l0.3,1.6l-1.4-0.8L8,10.4V5
l0.7,1.5L9,7.3l0.9,0.1l1.6,0.2l-1.2,1.1L9.6,9.2L9.8,10.1z"/> </symbol><symbol viewBox="0 0 16 16" id="star"><title>star</title> <polygon points="8,1.3 10,5.9 15,6.4 11.3,9.8 12.3,14.7 8,12.2 3.7,14.7 4.7,9.8 1,6.4 6,5.9 "/> </symbol><symbol viewBox="0 0 16 16" id="status"><title>status</title> <path d="M11,5c0-1.7-1.3-3-3-3S5,3.3,5,5c0,1.3,0.8,2.4,2,2.8V14l2-1V7.8C10.2,7.4,11,6.3,11,5z"/> </symbol><symbol viewBox="0 0 16 16" id="stop"><title>stop</title> <rect x="4" y="4" width="8" height="8"/> </symbol><symbol viewBox="0 0 16 16" id="subscribe"><title>subscribe</title> <path d="M15,9h-5c-0.6,0-1,0.4-1,1v5c0,0.6,0.4,1,1,1h5c0.6,0,1-0.4,1-1v-5C16,9.4,15.6,9,15,9z M15,13h-2v2h-1v-2h-2v-1h2v-2h1v2h2
V13z M12,8V5c0-1.1-0.9-2-2-2H2C0.9,3,0,3.9,0,5v5c0,1.1,0.9,2,2,2h6v-2c0-1.2,0.8-2,2-2H12z M6,9.1L1,6.2V5l5,2.9L11,5v1.2L6,9.1z"/> </symbol><symbol viewBox="0 0 16 16" id="subscribed"><title>subscribed</title> <path d="M12,8V5c0-1.1-0.9-2-2-2H2C0.9,3,0,3.9,0,5v5c0,1.1,0.9,2,2,2h6v-2c0-1.2,0.8-2,2-2H12z M6,9.1L1,6.2V5l5,2.9L11,5v1.2
L6,9.1z M15,9h-5c-0.6,0-1,0.4-1,1v5c0,0.6,0.4,1,1,1h5c0.6,0,1-0.4,1-1v-5C16,9.4,15.6,9,15,9z M12,15l-2.1-2.1l0.7-0.7l1.4,1.4
l2.8-2.8l0.7,0.7L12,15z"/> </symbol><symbol viewBox="0 0 16 16" id="summary"><title>summary</title> <path d="M12,3h-2c0-1.1-0.9-2-2-2S6,1.9,6,3H4C3.4,3,3,3.4,3,4v8c0,0.5,0.4,1,1,1h8c0.5,0,1-0.4,1-1V4C13,3.4,12.6,3,12,3z M8,2.2
c0.4,0,0.8,0.3,0.8,0.8S8.4,3.8,8,3.8S7.2,3.4,7.2,3S7.6,2.2,8,2.2z M9,10H5V9h4V10z M11,8H5V7h6V8z M11,6H5V5h6V6z"/> </symbol><symbol viewBox="0 0 16 16" id="tablet"><title>tablet</title> <path d="M12,0H4C2.9,0,2,0.9,2,2v12c0,1.1,0.9,2,2,2h8c1.1,0,2-0.9,2-2V2C14,0.9,13.1,0,12,0z M8.5,15h-1
C7.2,15,7,14.8,7,14.5S7.2,14,7.5,14h1C8.8,14,9,14.2,9,14.5S8.8,15,8.5,15z M12.5,13h-9V2h9V13z"/> </symbol><symbol viewBox="0 0 16 16" id="tag"><title>tag</title> <path d="M11.3,4.3C11.1,4.1,10.9,4,10.6,4H3C2.5,4,2,4.5,2,5v6c0,0.6,0.5,1,1,1h7.6c0.3,0,0.5-0.1,0.7-0.3L15,8L11.3,4.3z M10,9
C9.5,9,9,8.5,9,8s0.5-1,1-1s1,0.5,1,1S10.5,9,10,9z"/> </symbol><symbol viewBox="0 0 16 16" id="time"><title>time</title> <path d="M8,2C4.7,2,2,4.7,2,8s2.7,6,6,6s6-2.7,6-6S11.3,2,8,2z M10.5,11.5L7.2,8.3V4h1.5v3.7l2.8,2.8L10.5,11.5z"/> </symbol><symbol viewBox="0 0 16 16" id="top"><title>top</title> <path d="M3,12h10L8,7L3,12z M3,4v2h10V4H3z"/> </symbol><symbol viewBox="0 0 16 16" id="trash"><title>trash</title> <path d="M5.9,13h4.3c0.5,0,0.9-0.4,1-0.9L12,5.5H4l0.9,6.6C5,12.6,5.4,13,5.9,13z M11,3c0-0.6-0.4-1-1-1H6C5.4,2,5,2.4,5,3L3,4v1h1
h1h1h1h2h1h1h1h1V4L11,3z M9.5,4h-3C6.2,4,6,3.8,6,3.5S6.2,3,6.5,3h3C9.8,3,10,3.2,10,3.5S9.8,4,9.5,4z"/> </symbol><symbol viewBox="0 0 16 16" id="unapprove"><title>unapprove</title> <g enable-background="new "> <path d="M8,2C4.7,2,2,4.7,2,8s2.7,6,6,6s6-2.7,6-6S11.3,2,8,2z M12,8c0,0.7-0.2,1.4-0.6,2L6,4.6C6.6,4.2,7.3,4,8,4
C10.2,4,12,5.8,12,8z M4,8c0-0.7,0.2-1.4,0.6-2l5.5,5.5C9.4,11.8,8.7,12,8,12C5.8,12,4,10.2,4,8z"/> </g> </symbol><symbol viewBox="0 0 16 16" id="unsubscribe"><title>unsubscribe</title> <path d="M15,9h-5c-0.6,0-1,0.4-1,1v5c0,0.6,0.4,1,1,1h5c0.6,0,1-0.4,1-1v-5C16,9.4,15.6,9,15,9z M15,13h-5v-1h5V13z M12,8V5
c0-1.1-0.9-2-2-2H2C0.9,3,0,3.9,0,5v5c0,1.1,0.9,2,2,2h6v-2c0-1.2,0.8-2,2-2H12z M6,9.1L1,6.2V5l5,2.9L11,5v1.2L6,9.1z"/> </symbol><symbol viewBox="0 0 16 16" id="unzoom"><title>unzoom</title> <path d="M4,6v1h5V6H4z M11,9.6c0.6-0.9,1-2,1-3.1C12,3.5,9.5,1,6.5,1S1,3.5,1,6.5S3.5,12,6.5,12c1.2,0,2.2-0.4,3.1-1l3.7,3.7
l1.4-1.4L11,9.6z M6.5,10.5c-2.2,0-4-1.8-4-4s1.8-4,4-4s4,1.8,4,4S8.7,10.5,6.5,10.5z"/> </symbol><symbol viewBox="0 0 16 16" id="user"><title>user</title> <path d="M8,8c1.7,0,3-1.3,3-3S9.7,2,8,2S5,3.3,5,5S6.3,8,8,8z M10,9H6c-1.7,0-3,1.3-3,3v2h10v-2C13,10.3,11.7,9,10,9z"/> </symbol><symbol viewBox="0 0 16 16" id="video"><title>video</title> <path d="M12,4v1h-1V4H5v1H4V4H2v9h2v-1h1v1h6v-1h1v1h2V4H12z M5,11H4v-1h1V11z M5,9H4V8h1V9z M5,7H4V6h1V7z M12,11h-1v-1h1V11z
M12,9h-1V8h1V9z M12,7h-1V6h1V7z"/> </symbol><symbol viewBox="0 0 16 16" id="videocamera"><title>videocamera</title> <path d="M10,7V6c0-1.1-0.9-2-2-2H4C2.9,4,2,4.9,2,6v4c0,1.1,0.9,2,2,2h4c1.1,0,2-0.9,2-2V9l2.3,2.3c0.6,0.6,1.7,0.2,1.7-0.7V5.4
c0-0.9-1.1-1.3-1.7-0.7L10,7z"/> </symbol><symbol viewBox="0 0 16 16" id="warning"><title>warning</title> <path d="M15.6,11.3L9.7,1.6c-0.9-1.5-2.4-1.5-3.3,0l-5.9,9.7c-1,1.5-0.3,2.7,1.4,2.7h12.2C15.8,14,16.5,12.8,15.6,11.3z M8,12
c-0.6,0-1-0.4-1-1s0.4-1,1-1s1,0.4,1,1S8.6,12,8,12z M8.8,9H7.2L7,4h2L8.8,9z"/> </symbol><symbol viewBox="0 0 16 16" id="website"><title>website</title> <path d="M8,2C4.7,2,2,4.7,2,8s2.7,6,6,6s6-2.7,6-6S11.3,2,8,2z M11.9,5.8h-1.5c-0.1-0.7-0.2-1.3-0.4-1.8C10.7,4.3,11.4,5,11.9,5.8z
M12.5,8c0,0.3,0,0.5-0.1,0.8h-1.9c0-0.2,0-0.5,0-0.8s0-0.5,0-0.8h1.9C12.5,7.5,12.5,7.7,12.5,8z M8,12.5c-0.2-0.2-0.6-0.9-0.8-2.2
h1.6C8.6,11.5,8.2,12.3,8,12.5z M7,8.8C7,8.5,7,8.3,7,8s0-0.5,0-0.8h2C9,7.5,9,7.7,9,8s0,0.5,0,0.8H7z M3.5,8c0-0.3,0-0.5,0.1-0.8
h1.9c0,0.2,0,0.5,0,0.8s0,0.5,0,0.8H3.6C3.5,8.5,3.5,8.3,3.5,8z M8,3.5c0.2,0.1,0.6,0.9,0.8,2.2H7.2C7.4,4.4,7.8,3.6,8,3.5z
M6.1,3.9C5.9,4.5,5.8,5.1,5.7,5.8H4.1C4.6,5,5.3,4.3,6.1,3.9z M4.1,10.2h1.5c0.1,0.7,0.2,1.3,0.4,1.8C5.3,11.7,4.6,11,4.1,10.2z
M9.9,12.1c0.2-0.5,0.3-1.1,0.4-1.8h1.5C11.4,11,10.7,11.7,9.9,12.1z"/> </symbol><symbol viewBox="0 0 16 16" id="week"><title>week</title> <path d="M12,3h-1V2H9v1H7V2H5v1H4C2.9,3,2,3.9,2,5v6c0,1.1,0.9,2,2,2h8c1.1,0,2-0.9,2-2V5C14,3.9,13.1,3,12,3z M8.2,11H7.1l1.7-5H6
V5h4.2L8.2,11z"/> </symbol><symbol viewBox="0 0 16 16" id="xpost"><title>xpost</title> <path d="M13,4c0-1.1-0.9-2-2-2S9,2.9,9,4c0,0.7,0.4,1.4,1,1.7V7c0,1.1-0.9,2-2,2C7.3,9,6.6,9.2,6,9.6V5.7c0.6-0.3,1-1,1-1.7
c0-1.1-0.9-2-2-2S3,2.9,3,4c0,0.7,0.4,1.4,1,1.7V14h2v-1c0-1.1,0.9-2,2-2c2.2,0,4-1.8,4-4V5.7C12.6,5.4,13,4.7,13,4z M5,3.2
c0.4,0,0.8,0.3,0.8,0.8S5.4,4.8,5,4.8S4.2,4.4,4.2,4S4.6,3.2,5,3.2z M11,4.8c-0.4,0-0.8-0.3-0.8-0.8s0.3-0.8,0.8-0.8
s0.8,0.3,0.8,0.8S11.4,4.8,11,4.8z"/> </symbol><symbol viewBox="0 0 16 16" id="zoom"><title>zoom</title> <path d="M7,4H6v2H4v1h2v2h1V7h2V6H7V4z M11,9.6c0.6-0.9,1-2,1-3.1C12,3.5,9.5,1,6.5,1S1,3.5,1,6.5S3.5,12,6.5,12
c1.2,0,2.2-0.4,3.1-1l3.7,3.7l1.4-1.4L11,9.6z M6.5,10.5c-2.2,0-4-1.8-4-4s1.8-4,4-4s4,1.8,4,4S8.7,10.5,6.5,10.5z"/> </symbol></svg>

After

Width:  |  Height:  |  Size: 27 KiB

View File

@@ -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 );

View File

@@ -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 );

326
assets/treville/js/html5shiv.js vendored Executable file
View File

@@ -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 = '<xyz></xyz>';
//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<style>' + cssText + '</style>';
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(;i<l;i++){
clone.createElement(elems[i]);
}
return clone;
}
/**
* Shivs the `createElement` and `createDocumentFragment` methods of the document.
* @private
* @param {Document|DocumentFragment} ownerDocument The document.
* @param {Object} data of the document.
*/
function shivMethods(ownerDocument, data) {
if (!data.cache) {
data.cache = {};
data.createElem = ownerDocument.createElement;
data.createFrag = ownerDocument.createDocumentFragment;
data.frag = data.createFrag();
}
ownerDocument.createElement = function(nodeName) {
//abort shiv
if (!html5.shivMethods) {
return data.createElem(nodeName);
}
return createElement(nodeName, ownerDocument, data);
};
ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
'var n=f.cloneNode(),c=n.createElement;' +
'h.shivMethods&&(' +
// unroll the `createElement` calls
getElements().join().replace(/[\w\-:]+/g, function(nodeName) {
data.createElem(nodeName);
data.frag.createElement(nodeName);
return 'c("' + nodeName + '")';
}) +
');return n}'
)(html5, data.frag);
}
/*--------------------------------------------------------------------------*/
/**
* Shivs the given document.
* @memberOf html5
* @param {Document} ownerDocument The document to shiv.
* @returns {Document} The shived document.
*/
function shivDocument(ownerDocument) {
if (!ownerDocument) {
ownerDocument = document;
}
var data = getExpandoData(ownerDocument);
if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
data.hasCSS = !!addStyleSheet(ownerDocument,
// corrects block display not defined in IE6/7/8/9
'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
// adds styling not present in IE6/7/8/9
'mark{background:#FF0;color:#000}' +
// hides non-rendered elements
'template{display:none}'
);
}
if (!supportsUnknownElements) {
shivMethods(ownerDocument, data);
}
return ownerDocument;
}
/*--------------------------------------------------------------------------*/
/**
* The `html5` object is exposed so that more elements can be shived and
* existing shiving can be detected on iframes.
* @type Object
* @example
*
* // options can be changed before the script is included
* html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
*/
var html5 = {
/**
* An array or space separated string of node names of the elements to shiv.
* @memberOf html5
* @type Array|String
*/
'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video',
/**
* current version of html5shiv
*/
'version': version,
/**
* A flag to indicate that the HTML5 style sheet should be inserted.
* @memberOf html5
* @type Boolean
*/
'shivCSS': (options.shivCSS !== false),
/**
* Is equal to true if a browser supports creating unknown/HTML5 elements
* @memberOf html5
* @type boolean
*/
'supportsUnknownElements': supportsUnknownElements,
/**
* A flag to indicate that the document's `createElement` and `createDocumentFragment`
* methods should be overwritten.
* @memberOf html5
* @type Boolean
*/
'shivMethods': (options.shivMethods !== false),
/**
* A string to describe the type of `html5` object ("default" or "default print").
* @memberOf html5
* @type String
*/
'type': 'default',
// shivs the document according to the specified `html5` object options
'shivDocument': shivDocument,
//creates a shived element
createElement: createElement,
//creates a shived documentFragment
createDocumentFragment: createDocumentFragment,
//extends list of elements
addElements: addElements
};
/*--------------------------------------------------------------------------*/
// expose html5
window.html5 = html5;
// shiv the document
shivDocument(document);
if(typeof module == 'object' && module.exports){
module.exports = html5;
}
}(typeof window !== "undefined" ? window : this, document));

5
assets/treville/js/jquery.flexslider-min.js vendored Executable file

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

130
assets/treville/js/navigation.js Executable file
View File

@@ -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' );
} );
}() );

23
assets/treville/js/slider.js Executable file
View File

@@ -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"
});
});

230
assets/treville/js/svgxuse.js Executable file
View File

@@ -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();
}
}
}());

51
back_treville.php Executable file
View File

@@ -0,0 +1,51 @@
<?php
namespace RomhackPlaza\Backwards;
defined( '\ABSPATH' ) || exit;
/*
* This file contains some snippets used in the base Treville theme.
* This function are not edited. All rights are for ThemeZee.
*/
if( ! function_exists( 'treville_is_amp' ) ) {
/**
* Checks if AMP page is rendered.
*/
function treville_is_amp() {
return function_exists( 'is_amp_endpoint' ) && is_amp_endpoint();
}
}
if( ! function_exists( 'treville_amp_menu_toggl' ) ) {
function treville_amp_menu_toggle() {
if ( treville_is_amp() ) {
echo "[aria-expanded]=\"mobileMenuExpanded? 'true' : 'false'\" ";
echo 'on="tap:AMP.setState({mobileMenuExpanded: !mobileMenuExpanded})"';
}
}
}
if( ! function_exists( 'treville_amp_secondary_menu_is_toggled' ) ) {
function treville_amp_secondary_menu_is_toggled() {
if ( treville_is_amp() ) {
echo "[class]=\"'secondary-navigation' + ( mobileMenuExpanded ? ' toggled-on' : '' )\"";
}
}
}
if( !function_exists( 'treville_amp_primary_menu_is_toggled' ) ) {
function treville_amp_primary_menu_is_toggled() {
if ( treville_is_amp() ) {
echo "[class]=\"'primary-navigation-wrap' + ( mobileMenuExpanded ? ' toggled-on' : '' )\"";
}
}
}

14
composer.json Executable file
View File

@@ -0,0 +1,14 @@
{
"require": {
"timber/timber": "^2.3",
"wptt/webfont-loader": "^1.1"
},
"autoload": {
"psr-4": {
"RomhackPlaza\\": "src/"
},
"files": [
"vendor/wptt/webfont-loader/wptt-webfont-loader.php"
]
}
}

479
composer.lock generated Executable file
View File

@@ -0,0 +1,479 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "2f8f27bc317055ac73d264d2dfe78862",
"packages": [
{
"name": "symfony/deprecation-contracts",
"version": "v3.6.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/deprecation-contracts.git",
"reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62",
"reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62",
"shasum": ""
},
"require": {
"php": ">=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"
}

15
functions.php Executable file
View File

@@ -0,0 +1,15 @@
<?php
// Loading Timber and other packages.
require_once __DIR__ . '/vendor/autoload.php';
Timber\Timber::init();
// Backward Treville compatibility.
require_once get_template_directory() . '/back_treville.php';
if( !defined( 'ROMHACKPLAZA_THEME' ) )
define( 'ROMHACKPLAZA_THEME', '0.0.1' );
use RomhackPlaza\Theme;
$_romhackplaza_theme = new Theme();

3
index.php Executable file
View File

@@ -0,0 +1,3 @@
<?php
\Timber\Timber::render( 'index.twig', \Timber\Timber::context() );

17
page.php Normal file
View File

@@ -0,0 +1,17 @@
<?php
use Timber\Timber;
use RomhackPlaza\Theme\Page_Access;
if( Page_Access::can_access_or_change_content() ) {
$page = Timber::get_post();
$templates_list = [
'pages/' . $page->post_name . '.twig',
'pages/generic.twig',
];
Timber::render($templates_list, Timber::context());
}

329
src/Theme.php Executable file
View File

@@ -0,0 +1,329 @@
<?php
namespace RomhackPlaza;
use RomhackPlaza\Theme\Widget_Area;
use RomhackPlaza\Theme\Script;
use RomhackPlaza\Theme\Script_Type;
use RomhackPlaza\Theme\Extenders;
defined( '\ABSPATH' ) || exit;
class Theme {
/**
* Each theme features activated by add_theme_support() function.
*/
public const array THEME_SUPPORTS = [ 'automatic-feed-links', 'title-tag', 'post-thumbnails', 'responsive-embeds' ];
/**
* If the RomhackPlaza plugin is enabled or not.
* @var bool
*/
public bool $main_plugin_enabled = false;
/**
* Settings object.
* @var Theme\Settings
*/
public Theme\Settings $settings;
/**
* Children created class.
* ADD PREFIX FOR EACH STIUATION (Except if it's a direct child and unique, like Customizer)
*
* Extenders : extend_
* Scripts : script_
* Pages : page_
* Widget area : widget_area_
* ...
*
* @var array
*/
public array $children = [];
/**
* New theme element, setup it.
*/
public function __construct() {
add_action( 'after_setup_theme', [ $this, 'setup' ] );
add_action( 'widgets_init', [ $this, 'register_widgets_areas' ] );
add_action( 'wp_enqueue_scripts', [ $this, 'register_scripts_stylesheets' ] );
add_action( 'wp_enqueue_scripts', [ $this, 'register_fonts' ], 1 );
add_action( 'enqueue_block_editor_assets', [ $this, 'register_fonts' ] );
add_filter( 'image_size_names_choose', [ $this, 'image_size_names' ] );
// Classes loader.
$this->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 '<div class="notice notice-error"><p>';
echo 'RomhackPlaza theme requires <strong>RomhackPlaza plugin</strong> to be installed and active. The default theme is applied.';
echo '</p></div>';
});
}
}
/**
* 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' => '<div class="widget-wrap"><aside id="%1$s" class="widget %2$s clearfix">',
'after_widget' => '</aside></div>',
'before_title' => '<div class="widget-header"><h3 class="widget-title">',
'after_title' => '</h3></div>',
]
)->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' => '<div id="%1$s" class="widget %2$s">',
'after_widget' => '</div>',
'before_title' => '<div class="widget-header"><h3 class="widget-title">',
'after_title' => '</h3></div>',
]
)->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;
}
}

150
src/Theme/Customizer.php Normal file
View File

@@ -0,0 +1,150 @@
<?php
namespace RomhackPlaza\Theme;
defined( '\ABSPATH' ) || exit;
use RomhackPlaza\Theme\Script;
use RomhackPlaza\Theme\Script_Type;
class Customizer {
public function __construct() {
add_action( 'customize_register', array( $this, 'custom_panel' ) );
add_action( 'customize_controls_print_style', array( $this, 'custom_preview_css' ) );
add_action( 'customize_preview_init', array( $this, 'custom_preview_js' ) );
add_action( 'customize_controls_enqueue_scripts', array( $this, 'custom_controls_js' ) );
// --- Sections ---
new Customizer\General();
new Customizer\Blog();
new Customizer\Post();
new Customizer\Extends_Website();
}
/**
* Add custom panel to "Customize" menu.
* @param $wp_customize
* @return void
*/
public function custom_panel( $wp_customize ) {
$wp_customize->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';
}
}

View File

@@ -0,0 +1,23 @@
<?php
namespace RomhackPlaza\Theme\Customizer;
defined( '\ABSPATH' ) || exit;
abstract class Abstract_Section {
/**
* Launch the action.
* @return void
*/
public function __construct() {
add_action( 'customize_register', array( $this, 'section' ) );
}
/**
* Customize instructions.
* @param $wp_customize
* @return void
*/
abstract public function section( $wp_customize ): void;
}

View File

@@ -0,0 +1,240 @@
<?php
namespace RomhackPlaza\Theme\Customizer;
use RomhackPlaza\Theme\Customizer;
defined( '\ABSPATH' ) || exit;
class Blog extends Abstract_Section {
/**
* All settings are from Treville base.
* @param $wp_customize
* @return void
*/
public function section( $wp_customize ): void {
$wp_customize->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' ) ) );
}
*/
}
}

View File

@@ -0,0 +1,35 @@
<?php
namespace RomhackPlaza\Theme\Customizer\Control;
defined( '\ABSPATH' ) || exit;
class Category_Dropdown extends \WP_Customize_Control {
/**
* Code from Treville.
* @return void
*/
public function render_content() {
$categories = get_categories( array( 'hide_empty' => false ) );
if ( ! empty( $categories ) ) { ?>
<label><span class="customize-control-title"><?php echo esc_html( $this->label ); ?></span>
<select <?php $this->link(); ?>>
<option value="0"><?php esc_html_e( 'All Categories', 'romhackplaza' ); ?></option>
<?php foreach( $categories as $category ) {
printf(
'<option value="%1$s" %2$s>%3$s</option>',
$category->term_id,
selected( $this->value(), $category->term_id, false ),
$category->name . ' (' . $category->count . ')'
);
} ?>
</select>
</label>
<?php }
}
}

View File

@@ -0,0 +1,22 @@
<?php
namespace RomhackPlaza\Theme\Customizer\Control;
defined( '\ABSPATH' ) || exit;
class Header extends \WP_Customize_Control {
/**
* Code from Treville.
* @return void
*/
public function render_content() {
?>
<label>
<span class="customize-control-title"><?php echo wp_kses_post( $this->label ); ?></span>
</label>
<?php
}
}

View File

@@ -0,0 +1,112 @@
<?php
namespace RomhackPlaza\Theme\Customizer;
use RomhackPlaza\Theme\Customizer;
defined( '\ABSPATH' ) || exit;
class Extends_Website extends Abstract_Section {
/**
* All settings are from Treville base.
* @param $wp_customize
* @return void
*/
public function section( $wp_customize ): void {
$wp_customize->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,
)
);
}
}

View File

@@ -0,0 +1,56 @@
<?php
namespace RomhackPlaza\Theme\Customizer;
use RomhackPlaza\Theme\Customizer;
defined( '\ABSPATH' ) || exit;
class General extends Abstract_Section {
/**
* All settings are from Treville base.
* @param $wp_customize
* @return void
*/
public function section( $wp_customize ): void {
$wp_customize->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' ),
]
]
);
}
}

View File

@@ -0,0 +1,276 @@
<?php
namespace RomhackPlaza\Theme\Customizer;
use RomhackPlaza\Theme\Customizer;
defined( '\ABSPATH' ) || exit;
class Post extends Abstract_Section {
/**
* All settings are from Treville base.
* @param $wp_customize
* @return void
*/
public function section( $wp_customize ): void {
$wp_customize->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' ) ) );
}
*/
}
}

View File

@@ -0,0 +1,21 @@
<?php
namespace RomhackPlaza\Theme\Customizer;
use RomhackPlaza\Theme\Customizer;
defined( '\ABSPATH' ) || exit;
class Slider extends Abstract_Section {
/**
* All settings are from Treville base.
* @param $wp_customize
* @return void
*/
public function section( $wp_customize ): void {
// Not copied for now. Not useful for the Plaza.
}
}

View File

@@ -0,0 +1,57 @@
<?php
namespace RomhackPlaza\Theme\Extenders;
defined( '\ABSPATH' ) || exit;
abstract class Abstract_Extender {
/**
* When launched. Check if extend car occur.
* Launch extender.
*/
public function __construct() {
if( !$this->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;
}

View File

@@ -0,0 +1,50 @@
<?php
namespace RomhackPlaza\Theme\Extenders;
defined( '\ABSPATH' ) || exit;
class Excerpt extends Abstract_Extender {
public function can_extend(): bool
{
return true;
}
public function extend(): void {
$this->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 : '';
}
}

View File

@@ -0,0 +1,39 @@
<?php
namespace RomhackPlaza\Theme\Extenders;
defined( '\ABSPATH' ) || exit;
use RomhackPlaza\Theme\Snippets;
class Nav_Menu extends Abstract_Extender {
public function can_extend(): bool {
return true;
}
public function extend(): void {
$this->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;
}
}

View File

@@ -0,0 +1,100 @@
<?php
namespace RomhackPlaza\Theme\Extenders;
defined( '\ABSPATH' ) || exit;
use Romhackplaza\Theme\Script;
use RomhackPlaza\Theme\Script_Type;
class Site_Settings_CSS extends Abstract_Extender {
public function can_extend(): bool {
return true;
}
public function extend(): void {
$this->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 );
}
}

View File

@@ -0,0 +1,29 @@
<?php
namespace RomhackPlaza\Theme\Extenders;
defined( '\ABSPATH' ) || exit;
use Timber\Timber;
class Timber_Twig extends Abstract_Extender {
protected function can_extend(): bool {
return true;
}
protected function extend(): void {
$this->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;
}
}

61
src/Theme/Page_Access.php Normal file
View File

@@ -0,0 +1,61 @@
<?php
namespace RomhackPlaza\Theme;
use Timber\Timber;
defined( 'ABSPATH' ) || exit;
class Page_Access {
public static string $last_needed_cap;
private function __construct() {}
public static function current_can_access() {
$capability_required = get_post_meta( get_the_ID(), 'capability_required', true ) ?? "none";
// Everyone can access to this page.
if( $capability_required === "none" )
return true;
// Replace friendly name.
if( $capability_required === "staff" )
$capability_required = "edit_others_posts";
if( current_user_can( $capability_required ) )
return true; // The user can access to this page.
self::$last_needed_cap = $capability_required;
return false;
}
public static function can_access_or_change_content( $page = 'capability_required.twig' ): bool {
if( self::current_can_access() )
return true;
$capability_required = self::$last_needed_cap;
$context = Timber::context();
switch( $capability_required ){
case "edit_others_posts":
$context['why'] = __( "You need to be a staff member.", 'romhackplaza' );
break;
case "edit_posts":
$context['why'] = __( "You need to be a member.", 'romhackplaza' );
break;
case "read":
$context['why'] = __( "You need to be logged-in.", 'romhackplaza' );
break;
default:
$context['why'] = sprintf( __( "You need to have this capability: %s", 'romhackplaza' ), $capability_required );
break;
}
Timber::render( $page, $context );
return false;
}
}

View File

@@ -0,0 +1,79 @@
<?php
namespace RomhackPlaza\Theme\Pages;
defined( '\ABSPATH' ) || exit;
// TODO: Have same usage than the Admin Page creator.
abstract class Abstract_Page {
/**
* @var string
*/
final public string $page_title;
/**
* @var string
*/
final public string $menu_title;
/**
* @var string
*/
final public string $page_slug;
/**
* @var string
*/
final public string $capability;
/**
* @var int|null
*/
public int|null $position = null;
/**
* Launch page setup and create page.
*/
public function __construct() {
$this->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.
*/
}

View File

@@ -0,0 +1,180 @@
<?php
namespace RomhackPlaza\Theme\Pages;
defined( '\ABSPATH' ) || exit;
use RomhackPlaza\Theme\Script;
use RomhackPlaza\Theme\Script_Type;
class Theme_Info extends Abstract_Page {
protected function setup(): void {
$theme = wp_get_theme();
$this->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();
?>
<div class="wrap theme-info-wrap">
<h1><?php printf( esc_html__( 'Welcome to %1$s %2$s', 'romhackplaza' ), $theme->display( 'Name' ), $theme->display( 'Version' ) ); ?></h1>
<div class="theme-description"><?php echo $theme->display( 'Description' ); ?></div>
<hr>
<div class="important-links clearfix">
<p><strong><?php esc_html_e( 'Theme Links', 'treville' ); ?>:</strong>
<a href="<?php echo esc_url( __( 'https://themezee.com/themes/treville/', 'treville' ) . '?utm_source=theme-info&utm_medium=textlink&utm_campaign=treville&utm_content=theme-page' ); ?>" target="_blank"><?php esc_html_e( 'Theme Page', 'treville' ); ?></a>
<a href="http://preview.themezee.com/?demo=treville&utm_source=theme-info&utm_campaign=treville" target="_blank"><?php esc_html_e( 'Theme Demo', 'treville' ); ?></a>
<a href="<?php echo esc_url( __( 'https://themezee.com/docs/treville-documentation/', 'treville' ) . '?utm_source=theme-info&utm_medium=textlink&utm_campaign=treville&utm_content=documentation' ); ?>" target="_blank"><?php esc_html_e( 'Theme Documentation', 'treville' ); ?></a>
<a href="<?php echo esc_url( __( 'https://themezee.com/changelogs/?action=themezee-changelog&type=theme&slug=treville', 'treville' ) ); ?>" target="_blank"><?php esc_html_e( 'Theme Changelog', 'treville' ); ?></a>
<a href="<?php echo esc_url( __( 'https://wordpress.org/support/theme/treville/reviews/', 'treville' ) ); ?>" target="_blank"><?php esc_html_e( 'Rate this theme', 'treville' ); ?></a>
</p>
</div>
<hr>
<div id="getting-started">
<h3><?php printf( esc_html__( 'Getting Started with %s', 'treville' ), $theme->display( 'Name' ) ); ?></h3>
<div class="columns-wrapper clearfix">
<div class="column column-half clearfix">
<div class="section">
<h4><?php esc_html_e( 'Theme Documentation', 'treville' ); ?></h4>
<p class="about">
<?php esc_html_e( 'You need help to setup and configure this theme? We got you covered with an extensive theme documentation on our website.', 'treville' ); ?>
</p>
<p>
<a href="<?php echo esc_url( __( 'https://themezee.com/docs/treville-documentation/', 'treville' ) . '?utm_source=theme-info&utm_medium=button&utm_campaign=treville&utm_content=documentation' ); ?>" target="_blank" class="button button-secondary">
<?php printf( esc_html__( 'View %s Documentation', 'treville' ), 'Treville' ); ?>
</a>
</p>
</div>
<div class="section">
<h4><?php esc_html_e( 'Theme Options', 'treville' ); ?></h4>
<p class="about">
<?php printf( esc_html__( '%s makes use of the Customizer for all theme settings. Click on "Customize Theme" to open the Customizer now.', 'treville' ), $theme->display( 'Name' ) ); ?>
</p>
<p>
<a href="<?php echo wp_customize_url(); ?>" class="button button-primary"><?php esc_html_e( 'Customize Theme', 'treville' ); ?></a>
</p>
</div>
</div>
<div class="column column-half clearfix">
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/screenshot.jpg" />
</div>
</div>
</div>
<hr>
<div id="more-features">
<h3><?php esc_html_e( 'Get more features', 'treville' ); ?></h3>
<div class="columns-wrapper clearfix">
<div class="column column-half clearfix">
<div class="section">
<h4><?php esc_html_e( 'Pro Version Add-on', 'treville' ); ?></h4>
<p class="about">
<?php printf( esc_html__( 'Purchase the %s Pro Add-on and get additional features and advanced customization options.', 'treville' ), 'Treville' ); ?>
</p>
<p>
<a href="<?php echo esc_url( __( 'https://themezee.com/addons/treville-pro/', 'treville' ) . '?utm_source=theme-info&utm_medium=button&utm_campaign=treville&utm_content=pro-version' ); ?>" target="_blank" class="button button-secondary">
<?php printf( esc_html__( 'Learn more about %s Pro', 'treville' ), 'Treville' ); ?>
</a>
</p>
</div>
</div>
<div class="column column-half clearfix">
<div class="section">
<h4><?php esc_html_e( 'Recommended Plugins', 'treville' ); ?></h4>
<p class="about">
<?php esc_html_e( 'Extend the functionality of your WordPress website with our free and easy to use plugins.', 'treville' ); ?>
</p>
<p>
<a href="<?php echo esc_url( admin_url( 'plugin-install.php?tab=search&type=tag&s=themezee' ) ); ?>" class="button button-secondary">
<?php esc_html_e( 'Install Plugins', 'treville' ); ?>
</a>
</p>
</div>
</div>
</div>
</div>
<hr>
<div id="theme-author">
<p>
<?php
printf(
esc_html__( '%1$s is proudly brought to you by %2$s. If you like this theme, %3$s :)', 'treville' ),
$theme->display( 'Name' ),
'<a target="_blank" href="' . __( 'https://themezee.com/', 'treville' ) . '?utm_source=theme-info&utm_medium=footer&utm_campaign=treville" title="ThemeZee">ThemeZee</a>',
'<a target="_blank" href="' . __( 'https://wordpress.org/support/theme/treville/reviews/', 'treville' ) . '" title="' . esc_attr__( 'Review Treville', 'treville' ) . '">' . esc_html__( 'rate it', 'treville' ) . '</a>'
);
?>
</p>
</div>
</div>
<?php
}
public function scripts( $hook ): void {
// If it's not our page. Ignore.
if( $hook != 'appearance_page_romhackplaza_theme' )
return;
new Script(
Script_Type::CSS,
'treville-theme-info-css',
get_template_directory_uri() . '/assets/treville/css/theme-info.css'
)->enqueue();
}
}

135
src/Theme/Script.php Executable file
View File

@@ -0,0 +1,135 @@
<?php
namespace Romhackplaza\Theme;
defined( '\ABSPATH' ) || exit;
// TODO: Replace by Dummy if plugin is not enabled and use plugin class.
class Script {
/**
* @var Script_Type
*/
final public Script_Type $type;
/**
* Script name.
* @var string
*/
final public string $handle;
/**
* URL where the file is.
* @var string
*/
final public string|bool $source;
/**
* Dependencies from other scripts.
* @var array
*/
final public array $deps;
/**
* Version number. False if not.
* @var string|bool
*/
final public string|bool $version;
final public string|bool $media;
final public array|bool $args;
/**
* Save values
*
* @param Script_Type $type
* @param string $handle
* @param string|bool $source
* @param array $deps
* @param string|bool $version
* @param string|bool $media
* @param array $args
* @return Script - Itself.
*/
public function __construct(
Script_Type $type,
string $handle,
string|bool $source = false,
array $deps = [],
string|bool $version = false,
string|bool $media = false,
array|bool $args = [],
) {
$this->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;
}
}

View File

@@ -0,0 +1,6 @@
<?php
namespace Romhackplaza\Theme;
defined( '\ABSPATH' ) || exit;
enum Script_Type { case JS; case CSS; };

129
src/Theme/Settings.php Normal file
View File

@@ -0,0 +1,129 @@
<?php
namespace RomhackPlaza\Theme;
defined( '\ABSPATH' ) || exit;
class Settings {
private array $options;
/**
* Default settings.
* @var array
*/
private array $defaults;
/**
* Build default settings and refresh.
* /!\ Settings are registred with Customizer.
*/
public function __construct() {
$this->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;
}
}

24
src/Theme/Snippets.php Normal file
View File

@@ -0,0 +1,24 @@
<?php
namespace RomhackPlaza\Theme;
defined( '\ABSPATH' ) || exit;
class Snippets {
/**
* Build SVG HTML object.
* @param string $icon_id
* @return string
*/
public static function svg_icon( string $icon_id ): string {
$svg = '<svg class="icon icon-' . esc_attr( $icon_id ) . '" aria-hidden="true" role="img">';
$svg .= ' <use xlink:href="' . get_parent_theme_file_uri( '/assets/treville/icons/genericons-neue.svg#' ) . esc_html( $icon_id ) . '"></use> ';
$svg .= '</svg>';
return $svg;
}
}

View File

@@ -0,0 +1,82 @@
<?php
namespace RomhackPlaza\Theme;
use RomhackPlaza\Extenders\User_Notifications;
use RomhackPlaza\Format;
use RomhackPlaza\Modal;
defined( 'ABSPATH' ) || exit;
class Template_Context {
public function __construct() {
add_filter( 'timber/context', [ $this, 'timber_context_handler_by_page' ] );
}
public function timber_context_handler_by_page( $context ) {
global $_romhackplaza;
/**
* /!\ Scripts for submissions are entirely managed by Submissions extenders.
* @see RomhackPlaza\Extenders\Submissions;
*/
/**
* Notifications page.
* - Add notifications to context.
* - Load JS send script and prepare nonce.
* - Load Modal for reply box.
*/
if( is_page( 'notifications' ) && is_user_logged_in() ){
$args = [
'recipient' => 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;
}
}

54
src/Theme/Widget_Area.php Executable file
View File

@@ -0,0 +1,54 @@
<?php
namespace RomhackPlaza\Theme;
defined( '\ABSPATH' ) || exit;
class Widget_Area {
/**
* @var string|mixed|null
*/
final public string $name;
/**
* @var string|mixed|null
*/
final public string $id;
/**
* WP Args like register_sidebar() args.
* @var array
*/
final public array $wp_args;
/**
* Save values.
* @param array $wp_args - Like register_sidebar()
* @return Widget_Area - Itself.
*/
public function __construct( array $wp_args = [] ) {
$this->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;
}
}

2008
style.css Executable file

File diff suppressed because it is too large Load Diff

4426
treville.css Executable file

File diff suppressed because it is too large Load Diff

21
views/404.twig Normal file
View File

@@ -0,0 +1,21 @@
{% extends 'base.twig' %}
{% block page %}
<div class="error-404 not-found type-page">
<header class="entry-header">
<h1 class="page-title">{{ __( 'Oops, this page doesn\'t exist', 'romhackplaza' )|esc_html }}</h1>
</header>
<div class="post-content">
<div class="entry-content clearfix">
<p>{{ __( "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') }}</p>
</div>
</div>
</div>
{% endblock %}

115
views/base.twig Normal file
View File

@@ -0,0 +1,115 @@
<!DOCTYPE html>
<html {{ fn( 'language_attributes' ) }}>
<head>
{% block head %}
<meta charset="{{ site.charset }}">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="{{ site.pingback }}">
{{ fn( 'wp_head' ) }}
{% endblock %}
</head>
<body {{ fn( 'body_class' ) }} >
{% block body %}
{% do action('wp_body_open') %}
<div id="page" class="hfeed site">
<a class="skip-link screen-reader-text" href="#content">{{ __( 'Skip to content', 'romhackplaza' )|esc_html }}</a>
<header id="masthead" class="site-header clearfix" role="banner">
{% block header %}
<div class="header-main container clearfix">
<div id="logo" class="site-branding clearfix">
{{ fn( 'the_custom_logo' ) }}
<!-- Site logo -->
{% if is_home %}
<h1 class="site-title"><a href="{{ site.url }}/" rel="home">{{ site.title }}</a></h1>
{% else %}
<p class="site-title"><a href="{{ site.url }}/" rel="home">{{ site.title }}</a></p>
{% endif %}
{% if site.description or conditional_tag.is_customize_preview %}
<p class="site-description">{{ site.description }}</p>
{% endif %}
</div>
{% include 'pieces/menus/secondary.twig' %}
</div>
{% include 'pieces/menus/primary.twig' %}
{% endblock %}
</header>
{# Add Header image here if needed... #}
{# Add Slider if needed #}
<div id="content" class="site-content container clearfix">
<section id="primary" class="content-single content-area">
<main id="main" class="site-main" role="main">
{% block page %}
{% endblock %}
</main>
</section>
{% block sidebar %}
{% if wp_sidebar %}
<section id="secondary" class="sidebar widget-area clearfix" role="complementary">
{{ wp_sidebar }}
</section>
{% endif %}
{% endblock %}
</div>
<div id="footer" class="footer-wrap">
{% block footer %}
<footer id="colophon" class="site-footer container clearfix" role="contentinfo">
{# TODO Add things later... #}
</footer>
{% endblock %}
</div>
</div>
{{ fn( 'wp_footer') }}
{% endblock %}
</body>
</html>

View File

@@ -0,0 +1,14 @@
{% extends "pages/generic.twig" %}
{% block page_content %}
<b>{{ __( 'You do not have permission to view the content on this page.', 'romhackplaza') }}</b><br>
{{ why }}
{% if not user %}
<p>Please <a href="{{ fn( 'wp_login_url') }}">log in</a> or <a href="{{ fn('wp_registration_url') }}">register</a>.</p>
{% endif %}
{% endblock %}

5
views/index.twig Executable file
View File

@@ -0,0 +1,5 @@
{% extends 'base.twig' %}
{% block page %}
{% include 'pieces/posts/author-bio.twig' %}
{% endblock %}

26
views/pages/generic.twig Normal file
View File

@@ -0,0 +1,26 @@
{% extends 'base.twig' %}
{% block page %}
<article id="post-{{ post.ID }}" {{ fn('post_class') }}>
<header class="entry-header">
<h1 class="page-title">{{ post.title }}</h1>
</header>
{{ fn('the_post_thumbnail') }}
<div class="post-content">
<div class="entry-content clearfix">
{% block page_content %}
{{ post.content }}
{% endblock %}
</div>
</div>
</article>
{% endblock %}

View File

@@ -0,0 +1,68 @@
{% extends 'pages/generic.twig' %}
{% block page_content %}
{% for notif in notifications %}
{% set sender = get_user( notif.sender ) %}
<div class="bottom_bar"></div>
<div id="notification-{{ notif.id }}" style="padding:10px;overflow:auto;">
{% if notif.readed != 1 %}
<div id="new-info-{{ notif.id }}" style="color:red;display:block;margin-bottom:7px;text-align:right;">
{{ __( 'New', 'romhackplaza' ) }}
</div>
{% endif %}
<div class="reviews_post_parent_details">
<img src="{{ fn( 'get_avatar_url', notif.sender ) }}" width="40px"><span class="reviews_parent_title">{{ sender.name }}</span>
</div>
<div class="reviews_post_title">
{{ notif.type }}
</div>
<p class="reviews_post_details">
{% if notif.auto == 1 %}
{{ __( 'Automatic notification', 'romhackplaza' ) }} -
{% endif %}
{{ notif.date|date }} ({{ notif.id }})
</p>
<div id="review-content-{{ notif.id }}" class="reviews_post_content">
{{ notif.content }}
</div>
<br>
<div class="news-links">
{% if notif.readed != 1 %}
<span class="rhdo-project-link">
<a class="mark-as-read" href="#mark-as-read" data-id="{{ notif.id }}">
{{ __('Mark as read', 'romhackplaza') }}
</a>
</span>
{% endif %}
{% if notif.type_id == "message" or notif.type_id == "reply_message" %}
<span class="rhdo-project-link" style="float:right;display:block;">
<a class="reply-message" href="#reply" data-id="{{ notif.id }}">
{{ __('Reply', 'romhackplaza') }}
</a>
</span>
{% endif %}
</div>
</div>
{% else %}
{{ __( "You don't have any notifications.", 'romhackplaza') }}
{% endfor %}
{% endblock %}

View File

@@ -0,0 +1,85 @@
{% extends 'pages/generic.twig' %}
{% set accordion_opened = false %}
{% block page_content %}
<div class="container custom-uploader {{ post_type_singular }}">
{% 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 %}
</div>
{% endblock %}

View File

@@ -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 %}

View File

@@ -0,0 +1,33 @@
{% if menu.primary %}
<div class="primary-navigation-wrap" {{ fn( 'RomhackPlaza\\Backwards\\treville_amp_primary_menu_is_toggled') }} >
<div class="primary-navigation container">
<nav id="site-navigation" class="main-navigation" role="navigation" aria-label="{{ __('Primary Menu', 'romhackplaza')|esc_attr }}">
<ul id="primary-menu" class="menu">
{% for item in menu.primary.items %}
<li class="{{ item.classes|join(' ') }}">
<a href="{{ item.link }}" {{ item.is_target_blank ? 'target="_blank"' }}>{{ item.title }}</a>
{% if item.children %}
<ul class="sub-menu">
{% for child in item.children %}
<li class="menu-item {{ child.classes|join(' ') }}">
<a href="{{ child.link }}" {{ child.is_target_blank ? 'target="_blank"' }}>{{ child.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</nav>
</div>
</div>
{% endif %}

View File

@@ -0,0 +1,40 @@
{% if menu.primary or menu.secondary %}
<button class="mobile-menu-toggle menu-toggle" aria-controls="primary-menu secondary-menu" aria-expanded="false" {{ fn( 'RomhackPlaza\\Backwards\\treville_amp_menu_toggle') }}>
{{ svg_icon('menu') }}
{{ svg_icon('close') }}
<span class="menu-toggle-text screen-reader-text">{{ __('Menu', 'romhackplaza')|esc_html }}</span>
</button>
{% endif %}
{% if menu.secondary %}
<div class="secondary-navigation" {{ fn( 'RomhackPlaza\\Backwards\\treville_amp_secondary_menu_is_toggled') }} >
<nav id="header-navigation" class="top-navigation" role="navigation" aria-label="{{ __('Secondary Menu', 'romhackplaza')|esc_attr }}">
<ul id="secondary-menu" class="menu">
{% for item in menu.secondary.items %}
<li class=" {{ item.classes|join(' ') }}">
<a href="{{ item.link }}" {{ item.is_target_blank ? 'target="_blank"' }}>{{ item.title }}</a>
{% if item.children %}
<ul class="sub-menu">
{% for child in item.children %}
<li class="menu-item {{ child.classes|join(' ') }}">
<a href="{{ child.link }}" {{ child.is_target_blank ? 'target="_blank"' }}>{{ child.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</nav>
</div>
{% endif %}

View File

@@ -0,0 +1,22 @@
{% if theme_setting( 'author_bio' ) or conditional_tag.is_customize_preview %}
<div class="entry-author clearfix">
<div class="author-avatar">
{{ fn( 'get_avatar', post.author.user_email, 128 ) }}
</div>
<div class="author-heading">
<h4 class="author-title">{{ __( 'About %s', 'romhackplaza' )|esc_html|format( '<span class="author-name">' ~ post.author.display_name ~ '</span>' ) }}</h4>
<a class="author-link" href="{{ post.author.profile_url|esc_url }}" rel="author">
{{ __( 'View all posts', 'romhackplaza')|esc_html }}
</a>
</div>
<p class="author-bio">
{{ post.author.meta( 'description' ) }}
</p>
</div>
{% endif %}

View File

@@ -0,0 +1,23 @@
<article id="post-{{ post.ID }}" class="article post-type-{{ post.type }}">
<header class="entry-header">
<a href="{{ post.link }}">
<h1 class="page-title">{{ post.title }}</h1>
</a>
</header>
{{ fn( 'the_post_thumbnail' ) }}
<div class="post-content">
<div class="entry-content clearfix">
{{ post.content }}
</div>
</div>
</article>

View File

@@ -0,0 +1,10 @@
<span class="label">
{{ __( "Main Image:", 'romhackplaza' ) }}
</span>
<span class="field-helper">
{{ __( "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' ) }}
</span>
<br>
{% if can_acf %}
{{ function( 'acf_form', attachments_settings ) }}
{% endif %}

View File

@@ -0,0 +1,11 @@
<label for="author-name">
{{ __( "Authors:", 'romhackplaza') }}
</label>
<span class="field-helper">
{{ __( "Person or Group who created this, if it's you add/select yourself.", 'romhackplaza' ) }}
</span>
<select id="author-name" name="author-name[]" multiple="multiple" required>
{% for author in value_authors %}
<option value="{{ author.term_id|esc_attr }}" selected>{{ author.name|esc_html }}</option>
{% endfor %}
</select>

View File

@@ -0,0 +1,7 @@
<label for="staff">
{{ __( "Staff/Credits", 'romhackplaza' ) }}
</label>
<span class="field-helper">
{{ __( "Optional.", 'romhackplaza') }}
</span>
<textarea id="staff" name="staff" rows="4">{{ value_credits }}</textarea>

View File

@@ -0,0 +1,10 @@
<label for="entryTitle">{{ entry_title_field_name }}</label>
{% 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 %}
<input
type="text"
id="entryTitle"
value="{{ value_entry_title }}"
{% if not post_type == "translations" %}required{% endif %}
>

View File

@@ -0,0 +1,12 @@
<label for="releaseSite">
{{ __( "Release Site:", 'romhackplaza' ) }}
</label>
<span class="field-helper">{{ __( 'Optional.', 'romhackplaza' ) }}</span>
<span class="field-helper">{{ __( "Project entry on site/blog/forum/GitHub.", 'romhackplaza' ) }}</span>
<input type="url" id="releaseSite" name="release_site" placeholder="https://example.com" value="{{ value_release_site }}">
<label for="youtubeVideo">
{{ __( "YouTube Video:", 'romhackplaza' ) }}
</label>
<span class="field-helper">{{ __( 'Optional.', 'romhackplaza' ) }}</span>
<input type="url" id="youtubeVideo" name="youtube_video" placeholder="https://youtube.com/watch?v=example" value="{{ value_youtube_video }}">

View File

@@ -0,0 +1,32 @@
<span class="label">
{{ __( "Files", 'romhackplaza' ) }}
</span>
<span class="field-helper">
{{ __( "For patches, .zip is prefered. .7z/.rar accepted. <b>To enable online patcher</b>, your patch need to be compressed in a <b>ZIP file</b>", 'romhackplaza' ) }}
</span>
<div class="file-upload-container">
<label class="drop-container" id="file-container">
<span id="file-container-text" class="drop-title">{{ __( "Drop files here or click to upload the file.", 'romhackplaza' ) }}</span>
</label>
<span id="fileSizeDisplay"></span>
<div class="button-container">
<button id="cancelButton" style="display:none;">{{ __( "Cancel Upload", 'romhackplaza' ) }}</button>
</div>
</div>
<div id="progress" style="display:none;">
<div id="fullbar">
<div class="bar" style="width:0%;"></div>
<div id="status">0%</div>
</div>
<div id="speed">0.00 KB/s</div>
</div>
{% if submission_can_bypass_trashed_private %}
<div id="chosen-server-visual" style="display:block;float:right;">
{{ __( "Chosen server: ", 'romhackplaza' ) }}
</div>
{% endif %}
<div id="current-files">
<span class="label">
{{ __( "Current Files", 'romhackplaza' ) }}
</span>
</div>

View File

@@ -0,0 +1,7 @@
<label for="gameTitle">{{ __( "Game Name:", 'romhackplaza' ) }}</label>
<span class="field-helper">{{ __( "Search your game (give it a second).", 'romhackplaza' ) }}</span>
<select id="gameTitle" name="gameTitle" data-term-id="{{ value_game_id|esc_attr }}" data-term-name="{{ value_game_name|esc_attr }}">
{% if value_game_id == "" %}
<option value=""></option>
{% endif %}
</select>

View File

@@ -0,0 +1,11 @@
<label for="genre">
{{ __( "Genre:", 'romhackplaza' ) }}
</label>
<select id="genre" name="genre" class="custom-select" required>
<option value="" disabled selected>{{ __( "Select a genre", 'romhackplaza' ) }}
{% for term in terms_genre %}
<option value="{{ term.id|esc_attr }}" {% if term.id == value_genre_id %}selected{% endif %}>
{{ term.name|esc_html }}
</option>
{% endfor %}
</select>

View File

@@ -0,0 +1,9 @@
<fieldset>
<legend>{{ __( "Status:", 'romhackplaza' ) }}</legend>
{% for term in terms_status %}
<div class="status-option">
<input type="radio" id="complete" name="hack-status" value="{{ term.id }}" {% if term.id in value_terms_status %}checked{% endif %} required>
<label for="complete">{{ __( term.title, 'romhackplaza' ) }}</label>
</div>
{% endfor %}
</fieldset>

View File

@@ -0,0 +1,13 @@
<label for="hashes">
{{ __( "Hashes:", 'romhackplaza' ) }}
</label>
<span class="field-helper">{{ __( "Hash of original, unpatched rom. Calculate it here or paste it directly below.", "romhackplaza" ) }}</span>
<div class="file-upload-container">
<label class="drop-container" id="hash-container">
<span class="drop-title" id="hash-container-text">{{ __( "Drop files here or click to upload the file", 'romhackplaza' ) }}</span>
</label>
</div>
<div><span id="loading" style="display:none;">{{ __( 'Now Loading...', 'romhackplaza' ) }}</span></div>
<textarea id="hashes" name="hashes" rows="4" required>{{ value_hashes }}</textarea>
<button id="clearButton" type="button" style="float:right;">{{ __( "Clear", 'romhackplaza' ) }}</button>

View File

@@ -0,0 +1,17 @@
<label for="language">
{{ __( "Language", 'romhackplaza' ) }}
{% do action( 'qm/debug', value_terms_language ) %}
</label>
<div class="languages-selector">
<input type="text" id="searchBox" placeholder="{{ __( "Find languages...", 'romhackplaza' ) }}">
<div id="checkboxGroup">
{% for term in terms_language %}
<div class="checkbox-wrapper">
<label>
<input type="checkbox" name="language[]" value="{{ term.term_id }}" {% if term.term_id in value_terms_language %}checked{% endif %} >
{{ __( term.name, 'romhackplaza' ) }}
</label>
</div>
{% endfor %}
</div>
</div>

View File

@@ -0,0 +1,11 @@
<label for="platform">
{{ __( "Platform:", 'romhackplaza' ) }}
</label>
<select id="platform" name="platform" class="custom-select" required>
<option value="" disabled selected>{{ __( "Select a platform", 'romhackplaza' ) }}
{% for term in terms_platform %}
<option value="{{ term.id|esc_attr }}" {% if term.id == value_platform_id %}selected{% endif %}>
{{ term.name|esc_html }}
</option>
{% endfor %}
</select>

View File

@@ -0,0 +1,4 @@
<label for="postContent">
{{ __( "Description:", 'romhackplaza') }}
</label>
{{ fn( 'wp_editor', value_post_content, "postContent", post_content_settings ) }}

View File

@@ -0,0 +1,15 @@
<label for="releaseDate">
{{ __( "Last updated:", "romhackplaza" ) }}
</label>
<span class="field-helper">{{ __( "If only initial release exist, the release date.", "romhackplaza" ) }}</span>
<input
type="date"
id="releaseDate"
name="release_date"
value="{{ value_release_date }}"
required
>
<script>
const today = new Date().toISOString().split("T")[0];
document.getElementById("releaseDate").setAttribute( "max", today );
</script>

View File

@@ -0,0 +1,4 @@
<div class="drafts-checkbox">
<input type="checkbox" id="saveToDrafts" name="saveToDrafts" value="yes" {% if submission_save_as_draft_checkbox %}checked{% endif %}>
<label for="saveToDrafts">{{ __( "Don't publish, save to", 'romhackplaza' ) }} <a href="/my-drafts/">{{ __( "My Drafts", 'romhackplaza') }}</a></label>
</div>

View File

@@ -0,0 +1,8 @@
<label for="versionNumber">{{ version_number_field_name }}</label>
<input
type="text"
id="versionNumber"
name="versionNumber"
value="{{ value_version_number }}"
required
>

View File

@@ -0,0 +1,9 @@
<form id="translationForm">
{% if submission_post_id != 0 %}
<input type="hidden" name="is_edit" value="1">
<input type="hidden" name="post_id" value="{{ submission_edit_entry }}">
{% endif %}
<input type="hidden" name="custom_post_type" value="{{ post_type }}">
<input type="hidden" id="reservedPostID" name="reserved_post_id" value="">
<input type="hidden" id="favoriteServer" name="favorite_server" value="">

View File

@@ -0,0 +1,4 @@
{{ submission_save_nonce }}
<button class="blueButton" type="submit" id="submitTranslationButton">{{ __( "Submit Changes", 'romhackplaza' ) }}</button>
</form>

View File

@@ -0,0 +1,5 @@
{% if submission_queue_status != "" %}
{{ __( "Message by team:", 'romhackplaza' ) }} {{ submission_queue_status }}
{% endif %}

View File

@@ -0,0 +1,33 @@
{% if submission_post_id == 0 %}
<b>{{ __( "No valid post ID provided.", "romhackplaza" ) }}</b>
{% 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.") }}
<br>
{{ __( "We'll get to it as soon as possible.", 'romhackplaza' ) }}
<br>
{{ __( "To avoid wait times, you can also ", "romhackplaza" ) }}<a href="/how-to-become-verified">{{ __( "become verified", 'romhackplaza') }}</a>.
{% endif %}
{% else %}
<b>{{ __( "Do you want a coffee?", "romhackplaza" ) }}</b>
{% endif %}

View File

@@ -0,0 +1,23 @@
{% set new_post = get_post( submission_post_id ) %}
<ul>
<li>
<a href="{{ new_post.link }}">{{ __( "View entry", "romhackplaza") }}</a>
</li>
<li>
<a href="{{ submission_edit_entry }}">{{ __( "Edit Again", 'romhackplaza' ) }}</a>
</li>
</ul>
<h3>{{ __( "What now?", 'romhackplaza' ) }}</h3>
<ul>
<li><a href="/submit-romhack">{{ __( "Submit new Romhack", "romhackplaza" ) }}</a></li>
<li><a href="/submit-translation">{{ __( "Submit new Translation", "romhackplaza" ) }}</a></li>
<li><a href="/submit-homebrew">{{ __( "Submit new Homebrew", "romhackplaza" ) }}</a></li>
<li><a href="/submit-utility">{{ __( "Submit new Utility", "romhackplaza" ) }}</a></li>
<li><a href="/submit-document">{{ __( "Submit new Document", "romhackplaza" ) }}</a></li>
<li><a href="/submit-lua-script">{{ __( "Submit new LUA Script", "romhackplaza" ) }}</a></li>
<li><a href="/submit-tutorial">{{ __( "Submit new Tutorial", "romhackplaza" ) }}</a></li>
<li><a href="/submit-news">{{ __( "Submit new News", "romhackplaza" ) }}</a></li>
<li><a href="{{ site.url }}">{{ __( "Go Home", "romhackplaza" ) }}</a></li>
</ul>

1
views/single.twig Executable file
View File

@@ -0,0 +1 @@
<h2>{post.title}</h2>