Compare commits
86 commits
wide-image
...
main
Author | SHA1 | Date | |
---|---|---|---|
![]() |
41a7ce2c1a | ||
![]() |
2a5d80a692 | ||
![]() |
29fd947757 | ||
![]() |
e1b0973a30 | ||
![]() |
a36364dfab | ||
![]() |
5c5f202e57 | ||
![]() |
9cd66cd408 | ||
![]() |
fee6d2824e | ||
![]() |
6613982368 | ||
![]() |
ea694d0d4a | ||
![]() |
f37149ec5f | ||
![]() |
1deba6f332 | ||
![]() |
4ddb2dceb7 | ||
![]() |
fb359d0d97 | ||
![]() |
fa32eb3044 | ||
![]() |
7d1da147da | ||
![]() |
c4130c955f | ||
![]() |
36a960af00 | ||
![]() |
e27d944b88 | ||
![]() |
716313e2c1 | ||
![]() |
18a04d15c6 | ||
![]() |
cd01830d75 | ||
![]() |
7c4ef08555 | ||
![]() |
959bbb4c1c | ||
![]() |
bc8a6c7ba1 | ||
![]() |
e044d1cfa6 | ||
![]() |
fac2e87dc7 | ||
![]() |
14f5d7b330 | ||
![]() |
dd0662fe08 | ||
![]() |
e767af9259 | ||
![]() |
5459741923 | ||
![]() |
0ea12f0c68 | ||
![]() |
7baae124fb | ||
![]() |
6309c7d0a6 | ||
![]() |
a98bccdefc | ||
![]() |
a273df562a | ||
![]() |
16bb16adc5 | ||
![]() |
2e4fe74a0d | ||
![]() |
b6305ae2a7 | ||
![]() |
f23b3dbc43 | ||
![]() |
f219c41577 | ||
![]() |
200eeeb645 | ||
![]() |
2b5489eb0b | ||
![]() |
c8a0f09dd6 | ||
![]() |
3626b7482d | ||
![]() |
4a65667c5c | ||
![]() |
4215c0c97e | ||
![]() |
ed01dd0b8b | ||
![]() |
f998a5f69c | ||
![]() |
1ea35da65f | ||
![]() |
1771519be7 | ||
![]() |
449990179b | ||
![]() |
852f40b23c | ||
![]() |
4c3b935e0e | ||
![]() |
a662d22d9d | ||
![]() |
2f70982b00 | ||
![]() |
8b3a2a027e | ||
![]() |
f3713b0187 | ||
![]() |
cb384b74e9 | ||
![]() |
2210dbefdc | ||
![]() |
9ee6a88866 | ||
![]() |
231da8ea14 | ||
![]() |
a9cd8e45b9 | ||
![]() |
91797b5e6c | ||
![]() |
bdc3fdfd12 | ||
![]() |
76c81828b2 | ||
![]() |
1f16f15377 | ||
![]() |
cf642c20e1 | ||
![]() |
a30282d217 | ||
![]() |
b7aea26f97 | ||
![]() |
5250c856e6 | ||
![]() |
6ac4a911a8 | ||
![]() |
5f17a9ad55 | ||
![]() |
0366bbfb77 | ||
![]() |
22f6c12226 | ||
![]() |
dc947a0348 | ||
![]() |
050f5b06b5 | ||
![]() |
237bfc89c8 | ||
![]() |
b692a6ac04 | ||
![]() |
bd76c3615d | ||
![]() |
b751a6b580 | ||
![]() |
cbcfe5014e | ||
![]() |
12c555586c | ||
![]() |
f12ba2c29e | ||
![]() |
a62a65fece | ||
![]() |
0ac4756727 |
35 changed files with 3374 additions and 1122 deletions
2
.github/LISEZMOI.md
vendored
2
.github/LISEZMOI.md
vendored
|
@ -1,5 +1,7 @@
|
|||
# Thème Marianne pour WordPress
|
||||
|
||||
**⚠️ Ce thème n’est plus maintenu ⚠️**
|
||||
|
||||
- 🇬🇧 [English](/.github/README.md)
|
||||
- 🇫🇷 **Français**
|
||||
|
||||
|
|
2
.github/README.md
vendored
2
.github/README.md
vendored
|
@ -1,5 +1,7 @@
|
|||
# Marianne Theme for WordPress
|
||||
|
||||
**⚠️ This theme is no longer maintained ⚠️**
|
||||
|
||||
- 🇬🇧 **English**
|
||||
- 🇫🇷 [Français](/.github/LISEZMOI.md)
|
||||
|
||||
|
|
3
404.php
3
404.php
|
@ -15,9 +15,8 @@ get_header();
|
|||
<main id="primary" class="site-primary" role="main">
|
||||
<?php get_template_part( 'template-parts/content', 'none' ); ?>
|
||||
</main>
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
get_sidebar();
|
||||
get_footer();
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
.marianne-admin li {
|
||||
display: inline-block;
|
||||
}
|
||||
.marianne-admin-list::before {
|
||||
.marianne-admin-list li::before {
|
||||
content: "— ";
|
||||
display: inline-block;
|
||||
}
|
||||
|
|
2
assets/css/marianne-theme-page.min.css
vendored
2
assets/css/marianne-theme-page.min.css
vendored
|
@ -1 +1 @@
|
|||
.marianne-admin h1,.marianne-admin h2,.marianne-admin h3{margin:1rem 0;padding:0 0 .25em}.marianne-admin .marianne-admin-block{background-color:#fff;border:1px solid #c3c4c7;box-shadow:0 1px 1px rgba(0,0,0,.04);padding:1rem 2rem;margin:2em 0}.marianne-admin .marianne-admin-header{border-bottom:1px solid #c3c4c7}.marianne-admin .marianne-admin-title{font-weight:900}.marianne-admin p{margin:1rem 0}.marianne-admin blockquote{font-style:italic;margin:1rem 0}.marianne-admin blockquote cite{font-style:normal}.marianne-admin .list-inline{list-style-type:none;margin:0;padding:0}.marianne-admin li{display:inline-block}.marianne-admin-list::before{content:"— ";display:inline-block}.marianne-admin #update-theme,.marianne-admin .thickbox{color:#de0000}.marianne-admin #update-theme:focus,.marianne-admin #update-theme:hover,.marianne-admin .thickbox:focus,.marianne-admin .thickbox:hover{color:#900000}.marianne-admin-margins{margin:1rem 0}.marianne-admin #marianne-button-btc{background-color:#f7931a;border-color:#f7931a;color:#fff}.marianne-admin #marianne-button-btc:focus,.marianne-admin #marianne-button-btc:hover{background-color:#e8840c;border-color:#e8840c}#marianne-button-btc[aria-expanded=false]~#marianne-btc-donate-container{display:none}#marianne-button-btc[aria-expanded=true]~#marianne-btc-donate-container{display:block}#marianne-btc-donate{background-color:#f0f0f1;display:inline-block;margin-top:1rem;padding:1rem 2rem}.marianne-admin #btc-qr{display:block;margin:0 auto;max-width:100%}.marianne-admin #btc-address a{word-break:break-all}#marianne-admin-button-rate,#marianne-admin-button-thanks{background-color:green;border-color:green;color:#fff}#marianne-admin-button-rate:focus,#marianne-admin-button-rate:hover,#marianne-admin-button-thanks:focus,#marianne-admin-button-thanks:hover{background-color:#006400;border-color:#006400}.marianne-admin-footer{color:#50575e}.marianne-mif{display:inline-block;font-size:.8em;text-align:center}.marianne-flag{display:flex;justify-content:space-between;margin-top:.1em}.marianne-flag-blue,.marianne-flag-red,.marianne-flag-white{display:inline-block;flex:1;height:2px}.marianne-flag-blue{background-color:#001489}.marianne-flag-white{background-color:#f4f9ff}.marianne-flag-red{background-color:#ef3340}.marianne-mif a{color:inherit;text-decoration:none}.marianne-mif a:focus,.marianne-mif a:hover{color:#135e96;text-decoration:underline}
|
||||
.marianne-admin h1,.marianne-admin h2,.marianne-admin h3{margin:1rem 0;padding:0 0 .25em}.marianne-admin .marianne-admin-block{background-color:#fff;border:1px solid #c3c4c7;box-shadow:0 1px 1px rgba(0,0,0,.04);padding:1rem 2rem;margin:2em 0}.marianne-admin .marianne-admin-header{border-bottom:1px solid #c3c4c7}.marianne-admin .marianne-admin-title{font-weight:900}.marianne-admin p{margin:1rem 0}.marianne-admin blockquote{font-style:italic;margin:1rem 0}.marianne-admin blockquote cite{font-style:normal}.marianne-admin .list-inline{list-style-type:none;margin:0;padding:0}.marianne-admin li{display:inline-block}.marianne-admin-list li::before{content:"— ";display:inline-block}.marianne-admin #update-theme,.marianne-admin .thickbox{color:#de0000}.marianne-admin #update-theme:focus,.marianne-admin #update-theme:hover,.marianne-admin .thickbox:focus,.marianne-admin .thickbox:hover{color:#900000}.marianne-admin-margins{margin:1rem 0}.marianne-admin #marianne-button-btc{background-color:#f7931a;border-color:#f7931a;color:#fff}.marianne-admin #marianne-button-btc:focus,.marianne-admin #marianne-button-btc:hover{background-color:#e8840c;border-color:#e8840c}#marianne-button-btc[aria-expanded=false]~#marianne-btc-donate-container{display:none}#marianne-button-btc[aria-expanded=true]~#marianne-btc-donate-container{display:block}#marianne-btc-donate{background-color:#f0f0f1;display:inline-block;margin-top:1rem;padding:1rem 2rem}.marianne-admin #btc-qr{display:block;margin:0 auto;max-width:100%}.marianne-admin #btc-address a{word-break:break-all}#marianne-admin-button-rate,#marianne-admin-button-thanks{background-color:green;border-color:green;color:#fff}#marianne-admin-button-rate:focus,#marianne-admin-button-rate:hover,#marianne-admin-button-thanks:focus,#marianne-admin-button-thanks:hover{background-color:#006400;border-color:#006400}.marianne-admin-footer{color:#50575e}.marianne-mif{display:inline-block;font-size:.8em;text-align:center}.marianne-flag{display:flex;justify-content:space-between;margin-top:.1em}.marianne-flag-blue,.marianne-flag-red,.marianne-flag-white{display:inline-block;flex:1;height:2px}.marianne-flag-blue{background-color:#001489}.marianne-flag-white{background-color:#f4f9ff}.marianne-flag-red{background-color:#ef3340}.marianne-mif a{color:inherit;text-decoration:none}.marianne-mif a:focus,.marianne-mif a:hover{color:#135e96;text-decoration:underline}
|
||||
|
|
|
@ -2,54 +2,197 @@
|
|||
"use strict";
|
||||
|
||||
$( document ).ready( function( $ ) {
|
||||
/* Show/hide controls depending on other control values. */
|
||||
/**
|
||||
* Show/hide controls in the Theme Customizer
|
||||
* depending on other control values.
|
||||
*/
|
||||
|
||||
// The speed of animations.
|
||||
var speed = 200;
|
||||
|
||||
// Show Custom Page Width only when 'Custom' is checked.
|
||||
if ( $( '#customize-control-custom_logo .remove-button' ).length > 0 ) {
|
||||
$( '#customize-control-marianne_header_logo_round' ).show();
|
||||
// Show the front page title displaying if a front page is set.
|
||||
if ( $( "#_customize-input-show_on_front-radio-page:checked" ).val() ) {
|
||||
$( "#customize-control-static_front_page_title" ).show();
|
||||
} else {
|
||||
$( '#customize-control-marianne_header_logo_round' ).hide();
|
||||
$( "#customize-control-static_front_page_title" ).hide();
|
||||
}
|
||||
|
||||
$( '#customize-control-custom_logo' ).on( 'DOMSubtreeModified', function () {
|
||||
if ( $( '#customize-control-custom_logo .remove-button' ).length > 0 ) {
|
||||
$( '#customize-control-marianne_header_logo_round' ).show( speed );
|
||||
$( "#customize-control-show_on_front" ).change( function () {
|
||||
if ( $( "#_customize-input-show_on_front-radio-page:checked" ).val() ) {
|
||||
$( "#customize-control-static_front_page_title" ).show();
|
||||
} else {
|
||||
$( '#customize-control-marianne_header_logo_round' ).hide( speed );
|
||||
$( "#customize-control-static_front_page_title" ).hide();
|
||||
}
|
||||
});
|
||||
} );
|
||||
|
||||
// Show sidebar parameters if a sidebar is set.
|
||||
if ( $( "#_customize-input-marianne_global_layout-radio-two-column-left-sidebar:checked" ).val() ) {
|
||||
$( "#customize-control-marianne_global_sidebar_width" ).show();
|
||||
$( "#customize-control-marianne_global_sidebar_margin" ).show();
|
||||
} else {
|
||||
$( "#customize-control-marianne_global_sidebar_width" ).hide();
|
||||
$( "#customize-control-marianne_global_sidebar_margin" ).hide();
|
||||
}
|
||||
|
||||
$( "#customize-control-marianne_global_layout" ).change( function () {
|
||||
if ( $( "#_customize-input-marianne_global_layout-radio-two-column-left-sidebar:checked" ).val() ) {
|
||||
$( "#customize-control-marianne_global_sidebar_width" ).show( speed );
|
||||
$( "#customize-control-marianne_global_sidebar_margin" ).show( speed );
|
||||
} else {
|
||||
$( "#customize-control-marianne_global_sidebar_width" ).hide( speed );
|
||||
$( "#customize-control-marianne_global_sidebar_margin" ).hide( speed );
|
||||
}
|
||||
} );
|
||||
|
||||
// Show the right font list depending on the selected font family.
|
||||
if ( $( "#_customize-input-marianne_global_font_family-radio-sans-serif:checked" ).val() ) {
|
||||
$( "#customize-control-marianne_global_fonts_sans_serif" ).show();
|
||||
$( "#customize-control-marianne_global_fonts_serif" ).hide();
|
||||
$( "#customize-control-marianne_global_fonts_monospace" ).hide();
|
||||
} else if ( $( "#_customize-input-marianne_global_font_family-radio-serif:checked" ).val() ) {
|
||||
$( "#customize-control-marianne_global_fonts_sans_serif" ).hide();
|
||||
$( "#customize-control-marianne_global_fonts_serif" ).show();
|
||||
$( "#customize-control-marianne_global_fonts_monospace" ).hide();
|
||||
} else if ( $( "#_customize-input-marianne_global_font_family-radio-monospace:checked" ).val() ) {
|
||||
$( "#customize-control-marianne_global_fonts_sans_serif" ).hide();
|
||||
$( "#customize-control-marianne_global_fonts_serif" ).hide();
|
||||
$( "#customize-control-marianne_global_fonts_monospace" ).show();
|
||||
}
|
||||
|
||||
$( "#customize-control-marianne_global_font_family" ).change( function () {
|
||||
if ( $( "#_customize-input-marianne_global_font_family-radio-sans-serif:checked" ).val() ) {
|
||||
$( "#customize-control-marianne_global_fonts_sans_serif" ).show();
|
||||
$( "#customize-control-marianne_global_fonts_serif" ).hide();
|
||||
$( "#customize-control-marianne_global_fonts_monospace" ).hide();
|
||||
} else if ( $( "#_customize-input-marianne_global_font_family-radio-serif:checked" ).val() ) {
|
||||
$( "#customize-control-marianne_global_fonts_sans_serif" ).hide();
|
||||
$( "#customize-control-marianne_global_fonts_serif" ).show();
|
||||
$( "#customize-control-marianne_global_fonts_monospace" ).hide();
|
||||
} else if ( $( "#_customize-input-marianne_global_font_family-radio-monospace:checked" ).val() ) {
|
||||
$( "#customize-control-marianne_global_fonts_sans_serif" ).hide();
|
||||
$( "#customize-control-marianne_global_fonts_serif" ).hide();
|
||||
$( "#customize-control-marianne_global_fonts_monospace" ).show();
|
||||
}
|
||||
} );
|
||||
|
||||
// Show Round Logo when a logo is set.
|
||||
if ( $( "#customize-control-custom_logo .remove-button" ).length > 0 ) {
|
||||
$( "#customize-control-marianne_header_logo_round" ).show();
|
||||
} else {
|
||||
$( "#customize-control-marianne_header_logo_round" ).hide();
|
||||
}
|
||||
|
||||
$( "#customize-control-custom_logo" ).on( "DOMSubtreeModified", function () {
|
||||
if ( $( "#customize-control-custom_logo .remove-button" ).length > 0 ) {
|
||||
$( "#customize-control-marianne_header_logo_round" ).show( speed );
|
||||
} else {
|
||||
$( "#customize-control-marianne_header_logo_round" ).hide( speed );
|
||||
}
|
||||
} );
|
||||
|
||||
// Show Search button text only when the search button is enabled.
|
||||
if ( $( '#_customize-input-marianne_header_menu_search' ).is( ':checked' ) ) {
|
||||
$( '#customize-control-marianne_header_menu_search_text' ).show();
|
||||
if ( $( "#_customize-input-marianne_header_menu_search" ).is( ":checked" ) ) {
|
||||
$( "#customize-control-marianne_header_menu_search_text" ).show();
|
||||
} else {
|
||||
$( '#customize-control-marianne_header_menu_search_text' ).hide();
|
||||
$( "#customize-control-marianne_header_menu_search_text" ).hide();
|
||||
}
|
||||
|
||||
$( '#_customize-input-marianne_header_menu_search' ).change( function () {
|
||||
if ( $( '#_customize-input-marianne_header_menu_search' ).is( ':checked' ) ) {
|
||||
$( '#customize-control-marianne_header_menu_search_text' ).show( speed );
|
||||
$( "#_customize-input-marianne_header_menu_search" ).change( function () {
|
||||
if ( $( this ).is( ":checked" ) ) {
|
||||
$( "#customize-control-marianne_header_menu_search_text" ).show( speed );
|
||||
} else {
|
||||
$( '#customize-control-marianne_header_menu_search_text' ).hide( speed );
|
||||
$( "#customize-control-marianne_header_menu_search_text" ).hide( speed );
|
||||
}
|
||||
});
|
||||
} );
|
||||
|
||||
// Show the author prefix when the author's name is displayed.
|
||||
if ( $( "#_customize-input-marianne_loop_author_name" ).is( ":checked" ) ) {
|
||||
$( "#customize-control-marianne_loop_author_name_prefix" ).show();
|
||||
} else {
|
||||
$( "#customize-control-marianne_loop_author_name_prefix" ).hide();
|
||||
}
|
||||
|
||||
$( "#_customize-input-marianne_loop_author_name" ).change( function () {
|
||||
if ( $( this ).is( ":checked" ) ) {
|
||||
$( "#customize-control-marianne_loop_author_name_prefix" ).show( speed );
|
||||
} else {
|
||||
$( "#customize-control-marianne_loop_author_name_prefix" ).hide( speed );
|
||||
}
|
||||
} );
|
||||
|
||||
// Show the author info and prefix options when the position is set to header.
|
||||
if ( $( "#_customize-input-marianne_post_author_position-radio-top" ).is( ":checked" ) ) {
|
||||
$( "#customize-control-marianne_post_author_info" ).show();
|
||||
|
||||
if ( $( "#_customize-input-marianne_post_author_info-radio-name" ).is( ":checked" )
|
||||
|| $( "#_customize-input-marianne_post_author_info-radio-name_avatar" ).is( ":checked" )
|
||||
) {
|
||||
$( "#customize-control-marianne_post_author_name_prefix" ).show();
|
||||
} else {
|
||||
$( "#customize-control-marianne_post_author_name_prefix" ).hide();
|
||||
}
|
||||
} else {
|
||||
$( "#customize-control-marianne_post_author_info" ).hide();
|
||||
$( "#customize-control-marianne_post_author_name_prefix" ).hide();
|
||||
}
|
||||
|
||||
$( "#customize-control-marianne_post_author_position" ).change( function () {
|
||||
if ( $( "#_customize-input-marianne_post_author_position-radio-top" ).is( ":checked" ) ) {
|
||||
$( "#customize-control-marianne_post_author_info" ).show( speed );
|
||||
|
||||
if ( $( "#_customize-input-marianne_post_author_info-radio-name" ).is( ":checked" )
|
||||
|| $( "#_customize-input-marianne_post_author_info-radio-name_avatar" ).is( ":checked" )
|
||||
) {
|
||||
$( "#customize-control-marianne_post_author_name_prefix" ).show( speed );
|
||||
} else {
|
||||
$( "#customize-control-marianne_post_author_name_prefix" ).hide( speed );
|
||||
}
|
||||
} else {
|
||||
$( "#customize-control-marianne_post_author_info" ).hide( speed );
|
||||
$( "#customize-control-marianne_post_author_name_prefix" ).hide( speed );
|
||||
}
|
||||
} );
|
||||
|
||||
$( "#customize-control-marianne_post_author_info" ).change( function () {
|
||||
if ( $( "#_customize-input-marianne_post_author_info-radio-avatar" ).is( ":checked" ) ) {
|
||||
$( "#customize-control-marianne_post_author_name_prefix" ).hide( speed );
|
||||
} else {
|
||||
$( "#customize-control-marianne_post_author_name_prefix" ).show( speed );
|
||||
}
|
||||
} );
|
||||
|
||||
// Show the author avatar and biography if the position is set to bottom.
|
||||
if ( $( "#_customize-input-marianne_post_author_position-radio-bottom" ).is( ":checked" ) ) {
|
||||
$( "#customize-control-marianne_post_author_avatar" ).show();
|
||||
$( "#customize-control-marianne_post_author_bio" ).show();
|
||||
} else {
|
||||
$( "#customize-control-marianne_post_author_avatar" ).hide();
|
||||
$( "#customize-control-marianne_post_author_bio" ).hide();
|
||||
}
|
||||
|
||||
$( "#customize-control-marianne_post_author_position" ).change( function () {
|
||||
if ( $( "#_customize-input-marianne_post_author_position-radio-bottom" ).is( ":checked" ) ) {
|
||||
$( "#customize-control-marianne_post_author_avatar" ).show( speed );
|
||||
$( "#customize-control-marianne_post_author_bio" ).show( speed );
|
||||
} else {
|
||||
$( "#customize-control-marianne_post_author_avatar" ).hide( speed );
|
||||
$( "#customize-control-marianne_post_author_bio" ).hide( speed );
|
||||
}
|
||||
} );
|
||||
|
||||
// Show Phone Type only when a phone number is typed.
|
||||
if ( $( '#_customize-input-marianne_social_phone' ).val().length > 0 ) {
|
||||
$( '#customize-control-marianne_social_phone_type' ).show();
|
||||
if ( $( "#_customize-input-marianne_social_phone" ).val().length > 0 ) {
|
||||
$( "#customize-control-marianne_social_phone_type" ).show();
|
||||
} else {
|
||||
$( '#customize-control-marianne_social_phone_type' ).hide();
|
||||
$( "#customize-control-marianne_social_phone_type" ).hide();
|
||||
}
|
||||
|
||||
$( '#_customize-input-marianne_social_phone' ).on( 'input', function () {
|
||||
$( "#_customize-input-marianne_social_phone" ).on( "input", function () {
|
||||
if ( $( this ).val().length > 0 ) {
|
||||
$( '#customize-control-marianne_social_phone_type' ).show( speed );
|
||||
$( "#customize-control-marianne_social_phone_type" ).show( speed );
|
||||
} else {
|
||||
$( '#customize-control-marianne_social_phone_type' ).hide( speed );
|
||||
$( "#customize-control-marianne_social_phone_type" ).hide( speed );
|
||||
}
|
||||
});
|
||||
} );
|
||||
} );
|
||||
} )( jQuery, wp.customize );
|
||||
|
|
2
assets/js/customizer-controls-change.min.js
vendored
2
assets/js/customizer-controls-change.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -11,12 +11,12 @@
|
|||
*/
|
||||
|
||||
// Set our slider defaults and initialise the slider
|
||||
$( '.slider-custom-control' ).each( function() {
|
||||
var sliderValue = $( this ).find( '.customize-control-slider-value' ).val();
|
||||
var newSlider = $( this ).find( '.slider' );
|
||||
var sliderMinValue = parseFloat( newSlider.attr( 'slider-min-value' ) );
|
||||
var sliderMaxValue = parseFloat( newSlider.attr( 'slider-max-value' ) );
|
||||
var sliderStepValue = parseFloat( newSlider.attr( 'slider-step-value' ) );
|
||||
$( ".slider-custom-control" ).each( function() {
|
||||
var sliderValue = $( this ).find( ".customize-control-slider-value" ).val();
|
||||
var newSlider = $( this ).find( ".slider" );
|
||||
var sliderMinValue = parseFloat( newSlider.attr( "slider-min-value" ) );
|
||||
var sliderMaxValue = parseFloat( newSlider.attr( "slider-max-value" ) );
|
||||
var sliderStepValue = parseFloat( newSlider.attr( "slider-step-value" ) );
|
||||
|
||||
newSlider.slider( {
|
||||
value: sliderValue,
|
||||
|
@ -25,29 +25,29 @@
|
|||
step: sliderStepValue,
|
||||
change: function( e,ui ) {
|
||||
// Important! When slider stops moving make sure to trigger change event so Customizer knows it has to save the field
|
||||
$( this ).parent().find( '.customize-control-slider-value' ).trigger( 'change' );
|
||||
$( this ).parent().find( ".customize-control-slider-value" ).trigger( "change" );
|
||||
}
|
||||
} );
|
||||
} );
|
||||
|
||||
// Change the value of the input field as the slider is moved
|
||||
$( '.slider' ).on( 'slide', function( event, ui ) {
|
||||
$( this ).parent().find( '.customize-control-slider-value' ).val( ui.value );
|
||||
$( ".slider" ).on( "slide", function( event, ui ) {
|
||||
$( this ).parent().find( ".customize-control-slider-value" ).val( ui.value );
|
||||
} );
|
||||
|
||||
// Reset slider and input field back to the default value
|
||||
$( '.slider-reset' ).on( 'click', function() {
|
||||
var resetValue = $( this ).attr( 'slider-reset-value' );
|
||||
$( this ).parent().find( '.customize-control-slider-value' ).val( resetValue );
|
||||
$( this ).parent().find( '.slider').slider( 'value', resetValue );
|
||||
$( ".slider-reset" ).on( "click", function() {
|
||||
var resetValue = $( this ).attr( "slider-reset-value" );
|
||||
$( this ).parent().find( ".customize-control-slider-value" ).val( resetValue );
|
||||
$( this ).parent().find( ".slider" ).slider( "value", resetValue );
|
||||
});
|
||||
|
||||
// Update slider if the input field loses focus as it's most likely changed
|
||||
$( '.customize-control-slider-value' ).blur( function() {
|
||||
$( ".customize-control-slider-value" ).blur( function() {
|
||||
var resetValue = $( this ).val();
|
||||
var slider = $( this ).parent().find( '.slider' );
|
||||
var sliderMinValue = parseInt( slider.attr( 'slider-min-value' ) );
|
||||
var sliderMaxValue = parseInt( slider.attr( 'slider-max-value' ) );
|
||||
var slider = $( this ).parent().find( ".slider" );
|
||||
var sliderMinValue = parseInt( slider.attr( "slider-min-value" ) );
|
||||
var sliderMaxValue = parseInt( slider.attr( "slider-max-value" ) );
|
||||
|
||||
// Make sure our manual input value doesn't exceed the minimum & maxmium values
|
||||
if ( resetValue < sliderMinValue ) {
|
||||
|
@ -58,14 +58,14 @@
|
|||
resetValue = sliderMaxValue;
|
||||
$( this ).val( resetValue );
|
||||
}
|
||||
$( this ).parent().find( '.slider' ).slider( 'value', resetValue );
|
||||
$( this ).parent().find( ".slider" ).slider( "value", resetValue );
|
||||
} );
|
||||
} );
|
||||
|
||||
/**
|
||||
* About Marianne link.
|
||||
*/
|
||||
wp.customize.sectionConstructor['marianne-about'] = wp.customize.Section.extend( {
|
||||
wp.customize.sectionConstructor["marianne-about"] = wp.customize.Section.extend( {
|
||||
// No events for this type of section.
|
||||
attachEvents: () => {},
|
||||
|
||||
|
@ -74,5 +74,4 @@
|
|||
return true;
|
||||
}
|
||||
} );
|
||||
|
||||
} )( jQuery, wp.customize );
|
||||
|
|
|
@ -116,57 +116,10 @@
|
|||
} );
|
||||
} );
|
||||
|
||||
// Global > Page Width.
|
||||
wp.customize( "marianne_global_page_width", function( value ) {
|
||||
value.bind( function( newval ) {
|
||||
var target = "#page",
|
||||
classes = {
|
||||
"480": "page-width-480",
|
||||
"600": "page-width-600",
|
||||
"720": "page-width-720"
|
||||
};
|
||||
|
||||
marianneSelectRadioToggleClass( target, classes, newval );
|
||||
} );
|
||||
} );
|
||||
|
||||
// Global > Expand images.
|
||||
wp.customize( "marianne_global_images_expand", function( value ) {
|
||||
value.bind( function( newval ) {
|
||||
var target = ".entry-thumbnail",
|
||||
classToAdd = "entry-thumbnail-wide";
|
||||
|
||||
marianneCheckboxToggleClass( target, classToAdd, newval );
|
||||
} );
|
||||
} );
|
||||
|
||||
// Global > Font Family.
|
||||
wp.customize( "marianne_global_font_family", function( value ) {
|
||||
value.bind( function( newval ) {
|
||||
var target = "body",
|
||||
classes = {
|
||||
"sans-serif": "font-family-sans-serif",
|
||||
"serif": "font-family-serif",
|
||||
"monospace": "font-family-monospace"
|
||||
};
|
||||
|
||||
marianneSelectRadioToggleClass( target, classes, newval );
|
||||
} );
|
||||
} );
|
||||
|
||||
// Global > Font Size.
|
||||
wp.customize( "marianne_global_font_size", function( value ) {
|
||||
value.bind( function( newval ) {
|
||||
var target = "body",
|
||||
classes = {
|
||||
80: "font-size-80",
|
||||
90: "font-size-90",
|
||||
100: "font-size-100",
|
||||
110: "font-size-110",
|
||||
120: "font-size-120"
|
||||
};
|
||||
|
||||
marianneSelectRadioToggleClass( target, classes, newval );
|
||||
$( "body" ).css( "font-size", ( 12 * Number( newval ) / 100 ) + "pt" );
|
||||
} );
|
||||
} );
|
||||
|
||||
|
|
2
assets/js/customizer-live-preview.min.js
vendored
2
assets/js/customizer-live-preview.min.js
vendored
|
@ -1 +1 @@
|
|||
!function(e){"use strict";function t(t,n,i){t&&n&&i&&e.each(n,function(n,o){Array.isArray(t)?e.each(t,function(t,s){e(s).hasClass(o)&&e(s).removeClass(o),n===i&&e(s).addClass(o)}):(e(t).hasClass(o)&&e(t).removeClass(o),n===i&&e(t).addClass(o))})}function n(t,n,i){t&&n&&(!0===i?e(t).hasClass(n)||e(t).addClass(n):e(t).hasClass(n)&&e(t).removeClass(n))}e(document).ready(function(e){wp.customize("blogname",function(t){t.bind(function(t){0===e(".site-title").children("a").length?e(".site-title").html(t):e(".site-title a").html(t)})}),wp.customize("blogdescription",function(t){t.bind(function(t){e(".site-description").html(t)})}),wp.customize("colors_scheme",function(e){e.bind(function(e){t("body",{light:"color-scheme-light",dark:"color-scheme-dark",auto:"color-scheme-auto"},e)})}),wp.customize("colors_link_hover",function(e){e.bind(function(e){t("body",{blue:"link-hover-blue",red:"link-hover-red",green:"link-hover-green",orange:"link-hover-orange",purple:"link-hover-purple"},e)})}),wp.customize("marianne_global_page_width",function(e){e.bind(function(e){t("#page",{480:"page-width-480",600:"page-width-600",720:"page-width-720"},e)})}),wp.customize("marianne_global_images_expand",function(e){e.bind(function(e){n(".entry-thumbnail","entry-thumbnail-wide",e)})}),wp.customize("marianne_global_font_family",function(e){e.bind(function(e){t("body",{"sans-serif":"font-family-sans-serif",serif:"font-family-serif",monospace:"font-family-monospace"},e)})}),wp.customize("marianne_global_font_size",function(e){e.bind(function(e){t("body",{80:"font-size-80",90:"font-size-90",100:"font-size-100",110:"font-size-110",120:"font-size-120"},e)})}),wp.customize("marianne_global_text_shadow",function(e){e.bind(function(e){n("body","text-shadow",e)})}),wp.customize("marianne_header_align",function(e){e.bind(function(e){t(".site-header",{left:"site-header-align-left",center:"site-header-align-center",right:"site-header-align-right"},e)})}),wp.customize("marianne_header_title_weight",function(e){e.bind(function(e){t(".site-title",{normal:"site-title-weight-normal",bold:"site-title-weight-bold",bolder:"site-title-weight-bolder"},e)})}),wp.customize("marianne_header_desc_weight",function(e){e.bind(function(e){t(".site-description",{thin:"site-desc-weight-thin",normal:"site-desc-weight-normal"},e)})}),wp.customize("marianne_header_desc_style",function(e){e.bind(function(e){t(".site-description",{normal:"site-desc-style-normal",italic:"site-desc-style-italic"},e)})}),wp.customize("marianne_header_menu_search_text",function(t){t.bind(function(t){e("#header-search-button").length>0&&(t.length>0?e("#header-search-button").html(t):e("#header-search-button").html(marianne_live.default_search_text))})}),console.log(wp.customize),wp.customize("marianne_content_text_align",function(e){e.bind(function(e){t([".entry-content",".comment-content"],{left:"text-align-left",center:"text-align-center",right:"text-align-right",justify:"text-align-justify"},e)})}),wp.customize("marianne_content_hyphens",function(e){e.bind(function(e){n(".entry-content","text-hyphens",e)})}),wp.customize("marianne_footer_align",function(e){e.bind(function(e){t(".site-footer",{left:"site-footer-align-left",center:"site-footer-align-center",right:"site-footer-align-right"},e)})}),wp.customize("marianne_footer_text",function(t){t.bind(function(t){e("#site-footer-text").length?e("#site-footer-text").html(t):e(".site-footer").prepend('<div id="site-footer-text" class="site-footer-block">'+t+"</div>")})}),wp.customize("marianne_social_style",function(e){e.bind(function(e){t(".site-social",{square:"site-social-square",round:"site-social-round"},e)})})})}(jQuery,wp.customize);
|
||||
!function(e){"use strict";function t(t,n,i){t&&n&&i&&e.each(n,function(n,o){Array.isArray(t)?e.each(t,function(t,s){e(s).hasClass(o)&&e(s).removeClass(o),n===i&&e(s).addClass(o)}):(e(t).hasClass(o)&&e(t).removeClass(o),n===i&&e(t).addClass(o))})}function n(t,n,i){t&&n&&(!0===i?e(t).hasClass(n)||e(t).addClass(n):e(t).hasClass(n)&&e(t).removeClass(n))}e(document).ready(function(e){wp.customize("blogname",function(t){t.bind(function(t){0===e(".site-title").children("a").length?e(".site-title").html(t):e(".site-title a").html(t)})}),wp.customize("blogdescription",function(t){t.bind(function(t){e(".site-description").html(t)})}),wp.customize("colors_scheme",function(e){e.bind(function(e){t("body",{light:"color-scheme-light",dark:"color-scheme-dark",auto:"color-scheme-auto"},e)})}),wp.customize("colors_link_hover",function(e){e.bind(function(e){t("body",{blue:"link-hover-blue",red:"link-hover-red",green:"link-hover-green",orange:"link-hover-orange",purple:"link-hover-purple"},e)})}),wp.customize("marianne_global_font_size",function(t){t.bind(function(t){e("body").css("font-size",12*Number(t)/100+"pt")})}),wp.customize("marianne_global_text_shadow",function(e){e.bind(function(e){n("body","text-shadow",e)})}),wp.customize("marianne_header_align",function(e){e.bind(function(e){t(".site-header",{left:"site-header-align-left",center:"site-header-align-center",right:"site-header-align-right"},e)})}),wp.customize("marianne_header_title_weight",function(e){e.bind(function(e){t(".site-title",{normal:"site-title-weight-normal",bold:"site-title-weight-bold",bolder:"site-title-weight-bolder"},e)})}),wp.customize("marianne_header_desc_weight",function(e){e.bind(function(e){t(".site-description",{thin:"site-desc-weight-thin",normal:"site-desc-weight-normal"},e)})}),wp.customize("marianne_header_desc_style",function(e){e.bind(function(e){t(".site-description",{normal:"site-desc-style-normal",italic:"site-desc-style-italic"},e)})}),wp.customize("marianne_header_menu_search_text",function(t){t.bind(function(t){e("#header-search-button").length>0&&(t.length>0?e("#header-search-button").html(t):e("#header-search-button").html(marianne_live.default_search_text))})}),wp.customize("marianne_content_text_align",function(e){e.bind(function(e){t([".entry-content",".comment-content"],{left:"text-align-left",center:"text-align-center",right:"text-align-right",justify:"text-align-justify"},e)})}),wp.customize("marianne_content_hyphens",function(e){e.bind(function(e){n(".entry-content","text-hyphens",e)})}),wp.customize("marianne_footer_align",function(e){e.bind(function(e){t(".site-footer",{left:"site-footer-align-left",center:"site-footer-align-center",right:"site-footer-align-right"},e)})}),wp.customize("marianne_footer_text",function(t){t.bind(function(t){e("#site-footer-text").length?e("#site-footer-text").html(t):e(".site-footer").prepend('<div id="site-footer-text" class="site-footer-block">'+t+"</div>")})}),wp.customize("marianne_social_style",function(e){e.bind(function(e){t(".site-social",{square:"site-social-square",round:"site-social-round"},e)})})})}(jQuery,wp.customize);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/**
|
||||
* navigation.js
|
||||
*
|
||||
* Handles dropdown for the primary menu
|
||||
* and toggling it for small screens.
|
||||
* Handles dropdown for the primary menu and toggling it for small screens;
|
||||
* and adds a function to scroll to top of the page on click.
|
||||
*
|
||||
* Based on the work of the WordPress team in the Twenty Twenty-One Theme.
|
||||
*
|
||||
|
@ -10,7 +10,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* Toggle an attribute"s value
|
||||
* Toggle an attribute's value
|
||||
*
|
||||
* @param {Element} el - The element.
|
||||
*/
|
||||
|
@ -66,6 +66,12 @@ function marianneAriaExpand( el ) {
|
|||
}
|
||||
|
||||
( function( $ ) {
|
||||
|
||||
// Return to the top of the page on click.
|
||||
$( "#back-to-top" ).click( function () {
|
||||
$( "html, body" ).animate( { scrollTop: 0 }, 200 );
|
||||
} );
|
||||
|
||||
// Adds role and tabindex to menu links.
|
||||
var menu_elements = $( "#menu-primary .menu-item" );
|
||||
|
||||
|
@ -77,7 +83,7 @@ function marianneAriaExpand( el ) {
|
|||
$( item )
|
||||
.children( "a" )
|
||||
.attr( "tabindex", "0" );
|
||||
});
|
||||
} );
|
||||
|
||||
/**
|
||||
* Change aria-expanded value on hover and focus.
|
||||
|
|
2
assets/js/navigation.min.js
vendored
2
assets/js/navigation.min.js
vendored
|
@ -1 +1 @@
|
|||
function marianneToggleAriaExpanded(e){"true"!==e.getAttribute("aria-expanded")?e.setAttribute("aria-expanded","true"):e.setAttribute("aria-expanded","false")}function marianneExpandSubMenu(e){window.matchMedia("(min-width: 500px)").matches?(e.closest("nav").querySelectorAll(".sub-menu-toggle").forEach(function(a){a!==e&&a.setAttribute("aria-expanded","false")}),marianneToggleAriaExpanded(e),e.parentNode.querySelectorAll("ul > li:last-child > a").forEach(function(a){a.addEventListener("blur",function(a){e.parentNode.contains(a.relatedTarget)||e.setAttribute("aria-expanded","false")})})):e.removeAttribute("aria-haspopup").removeAttribute("aria-expanded")}function marianneAriaExpand(e){"true"!==e.getAttribute("aria-expanded")?e.setAttribute("aria-expanded","true"):e.setAttribute("aria-expanded","false")}!function(e){e("#menu-primary .menu-item").each(function(a,t){e(t).children("a").attr("role","menu-item"),e(t).children("a").attr("tabindex","0")}),e(window).on("load",function(){var a;a="#menu-primary"+" ",window.matchMedia("(max-width: 500px)").matches||window.matchMedia("(hover: none)").matches?(e(a+".sub-menu-toggle").removeAttr("aria-haspopup"),e(a+".sub-menu-toggle").removeAttr("aria-expanded"),e("#menu-mobile-button").attr("aria-haspopup","true").attr("aria-expanded","false"),e("#header-search-button").attr("aria-expanded","false"),e("body").hasClass("search")||e(".header-search-box").hide(),e(document).keydown(function(a){27===a.keyCode&&(e("#menu-mobile-button").attr("aria-expanded","false"),e("#header-search-button").attr("aria-expanded","false"),e("body").hasClass("search")||e(".header-search-box").hide())}),e(document).mouseup(function(a){var t=e("#menu-primary-container"),n=e(".header-search-box");t.is(a.target)||0!==t.has(a.target).length||n.is(a.target)||0!==n.has(a.target).length||(e("#menu-mobile-button").attr("aria-expanded","false"),e("#header-search-button").attr("aria-expanded","false"),e("body").hasClass("search")||e(".header-search-box").hide())}),e("#menu-mobile-button").click(function(){e("#header-search-button").attr("aria-expanded","false"),e("body").hasClass("search")||e(".header-search-box").hide()})):(e(a+".sub-menu-toggle").attr("aria-haspopup")&&e(a+".sub-menu-toggle").attr("aria-expended")||(e(a+".sub-menu-toggle").attr("aria-haspopup","true"),e(a+".sub-menu-toggle").attr("aria-expanded","false")),e(a+".menu-item-has-children").hover(function(){e(this).find(".sub-menu-toggle").attr("aria-expanded")&&e(this).find(".sub-menu-toggle").attr("aria-expanded","true")},function(){e(this).find(".sub-menu-toggle").attr("aria-expanded")&&e(this).find(".sub-menu-toggle").attr("aria-expanded","false")}),e(a+".sub-menu a").focus(function(){e(this).parents(".menu-item-has-children").find(".sub-menu-toggle").attr("aria-expanded")&&e(this).parents(".menu-item-has-children").find(".sub-menu-toggle").attr("aria-expanded","true")}),e(a+".sub-menu a").blur(function(){e(this).parents(".menu-item-has-children").find(".sub-menu-toggle").attr("aria-expanded")&&e(this).parents(".menu-item-has-children").find(".sub-menu-toggle").attr("aria-expanded","false")}),e(a+".sub-menu-toggle").focus(function(){e(this).closest(".menu-item-has-children").find(".sub-menu-toggle").attr("aria-expanded")&&e(this).closest(".menu-item-has-children").find(".sub-menu-toggle").attr("aria-expanded","true")}),e(a+".sub-menu-toggle").blur(function(){e(this).closest(".menu-item-has-children").find(".sub-menu-toggle").attr("aria-expanded")&&e(this).closest(".menu-item-has-children").find(".sub-menu-toggle").attr("aria-expanded","false")}),document.addEventListener("keydown",function(a){27===a.keyCode&&e(".sub-menu-toggle").attr("aria-expanded","false")}))}),e("body").hasClass("search")?e(".header-search-box").show():e("#header-search-button").click(function(){e(".header-search-box").toggle(),e(this).attr("aria-expanded",function(e,a){return"false"===a?"true":"false"})})}(jQuery);
|
||||
function marianneToggleAriaExpanded(e){"true"!==e.getAttribute("aria-expanded")?e.setAttribute("aria-expanded","true"):e.setAttribute("aria-expanded","false")}function marianneExpandSubMenu(e){window.matchMedia("(min-width: 500px)").matches?(e.closest("nav").querySelectorAll(".sub-menu-toggle").forEach(function(a){a!==e&&a.setAttribute("aria-expanded","false")}),marianneToggleAriaExpanded(e),e.parentNode.querySelectorAll("ul > li:last-child > a").forEach(function(a){a.addEventListener("blur",function(a){e.parentNode.contains(a.relatedTarget)||e.setAttribute("aria-expanded","false")})})):e.removeAttribute("aria-haspopup").removeAttribute("aria-expanded")}function marianneAriaExpand(e){"true"!==e.getAttribute("aria-expanded")?e.setAttribute("aria-expanded","true"):e.setAttribute("aria-expanded","false")}!function(e){e("#back-to-top").click(function(){e("html, body").animate({scrollTop:0},200)}),e("#menu-primary .menu-item").each(function(a,t){e(t).children("a").attr("role","menu-item"),e(t).children("a").attr("tabindex","0")}),e(window).on("load",function(){var a;a="#menu-primary"+" ",window.matchMedia("(max-width: 500px)").matches||window.matchMedia("(hover: none)").matches?(e(a+".sub-menu-toggle").removeAttr("aria-haspopup"),e(a+".sub-menu-toggle").removeAttr("aria-expanded"),e("#menu-mobile-button").attr("aria-haspopup","true").attr("aria-expanded","false"),e("#header-search-button").attr("aria-expanded","false"),e("body").hasClass("search")||e(".header-search-box").hide(),e(document).keydown(function(a){27===a.keyCode&&(e("#menu-mobile-button").attr("aria-expanded","false"),e("#header-search-button").attr("aria-expanded","false"),e("body").hasClass("search")||e(".header-search-box").hide())}),e(document).mouseup(function(a){var t=e("#menu-primary-container"),n=e(".header-search-box");t.is(a.target)||0!==t.has(a.target).length||n.is(a.target)||0!==n.has(a.target).length||(e("#menu-mobile-button").attr("aria-expanded","false"),e("#header-search-button").attr("aria-expanded","false"),e("body").hasClass("search")||e(".header-search-box").hide())}),e("#menu-mobile-button").click(function(){e("#header-search-button").attr("aria-expanded","false"),e("body").hasClass("search")||e(".header-search-box").hide()})):(e(a+".sub-menu-toggle").attr("aria-haspopup")&&e(a+".sub-menu-toggle").attr("aria-expended")||(e(a+".sub-menu-toggle").attr("aria-haspopup","true"),e(a+".sub-menu-toggle").attr("aria-expanded","false")),e(a+".menu-item-has-children").hover(function(){e(this).find(".sub-menu-toggle").attr("aria-expanded")&&e(this).find(".sub-menu-toggle").attr("aria-expanded","true")},function(){e(this).find(".sub-menu-toggle").attr("aria-expanded")&&e(this).find(".sub-menu-toggle").attr("aria-expanded","false")}),e(a+".sub-menu a").focus(function(){e(this).parents(".menu-item-has-children").find(".sub-menu-toggle").attr("aria-expanded")&&e(this).parents(".menu-item-has-children").find(".sub-menu-toggle").attr("aria-expanded","true")}),e(a+".sub-menu a").blur(function(){e(this).parents(".menu-item-has-children").find(".sub-menu-toggle").attr("aria-expanded")&&e(this).parents(".menu-item-has-children").find(".sub-menu-toggle").attr("aria-expanded","false")}),e(a+".sub-menu-toggle").focus(function(){e(this).closest(".menu-item-has-children").find(".sub-menu-toggle").attr("aria-expanded")&&e(this).closest(".menu-item-has-children").find(".sub-menu-toggle").attr("aria-expanded","true")}),e(a+".sub-menu-toggle").blur(function(){e(this).closest(".menu-item-has-children").find(".sub-menu-toggle").attr("aria-expanded")&&e(this).closest(".menu-item-has-children").find(".sub-menu-toggle").attr("aria-expanded","false")}),document.addEventListener("keydown",function(a){27===a.keyCode&&e(".sub-menu-toggle").attr("aria-expanded","false")}))}),e("body").hasClass("search")?e(".header-search-box").show():e("#header-search-button").click(function(){e(".header-search-box").toggle(),e(this).attr("aria-expanded",function(e,a){return"false"===a?"true":"false"})})}(jQuery);
|
||||
|
|
19
footer.php
19
footer.php
|
@ -34,6 +34,7 @@
|
|||
array(
|
||||
'container' => '',
|
||||
'depth' => 1,
|
||||
'item_spacing' => 'discard',
|
||||
'menu_class' => 'navigation-menu',
|
||||
'menu_id' => 'menu-footer',
|
||||
'theme_location' => 'footer',
|
||||
|
@ -62,6 +63,24 @@
|
|||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( true === marianne_get_theme_mod( 'marianne_footer_go_top' ) ) : ?>
|
||||
<div class="site-footer-block">
|
||||
<?php
|
||||
$marianne_svg_chevron_data = marianne_svg_icons( 'chevron-up' );
|
||||
$marianne_svg_chevron_shapes = $marianne_svg_chevron_data['shapes'];
|
||||
$marianne_svg_chevron_args = array(
|
||||
'aria-label' => __( 'Back to top', 'marianne' ),
|
||||
'class' => 'feather-icons',
|
||||
'size' => array( 12, 12 ),
|
||||
);
|
||||
?>
|
||||
|
||||
<button id="back-to-top">
|
||||
<?php echo marianne_esc_svg( marianne_svg( $marianne_svg_chevron_shapes, $marianne_svg_chevron_args ) . ' ' . esc_html__( 'Back to top', 'marianne' ) ); ?>
|
||||
</button>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php wp_footer(); ?>
|
||||
</footer>
|
||||
</div><!-- #page -->
|
||||
|
|
140
functions.php
140
functions.php
|
@ -142,6 +142,17 @@ if ( ! function_exists( 'marianne_styles_scripts' ) ) {
|
|||
$theme_version = wp_get_theme()->get( 'Version' );
|
||||
$min = marianne_minify();
|
||||
|
||||
/**
|
||||
* Use Google Fonts stylesheet when a Google Font is selected.
|
||||
*
|
||||
* @since Marianne 1.8
|
||||
*/
|
||||
$marianne_font = marianne_font();
|
||||
|
||||
if ( $marianne_font['url'] && 'none' !== $marianne_font['url'] ) {
|
||||
wp_enqueue_style( 'marianne-fonts-google', $marianne_font['url'] . '&display=swap', array(), $theme_version );
|
||||
}
|
||||
|
||||
// The main stylesheet.
|
||||
wp_enqueue_style( 'marianne-stylesheet', get_template_directory_uri() . "/style$min.css", array(), $theme_version );
|
||||
|
||||
|
@ -220,10 +231,10 @@ if ( ! function_exists( 'marianne_add_sub_menu_toggle' ) ) {
|
|||
$output .= '<button class="sub-menu-toggle" aria-haspopup="true" aria-expanded="false" onClick="marianneExpandSubMenu(this)">';
|
||||
|
||||
// Displays the chevron SVG.
|
||||
$svg_chevron_data = marianne_svg_feather_icons( 'chevron-down' );
|
||||
$svg_chevron_data = marianne_svg_icons( 'chevron-down' );
|
||||
$svg_chevron_shapes = $svg_chevron_data['shapes'];
|
||||
$svg_chevron_args = array(
|
||||
'class' => 'feather sub-menu-toggle-icon',
|
||||
'class' => 'feather-icons sub-menu-toggle-icon',
|
||||
'size' => array( 12, 12 ),
|
||||
'echo' => false,
|
||||
'aria-label' => __( 'Submenu opening icon', 'marianne' ),
|
||||
|
@ -261,15 +272,9 @@ if ( ! function_exists( 'marianne_add_class' ) ) {
|
|||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'marianne_svg_feather_icons' ) ) {
|
||||
if ( ! function_exists( 'marianne_svg_icons' ) ) {
|
||||
/**
|
||||
* SVG date for social icons.
|
||||
*
|
||||
* All defined shapes in this function were made by Feather Icons:
|
||||
*
|
||||
* @author Cole Bemis
|
||||
* @license https://opensource.org/licenses/mit-license.php
|
||||
* @link https://feathericons.com/
|
||||
* SVG shapes for social icons.
|
||||
*
|
||||
* @param string $name The id of the icon.
|
||||
*
|
||||
|
@ -277,7 +282,7 @@ if ( ! function_exists( 'marianne_svg_feather_icons' ) ) {
|
|||
*
|
||||
* @since Marianne 1.3
|
||||
*/
|
||||
function marianne_svg_feather_icons( $name = '' ) {
|
||||
function marianne_svg_icons( $name = '' ) {
|
||||
$svg_data = array(
|
||||
'name' => '',
|
||||
'shapes' => '',
|
||||
|
@ -285,9 +290,29 @@ if ( ! function_exists( 'marianne_svg_feather_icons' ) ) {
|
|||
);
|
||||
|
||||
switch ( $name ) {
|
||||
case '500px':
|
||||
$svg_data['name'] = _x( '500px', 'The name of the photography site.', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M7.433 9.01A2.994 2.994 0 0 0 4.443 12a2.993 2.993 0 0 0 2.99 2.99 2.994 2.994 0 0 0 2.99-2.99 2.993 2.993 0 0 0-2.99-2.99m0 5.343A2.357 2.357 0 0 1 5.079 12a2.357 2.357 0 0 1 2.354-2.353A2.356 2.356 0 0 1 9.786 12a2.356 2.356 0 0 1-2.353 2.353m6.471-5.343a2.994 2.994 0 0 0-2.99 2.99 2.993 2.993 0 0 0 2.99 2.99 2.994 2.994 0 0 0 2.99-2.99 2.994 2.994 0 0 0-2.99-2.99m0 5.343A2.355 2.355 0 0 1 11.552 12a2.355 2.355 0 0 1 2.352-2.353A2.356 2.356 0 0 1 16.257 12a2.356 2.356 0 0 1-2.353 2.353m-11.61-3.55a2.1 2.1 0 0 0-1.597.423V9.641h2.687c.093 0 .16-.017.16-.292 0-.269-.108-.28-.18-.28H.39c-.174 0-.265.14-.265.294v2.602c0 .136.087.183.247.214.141.028.223.012.285-.057l.006-.01c.283-.408.9-.804 1.486-.732.699.086 1.262.644 1.34 1.327a1.512 1.512 0 0 1-1.5 1.685c-.636 0-1.19-.408-1.422-1.001-.035-.088-.092-.152-.343-.062-.229.083-.243.18-.212.268a2.11 2.11 0 0 0 1.976 1.386 2.102 2.102 0 0 0 .305-4.18M18.938 9.04c-.805.062-1.434.77-1.434 1.61v2.66c0 .155.117.187.293.187s.293-.031.293-.186v-2.668c0-.524.382-.974.868-1.024a.972.972 0 0 1 .758.247.984.984 0 0 1 .322.73c0 .08-.039.34-.217.58-.135.182-.39.399-.844.399h-.009c-.115 0-.215.005-.234.28-.013.186-.012.269.148.29.286.04.576-.016.865-.166.492-.256.822-.741.861-1.267a1.562 1.562 0 0 0-.452-1.222 1.56 1.56 0 0 0-1.218-.45m3.919 1.56l1.085-1.086c.04-.039.132-.132-.055-.324-.08-.083-.153-.125-.217-.125h-.001a.163.163 0 0 0-.121.058L22.46 10.21l-1.086-1.093c-.088-.088-.19-.067-.322.065-.135.136-.157.24-.069.328l1.086 1.092-1.064 1.064-.007.007c-.026.025-.065.063-.065.125-.001.063.042.139.126.223.07.071.138.107.2.107.069 0 .114-.045.139-.07l1.068-1.067 1.09 1.092a.162.162 0 0 0 .115.045h.002c.069 0 .142-.04.217-.118.122-.129.143-.236.06-.319z" />';
|
||||
break;
|
||||
|
||||
case 'apple_podcasts':
|
||||
$svg_data['name'] = __( 'Apple Podcasts', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M5.34 0A5.328 5.328 0 000 5.34v13.32A5.328 5.328 0 005.34 24h13.32A5.328 5.328 0 0024 18.66V5.34A5.328 5.328 0 0018.66 0zm6.525 2.568c2.336 0 4.448.902 6.056 2.587 1.224 1.272 1.912 2.619 2.264 4.392.12.59.12 2.2.007 2.864a8.506 8.506 0 01-3.24 5.296c-.608.46-2.096 1.261-2.336 1.261-.088 0-.096-.091-.056-.46.072-.592.144-.715.48-.856.536-.224 1.448-.874 2.008-1.435a7.644 7.644 0 002.008-3.536c.208-.824.184-2.656-.048-3.504-.728-2.696-2.928-4.792-5.624-5.352-.784-.16-2.208-.16-3 0-2.728.56-4.984 2.76-5.672 5.528-.184.752-.184 2.584 0 3.336.456 1.832 1.64 3.512 3.192 4.512.304.2.672.408.824.472.336.144.408.264.472.856.04.36.03.464-.056.464-.056 0-.464-.176-.896-.384l-.04-.03c-2.472-1.216-4.056-3.274-4.632-6.012-.144-.706-.168-2.392-.03-3.04.36-1.74 1.048-3.1 2.192-4.304 1.648-1.737 3.768-2.656 6.128-2.656zm.134 2.81c.409.004.803.04 1.106.106 2.784.62 4.76 3.408 4.376 6.174-.152 1.114-.536 2.03-1.216 2.88-.336.43-1.152 1.15-1.296 1.15-.023 0-.048-.272-.048-.603v-.605l.416-.496c1.568-1.878 1.456-4.502-.256-6.224-.664-.67-1.432-1.064-2.424-1.246-.64-.118-.776-.118-1.448-.008-1.02.167-1.81.562-2.512 1.256-1.72 1.704-1.832 4.342-.264 6.222l.413.496v.608c0 .336-.027.608-.06.608-.03 0-.264-.16-.512-.36l-.034-.011c-.832-.664-1.568-1.842-1.872-2.997-.184-.698-.184-2.024.008-2.72.504-1.878 1.888-3.335 3.808-4.019.41-.145 1.133-.22 1.814-.211zm-.13 2.99c.31 0 .62.06.844.178.488.253.888.745 1.04 1.259.464 1.578-1.208 2.96-2.72 2.254h-.015c-.712-.331-1.096-.956-1.104-1.77 0-.733.408-1.371 1.112-1.745.224-.117.534-.176.844-.176zm-.011 4.728c.988-.004 1.706.349 1.97.97.198.464.124 1.932-.218 4.302-.232 1.656-.36 2.074-.68 2.356-.44.39-1.064.498-1.656.288h-.003c-.716-.257-.87-.605-1.164-2.644-.341-2.37-.416-3.838-.218-4.302.262-.616.974-.966 1.97-.97z"/>';
|
||||
break;
|
||||
|
||||
case 'chevron-up':
|
||||
$svg_data['name'] = 'chevron-up';
|
||||
$svg_data['shapes'] = '<polyline points="18 15 12 9 6 15"/>';
|
||||
break;
|
||||
|
||||
case 'chevron-down':
|
||||
$svg_data['name'] = 'chevron-down';
|
||||
$svg_data['shapes'] = '<polyline points="6 9 12 15 18 9"></polyline>';
|
||||
$svg_data['shapes'] = '<polyline points="6 9 12 15 18 9"/>';
|
||||
break;
|
||||
|
||||
case 'diaspora':
|
||||
$svg_data['name'] = __( 'Diaspora', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M15.257 21.928l-2.33-3.255c-.622-.87-1.128-1.549-1.155-1.55-.027 0-1.007 1.317-2.317 3.115-1.248 1.713-2.28 3.115-2.292 3.115-.035 0-4.5-3.145-4.51-3.178-.006-.016 1.003-1.497 2.242-3.292 1.239-1.794 2.252-3.29 2.252-3.325 0-.056-.401-.197-3.55-1.247a1604.93 1604.93 0 0 1-3.593-1.2c-.033-.013.153-.635.79-2.648.46-1.446.845-2.642.857-2.656.013-.015 1.71.528 3.772 1.207 2.062.678 3.766 1.233 3.787 1.233.021 0 .045-.032.053-.07.008-.039.026-1.794.04-3.902.013-2.107.036-3.848.05-3.87.02-.03.599-.038 2.725-.038 1.485 0 2.716.01 2.735.023.023.016.064 1.175.132 3.776.112 4.273.115 4.33.183 4.33.026 0 1.66-.547 3.631-1.216 1.97-.668 3.593-1.204 3.605-1.191.04.045 1.656 5.307 1.636 5.327-.011.01-1.656.574-3.655 1.252-2.75.932-3.638 1.244-3.645 1.284-.006.029.94 1.442 2.143 3.202 1.184 1.733 2.148 3.164 2.143 3.18-.012.036-4.442 3.299-4.48 3.299-.015 0-.577-.767-1.249-1.705z"/>';
|
||||
break;
|
||||
|
||||
case 'email':
|
||||
|
@ -297,22 +322,27 @@ if ( ! function_exists( 'marianne_svg_feather_icons' ) ) {
|
|||
|
||||
case 'facebook':
|
||||
$svg_data['name'] = __( 'Facebook', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path>';
|
||||
$svg_data['shapes'] = '<path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/>';
|
||||
break;
|
||||
|
||||
case 'flickr':
|
||||
$svg_data['name'] = __( 'Flickr', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M5.334 6.666C2.3884 6.666 0 9.055 0 12c0 2.9456 2.3884 5.334 5.334 5.334 2.9456 0 5.332-2.3884 5.332-5.334 0-2.945-2.3864-5.334-5.332-5.334zm13.332 0c-2.9456 0-5.332 2.389-5.332 5.334 0 2.9456 2.3864 5.334 5.332 5.334C21.6116 17.334 24 14.9456 24 12c0-2.945-2.3884-5.334-5.334-5.334Z"/>';
|
||||
break;
|
||||
|
||||
case 'github':
|
||||
$svg_data['name'] = __( 'GitHub', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"></path>';
|
||||
$svg_data['shapes'] = '<path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/>';
|
||||
break;
|
||||
|
||||
case 'gitlab':
|
||||
$svg_data['name'] = __( 'GitLab', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M22.65 14.39L12 22.13 1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78 2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.51A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z"></path>';
|
||||
$svg_data['shapes'] = '<path d="M4.845.904c-.435 0-.82.28-.955.692C2.639 5.449 1.246 9.728.07 13.335a1.437 1.437 0 00.522 1.607l11.071 8.045c.2.145.472.144.67-.004l11.073-8.04a1.436 1.436 0 00.522-1.61c-1.285-3.942-2.683-8.256-3.817-11.746a1.004 1.004 0 00-.957-.684.987.987 0 00-.949.69l-2.405 7.408H8.203l-2.41-7.408a.987.987 0 00-.942-.69h-.006zm-.006 1.42l2.173 6.678H2.675zm14.326 0l2.168 6.678h-4.341zm-10.593 7.81h6.862c-1.142 3.52-2.288 7.04-3.434 10.559L8.572 10.135zm-5.514.005h4.321l3.086 9.5zm13.567 0h4.325c-2.467 3.17-4.95 6.328-7.411 9.502 1.028-3.167 2.059-6.334 3.086-9.502zM2.1 10.762l6.977 8.947-7.817-5.682a.305.305 0 01-.112-.341zm19.798 0l.952 2.922a.305.305 0 01-.11.341v.002l-7.82 5.68.026-.035z"/>';
|
||||
break;
|
||||
|
||||
case 'instagram':
|
||||
$svg_data['name'] = __( 'Instagram', 'marianne' );
|
||||
$svg_data['shapes'] = '<rect x="2" y="2" width="20" height="20" rx="5" ry="5"></rect><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"></path><line x1="17.5" y1="6.5" x2="17.51" y2="6.5"></line>';
|
||||
$svg_data['shapes'] = '<path d="M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z"/>';
|
||||
break;
|
||||
|
||||
case 'link':
|
||||
|
@ -322,7 +352,17 @@ if ( ! function_exists( 'marianne_svg_feather_icons' ) ) {
|
|||
|
||||
case 'linkedin':
|
||||
$svg_data['name'] = __( 'LinkedIn', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path><rect x="2" y="9" width="4" height="12"></rect><circle cx="4" cy="4" r="2"></circle>';
|
||||
$svg_data['shapes'] = '<path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"/>';
|
||||
break;
|
||||
|
||||
case 'mastodon':
|
||||
$svg_data['name'] = __( 'Mastodon', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M23.193 7.88c0-5.207-3.411-6.733-3.411-6.733C18.062.357 15.108.025 12.041 0h-.076c-3.069.025-6.02.357-7.74 1.147 0 0-3.412 1.526-3.412 6.732 0 1.193-.023 2.619.015 4.13.124 5.092.934 10.11 5.641 11.355 2.17.574 4.034.695 5.536.612 2.722-.15 4.25-.972 4.25-.972l-.09-1.975s-1.945.613-4.13.54c-2.165-.075-4.449-.234-4.799-2.892a5.5 5.5 0 0 1-.048-.745s2.125.52 4.818.643c1.646.075 3.19-.097 4.758-.283 3.007-.359 5.625-2.212 5.954-3.905.517-2.665.475-6.508.475-6.508zm-4.024 6.709h-2.497v-6.12c0-1.29-.543-1.944-1.628-1.944-1.2 0-1.802.776-1.802 2.313v3.349h-2.484v-3.35c0-1.537-.602-2.313-1.802-2.313-1.085 0-1.628.655-1.628 1.945v6.119H4.831V8.285c0-1.29.328-2.314.987-3.07.68-.759 1.57-1.147 2.674-1.147 1.278 0 2.246.491 2.886 1.474L12 6.585l.622-1.043c.64-.983 1.608-1.474 2.886-1.474 1.104 0 1.994.388 2.674 1.146.658.757.986 1.781.986 3.07v6.305z"></path>';
|
||||
break;
|
||||
|
||||
case 'medium':
|
||||
$svg_data['name'] = __( 'Medium', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M13.54 12a6.8 6.8 0 01-6.77 6.82A6.8 6.8 0 010 12a6.8 6.8 0 016.77-6.82A6.8 6.8 0 0113.54 12zM20.96 12c0 3.54-1.51 6.42-3.38 6.42-1.87 0-3.39-2.88-3.39-6.42s1.52-6.42 3.39-6.42 3.38 2.88 3.38 6.42M24 12c0 3.17-.53 5.75-1.19 5.75-.66 0-1.19-2.58-1.19-5.75s.53-5.75 1.19-5.75C23.47 6.25 24 8.83 24 12z" />';
|
||||
break;
|
||||
|
||||
case 'phone':
|
||||
|
@ -330,24 +370,69 @@ if ( ! function_exists( 'marianne_svg_feather_icons' ) ) {
|
|||
$svg_data['shapes'] = '<rect x="5" y="2" width="14" height="20" rx="2" ry="2"></rect><line x1="12" y1="18" x2="12.01" y2="18"></line>';
|
||||
break;
|
||||
|
||||
case 'rss':
|
||||
$svg_data['name'] = __( 'RSS Feed', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle>';
|
||||
case 'reddit':
|
||||
$svg_data['name'] = __( 'Reddit', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z"/>';
|
||||
break;
|
||||
|
||||
case 'youtube':
|
||||
$svg_data['name'] = __( 'YouTube', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z"></path><polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02"></polygon>';
|
||||
case 'rss':
|
||||
$svg_data['name'] = __( 'RSS Feed', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M19.199 24C19.199 13.467 10.533 4.8 0 4.8V0c13.165 0 24 10.835 24 24h-4.801zM3.291 17.415c1.814 0 3.293 1.479 3.293 3.295 0 1.813-1.485 3.29-3.301 3.29C1.47 24 0 22.526 0 20.71s1.475-3.294 3.291-3.295zM15.909 24h-4.665c0-6.169-5.075-11.245-11.244-11.245V8.09c8.727 0 15.909 7.184 15.909 15.91z"/>';
|
||||
break;
|
||||
|
||||
case 'signal':
|
||||
$svg_data['name'] = __( 'Signal', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M12.012 2.598c-5.22 0-9.452 3.9-9.452 8.709 0 3.016 1.219 5.301 3.155 6.774H5.71l.234 3.042v.004c0 .017 0 .031.004.046v.006c.024.144.15.255.301.255.053 0 .1-.015.144-.035l.011-.008L9.3 19.717c.854.196 1.767.299 2.71.299 5.22 0 9.452-3.899 9.452-8.71 0-4.81-4.233-8.709-9.454-8.709l.004.001zM10.39.72c.525-.065 1.061-.104 1.605-.104.38 0 .75.02 1.119.052l.057-.614C12.781.019 12.392 0 11.997 0c-.57 0-1.135.036-1.691.109l.083.612.001-.001zm3.797.094c.915.165 1.785.436 2.61.795l.252-.567c-.132-.056-.263-.112-.397-.165-.762-.3-1.551-.524-2.355-.671l-.11.608zm9.169 10.556c-.015.915-.155 1.806-.405 2.655l.59.175c.267-.903.416-1.854.431-2.831l-.616.001zM6.745 1.814c.811-.389 1.678-.698 2.586-.902L9.196.308c-.631.141-1.251.329-1.853.569-.297.117-.586.245-.867.381l.269.556zm13.65 1.399c-.706-.649-1.485-1.207-2.329-1.673l-.311.541c.811.445 1.561.981 2.224 1.596l.416-.462v-.002zm-5.244 18.838c.945-.24 1.845-.591 2.686-1.03l-.315-.533c-.786.413-1.631.738-2.521.967l.15.596zM3.677 4.005c.63-.638 1.347-1.2 2.13-1.675l-.327-.529c-.698.422-1.35.914-1.945 1.473-.102.094-.2.191-.3.289l.439.441.003.001zm19.48 11.28l-.568-.236c-.349.833-.803 1.614-1.354 2.332l.495.369c.577-.758 1.061-1.586 1.424-2.465h.003zM20.726 4.433c.606.675 1.122 1.425 1.534 2.228l.555-.275c-.435-.852-.979-1.645-1.627-2.366l-.465.413h.003zm2.554 3.003l-.568.244c.313.828.521 1.703.604 2.61l.615-.061c-.088-.956-.305-1.892-.651-2.793zM6.386 22.849l-.969.425-.332-1.025-.585.19.438 1.347c.029.083.09.151.167.188.041.017.083.026.126.026s.084-.009.123-.026l1.283-.563-.251-.562zm3.823-1.193c-.078-.016-.157-.027-.237-.041l-.465-.079c-.061-.009-.12 0-.172.023l-1.951.853.271.554 1.845-.803c.125.021.25.041.371.059.068.017.139.026.209.038l.129-.604zm3.728.02c-.633.104-1.281.156-1.942.156-.273 0-.525-.015-.772-.038l-.019.615c.251.024.511.04.791.04.698 0 1.383-.058 2.048-.166l-.104-.606-.002-.001zM1.517 7.116c.37-.825.852-1.598 1.425-2.302l-.47-.407c-.61.745-1.116 1.557-1.508 2.427l-.01.021.563.261zM20.532 18.21c-.612.651-1.31 1.229-2.07 1.728l.339.515c.806-.524 1.541-1.14 2.19-1.829l-.459-.414zM.97 14.551c-.188-.796-.293-1.676-.323-2.671H.031c.03 1.071.145 2.005.345 2.843l.594-.172zM.538 7.925c-.297.91-.468 1.853-.51 2.813l.615.03c.042-.923.209-1.816.487-2.662l-.592-.181zm4.199 13.26l-.59-1.815c-.02-.06-.056-.109-.105-.147-.232-.182-.449-.366-.66-.558l-.422.446c.194.184.408.362.629.541l.561 1.717.587-.184zm-2.105-3.292c-.591-.691-1.037-1.449-1.355-2.315l-.573.229c.041.107.083.216.126.322.33.796.771 1.509 1.342 2.175l.46-.411z"/>';
|
||||
break;
|
||||
|
||||
case 'soundcloud':
|
||||
$svg_data['name'] = __( 'SoundCloud', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M1.175 12.225c-.051 0-.094.046-.101.1l-.233 2.154.233 2.105c.007.058.05.098.101.098.05 0 .09-.04.099-.098l.255-2.105-.27-2.154c0-.057-.045-.1-.09-.1m-.899.828c-.06 0-.091.037-.104.094L0 14.479l.165 1.308c0 .055.045.094.09.094s.089-.045.104-.104l.21-1.319-.21-1.334c0-.061-.044-.09-.09-.09m1.83-1.229c-.061 0-.12.045-.12.104l-.21 2.563.225 2.458c0 .06.045.12.119.12.061 0 .105-.061.121-.12l.254-2.474-.254-2.548c-.016-.06-.061-.12-.121-.12m.945-.089c-.075 0-.135.06-.15.135l-.193 2.64.21 2.544c.016.077.075.138.149.138.075 0 .135-.061.15-.15l.24-2.532-.24-2.623c0-.075-.06-.135-.135-.135l-.031-.017zm1.155.36c-.005-.09-.075-.149-.159-.149-.09 0-.158.06-.164.149l-.217 2.43.2 2.563c0 .09.075.157.159.157.074 0 .148-.068.148-.158l.227-2.563-.227-2.444.033.015zm.809-1.709c-.101 0-.18.09-.18.181l-.21 3.957.187 2.563c0 .09.08.164.18.164.094 0 .174-.09.18-.18l.209-2.563-.209-3.972c-.008-.104-.088-.18-.18-.18m.959-.914c-.105 0-.195.09-.203.194l-.18 4.872.165 2.548c0 .12.09.209.195.209.104 0 .194-.089.21-.209l.193-2.548-.192-4.856c-.016-.12-.105-.21-.21-.21m.989-.449c-.121 0-.211.089-.225.209l-.165 5.275.165 2.52c.014.119.104.225.225.225.119 0 .225-.105.225-.225l.195-2.52-.196-5.275c0-.12-.105-.225-.225-.225m1.245.045c0-.135-.105-.24-.24-.24-.119 0-.24.105-.24.24l-.149 5.441.149 2.503c.016.135.121.24.256.24s.24-.105.24-.24l.164-2.503-.164-5.456-.016.015zm.749-.134c-.135 0-.255.119-.255.254l-.15 5.322.15 2.473c0 .15.12.255.255.255s.255-.12.255-.27l.15-2.474-.165-5.307c0-.148-.12-.27-.271-.27m1.005.166c-.164 0-.284.135-.284.285l-.103 5.143.135 2.474c0 .149.119.277.284.277.149 0 .271-.12.284-.285l.121-2.443-.135-5.112c-.012-.164-.135-.285-.285-.285m1.184-.945c-.045-.029-.105-.044-.165-.044s-.119.015-.165.044c-.09.054-.149.15-.149.255v.061l-.104 6.048.115 2.449v.008c.008.06.03.135.074.18.058.061.142.104.234.104.08 0 .158-.044.209-.09.058-.06.091-.135.091-.225l.015-.24.117-2.203-.135-6.086c0-.104-.061-.193-.135-.239l-.002-.022zm1.006-.547c-.045-.045-.09-.061-.15-.061-.074 0-.149.016-.209.061-.075.061-.119.15-.119.24v.029l-.137 6.609.076 1.215.061 1.185c0 .164.148.314.328.314.181 0 .33-.15.33-.329l.15-2.414-.15-6.637c0-.12-.074-.221-.165-.277m8.934 3.777c-.405 0-.795.086-1.139.232-.24-2.654-2.46-4.736-5.188-4.736-.659 0-1.305.135-1.889.359-.225.09-.27.18-.285.359v9.368c.016.18.15.33.33.345h8.185C22.681 17.218 24 15.914 24 14.28s-1.319-2.952-2.938-2.952"/>';
|
||||
break;
|
||||
|
||||
case 'spotify':
|
||||
$svg_data['name'] = __( 'Spotify', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z"></path>';
|
||||
break;
|
||||
|
||||
case 'tiktok':
|
||||
$svg_data['name'] = __( 'TikTok', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"/>';
|
||||
break;
|
||||
|
||||
case 'telegram':
|
||||
$svg_data['name'] = __( 'Telegram', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"/>';
|
||||
break;
|
||||
|
||||
case 'twitch':
|
||||
$svg_data['name'] = __( 'Twitch', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M21 2H3v16h5v4l4-4h5l4-4V2zm-10 9V7m5 4V7"></path>';
|
||||
$svg_data['shapes'] = '<path d="M11.571 4.714h1.715v5.143H11.57zm4.715 0H18v5.143h-1.714zM6 0L1.714 4.286v15.428h5.143V24l4.286-4.286h3.428L22.286 12V0zm14.571 11.143l-3.428 3.428h-3.429l-3 3v-3H6.857V1.714h13.714Z"/>';
|
||||
break;
|
||||
|
||||
case 'twitter':
|
||||
$svg_data['name'] = __( 'Twitter', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path>';
|
||||
$svg_data['shapes'] = '<path d="M23.953 4.57a10 10 0 01-2.825.775 4.958 4.958 0 002.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 00-8.384 4.482C7.69 8.095 4.067 6.13 1.64 3.162a4.822 4.822 0 00-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 01-2.228-.616v.06a4.923 4.923 0 003.946 4.827 4.996 4.996 0 01-2.212.085 4.936 4.936 0 004.604 3.417 9.867 9.867 0 01-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 007.557 2.209c9.053 0 13.998-7.496 13.998-13.985 0-.21 0-.42-.015-.63A9.935 9.935 0 0024 4.59z"/>';
|
||||
break;
|
||||
|
||||
case 'vimeo':
|
||||
$svg_data['name'] = __( 'Vimeo', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M23.9765 6.4168c-.105 2.338-1.739 5.5429-4.894 9.6088-3.2679 4.247-6.0258 6.3699-8.2898 6.3699-1.409 0-2.578-1.294-3.553-3.881l-1.9179-7.1138c-.719-2.584-1.488-3.878-2.312-3.878-.179 0-.806.378-1.8809 1.132l-1.129-1.457a315.06 315.06 0 003.501-3.1279c1.579-1.368 2.765-2.085 3.5539-2.159 1.867-.18 3.016 1.1 3.447 3.838.465 2.953.789 4.789.971 5.5069.5389 2.45 1.1309 3.674 1.7759 3.674.502 0 1.256-.796 2.265-2.385 1.004-1.589 1.54-2.797 1.612-3.628.144-1.371-.395-2.061-1.614-2.061-.574 0-1.167.121-1.777.391 1.186-3.8679 3.434-5.7568 6.7619-5.6368 2.4729.06 3.6279 1.664 3.4929 4.7969z"/>';
|
||||
break;
|
||||
|
||||
case 'vk':
|
||||
$svg_data['name'] = __( 'VK', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M15.684 0H8.316C1.592 0 0 1.592 0 8.316v7.368C0 22.408 1.592 24 8.316 24h7.368C22.408 24 24 22.408 24 15.684V8.316C24 1.592 22.391 0 15.684 0zm3.692 17.123h-1.744c-.66 0-.864-.525-2.05-1.727-1.033-1-1.49-1.135-1.744-1.135-.356 0-.458.102-.458.593v1.575c0 .424-.135.678-1.253.678-1.846 0-3.896-1.118-5.335-3.202C4.624 10.857 4.03 8.57 4.03 8.096c0-.254.102-.491.593-.491h1.744c.44 0 .61.203.78.677.863 2.49 2.303 4.675 2.896 4.675.22 0 .322-.102.322-.66V9.721c-.068-1.186-.695-1.287-.695-1.71 0-.204.17-.407.44-.407h2.744c.373 0 .508.203.508.643v3.473c0 .372.17.508.271.508.22 0 .407-.136.813-.542 1.254-1.406 2.151-3.574 2.151-3.574.119-.254.322-.491.763-.491h1.744c.525 0 .644.27.525.643-.22 1.017-2.354 4.031-2.354 4.031-.186.305-.254.44 0 .78.186.254.796.779 1.203 1.253.745.847 1.32 1.558 1.473 2.05.17.49-.085.744-.576.744z"/>';
|
||||
break;
|
||||
|
||||
case 'whatsapp':
|
||||
$svg_data['name'] = __( 'WhatsApp', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"/>';
|
||||
break;
|
||||
|
||||
case 'youtube':
|
||||
$svg_data['name'] = __( 'YouTube', 'marianne' );
|
||||
$svg_data['shapes'] = '<path d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"/>';
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -414,6 +499,7 @@ if ( ! function_exists( 'marianne_esc_svg' ) ) {
|
|||
);
|
||||
|
||||
$output = wp_kses( $input, $allowed_html );
|
||||
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
@ -426,7 +512,7 @@ if ( ! function_exists( 'marianne_svg' ) ) {
|
|||
* @param array $args Parameters to set.
|
||||
* $args = array(
|
||||
* 'class' => 'string' The class of the SVG image.
|
||||
* Default: 'feather'.
|
||||
* Default: 'simple-icons'.
|
||||
* 'size' => (array) The size of the image (width, height).
|
||||
* Default: array( 18, 18 ).
|
||||
* 'viewbox' => (string) The viewBox attribute to add to the image.
|
||||
|
@ -442,7 +528,7 @@ if ( ! function_exists( 'marianne_svg' ) ) {
|
|||
*/
|
||||
function marianne_svg( $shapes = '', $args = array() ) {
|
||||
if ( is_array( $args ) && ! empty( $args ) ) {
|
||||
$class = isset( $args['class'] ) ? $args['class'] : 'feather';
|
||||
$class = isset( $args['class'] ) ? $args['class'] : 'simple-icons';
|
||||
$size = isset( $args['size'] ) ? $args['size'] : array( 18, 18 );
|
||||
$viewbox = isset( $args['viewbox'] ) ? $args['viewbox'] : '0 0 24 24';
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
$marianne_body_class .= ' text-shadow';
|
||||
}
|
||||
?>
|
||||
|
||||
<body <?php body_class( $marianne_body_class ); ?>>
|
||||
<?php
|
||||
if ( function_exists( 'wp_body_open' ) ) {
|
||||
|
@ -40,16 +41,12 @@
|
|||
|
||||
<a class="skip-link screen-reader-text" href="#content"><?php esc_html_e( 'Skip to content', 'marianne' ); ?></a>
|
||||
|
||||
<?php
|
||||
$marianne_page_class = 'site';
|
||||
$marianne_page_class .= ' page-width-' . esc_attr( marianne_get_theme_mod( 'marianne_global_page_width' ) );
|
||||
?>
|
||||
<div id="page" <?php marianne_add_class( $marianne_page_class, false ); ?>>
|
||||
|
||||
<div id="page" class="site">
|
||||
<?php
|
||||
$marianne_header_class = 'site-header';
|
||||
$marianne_header_class .= ' site-header-align-' . esc_attr( marianne_get_theme_mod( 'marianne_header_align' ) );
|
||||
?>
|
||||
|
||||
<header id="header" <?php marianne_add_class( $marianne_header_class, false ); ?> role="banner">
|
||||
<?php
|
||||
$marianne_logo_class = 'site-logo';
|
||||
|
|
|
@ -9,103 +9,16 @@
|
|||
* @since Marianne 1.4
|
||||
*/
|
||||
|
||||
if ( ! function_exists( 'marianne_header_sizes' ) ) {
|
||||
/**
|
||||
* Defines heading sizes.
|
||||
*
|
||||
* Size of headings depend on the main font size.
|
||||
* h4 and h5 have a size…
|
||||
* h6 has the minimum size which is 80% of the main text size.
|
||||
*
|
||||
* @return array All heading sizes.
|
||||
* array( 'h1' => 150, 'h2' => 120… )
|
||||
*/
|
||||
function marianne_header_sizes() {
|
||||
// The number represents the percentage ofthe main body size.
|
||||
$h1 = 150; // Also the site title.
|
||||
$h3 = 100; // Also the site description.
|
||||
$h6 = 80;
|
||||
|
||||
// h2 is between h1 & h3.
|
||||
$h2 = $h3 + ( $h1 - $h3 ) / 2; // Also the post & page title.
|
||||
|
||||
// h4 and h5 are equaly between h3 and h6.
|
||||
$h4 = $h6 + ( ( $h3 - $h6 ) / 3 * 2 );
|
||||
$h5 = $h6 + ( ( $h3 - $h6 ) / 3 );
|
||||
|
||||
$headers = array(
|
||||
'h1' => $h1,
|
||||
'h2' => $h2,
|
||||
'h3' => $h3,
|
||||
'h4' => $h4,
|
||||
'h5' => $h5,
|
||||
'h6' => $h6,
|
||||
);
|
||||
|
||||
return $headers;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'marianne_percents_to_decimals' ) ) {
|
||||
/**
|
||||
* Converts percents to decimals for css rules.
|
||||
*
|
||||
* @param integer|float $input An integer between 0 and 100 to convert.
|
||||
* @param integer $max_length Max numbers after the decimal point.
|
||||
*
|
||||
* @return float The integer converted in a decimal format.
|
||||
*/
|
||||
function marianne_percents_to_decimals( $input, $max_length = 2 ) {
|
||||
if ( ! is_numeric( $input ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$output = 0;
|
||||
|
||||
if ( is_numeric( $input ) ) {
|
||||
$output = $input / 100;
|
||||
$output = number_format( $output, absint( $max_length ) );
|
||||
$output = rtrim( $output, '0' );
|
||||
}
|
||||
|
||||
$output = floatval( $output );
|
||||
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'marianne_css_number_format' ) ) {
|
||||
/**
|
||||
* Converts decimals to a nice css format.
|
||||
*
|
||||
* @param integer|float $input A number to convert.
|
||||
*
|
||||
* @return string The number with a css style applied.
|
||||
*/
|
||||
function marianne_css_number_format( $input ) {
|
||||
if ( ! is_numeric( $input ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$output = rtrim( $input, '0' );
|
||||
$output = rtrim( $output, '.' );
|
||||
|
||||
if ( 0 < floatval( $output ) && '0.' === substr( $output, 0, 2 ) ) {
|
||||
$output = substr( $output, 1 );
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'marianne_array_to_css' ) ) {
|
||||
/**
|
||||
* Generates a CSS string from a multidimensional array of CSS rules.
|
||||
*
|
||||
* @source http://matthewgrasmick.com/article/convert-nested-php-array-css-string
|
||||
* Based on the work of Matthew Grasmick.
|
||||
*
|
||||
* @param array $rules An array of CSS rules in the following format:
|
||||
* array( 'selector' => array( 'property' => 'value' ) ).
|
||||
* @link http://matthewgrasmick.com/article/convert-nested-php-array-css-string
|
||||
*
|
||||
* @param array $rules An array of CSS rules in the following format:
|
||||
* array( 'selector' => array( 'property' => 'value' ) ).
|
||||
* @param string $rule_type Add an at-rule (optional)
|
||||
* default: 'standard'. Also supports other at-rules.
|
||||
* Example: $rule_type = '@font-face'.
|
||||
|
@ -161,14 +74,14 @@ if ( ! function_exists( 'marianne_array_to_css' ) ) {
|
|||
|
||||
if ( ! function_exists( 'marianne_color_palette' ) ) {
|
||||
/**
|
||||
* An array of colors used in the theme
|
||||
* to be reused.
|
||||
* An array of colors used in the theme and to be reused.
|
||||
*
|
||||
* @param string $name The name of the color to return.
|
||||
* @param string $name The name of the color to return.
|
||||
* @param string $scheme The color scheme associated with the color.
|
||||
*
|
||||
* @return string The hex color.
|
||||
*/
|
||||
function marianne_color_palette( $name ) {
|
||||
function marianne_color_palette( $name, $scheme ) {
|
||||
$colors = array(
|
||||
'blue' => array(
|
||||
'light' => '#0057B7',
|
||||
|
@ -202,30 +115,160 @@ if ( ! function_exists( 'marianne_color_palette' ) ) {
|
|||
|
||||
if ( ! function_exists( 'marianne_custom_css' ) ) {
|
||||
/**
|
||||
* Get the desired styles from Theme Customizer and apply them to the Theme itself.
|
||||
* Inlines custom styles.
|
||||
*
|
||||
* Gets the custom styles from the Theme Customizer
|
||||
* and inlines them in the head element of pages.
|
||||
*/
|
||||
function marianne_custom_css() {
|
||||
// Set variables.
|
||||
$marianne_page_width = marianne_get_theme_mod( 'marianne_global_page_width' );
|
||||
$marianne_font_family = marianne_get_theme_mod( 'marianne_global_font_family' );
|
||||
$marianne_layout = marianne_get_theme_mod( 'marianne_global_layout' );
|
||||
$marianne_sidebar_width = marianne_get_theme_mod( 'marianne_global_sidebar_width' );
|
||||
$marianne_sidebar_margin = marianne_get_theme_mod( 'marianne_global_sidebar_margin' );
|
||||
|
||||
// Global.
|
||||
$font_size = 12 * marianne_get_theme_mod( 'marianne_global_font_size' );
|
||||
$css[':root']['--font-size'] = marianne_percents_to_decimals( $font_size, 0 ) . 'pt';
|
||||
// Set styles.
|
||||
$css[':root']['--font-size'] = ( 12 * absint( marianne_get_theme_mod( 'marianne_global_font_size' ) ) / 100 ) . 'pt';
|
||||
|
||||
$css[':root']['--page-width'] = marianne_get_theme_mod( 'marianne_global_page_width' ) . 'px';
|
||||
$marianne_font = marianne_font();
|
||||
|
||||
$font_family = marianne_get_theme_mod( 'marianne_global_font_family' );
|
||||
if ( isset( $marianne_font['css'] ) ) {
|
||||
$marianne_font_value = $marianne_font['css'];
|
||||
|
||||
if ( 'sans-serif' === $font_family ) {
|
||||
$css['body']['font-family'] = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif';
|
||||
} elseif ( 'serif' === $font_family ) {
|
||||
$css['body']['font-family'] = '"Iowan Old Style", "Apple Garamond", Baskerville, "Times New Roman", "Droid Serif", Times, "Source Serif Pro", serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"';
|
||||
} else {
|
||||
$css['body']['font-family'] = 'Menlo, Consolas, Monaco, "Liberation Mono", "Lucida Console", monospace';
|
||||
$css['body']['font-family'] = $marianne_font_value;
|
||||
}
|
||||
|
||||
// Responsive.
|
||||
// Soon…
|
||||
if ( 'one-column' === $marianne_layout ) {
|
||||
$css['.site']['max-width'] = absint( $marianne_page_width ) . 'px';
|
||||
|
||||
$css['.site-header']['margin-top'] = '4em';
|
||||
$css['.site-header']['margin-bottom'] = '4em';
|
||||
|
||||
$css['.site-content']['margin-top'] = '4em';
|
||||
|
||||
} elseif ( 'two-column-left-sidebar' === $marianne_layout ) {
|
||||
$css['.site']['max-width'] = absint( $marianne_page_width ) . 'px';
|
||||
|
||||
$css['.site-header']['width'] = absint( $marianne_sidebar_width ) . 'px';
|
||||
$css['.site-header']['float'] = 'left';
|
||||
$css['.site-header']['margin-left'] = '-' . absint( $marianne_sidebar_width + $marianne_sidebar_margin ) . 'px';
|
||||
|
||||
$css['#menu-primary > .menu-item']['border-right'] = '0';
|
||||
$css['#menu-primary > .menu-item']['border-left'] = '1px solid var(--color-border)';
|
||||
$css['#menu-primary > .menu-item']['display'] = 'block';
|
||||
$css['#menu-primary > .menu-item']['margin'] = '.5rem 0';
|
||||
$css['#menu-primary > .menu-item']['padding-right'] = '0';
|
||||
$css['#menu-primary > .menu-item']['padding-left'] = '.5rem';
|
||||
|
||||
$css['.site-content']['float'] = 'right';
|
||||
$css['.site-content']['position'] = 'relative';
|
||||
$css['.site-content']['margin-bottom'] = '4em';
|
||||
|
||||
$css['.site-secondary']['width'] = absint( $marianne_sidebar_width ) . 'px';
|
||||
$css['.site-secondary']['float'] = 'left';
|
||||
$css['.site-secondary']['margin-left'] = '-' . absint( $marianne_sidebar_width + $marianne_sidebar_margin ) . 'px';
|
||||
$css['.site-secondary']['clear'] = 'left';
|
||||
|
||||
$css['.site-secondary .separator']['margin'] = '2em 0';
|
||||
}
|
||||
|
||||
$css['.entry-thumbnail-wide .wp-post-image']['width'] = absint( $marianne_page_width ) . 'px';
|
||||
|
||||
$css['.alignwide']['margin-right'] = 'calc(-75vw / 2 + ' . absint( $marianne_page_width ) . 'px / 2)';
|
||||
$css['.alignwide']['margin-left'] = 'calc(-75vw / 2 + ' . absint( $marianne_page_width ) . 'px / 2)';
|
||||
$css['.alignfull']['margin-left'] = 'calc(-100vw / 2 + ' . absint( $marianne_page_width ) . 'px / 2)';
|
||||
$css['.alignfull']['margin-left'] = 'calc(-100vw / 2 + ' . absint( $marianne_page_width ) . 'px / 2)';
|
||||
|
||||
wp_add_inline_style( 'marianne-stylesheet', marianne_array_to_css( $css ) );
|
||||
|
||||
/**
|
||||
* Support responsive design.
|
||||
*/
|
||||
|
||||
// Responsive layout with left sidebar.
|
||||
if ( 'two-column-left-sidebar' === $marianne_layout ) {
|
||||
$marianne_sidebar_width = marianne_get_theme_mod( 'marianne_global_sidebar_width' );
|
||||
$marianne_sidebar_margin = marianne_get_theme_mod( 'marianne_global_sidebar_margin' );
|
||||
|
||||
$media_rule = '@media all and (max-width: ' . absint( $marianne_page_width + ( ( $marianne_sidebar_width + $marianne_sidebar_margin ) * 2 ) + 100 ) . 'px)';
|
||||
|
||||
$media = array();
|
||||
|
||||
$media['.site-header']['width'] = 'auto';
|
||||
$media['.site-header']['float'] = 'none';
|
||||
$media['.site-header']['margin-left'] = '0';
|
||||
$media['.site-header']['margin-top'] = '2em';
|
||||
$media['.site-header']['margin-bottom'] = '4em';
|
||||
|
||||
$media['#menu-primary > .menu-item']['border-right'] = '1px solid var(--color-border)';
|
||||
$media['#menu-primary > .menu-item']['border-left'] = '0';
|
||||
$media['#menu-primary > .menu-item']['display'] = 'inline-block';
|
||||
$media['#menu-primary > .menu-item']['margin-right'] = '.5rem';
|
||||
$media['#menu-primary > .menu-item']['padding-right'] = '.5rem';
|
||||
$media['#menu-primary > .menu-item']['padding-left'] = '0';
|
||||
|
||||
$media['#menu-primary > .menu-item:last-child']['border-right'] = '0';
|
||||
|
||||
$media['.site-content ']['float'] = 'none';
|
||||
|
||||
$media['.site-secondary']['width'] = 'auto';
|
||||
$media['.site-secondary']['float'] = 'none';
|
||||
$media['.site-secondary']['margin-left'] = '0';
|
||||
|
||||
wp_add_inline_style( 'marianne-stylesheet', marianne_array_to_css( $media, $media_rule ) );
|
||||
|
||||
} elseif ( $marianne_page_width > absint( 480 + ( 480 * 0.1 ) ) ) {
|
||||
// Responsive layout without sidebar, for screen width greater than 480px.
|
||||
|
||||
$media_rule = '@media all and (max-width: ' . absint( $marianne_page_width + ( $marianne_page_width * 0.1 ) ) . 'px)';
|
||||
|
||||
$media = array();
|
||||
|
||||
$media['.site']['width'] = '80%';
|
||||
|
||||
wp_add_inline_style( 'marianne-stylesheet', marianne_array_to_css( $media, $media_rule ) );
|
||||
}
|
||||
|
||||
// Responsive layout for small screens.
|
||||
$media_rule = '@media all and (max-width: ' . absint( 480 + ( 480 * 0.1 ) ) . 'px)';
|
||||
|
||||
$media = array();
|
||||
|
||||
$media['.site']['width'] = '90%';
|
||||
|
||||
$media['.site-content']['margin'] = '2em auto';
|
||||
|
||||
$media['.site-header']['margin-bottom'] = '1em';
|
||||
|
||||
$media['.entry-loop.sticky']['margin-right'] = '-.5rem';
|
||||
$media['.entry-loop.sticky']['margin-left'] = '-.5rem';
|
||||
$media['.entry-loop.sticky']['padding'] = '.5rem';
|
||||
|
||||
$media['.entry-loop.sticky figure']['margin-right'] = '-.5rem';
|
||||
$media['.entry-loop.sticky figure']['margin-left'] = '-.5rem';
|
||||
|
||||
$media['.nav-links']['display'] = 'block';
|
||||
$media['.nav-links']['justify-content'] = 'unset';
|
||||
|
||||
$media['.nav-links .nav-link-previous,.nav-links .nav-link-next']['max-width'] = 'unset';
|
||||
|
||||
$media['.nav-links .nav-link-previous']['padding-right'] = '0';
|
||||
|
||||
$media['.nav-links .nav-link-next']['padding-top'] = '.5em';
|
||||
$media['.nav-links .nav-link-next']['padding-left'] = '0';
|
||||
$media['.nav-links .nav-link-next']['text-align'] = 'right';
|
||||
|
||||
$media['.nav-links-one .nav-link-next']['text-align'] = 'right';
|
||||
|
||||
$media['.comment-list .parent .comment']['padding'] = '.5em 0 0 .5em';
|
||||
|
||||
$media['.wp-block-media-text']['display'] = 'block';
|
||||
|
||||
$media['.alignfull']['margin-right'] = '-1em';
|
||||
$media['.alignfull']['margin-left'] = '-1em';
|
||||
|
||||
wp_add_inline_style( 'marianne-stylesheet', marianne_array_to_css( $media, $media_rule ) );
|
||||
}
|
||||
|
||||
add_action( 'wp_enqueue_scripts', 'marianne_custom_css' );
|
||||
|
|
|
@ -33,6 +33,27 @@ if ( ! function_exists( 'marianne_customizer_scripts_styles' ) ) {
|
|||
add_action( 'customize_controls_enqueue_scripts', 'marianne_customizer_scripts_styles' );
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'marianne_head_fonts' ) ) {
|
||||
/**
|
||||
* Adds meta in head for Google Fonts.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since Marianne 1.8
|
||||
*/
|
||||
function marianne_head_fonts() {
|
||||
$marianne_font = marianne_font();
|
||||
if ( $marianne_font['url'] && 'none' !== $marianne_font['url'] ) {
|
||||
?>
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
add_action( 'wp_head', 'marianne_head_fonts', 1 );
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'marianne_customizer_script_live' ) ) {
|
||||
/**
|
||||
* Enqueues Theme Customizer live preview script.
|
||||
|
@ -57,6 +78,150 @@ if ( ! function_exists( 'marianne_customizer_script_live' ) ) {
|
|||
add_action( 'customize_preview_init', 'marianne_customizer_script_live' );
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'marianne_fonts' ) ) {
|
||||
/**
|
||||
* An array of all fonts supported by Marianne.
|
||||
*
|
||||
* @return array Supported fonts.
|
||||
*
|
||||
* @since Marianne 1.8
|
||||
*/
|
||||
function marianne_fonts() {
|
||||
$fonts = array();
|
||||
|
||||
$fonts['sans-serif'] = array(
|
||||
'lato' => array(
|
||||
'name' => _x( 'Lato', 'A font name', 'marianne' ),
|
||||
'css' => '"Lato", sans-serif',
|
||||
'url' => 'https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,400;0,700;0,900;1,100;1,400;1,700;1,900',
|
||||
),
|
||||
'noto-sans' => array(
|
||||
'name' => _x( 'Noto Sans', 'A font name', 'marianne' ),
|
||||
'css' => '"Noto Sans", sans-serif',
|
||||
'url' => 'https://fonts.googleapis.com/css2?family=Noto+Sans:ital,wght@0,400;0,700;1,400;1,700',
|
||||
),
|
||||
'open-sans' => array(
|
||||
'name' => _x( 'Open Sans', 'A font name', 'marianne' ),
|
||||
'css' => '"Open Sans", sans-serif',
|
||||
'url' => 'https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,700;0,800;1,300;1,400;1,700;1,800',
|
||||
),
|
||||
'pt-sans' => array(
|
||||
'name' => _x( 'PT Sans', 'A font name', 'marianne' ),
|
||||
'css' => '"PT Sans", sans-serif',
|
||||
'url' => 'https://fonts.googleapis.com/css2?family=PT+Sans:ital,wght@0,400;0,700;1,400;1,700',
|
||||
),
|
||||
'roboto' => array(
|
||||
'name' => _x( 'Roboto', 'A font name', 'marianne' ),
|
||||
'css' => '"Roboto", sans-serif',
|
||||
'url' => 'https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,400;0,700;0,900;1,100;1,400;1,700;1,900',
|
||||
),
|
||||
'source-sans-pro' => array(
|
||||
'name' => _x( 'Source Sans Pro', 'A font name', 'marianne' ),
|
||||
'css' => '"Source Sans Pro", sans-serif',
|
||||
'url' => 'https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,wght@0,200;0,400;0,700;0,900;1,200;1,400;1,700;1,900',
|
||||
),
|
||||
'system' => array(
|
||||
'name' => _x( 'Sans Serif (system)', 'A font name', 'marianne' ),
|
||||
'css' => '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif',
|
||||
'url' => 'none',
|
||||
),
|
||||
);
|
||||
|
||||
$fonts['serif'] = array(
|
||||
'lora' => array(
|
||||
'name' => _x( 'Lora', 'A font name', 'marianne' ),
|
||||
'css' => '"Lora", serif',
|
||||
'url' => 'https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,700;1,400;1,700',
|
||||
),
|
||||
'merriweather' => array(
|
||||
'name' => _x( 'Merriweather', 'A font name', 'marianne' ),
|
||||
'css' => '"Merriweather", serif',
|
||||
'url' => 'https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700;1,900',
|
||||
),
|
||||
'noto-serif' => array(
|
||||
'name' => _x( 'Noto Serif', 'A font name', 'marianne' ),
|
||||
'css' => '"Noto Serif", serif',
|
||||
'url' => 'https://fonts.googleapis.com/css2?family=Noto+Serif:ital,wght@0,400;0,700;1,400;1,700',
|
||||
),
|
||||
'pt-serif' => array(
|
||||
'name' => _x( 'PT Serif', 'A font name', 'marianne' ),
|
||||
'css' => '"PT Serif", serif',
|
||||
'url' => 'https://fonts.googleapis.com/css2?family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700',
|
||||
),
|
||||
'roboto-slab' => array(
|
||||
'name' => _x( 'Roboto Slab', 'A font name', 'marianne' ),
|
||||
'css' => '"Roboto Slab", serif',
|
||||
'url' => 'https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@100;200;400;700;900',
|
||||
),
|
||||
'source-serif-pro' => array(
|
||||
'name' => _x( 'Source Serif Pro', 'A font name', 'marianne' ),
|
||||
'css' => '"Source Serif Pro", serif',
|
||||
'url' => 'https://fonts.googleapis.com/css2?family=Source+Serif+Pro:ital,wght@0,200;0,400;0,700;0,900;1,200;1,400;1,700;1,900',
|
||||
),
|
||||
'system' => array(
|
||||
'name' => _x( 'Serif (system)', 'A font name', 'marianne' ),
|
||||
'css' => '"Iowan Old Style", "Apple Garamond", Baskerville, "Times New Roman", "Droid Serif", Times, "Source Serif Pro", serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
|
||||
'url' => 'none',
|
||||
),
|
||||
);
|
||||
|
||||
$fonts['monospace'] = array(
|
||||
'pt-mono' => array(
|
||||
'name' => _x( 'PT Mono', 'A font name', 'marianne' ),
|
||||
'css' => '"PT Mono", monospace',
|
||||
'url' => 'https://fonts.googleapis.com/css2?family=PT+Mono',
|
||||
),
|
||||
'roboto-mono' => array(
|
||||
'name' => _x( 'Roboto Mono', 'A font name', 'marianne' ),
|
||||
'css' => '"Roboto Mono", monospace',
|
||||
'url' => 'https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,100;0,400;0,700;1,100;1,400;1,700',
|
||||
),
|
||||
'source-code-pro' => array(
|
||||
'name' => _x( 'Source Code Pro', 'A font name', 'marianne' ),
|
||||
'css' => '"Source Code Pro", monospace',
|
||||
'url' => 'https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,200;0,400;0,700;0,900;1,200;1,400;1,700;1,900',
|
||||
),
|
||||
'system' => array(
|
||||
'name' => _x( 'Monospace (system)', 'A font name', 'marianne' ),
|
||||
'css' => 'Menlo, Consolas, Monaco, "Liberation Mono", "Lucida Console", monospace',
|
||||
'url' => 'none',
|
||||
),
|
||||
);
|
||||
|
||||
return $fonts;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'marianne_font' ) ) {
|
||||
/**
|
||||
* Retrieves font data from fonts supported by Marianne.
|
||||
*
|
||||
* @return array The font data in an array.
|
||||
*
|
||||
* @since Marianne 1.8
|
||||
*/
|
||||
function marianne_font() {
|
||||
$font_family = marianne_get_theme_mod( 'marianne_global_font_family' );
|
||||
|
||||
if ( 'sans-serif' === $font_family ) {
|
||||
$font_name = marianne_get_theme_mod( 'marianne_global_fonts_sans_serif' );
|
||||
} elseif ( 'serif' === $font_family ) {
|
||||
$font_name = marianne_get_theme_mod( 'marianne_global_fonts_serif' );
|
||||
} elseif ( 'monospace' === $font_family ) {
|
||||
$font_name = marianne_get_theme_mod( 'marianne_global_fonts_monospace' );
|
||||
} else {
|
||||
$font_name = '';
|
||||
}
|
||||
|
||||
if ( $font_name ) {
|
||||
$marianne_fonts = marianne_fonts();
|
||||
if ( isset( $marianne_fonts[ $font_family ][ $font_name ] ) ) {
|
||||
return $marianne_fonts[ $font_family ][ $font_name ];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'marianne_customize_register' ) ) {
|
||||
/**
|
||||
* Adds various options to the theme.
|
||||
|
@ -211,19 +376,69 @@ if ( ! function_exists( 'marianne_customize_register' ) ) {
|
|||
'live' => true,
|
||||
);
|
||||
|
||||
// Static Front Page.
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'static_front_page',
|
||||
'id' => 'title',
|
||||
'title' => __( 'Display the title of the front page.', 'marianne' ),
|
||||
'description' => __( 'Default: unchecked.', 'marianne' ),
|
||||
'type' => 'checkbox',
|
||||
);
|
||||
|
||||
// Global.
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_global',
|
||||
'id' => 'layout',
|
||||
'title' => __( 'Layout', 'marianne' ),
|
||||
'description' => __( 'You can choose to display your site in one or two columns, with a left sidebar. The sidebar will show up only if the screen is wide enough. Default: one column.', 'marianne' ),
|
||||
'type' => 'radio',
|
||||
'value' => array(
|
||||
'one-column' => __( 'One column', 'marianne' ),
|
||||
'two-column-left-sidebar' => __( 'Two columns with a left sidebar', 'marianne' ),
|
||||
),
|
||||
'live' => false,
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_global',
|
||||
'id' => 'sidebar_width',
|
||||
'title' => __( 'Sidebar Width', 'marianne' ),
|
||||
'description' => __( 'Default: 250px.', 'marianne' ),
|
||||
'type' => 'marianne_slider',
|
||||
'input_attrs' => array(
|
||||
'min' => 180,
|
||||
'max' => 320,
|
||||
'step' => 10,
|
||||
),
|
||||
'live' => false,
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_global',
|
||||
'id' => 'sidebar_margin',
|
||||
'title' => __( 'Sidebar Margin Width', 'marianne' ),
|
||||
'description' => __( 'Default: 100px.', 'marianne' ),
|
||||
'type' => 'marianne_slider',
|
||||
'input_attrs' => array(
|
||||
'min' => 50,
|
||||
'max' => 200,
|
||||
'step' => 10,
|
||||
),
|
||||
'live' => false,
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_global',
|
||||
'id' => 'page_width',
|
||||
'title' => __( 'Page Width', 'marianne' ),
|
||||
'description' => __( 'If you increase the width of the page, your featured images may become too small. In this case, you should regenerate their thumbnails with a plugins (recommended). Or you can enable the next option. Default: 480px.', 'marianne' ),
|
||||
'type' => 'radio',
|
||||
'value' => array(
|
||||
'480' => __( '480px', 'marianne' ),
|
||||
'600' => __( '600px', 'marianne' ),
|
||||
'720' => __( '720px', 'marianne' ),
|
||||
'type' => 'marianne_slider',
|
||||
'input_attrs' => array(
|
||||
'min' => 480,
|
||||
'max' => 1080,
|
||||
'step' => 10,
|
||||
),
|
||||
'live' => true,
|
||||
'live' => false,
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
|
@ -232,21 +447,66 @@ if ( ! function_exists( 'marianne_customize_register' ) ) {
|
|||
'title' => __( 'Expand featured images that are not wide enough.', 'marianne' ),
|
||||
'description' => __( 'This can make the images a bit blurry. This is less efficient than regenerating the images. Default: unchecked.', 'marianne' ),
|
||||
'type' => 'checkbox',
|
||||
'live' => true,
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_global',
|
||||
'id' => 'font_family',
|
||||
'title' => __( 'Font Family', 'marianne' ),
|
||||
'description' => __( "Choose the font family you want to apply to your site. Your readers' device will render the pages with its own system font. Please note that the rendering may vary from device to device. Default: Sans serif.", 'marianne' ),
|
||||
'type' => 'select',
|
||||
'description' => __( 'Default: Sans serif.', 'marianne' ),
|
||||
'type' => 'radio',
|
||||
'value' => array(
|
||||
'sans-serif' => __( 'Sans serif', 'marianne' ),
|
||||
'serif' => __( 'Serif', 'marianne' ),
|
||||
'monospace' => __( 'Monospaced', 'marianne' ),
|
||||
),
|
||||
'live' => true,
|
||||
);
|
||||
|
||||
$marianne_fonts = marianne_fonts();
|
||||
$marianne_fonts_sans_serif = $marianne_fonts['sans-serif'];
|
||||
$marianne_fonts_serif = $marianne_fonts['serif'];
|
||||
$marianne_fonts_monospace = $marianne_fonts['monospace'];
|
||||
|
||||
$option_value_sans_serif = array();
|
||||
foreach ( $marianne_fonts_sans_serif as $sanitized_name => $font_data ) {
|
||||
$option_value_sans_serif[ $sanitized_name ] = $font_data['name'];
|
||||
}
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_global',
|
||||
'id' => 'fonts_sans_serif',
|
||||
'title' => __( 'Sans Serif Fonts', 'marianne' ),
|
||||
'description' => __( 'System fonts are faster to load, but their rendering may vary from one device to another. Other fonts are retrieved from the Google Fonts service. Default: System.', 'marianne' ),
|
||||
'type' => 'select',
|
||||
'value' => $option_value_sans_serif,
|
||||
);
|
||||
|
||||
$option_value_serif = array();
|
||||
foreach ( $marianne_fonts_serif as $sanitized_name => $font_data ) {
|
||||
$option_value_serif[ $sanitized_name ] = $font_data['name'];
|
||||
}
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_global',
|
||||
'id' => 'fonts_serif',
|
||||
'title' => __( 'Serif Fonts', 'marianne' ),
|
||||
'description' => __( 'System fonts are faster to load, but their rendering may vary from one device to another. Other fonts are retrieved from the Google Fonts service. Default: System.', 'marianne' ),
|
||||
'type' => 'select',
|
||||
'value' => $option_value_serif,
|
||||
);
|
||||
|
||||
$option_value_monospace = array();
|
||||
foreach ( $marianne_fonts_monospace as $sanitized_name => $font_data ) {
|
||||
$option_value_monospace[ $sanitized_name ] = $font_data['name'];
|
||||
}
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_global',
|
||||
'id' => 'fonts_monospace',
|
||||
'title' => __( 'Monospace Fonts', 'marianne' ),
|
||||
'description' => __( 'System fonts are faster to load, but their rendering may vary from one device to another. Other fonts are retrieved from the Google Fonts service. Default: System.', 'marianne' ),
|
||||
'type' => 'select',
|
||||
'value' => $option_value_monospace,
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
|
@ -307,7 +567,7 @@ if ( ! function_exists( 'marianne_customize_register' ) ) {
|
|||
'section' => 'marianne_header',
|
||||
'id' => 'title_weight',
|
||||
'title' => __( 'Font weight of the site title', 'marianne' ),
|
||||
'description' => __( 'Default: bolder.', 'marianne' ),
|
||||
'description' => __( "Some fonts do not support 'bolder'. Default: bolder.", 'marianne' ),
|
||||
'type' => 'select',
|
||||
'value' => array(
|
||||
'normal' => __( 'Normal', 'marianne' ),
|
||||
|
@ -321,7 +581,7 @@ if ( ! function_exists( 'marianne_customize_register' ) ) {
|
|||
'section' => 'marianne_header',
|
||||
'id' => 'desc_weight',
|
||||
'title' => __( 'Font weight of the site description', 'marianne' ),
|
||||
'description' => __( 'Default: normal.', 'marianne' ),
|
||||
'description' => __( "Some fonts do not support 'Thin'. Default: normal.", 'marianne' ),
|
||||
'type' => 'select',
|
||||
'value' => array(
|
||||
'thin' => __( 'Thin', 'marianne' ),
|
||||
|
@ -357,6 +617,7 @@ if ( ! function_exists( 'marianne_customize_register' ) ) {
|
|||
'title' => __( 'Search button text', 'marianne' ),
|
||||
'description' => __( 'You can customize the button text. Leave blank to use the default text (Search).', 'marianne' ),
|
||||
'type' => 'text',
|
||||
'live' => true,
|
||||
);
|
||||
|
||||
// Content Formatting.
|
||||
|
@ -385,6 +646,49 @@ if ( ! function_exists( 'marianne_customize_register' ) ) {
|
|||
);
|
||||
|
||||
// Post List Settings.
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_loop',
|
||||
'id' => 'author_name',
|
||||
'title' => __( "Display the author's name.", 'marianne' ),
|
||||
'description' => __( 'Default: unchecked.', 'marianne' ),
|
||||
'type' => 'checkbox',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_loop',
|
||||
'id' => 'author_name_prefix',
|
||||
'title' => __( "Add a prefix to the author's name.", 'marianne' ),
|
||||
'description' => __( 'By John Doe. Default: unchecked.', 'marianne' ),
|
||||
'type' => 'checkbox',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_loop',
|
||||
'id' => 'author_avatar',
|
||||
'title' => __( "Display the author's avatar.", 'marianne' ),
|
||||
'description' => __( 'Make sure avatars are enabled in Settings > Discussion. Default: unchecked.', 'marianne' ),
|
||||
'type' => 'checkbox',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_loop',
|
||||
'id' => 'post_time',
|
||||
'title' => __( 'Display the post published time after the date.', 'marianne' ),
|
||||
'description' => __( 'Default: unchecked.', 'marianne' ),
|
||||
'type' => 'checkbox',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_loop',
|
||||
'id' => 'content',
|
||||
'title' => __( 'Display of the post content', 'marianne' ),
|
||||
'type' => 'radio',
|
||||
'value' => array(
|
||||
'excerpt' => __( 'The excerpt only (default)', 'marianne' ),
|
||||
'full' => __( 'The full content', 'marianne' ),
|
||||
),
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_loop',
|
||||
'id' => 'comment_link_text',
|
||||
|
@ -394,11 +698,68 @@ if ( ! function_exists( 'marianne_customize_register' ) ) {
|
|||
);
|
||||
|
||||
// Post Settings.
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_post',
|
||||
'id' => 'post_time',
|
||||
'title' => __( 'Display the post published time after the date.', 'marianne' ),
|
||||
'description' => __( 'Default: unchecked.', 'marianne' ),
|
||||
'type' => 'checkbox',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_post',
|
||||
'id' => 'author_position',
|
||||
'title' => __( "Position of the author's identity", 'marianne' ),
|
||||
'value' => array(
|
||||
'none' => __( 'Not displayed (default)', 'marianne' ),
|
||||
'top' => __( 'Post header', 'marianne' ),
|
||||
'bottom' => __( 'Bottom of the post', 'marianne' ),
|
||||
),
|
||||
'type' => 'radio',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_post',
|
||||
'id' => 'author_info',
|
||||
'title' => __( "Author's info to display", 'marianne' ),
|
||||
'description' => __( 'Before displaying avatars, make sure that they are enabled in Settings > Discussion.', 'marianne' ),
|
||||
'value' => array(
|
||||
'name' => __( 'Name', 'marianne' ),
|
||||
'avatar' => __( 'Avatar', 'marianne' ),
|
||||
'name_avatar' => __( 'Name & avatar', 'marianne' ),
|
||||
),
|
||||
'type' => 'radio',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_post',
|
||||
'id' => 'author_avatar',
|
||||
'title' => __( "Display the author's avatar.", 'marianne' ),
|
||||
'description' => __( 'Default: checked.', 'marianne' ),
|
||||
'type' => 'checkbox',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_post',
|
||||
'id' => 'author_name_prefix',
|
||||
'title' => __( "Add a prefix to the author's name.", 'marianne' ),
|
||||
'description' => __( 'Default: unchecked.', 'marianne' ),
|
||||
'type' => 'checkbox',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_post',
|
||||
'id' => 'author_bio',
|
||||
'title' => __( "Display the author's biographical info.", 'marianne' ),
|
||||
'description' => __( 'Only if this info is set on the profile of the author. Default: checked.', 'marianne' ),
|
||||
'type' => 'checkbox',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_post',
|
||||
'id' => 'nav',
|
||||
'title' => __( 'Display a link to the next and the previous post.', 'marianne' ),
|
||||
'description' => __( 'Default: hidden.', 'marianne' ),
|
||||
'description' => __( 'Default: unchecked.', 'marianne' ),
|
||||
'type' => 'checkbox',
|
||||
);
|
||||
|
||||
|
@ -434,6 +795,13 @@ if ( ! function_exists( 'marianne_customize_register' ) ) {
|
|||
'type' => 'checkbox',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_footer',
|
||||
'id' => 'go_top',
|
||||
'title' => __( 'Add a button to go back to the top of the page.', 'marianne' ),
|
||||
'type' => 'checkbox',
|
||||
);
|
||||
|
||||
// Social Links.
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_social',
|
||||
|
@ -476,6 +844,14 @@ if ( ! function_exists( 'marianne_customize_register' ) ) {
|
|||
'type' => 'text',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_social',
|
||||
'id' => 'mastodon',
|
||||
'title' => __( 'Mastodon', 'marianne' ),
|
||||
'description' => __( 'Your Mastodon profile URL.', 'marianne' ),
|
||||
'type' => 'text',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_social',
|
||||
'id' => 'facebook',
|
||||
|
@ -484,6 +860,22 @@ if ( ! function_exists( 'marianne_customize_register' ) ) {
|
|||
'type' => 'url',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_social',
|
||||
'id' => 'diaspora',
|
||||
'title' => __( 'Diaspora', 'marianne' ),
|
||||
'description' => __( 'Your Diaspora profile URL.', 'marianne' ),
|
||||
'type' => 'url',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_social',
|
||||
'id' => 'vk',
|
||||
'title' => __( 'VK', 'marianne' ),
|
||||
'description' => __( 'Your VK profile URL.', 'marianne' ),
|
||||
'type' => 'url',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_social',
|
||||
'id' => 'instagram',
|
||||
|
@ -492,6 +884,22 @@ if ( ! function_exists( 'marianne_customize_register' ) ) {
|
|||
'type' => 'url',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_social',
|
||||
'id' => 'flickr',
|
||||
'title' => __( 'Flickr', 'marianne' ),
|
||||
'description' => __( 'Your Flickr page URL.', 'marianne' ),
|
||||
'type' => 'url',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_social',
|
||||
'id' => '500px',
|
||||
'title' => _x( '500px', 'The name of the photography site.', 'marianne' ),
|
||||
'description' => __( 'Your 500px page URL.', 'marianne' ),
|
||||
'type' => 'url',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_social',
|
||||
'id' => 'youtube',
|
||||
|
@ -500,6 +908,46 @@ if ( ! function_exists( 'marianne_customize_register' ) ) {
|
|||
'type' => 'url',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_social',
|
||||
'id' => 'vimeo',
|
||||
'title' => __( 'Vimeo', 'marianne' ),
|
||||
'description' => __( 'Your Vimeo page URL.', 'marianne' ),
|
||||
'type' => 'url',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_social',
|
||||
'id' => 'tiktok',
|
||||
'title' => __( 'TikTok', 'marianne' ),
|
||||
'description' => __( 'Your TikTok account URL.', 'marianne' ),
|
||||
'type' => 'url',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_social',
|
||||
'id' => 'apple_podcasts',
|
||||
'title' => __( 'Apple Podcasts', 'marianne' ),
|
||||
'description' => __( 'An Apple Podcast URL.', 'marianne' ),
|
||||
'type' => 'url',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_social',
|
||||
'id' => 'spotify',
|
||||
'title' => __( 'Spotify', 'marianne' ),
|
||||
'description' => __( 'The URL of the Spotify page you want to share.', 'marianne' ),
|
||||
'type' => 'url',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_social',
|
||||
'id' => 'soundcloud',
|
||||
'title' => __( 'SoundCloud', 'marianne' ),
|
||||
'description' => __( 'Your SoundCloud profile URL.', 'marianne' ),
|
||||
'type' => 'url',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_social',
|
||||
'id' => 'linkedin',
|
||||
|
@ -508,6 +956,14 @@ if ( ! function_exists( 'marianne_customize_register' ) ) {
|
|||
'type' => 'url',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_social',
|
||||
'id' => 'medium',
|
||||
'title' => __( 'Medium', 'marianne' ),
|
||||
'description' => __( 'Your Medium profile URL.', 'marianne' ),
|
||||
'type' => 'url',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_social',
|
||||
'id' => 'github',
|
||||
|
@ -532,6 +988,14 @@ if ( ! function_exists( 'marianne_customize_register' ) ) {
|
|||
'type' => 'url',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_social',
|
||||
'id' => 'reddit',
|
||||
'title' => __( 'Reddit', 'marianne' ),
|
||||
'description' => __( 'Your Reddit profile URL.', 'marianne' ),
|
||||
'type' => 'url',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_social',
|
||||
'id' => 'email',
|
||||
|
@ -540,11 +1004,35 @@ if ( ! function_exists( 'marianne_customize_register' ) ) {
|
|||
'type' => 'email',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_social',
|
||||
'id' => 'signal',
|
||||
'title' => __( 'Signal', 'marianne' ),
|
||||
'description' => __( 'The phone number (without spaces, country code required) you registered to use Signal. Only works with the latest versions of Signal.', 'marianne' ),
|
||||
'type' => 'text',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_social',
|
||||
'id' => 'telegram',
|
||||
'title' => __( 'Telegram', 'marianne' ),
|
||||
'description' => __( 'Your Telegram username.', 'marianne' ),
|
||||
'type' => 'text',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_social',
|
||||
'id' => 'whatsapp',
|
||||
'title' => __( 'WhatsApp', 'marianne' ),
|
||||
'description' => __( 'The phone number (without spaces, country code required) you registered to use WhatsApp.', 'marianne' ),
|
||||
'type' => 'text',
|
||||
);
|
||||
|
||||
$marianne_customizer_options[] = array(
|
||||
'section' => 'marianne_social',
|
||||
'id' => 'phone',
|
||||
'title' => __( 'Phone', 'marianne' ),
|
||||
'description' => __( 'Your phone number (without spaces).', 'marianne' ),
|
||||
'description' => __( 'Your phone number (without spaces, country code required).', 'marianne' ),
|
||||
'type' => 'text',
|
||||
);
|
||||
|
||||
|
@ -555,9 +1043,8 @@ if ( ! function_exists( 'marianne_customize_register' ) ) {
|
|||
'description' => __( "This will automatically open the right application on your readers' phone when they will click on it.", 'marianne' ),
|
||||
'type' => 'select',
|
||||
'value' => array(
|
||||
'classic' => __( 'Classic', 'marianne' ),
|
||||
'sms' => __( 'SMS', 'marianne' ),
|
||||
'whatsapp' => __( 'WhatsApp', 'marianne' ),
|
||||
'call' => __( 'Call', 'marianne' ),
|
||||
'sms' => __( 'SMS', 'marianne' ),
|
||||
),
|
||||
);
|
||||
|
||||
|
@ -655,7 +1142,7 @@ if ( ! function_exists( 'marianne_customize_register' ) ) {
|
|||
$option_default = $options_default[ $option_name ];
|
||||
|
||||
// Calls the right sanitization function depending on the type of the option.
|
||||
if ( 'marianne_social_twitter' !== $option_name && 'marianne_social_email' !== $option_name && 'marianne_social_phone' !== $option_name ) {
|
||||
if ( 'marianne_social_twitter' !== $option_name && 'marianne_social_email' !== $option_name && 'marianne_social_phone' !== $option_name && 'marianne_social_signal' !== $option_name && 'marianne_social_telegram' !== $option_name && 'marianne_social_whatsapp' !== $option_name ) {
|
||||
switch ( $type ) {
|
||||
case 'radio':
|
||||
case 'select':
|
||||
|
@ -690,9 +1177,10 @@ if ( ! function_exists( 'marianne_customize_register' ) ) {
|
|||
$sanitize_callback = 'marianne_sanitize_twitter';
|
||||
} elseif ( 'marianne_social_email' === $option_name ) {
|
||||
$sanitize_callback = 'sanitize_email';
|
||||
} elseif ( 'marianne_social_phone' === $option_name ) {
|
||||
} elseif ( 'marianne_social_signal' === $option_name || 'marianne_social_whatsapp' === $option_name || 'marianne_social_phone' === $option_name ) {
|
||||
$sanitize_callback = 'marianne_sanitize_phone';
|
||||
|
||||
} elseif ( 'marianne_social_telegram' === $option_name ) {
|
||||
$sanitize_callback = 'marianne_sanitize_telegram';
|
||||
}
|
||||
|
||||
// Creates the setting.
|
||||
|
@ -770,13 +1258,22 @@ if ( ! function_exists( 'marianne_options_default' ) ) {
|
|||
'colors_scheme' => 'light',
|
||||
'colors_link_hover' => 'blue',
|
||||
|
||||
// Static Front Page.
|
||||
'static_front_page_title' => false,
|
||||
|
||||
// Global.
|
||||
'marianne_global_page_width' => '480',
|
||||
'marianne_global_images_expand' => false,
|
||||
'marianne_global_font_family' => 'sans-serif',
|
||||
'marianne_global_font_size' => 100,
|
||||
'marianne_global_font_smooth' => false,
|
||||
'marianne_global_text_shadow' => false,
|
||||
'marianne_global_layout' => 'one-column',
|
||||
'marianne_global_sidebar_width' => 250,
|
||||
'marianne_global_sidebar_margin' => 100,
|
||||
'marianne_global_page_width' => 480,
|
||||
'marianne_global_images_expand' => false,
|
||||
'marianne_global_font_family' => 'sans-serif',
|
||||
'marianne_global_fonts_sans_serif' => 'system',
|
||||
'marianne_global_fonts_serif' => 'system',
|
||||
'marianne_global_fonts_monospace' => 'system',
|
||||
'marianne_global_font_size' => 100,
|
||||
'marianne_global_font_smooth' => false,
|
||||
'marianne_global_text_shadow' => false,
|
||||
|
||||
// Header Settings.
|
||||
'marianne_header_align' => 'left',
|
||||
|
@ -792,33 +1289,60 @@ if ( ! function_exists( 'marianne_options_default' ) ) {
|
|||
'marianne_content_hyphens' => false,
|
||||
|
||||
// Post List Settings.
|
||||
'marianne_loop_comment_link_text' => '',
|
||||
'marianne_loop_author_name' => false,
|
||||
'marianne_loop_author_name_prefix' => false,
|
||||
'marianne_loop_author_avatar' => false,
|
||||
'marianne_loop_post_time' => false,
|
||||
'marianne_loop_content' => 'excerpt',
|
||||
'marianne_loop_comment_link_text' => '',
|
||||
|
||||
// Post Settings.
|
||||
'marianne_post_nav' => false,
|
||||
'marianne_post_post_time' => false,
|
||||
'marianne_post_author_position' => 'none',
|
||||
'marianne_post_author_info' => 'name',
|
||||
'marianne_post_author_avatar' => true,
|
||||
'marianne_post_author_name_prefix' => false,
|
||||
'marianne_post_author_bio' => true,
|
||||
'marianne_post_nav' => false,
|
||||
|
||||
// Footer Settings.
|
||||
'marianne_footer_align' => 'left',
|
||||
'marianne_footer_mention' => true,
|
||||
'marianne_footer_text' => '',
|
||||
'marianne_footer_go_top' => false,
|
||||
|
||||
// Social Links.
|
||||
'marianne_social_location' => 'footer',
|
||||
'marianne_social_style' => 'square',
|
||||
'marianne_social_target_blank' => false,
|
||||
'marianne_social_twitter' => '',
|
||||
'marianne_social_facebook' => '',
|
||||
'marianne_social_instagram' => '',
|
||||
'marianne_social_linkedin' => '',
|
||||
'marianne_social_youtube' => '',
|
||||
'marianne_social_email' => '',
|
||||
'marianne_social_github' => '',
|
||||
'marianne_social_gitlab' => '',
|
||||
'marianne_social_link' => '',
|
||||
'marianne_social_phone' => '',
|
||||
'marianne_social_phone_type' => 'classic',
|
||||
'marianne_social_rss' => false,
|
||||
'marianne_social_twitch' => '',
|
||||
'marianne_social_location' => 'footer',
|
||||
'marianne_social_style' => 'square',
|
||||
'marianne_social_target_blank' => false,
|
||||
'marianne_social_twitter' => '',
|
||||
'marianne_social_mastodon' => '',
|
||||
'marianne_social_facebook' => '',
|
||||
'marianne_social_diaspora' => '',
|
||||
'marianne_social_instagram' => '',
|
||||
'marianne_social_linkedin' => '',
|
||||
'marianne_social_medium' => '',
|
||||
'marianne_social_500px' => '',
|
||||
'marianne_social_flickr' => '',
|
||||
'marianne_social_youtube' => '',
|
||||
'marianne_social_vimeo' => '',
|
||||
'marianne_social_tiktok' => '',
|
||||
'marianne_social_spotify' => '',
|
||||
'marianne_social_apple_podcasts' => '',
|
||||
'marianne_social_soundcloud' => '',
|
||||
'marianne_social_email' => '',
|
||||
'marianne_social_github' => '',
|
||||
'marianne_social_gitlab' => '',
|
||||
'marianne_social_link' => '',
|
||||
'marianne_social_signal' => '',
|
||||
'marianne_social_telegram' => '',
|
||||
'marianne_social_whatsapp' => '',
|
||||
'marianne_social_phone' => '',
|
||||
'marianne_social_phone_type' => 'call',
|
||||
'marianne_social_rss' => false,
|
||||
'marianne_social_twitch' => '',
|
||||
'marianne_social_reddit' => '',
|
||||
'marianne_social_vk' => '',
|
||||
|
||||
// Print Settings.
|
||||
'marianne_print_comments_hide' => true,
|
||||
|
@ -1000,8 +1524,31 @@ if ( ! function_exists( 'marianne_sanitize_phone' ) ) {
|
|||
function marianne_sanitize_phone( $input ) {
|
||||
$output = '';
|
||||
|
||||
if ( preg_match( '/\+?[0-9]+/', $input ) ) {
|
||||
$output = $input;
|
||||
if ( preg_match( '/\+[0-9]+/', $input, $match ) ) {
|
||||
$output = $match[0];
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'marianne_sanitize_telegram' ) ) {
|
||||
/**
|
||||
* Telegram username sanitization.
|
||||
*
|
||||
* @param string $input The desired username.
|
||||
*
|
||||
* @return string The username, if it matches the regular expression.
|
||||
*
|
||||
* @since Marianne 1.6.1
|
||||
*/
|
||||
function marianne_sanitize_telegram( $input ) {
|
||||
$output = '';
|
||||
|
||||
if ( $input ) {
|
||||
if ( preg_match( '/^[A-Za-z0-9_]{5,50}$/', $input ) ) {
|
||||
$output = $input;
|
||||
}
|
||||
}
|
||||
|
||||
return $output;
|
||||
|
|
|
@ -64,7 +64,7 @@ function marianne_theme_page() {
|
|||
$gh_link_translate = 'https://github.com/te2dy/marianne/tree/main/languages';
|
||||
$bitcoin_address = '1BTUsDokaDRsqn4dsyAY6bc2rCLes4Vssb';
|
||||
$bitcoin_href = 'bitcoin:' . $bitcoin_address;
|
||||
$btc_qr = ' data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAAEiCAYAAABdvt+2AAAACXBIWXMAAAsTAAALEwEAmpwYAAAGEUlEQVR4nO3dQZLaQBAAQXD4/1/GL7DHjvGoWiLzviABWzGHjtb78/l8XgChH/UFAAgRkBMiICdEQE6IgJwQATkhAnJCBOSECMgJEZATIiAnREBOiICcEAE5IQJyQgTkhAjICRGQEyIgJ0RAToiAnBABOSECckIE5IQIyAkRkPt55Zu93+8r3+5y9dO7dz/f3euvv9/Tn399f6eVv18nIiAnREBOiICcEAE5IQJyQgTkhAjIXTpHtFLP4aycniO5+xzQ6v3N4bQmf/5OREBOiICcEAE5IQJyQgTkhAjICRGQGzVHtHJ6DqKeA5m+T2d3Tqi+v/r7ffrvd4cTEZATIiAnREBOiICcEAE5IQJyQgTkbjVHdHfT51x237/eRzR9zonfcyICckIE5IQIyAkRkBMiICdEQE6IgJw5okFOz7nU+4BW6uey0XEiAnJCBOSECMgJEZATIiAnREBOiIDcreaI7r4v5ulzPLuvP/36d02/vpITEZATIiAnREBOiICcEAE5IQJyQgTkRs0RPX2fzO6+odN/v/Lt17/7+vyeExGQEyIgJ0RAToiAnBABOSECckIE5C6dI/r2fSz1PqL6/U87/f7f/vs9yYkIyAkRkBMiICdEQE6IgJwQATkhAnKXzhFNf25VPYdS7+tZqT//u+8Lmv77LzkRATkhAnJCBOSECMgJEZATIiAnREDu/blwOKGe41iZPqdSX9/p96/vb6We4zqtnFNyIgJyQgTkhAjICRGQEyIgJ0RAToiA3Kjnmp3ex1PPqdRzOLuf3+n7n/76u+rf72ROREBOiICcEAE5IQJyQgTkhAjICRGQu3Qf0bebPoe0+/71HNfdX3/lyf+qTkRAToiAnBABOSECckIE5IQIyAkRkLt0H9FK/VyqlXqfzcrTr+/0HM3pOal6DmjyviMnIiAnREBOiICcEAE5IQJyQgTkhAjIXTpHNHmO4W9M33cz/fNb8dy72b+vk5yIgJwQATkhAnJCBOSECMgJEZATIiBnH9E/mD6HsqueM6nvf1f9/dff3w4nIiAnREBOiICcEAE5IQJyQgTkhAjIjZojWnn6nMbuPp3d1689/fruPid1khMRkBMiICdEQE6IgJwQATkhAnJCBOQunSOq50R253ROz/GYMzmrfm7ayvR9WSc5EQE5IQJyQgTkhAjICRGQEyIgJ0RA7v25cLjg7s8FO/1RmVPa8/T7nzwHtMuJCMgJEZATIiAnREBOiICcEAE5IQJyo55rVu9zWZm+r6beR3P686nvv55Dmv757HAiAnJCBOSECMgJEZATIiAnREBOiIDcqDmi088d252TOD1nUc/ZrNz9/nfV+46mfz47nIiAnBABOSECckIE5IQIyAkRkBMiIDdqjmjXt8/h7Dp9//U+pumefn9/4kQE5IQIyAkRkBMiICdEQE6IgJwQAbn3Z/pwy4PcfQ6pvv5638+ueo6q/v38iRMRkBMiICdEQE6IgJwQATkhAnJCBOQu3Uf05H0qr9f556bVczTTr+/0+9dzOk/+/3EiAnJCBOSECMgJEZATIiAnREBOiIDcqOeaTd6X8nrNn1M5Pedy+rlm07//+vpOf3/l/TkRATkhAnJCBOSECMgJEZATIiAnREBu1BzRSr3v5vTrr+5v+pzQSj2Hs3L3fT93vn4nIiAnREBOiICcEAE5IQJyQgTkhAjI3WqO6Onu/lysel/SafU+oNN/X3IiAnJCBOSECMgJEZATIiAnREBOiICcOaIb2Z0jOT1nUs+5nJ7zqZ9rt/v3k+e0nIiAnBABOSECckIE5IQIyAkRkBMiIHerOaLJcxB/o94HU+8jOv33d56j+R/uvA/KiQjICRGQEyIgJ0RAToiAnBABOSECcqPmiOo5m+lOz3nszqE8/fur55zqfU0nOREBOSECckIE5IQIyAkRkBMiICdEQO79mTxcAHwFJyIgJ0RAToiAnBABOSECckIE5IQIyAkRkBMiICdEQE6IgJwQATkhAnJCBOSECMgJEZATIiAnREBOiICcEAE5IQJyQgTkhAjICRGQEyIgJ0RAToiAnBABOSECckIE5H4BBWAhU9cs+JgAAAAASUVORK5CYII=';
|
||||
$btc_qr = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASIAAAEiCAYAAABdvt+2AAAACXBIWXMAAAsTAAALEwEAmpwYAAAGEUlEQVR4nO3dQZLaQBAAQXD4/1/GL7DHjvGoWiLzviABWzGHjtb78/l8XgChH/UFAAgRkBMiICdEQE6IgJwQATkhAnJCBOSECMgJEZATIiAnREBOiICcEAE5IQJyQgTkhAjICRGQEyIgJ0RAToiAnBABOSECckIE5IQIyAkRkPt55Zu93+8r3+5y9dO7dz/f3euvv9/Tn399f6eVv18nIiAnREBOiICcEAE5IQJyQgTkhAjIXTpHtFLP4aycniO5+xzQ6v3N4bQmf/5OREBOiICcEAE5IQJyQgTkhAjICRGQGzVHtHJ6DqKeA5m+T2d3Tqi+v/r7ffrvd4cTEZATIiAnREBOiICcEAE5IQJyQgTkbjVHdHfT51x237/eRzR9zonfcyICckIE5IQIyAkRkBMiICdEQE6IgJw5okFOz7nU+4BW6uey0XEiAnJCBOSECMgJEZATIiAnREBOiIDcreaI7r4v5ulzPLuvP/36d02/vpITEZATIiAnREBOiICcEAE5IQJyQgTkRs0RPX2fzO6+odN/v/Lt17/7+vyeExGQEyIgJ0RAToiAnBABOSECckIE5C6dI/r2fSz1PqL6/U87/f7f/vs9yYkIyAkRkBMiICdEQE6IgJwQATkhAnKXzhFNf25VPYdS7+tZqT//u+8Lmv77LzkRATkhAnJCBOSECMgJEZATIiAnREDu/blwOKGe41iZPqdSX9/p96/vb6We4zqtnFNyIgJyQgTkhAjICRGQEyIgJ0RAToiA3Kjnmp3ex1PPqdRzOLuf3+n7n/76u+rf72ROREBOiICcEAE5IQJyQgTkhAjICRGQu3Qf0bebPoe0+/71HNfdX3/lyf+qTkRAToiAnBABOSECckIE5IQIyAkRkLt0H9FK/VyqlXqfzcrTr+/0HM3pOal6DmjyviMnIiAnREBOiICcEAE5IQJyQgTkhAjIXTpHNHmO4W9M33cz/fNb8dy72b+vk5yIgJwQATkhAnJCBOSECMgJEZATIiBnH9E/mD6HsqueM6nvf1f9/dff3w4nIiAnREBOiICcEAE5IQJyQgTkhAjIjZojWnn6nMbuPp3d1689/fruPid1khMRkBMiICdEQE6IgJwQATkhAnJCBOQunSOq50R253ROz/GYMzmrfm7ayvR9WSc5EQE5IQJyQgTkhAjICRGQEyIgJ0RA7v25cLjg7s8FO/1RmVPa8/T7nzwHtMuJCMgJEZATIiAnREBOiICcEAE5IQJyo55rVu9zWZm+r6beR3P686nvv55Dmv757HAiAnJCBOSECMgJEZATIiAnREBOiIDcqDmi088d252TOD1nUc/ZrNz9/nfV+46mfz47nIiAnBABOSECckIE5IQIyAkRkBMiIDdqjmjXt8/h7Dp9//U+pumefn9/4kQE5IQIyAkRkBMiICdEQE6IgJwQAbn3Z/pwy4PcfQ6pvv5638+ueo6q/v38iRMRkBMiICdEQE6IgJwQATkhAnJCBOQu3Uf05H0qr9f556bVczTTr+/0+9dzOk/+/3EiAnJCBOSECMgJEZATIiAnREBOiIDcqOeaTd6X8nrNn1M5Pedy+rlm07//+vpOf3/l/TkRATkhAnJCBOSECMgJEZATIiAnREBu1BzRSr3v5vTrr+5v+pzQSj2Hs3L3fT93vn4nIiAnREBOiICcEAE5IQJyQgTkhAjI3WqO6Onu/lysel/SafU+oNN/X3IiAnJCBOSECMgJEZATIiAnREBOiICcOaIb2Z0jOT1nUs+5nJ7zqZ9rt/v3k+e0nIiAnBABOSECckIE5IQIyAkRkBMiIHerOaLJcxB/o94HU+8jOv33d56j+R/uvA/KiQjICRGQEyIgJ0RAToiAnBABOSECcqPmiOo5m+lOz3nszqE8/fur55zqfU0nOREBOSECckIE5IQIyAkRkBMiICdEQO79mTxcAHwFJyIgJ0RAToiAnBABOSECckIE5IQIyAkRkBMiICdEQE6IgJwQATkhAnJCBOSECMgJEZATIiAnREBOiICcEAE5IQJyQgTkhAjICRGQEyIgJ0RAToiAnBABOSECckIE5H4BBWAhU9cs+JgAAAAASUVORK5CYII=';
|
||||
|
||||
/**
|
||||
* Allows some html elements in paragraphs.
|
||||
|
@ -87,27 +87,25 @@ function marianne_theme_page() {
|
|||
</h1>
|
||||
|
||||
<p>
|
||||
<blockquote>
|
||||
<?php esc_html_e( "Thank you for using Marianne, a minimalist theme like they don't make anymore.", 'marianne' ); ?>
|
||||
|
||||
<br>
|
||||
|
||||
<cite>
|
||||
<?php
|
||||
printf(
|
||||
wp_kses(
|
||||
/* translators: %1$s: The name of theme author. %2$s: Bitcoin address. */
|
||||
__( '— %1$s, the author of Marianne', 'marianne' ),
|
||||
$kses_allowed_html
|
||||
),
|
||||
'<a href="https://chezteddy.fr/" rel="external" target="_blank">' . esc_html__( 'Teddy', 'marianne' ) . '</a>'
|
||||
);
|
||||
?>
|
||||
</cite>
|
||||
</blockquote>
|
||||
</p>
|
||||
<blockquote>
|
||||
<?php esc_html_e( "Thank you for using Marianne, a minimalist theme like they don't make anymore.", 'marianne' ); ?>
|
||||
|
||||
<br>
|
||||
|
||||
<cite>
|
||||
<?php
|
||||
printf(
|
||||
wp_kses(
|
||||
/* translators: %1$s: The name of theme author. %2$s: Bitcoin address. */
|
||||
__( '— %1$s, the author of Marianne', 'marianne' ),
|
||||
$kses_allowed_html
|
||||
),
|
||||
'<a href="https://chezteddy.fr/" rel="external" target="_blank">' . esc_html__( 'Teddy', 'marianne' ) . '</a>'
|
||||
);
|
||||
?>
|
||||
</cite>
|
||||
</blockquote>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>
|
||||
|
@ -263,7 +261,7 @@ function marianne_theme_page() {
|
|||
printf(
|
||||
wp_kses(
|
||||
/* translators: %s: The URL of the support forum of the theme on WordPress.org */
|
||||
__( 'Please visit the <a href="%s" rel="external" target="_blank">support forum</a> and post them.', 'marianne' ),
|
||||
__( 'Please visit the <a href="%s" target="_blank">support forum</a> and post them.', 'marianne' ),
|
||||
$kses_allowed_html
|
||||
),
|
||||
esc_url( $support_wp_link )
|
||||
|
@ -282,7 +280,7 @@ function marianne_theme_page() {
|
|||
printf(
|
||||
wp_kses(
|
||||
/* translators: %1$s: The URL of the GitHub Issues page of the Marianne repository. %2$s: The URL of the support forum of the theme on WordPress.org */
|
||||
__( 'Please report issues or make feature requests on <a href="%1$s" target="_blank">GitHub</a> or, if you do not have an account, on the <a href="%2$s" target="_blank">support forum</a>.', 'marianne' ),
|
||||
__( 'Please report issues or make feature requests on <a href="%1$s" rel="external" target="_blank">GitHub</a> or, if you do not have an account, on the <a href="%2$s" target="_blank">support forum</a>.', 'marianne' ),
|
||||
$kses_allowed_html
|
||||
),
|
||||
esc_url( $gh_link_issues ),
|
||||
|
@ -335,37 +333,28 @@ function marianne_theme_page() {
|
|||
<h2 class="marianne-admin-header"><?php echo esc_html__( 'Acknowledgements', 'marianne' ); ?></h2>
|
||||
|
||||
<p>
|
||||
<?php esc_html_e( 'Thanks to:', 'marianne' ); ?>
|
||||
<?php esc_html_e( 'I would like to thank the following people for their contribution:', 'marianne' ); ?>
|
||||
</p>
|
||||
|
||||
<?php
|
||||
$contributors = array(
|
||||
array(
|
||||
'name' => 'Peter',
|
||||
'url' => 'https://www.peterpellenaars.nl/',
|
||||
'text' => '%s for its Dutch translation and its great help in reporting bugs.',
|
||||
)
|
||||
);
|
||||
?>
|
||||
<ul class="marianne-admin-list">
|
||||
<li>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
__( '<a href="https://www.knotenpunkte.net/" rel="external" target="_blank">Dr. Matthias Kampmann</a>, whose suggestions allowed me to improve some customization features of the theme.', 'marianne' ),
|
||||
$kses_allowed_html
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
|
||||
<?php if ( $contributors ) : ?>
|
||||
<ul class="marianne-admin-list">
|
||||
<?php foreach ( $contributors as $contributor ) : ?>
|
||||
<li>
|
||||
<?php
|
||||
printf(
|
||||
wp_kses(
|
||||
/* translators: %s: The name of the contributor. */
|
||||
__( $contributor['text'], 'marianne' ),
|
||||
$kses_allowed_html
|
||||
),
|
||||
'<a href="' . esc_url( $contributor['url'] ) . '" rel="external" target="_blank">' . esc_html( $contributor['name'] ) . '</a>'
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<li>
|
||||
<?php
|
||||
echo wp_kses(
|
||||
__( '<a href="https://www.peterpellenaars.nl/" rel="external" target="_blank">Peter Pellenaars</a>, who has been a great help in reporting bugs, improving the text strings, and for its translation into Dutch.', 'marianne' ),
|
||||
$kses_allowed_html
|
||||
);
|
||||
?>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<footer class="marianne-admin-footer">
|
||||
|
|
|
@ -156,7 +156,13 @@ if ( ! function_exists( 'marianne_menu_primary' ) ) {
|
|||
?>
|
||||
<div id="menu-primary-container" aria-label="<?php echo esc_attr__( 'Open the search form', 'marianne' ); ?>">
|
||||
<button id="header-search-button" class="button-inline button-expand" aria-haspopup="true" aria-expanded="false">
|
||||
<?php echo esc_html_x( 'Search', 'The search button in the header.', 'marianne' ); ?>
|
||||
<?php
|
||||
if ( ! marianne_get_theme_mod( 'marianne_header_menu_search_text' ) ) {
|
||||
echo esc_html_x( 'Search', 'The search button in the header.', 'marianne' );
|
||||
} else {
|
||||
echo esc_html( marianne_get_theme_mod( 'marianne_header_menu_search_text' ) );
|
||||
}
|
||||
?>
|
||||
|
||||
<span class="screen-reader-text">
|
||||
<?php esc_html_e( 'Open the search form', 'marianne' ); ?>
|
||||
|
@ -201,15 +207,207 @@ if ( ! function_exists( 'marianne_the_date' ) ) {
|
|||
* separate them with a space.
|
||||
* Example: $class = "class-1 class-2".
|
||||
*
|
||||
* @param string $args Items to display.
|
||||
* - 'date' adds the published date.
|
||||
* - 'time' adds the published time after the date.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function marianne_the_date( $class = 'entry-date' ) {
|
||||
function marianne_the_date( $class = 'entry-date', $args = array() ) {
|
||||
if ( isset( $args['date'] ) && false === $args['date'] ) {
|
||||
$args['date'] = false;
|
||||
} else {
|
||||
$args['date'] = true;
|
||||
}
|
||||
|
||||
if ( isset( $args['time'] ) && true === $args['time'] ) {
|
||||
$args['time'] = true;
|
||||
} else {
|
||||
$args['time'] = false;
|
||||
}
|
||||
?>
|
||||
<time<?php marianne_add_class( $class ); ?> datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>"><?php the_date(); ?></time>
|
||||
<time<?php marianne_add_class( $class ); ?> datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>">
|
||||
<?php
|
||||
if ( true === $args['date'] && false === $args['time'] ) {
|
||||
echo esc_html( get_the_date() );
|
||||
} elseif ( true === $args['date'] && true === $args['time'] ) {
|
||||
printf(
|
||||
/* translators: %1$s: The date. %2$s: The time. */
|
||||
esc_html_x( '%1$s at %2$s', 'The post date and time', 'marianne' ),
|
||||
esc_html( get_the_date() ),
|
||||
esc_html( get_the_time() )
|
||||
);
|
||||
} elseif ( false === $args['date'] && true === $args['time'] ) {
|
||||
echo esc_html( get_the_time() );
|
||||
}
|
||||
?>
|
||||
</time>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'marianne_post_info' ) ) {
|
||||
/**
|
||||
* The post meta.
|
||||
*
|
||||
* Displays the post date and, if enabled, the author's name and avatar.
|
||||
*
|
||||
* @param string $class The class of the container.
|
||||
* To set multiple classes,
|
||||
* separate them with a space.
|
||||
* Example: $class = "class-1 class-2".
|
||||
*
|
||||
* @param string $args Options to activate:
|
||||
* - 'time' adds the time of publish after the date.
|
||||
* - 'author_name' displays the author's name.
|
||||
* - 'author_prefix' displays 'By' before the author's name.
|
||||
* - 'avatar' displays the author's avatar.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since Marianne 1.5
|
||||
*/
|
||||
function marianne_post_info( $class = '', $args = array() ) {
|
||||
$class .= ' entry-info';
|
||||
|
||||
// Date formatting options.
|
||||
$the_date_args = array(
|
||||
'date' => true,
|
||||
'time' => false,
|
||||
);
|
||||
|
||||
if ( in_array( 'time', $args, true ) ) {
|
||||
$the_date_args['time'] = true;
|
||||
}
|
||||
?>
|
||||
|
||||
<div<?php marianne_add_class( $class ); ?>>
|
||||
<?php if ( ! in_array( 'author_name', $args, true ) && ! in_array( 'author_avatar', $args, true ) ) : ?>
|
||||
<?php if ( ! is_singular() ) : ?>
|
||||
<a href="<?php the_permalink(); ?>">
|
||||
<?php marianne_the_date( 'entry-date', $the_date_args ); ?>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<?php marianne_the_date( 'entry-date', $the_date_args ); ?>
|
||||
<?php endif; ?>
|
||||
<?php else : ?>
|
||||
<?php if ( in_array( 'author_avatar', $args, true ) ) : ?>
|
||||
<div class="entry-info-avatar">
|
||||
<?php if ( ! is_author() ) : ?>
|
||||
<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
|
||||
<?php echo get_avatar( get_the_author_meta( 'ID' ), 32 ); ?>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<?php echo get_avatar( get_the_author_meta( 'ID' ), 32 ); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ( in_array( 'author_name', $args, true ) ) : ?>
|
||||
<div class="entry-info-author">
|
||||
<?php if ( ! is_author() ) : ?>
|
||||
<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
|
||||
<?php
|
||||
if ( ! in_array( 'author_prefix', $args, true ) ) {
|
||||
echo esc_html( get_the_author_meta( 'display_name' ) );
|
||||
} else {
|
||||
printf(
|
||||
/* translators: %s: The author's name. */
|
||||
esc_html__( 'By %s', 'marianne' ),
|
||||
esc_html( get_the_author_meta( 'display_name' ) )
|
||||
);
|
||||
}
|
||||
?>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<?php
|
||||
if ( ! in_array( 'author_prefix', $args, true ) ) {
|
||||
echo esc_html( get_the_author_meta( 'display_name' ) );
|
||||
} else {
|
||||
printf(
|
||||
/* translators: %s: The author's name. */
|
||||
esc_html__( 'By %s', 'marianne' ),
|
||||
esc_html( get_the_author_meta( 'display_name' ) )
|
||||
);
|
||||
}
|
||||
?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="entry-info-separator">
|
||||
·
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="entry-info-date">
|
||||
<?php if ( ! is_singular() ) : ?>
|
||||
<a href="<?php the_permalink(); ?>">
|
||||
<?php marianne_the_date( 'entry-date', $the_date_args ); ?>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<?php marianne_the_date( 'entry-date', $the_date_args ); ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'marianne_post_signature' ) ) {
|
||||
/**
|
||||
* The post signature.
|
||||
*
|
||||
* @param string $class The class of the container.
|
||||
* To set multiple classes,
|
||||
* separate them with a space.
|
||||
* Example: $class = "class-1 class-2".
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since Marianne 1.5
|
||||
*/
|
||||
function marianne_post_signature( $class = '' ) {
|
||||
if ( 'bottom' === marianne_get_theme_mod( 'marianne_post_author_position' ) ) {
|
||||
if ( get_the_author_meta( 'description' ) && false !== marianne_get_theme_mod( 'marianne_post_author_bio' ) ) {
|
||||
$class .= ' post-signature-align-top';
|
||||
} else {
|
||||
$class .= ' post-signature-align-center';
|
||||
}
|
||||
?>
|
||||
|
||||
<div<?php marianne_add_class( $class ); ?>>
|
||||
<?php if ( false !== marianne_get_theme_mod( 'marianne_post_author_avatar' ) ) : ?>
|
||||
<div class="post-signature-avatar">
|
||||
<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
|
||||
<?php echo get_avatar( get_the_author_meta( 'ID' ), 56 ); ?>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="post-signature-content">
|
||||
<h4 class="post-signature-author-name">
|
||||
<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" rel="author">
|
||||
<cite>
|
||||
<?php echo esc_html( get_the_author_meta( 'display_name' ) ); ?>
|
||||
</cite>
|
||||
</a>
|
||||
</h4>
|
||||
|
||||
<?php if ( get_the_author_meta( 'description' ) && false !== marianne_get_theme_mod( 'marianne_post_author_bio' ) ) : ?>
|
||||
<div class="post-signature-author-description text-secondary">
|
||||
<?php echo wp_kses_post( wpautop( get_the_author_meta( 'description' ) ) ); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists( 'marianne_loop_comments' ) ) {
|
||||
/**
|
||||
* The link to comments.
|
||||
|
@ -372,20 +570,16 @@ if ( ! function_exists( 'marianne_social_link' ) ) {
|
|||
|
||||
$container_class .= ' site-social-' . marianne_get_theme_mod( 'marianne_social_style' );
|
||||
|
||||
$social_supported = array( 'twitter', 'mastodon', 'facebook', 'diaspora', 'vk', 'instagram', 'flickr', '500px', 'youtube', 'vimeo', 'tiktok', 'apple_podcasts', 'spotify', 'soundcloud', 'linkedin', 'medium', 'github', 'gitlab', 'twitch', 'reddit', 'email', 'signal', 'telegram', 'whatsapp', 'phone', 'link', 'rss' );
|
||||
|
||||
// Puts set social links in an array.
|
||||
$social_links = array();
|
||||
|
||||
$social_links['twitter'] = marianne_get_theme_mod( 'marianne_social_twitter' ) ? marianne_get_theme_mod( 'marianne_social_twitter' ) : '';
|
||||
$social_links['facebook'] = marianne_get_theme_mod( 'marianne_social_facebook' ) ? marianne_get_theme_mod( 'marianne_social_facebook' ) : '';
|
||||
$social_links['instagram'] = marianne_get_theme_mod( 'marianne_social_instagram' ) ? marianne_get_theme_mod( 'marianne_social_instagram' ) : '';
|
||||
$social_links['youtube'] = marianne_get_theme_mod( 'marianne_social_youtube' ) ? marianne_get_theme_mod( 'marianne_social_youtube' ) : '';
|
||||
$social_links['linkedin'] = marianne_get_theme_mod( 'marianne_social_linkedin' ) ? marianne_get_theme_mod( 'marianne_social_linkedin' ) : '';
|
||||
$social_links['github'] = marianne_get_theme_mod( 'marianne_social_github' ) ? marianne_get_theme_mod( 'marianne_social_github' ) : '';
|
||||
$social_links['gitlab'] = marianne_get_theme_mod( 'marianne_social_gitlab' ) ? marianne_get_theme_mod( 'marianne_social_gitlab' ) : '';
|
||||
$social_links['twitch'] = marianne_get_theme_mod( 'marianne_social_twitch' ) ? marianne_get_theme_mod( 'marianne_social_twitch' ) : '';
|
||||
$social_links['email'] = marianne_get_theme_mod( 'marianne_social_email' ) ? marianne_get_theme_mod( 'marianne_social_email' ) : '';
|
||||
$social_links['phone'] = marianne_get_theme_mod( 'marianne_social_phone' ) ? marianne_get_theme_mod( 'marianne_social_phone' ) : '';
|
||||
$social_links['link'] = marianne_get_theme_mod( 'marianne_social_link' ) ? marianne_get_theme_mod( 'marianne_social_link' ) : '';
|
||||
$social_links['rss'] = marianne_get_theme_mod( 'marianne_social_rss' ) ? marianne_get_theme_mod( 'marianne_social_rss' ) : '';
|
||||
foreach ( $social_supported as $social ) {
|
||||
if ( marianne_get_theme_mod( sanitize_key( 'marianne_social_' . $social ) ) ) {
|
||||
$social_links[ $social ] = marianne_get_theme_mod( sanitize_key( 'marianne_social_' . $social ) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! empty( $social_links ) ) :
|
||||
?>
|
||||
|
@ -393,7 +587,7 @@ if ( ! function_exists( 'marianne_social_link' ) ) {
|
|||
<ul class="social-links list-inline">
|
||||
<?php
|
||||
foreach ( $social_links as $site => $link ) {
|
||||
$svg_icons = marianne_svg_feather_icons( $site );
|
||||
$svg_icons = marianne_svg_icons( $site );
|
||||
$svg_name = $svg_icons['name'];
|
||||
$svg_shapes = $svg_icons['shapes'];
|
||||
|
||||
|
@ -409,6 +603,30 @@ if ( ! function_exists( 'marianne_social_link' ) ) {
|
|||
}
|
||||
break;
|
||||
|
||||
case 'signal':
|
||||
if ( $link ) {
|
||||
$phone_number = marianne_get_theme_mod( 'marianne_social_signal' );
|
||||
|
||||
$link = 'https://signal.me/#p/' . $phone_number;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'telegram':
|
||||
if ( $link ) {
|
||||
$telegram_username = marianne_get_theme_mod( 'marianne_social_telegram' );
|
||||
|
||||
$link = 'https://t.me/' . $telegram_username;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'whatsapp':
|
||||
if ( $link ) {
|
||||
$phone_number = marianne_get_theme_mod( 'marianne_social_whatsapp' );
|
||||
|
||||
$link = 'whatsapp:' . $phone_number;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'phone':
|
||||
if ( $link ) {
|
||||
$phone_type = marianne_get_theme_mod( 'marianne_social_phone_type' );
|
||||
|
@ -416,8 +634,6 @@ if ( ! function_exists( 'marianne_social_link' ) ) {
|
|||
|
||||
if ( 'sms' === $phone_type ) {
|
||||
$phone_prefix = 'sms:';
|
||||
} elseif ( 'whatsapp' === $phone_type ) {
|
||||
$phone_prefix = 'whatsapp:';
|
||||
}
|
||||
|
||||
$link = $phone_prefix . $link;
|
||||
|
@ -435,6 +651,8 @@ if ( ! function_exists( 'marianne_social_link' ) ) {
|
|||
}
|
||||
|
||||
if ( $link ) {
|
||||
|
||||
// Sets a target value for links.
|
||||
if ( false === marianne_get_theme_mod( 'marianne_social_target_blank' ) ) {
|
||||
$target = '_self';
|
||||
} else {
|
||||
|
@ -444,7 +662,9 @@ if ( ! function_exists( 'marianne_social_link' ) ) {
|
|||
?>
|
||||
<li>
|
||||
<?php
|
||||
if ( 'phone' !== $link && 'link' !== $site && 'rss' !== $site ) {
|
||||
$specific_icons = array( 'phone', 'link', 'rss' );
|
||||
|
||||
if ( ! in_array( $site, $specific_icons, true ) ) {
|
||||
$link_aria_label = sprintf(
|
||||
/* translators: %s. The name of the social site. */
|
||||
_x( 'Link to %s', 'Label for links to social sites.', 'marianne' ),
|
||||
|
@ -457,7 +677,7 @@ if ( ! function_exists( 'marianne_social_link' ) ) {
|
|||
_x( '%s icon', 'Alternative text for social icon images', 'marianne' ),
|
||||
ucfirst( $site )
|
||||
),
|
||||
'class' => 'feather feather-' . $site,
|
||||
'class' => 'simple-icons icon-' . $site,
|
||||
'size' => array( 16, 16 ),
|
||||
);
|
||||
} elseif ( 'phone' === $site ) {
|
||||
|
@ -465,7 +685,7 @@ if ( ! function_exists( 'marianne_social_link' ) ) {
|
|||
|
||||
$svg_args = array(
|
||||
'aria-label' => __( 'Phone icon', 'marianne' ),
|
||||
'class' => 'feather feather-' . $site,
|
||||
'class' => 'feather-icons icon-' . $site,
|
||||
'size' => array( 16, 16 ),
|
||||
);
|
||||
} elseif ( 'link' === $site ) {
|
||||
|
@ -473,7 +693,7 @@ if ( ! function_exists( 'marianne_social_link' ) ) {
|
|||
|
||||
$svg_args = array(
|
||||
'aria-label' => __( 'Link icon', 'marianne' ),
|
||||
'class' => 'feather feather-' . $site,
|
||||
'class' => 'feather-icons icon-' . $site,
|
||||
'size' => array( 16, 16 ),
|
||||
);
|
||||
} elseif ( 'rss' === $site ) {
|
||||
|
@ -481,7 +701,7 @@ if ( ! function_exists( 'marianne_social_link' ) ) {
|
|||
|
||||
$svg_args = array(
|
||||
'aria-label' => __( 'RSS icon', 'marianne' ),
|
||||
'class' => 'feather feather-' . $site,
|
||||
'class' => 'simple-icons icon-' . $site,
|
||||
'size' => array( 16, 16 ),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -37,9 +37,8 @@ get_header();
|
|||
|
||||
<?php get_template_part( 'loop' ); ?>
|
||||
</main>
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
get_sidebar();
|
||||
get_footer();
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
3
page.php
3
page.php
|
@ -27,9 +27,8 @@ get_header();
|
|||
}
|
||||
?>
|
||||
</main>
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
get_sidebar();
|
||||
get_footer();
|
||||
|
|
109
readme.txt
109
readme.txt
|
@ -2,7 +2,7 @@
|
|||
|
||||
Contributors: Teddy
|
||||
Requires at least: 5.3
|
||||
Tested up to: 5.7.2
|
||||
Tested up to: 5.8.1
|
||||
Requires PHP: 5.2
|
||||
License: GPLv3 or later
|
||||
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
@ -36,9 +36,54 @@ on tablet and mobile, and it has been designed to give a good print results.
|
|||
|
||||
== Changelog ==
|
||||
|
||||
=== ? – May ?th, 2021 ===
|
||||
=== 1.8 – September 18th, 2021 ===
|
||||
- Added: custom fonts from Google Fonts.
|
||||
|
||||
=== 1.7.1 – September 17th, 2021 ===
|
||||
Fixed: "Back to top" button bug in the Theme Customizer.
|
||||
|
||||
=== 1.7 – September 16th, 2021 ===
|
||||
Added: option to display the excerpt or the full content of posts in the loop.
|
||||
Added: button in the footer to go to the top of the page.
|
||||
Added: option to display/hide the title of the front page.
|
||||
Fixed: text of the search button bug.
|
||||
Updated: "tested up to" version number (5.8 to 5.8.1).
|
||||
Updated: translation files.
|
||||
|
||||
=== 1.6.1 – July 30th, 2021 ===
|
||||
Added: social link to Signal and Telegram.
|
||||
Added: one contributor in About Marianne page.
|
||||
Updated: "tested up to" version number (5.7.2 to 5.8).
|
||||
Updated: translation files.
|
||||
|
||||
=== 1.6 – June 19th, 2021 ===
|
||||
Added: option to display the theme with a left sidebar.
|
||||
Added: new social links.
|
||||
Fixed: phone number sanitization.
|
||||
Updated: translation files.
|
||||
|
||||
=== 1.5.1 – May 28th, 2021 ===
|
||||
- Added: descriptions to some options.
|
||||
- Fixed: Feather Icons display.
|
||||
|
||||
=== 1.5 – May 27th, 2021 ===
|
||||
- Added: the ability to display the author's name in the post list and inside posts.
|
||||
- Added: 500px and Diaspora support.
|
||||
- Fixed: social icon margins.
|
||||
- Updated: Feather Icons mostly replaced by Simple Icons.
|
||||
- Updated: translation files.
|
||||
|
||||
=== 1.4.1 – May 24th, 2021 ===
|
||||
- Fixed: .zip error.
|
||||
|
||||
=== 1.4 – May 24th, 2021 ===
|
||||
- Added: inline CSS system for future improvements.
|
||||
- Added: new social icons.
|
||||
- Added: Dutch translation.
|
||||
- Added: a list of contributors in the About page.
|
||||
- Updated: French translation.
|
||||
- Updated: 'Tested up to' version number (5.7.1 to 5.7.2).
|
||||
- Removed: unwanted white space in the footer menu.
|
||||
|
||||
=== 1.3.6 – May 8th, 2021 ===
|
||||
- Fixed: bug on the primary menu on Android.
|
||||
|
@ -243,11 +288,63 @@ Source: https://www.flickr.com/photos/137643065@N06/23699397893
|
|||
License: CC0 1.0 Public Domain Dedication
|
||||
License URI: https://creativecommons.org/publicdomain/zero/1.0/
|
||||
|
||||
SVG Icons: Feather Icons, Copyright (c) 2013-2017 Cole Bemis
|
||||
Source: https://icons.getbootstrap.com/
|
||||
License: MIT
|
||||
License URI: https://opensource.org/licenses/mit-license.php
|
||||
SVG Icons:
|
||||
- Feather Icons, Copyright (c) 2013-2017 Cole Bemis
|
||||
Source: https://icons.getbootstrap.com/
|
||||
License: MIT
|
||||
License URI: https://opensource.org/licenses/mit-license.php
|
||||
- Simple Icons
|
||||
Source: https://simpleicons.org/
|
||||
License: CC0
|
||||
License URI: https://github.com/simple-icons/simple-icons/blob/develop/LICENSE.md
|
||||
|
||||
Admin icons: Dashicons, Copyright Wordpress
|
||||
License: GPLv2
|
||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
|
||||
Fonts:
|
||||
- Lato, Copyright (c) 2010-2011 by tyPoland Lukasz Dziedzic (team@latofonts.com)
|
||||
License: SIL Open Font License, Version 1.1
|
||||
License URI: http://scripts.sil.org/OFL
|
||||
- Lora, The Lora Project Authors (https://github.com/cyrealtype/Lora-Cyrillic), with Reserved Font Name "Lora".
|
||||
License: SIL Open Font License, Version 1.1
|
||||
License URI: http://scripts.sil.org/OFL
|
||||
- Merriweather, Copyright 2016 The Merriweather Project Authors (https://github.com/EbenSorkin/Merriweather), with Reserved Font Name "Merriweather".
|
||||
License: SIL Open Font License, Version 1.1
|
||||
License URI: http://scripts.sil.org/OFL
|
||||
- Noto Sans, Copyright 2012 Google Inc. All Rights Reserved.
|
||||
License: SIL Open Font License, Version 1.1
|
||||
License URI: http://scripts.sil.org/OFL
|
||||
- Noto Serif, Copyright 2012 Google Inc. All Rights Reserved.
|
||||
License: SIL Open Font License, Version 1.1
|
||||
License URI: http://scripts.sil.org/OFL
|
||||
- Open Sans, Digitized data copyright 2010-2011, Google Corporation.
|
||||
License: Apache License, version 2.0
|
||||
License URI: http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
- PT Mono, Copyright © 2010 ParaType Inc., ParaType Ltd. All rights reserved.
|
||||
License: SIL Open Font License, Version 1.1
|
||||
License URI: http://scripts.sil.org/OFL
|
||||
- PT Sans, Copyright © 2009 ParaType Ltd. All rights reserved.
|
||||
License: SIL Open Font License, Version 1.1
|
||||
License URI: http://scripts.sil.org/OFL
|
||||
- PT Serif, Copyright © 2010 ParaType Ltd. All rights reserved.
|
||||
License: SIL Open Font License, Version 1.1
|
||||
License URI: http://scripts.sil.org/OFL
|
||||
- Roboto, Copyright 2011 Google Inc. All Rights Reserved.
|
||||
License: Apache License, version 2.0
|
||||
License URI: http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
- Roboto Mono, Copyright 2015 The Roboto Mono Project Authors (https://github.com/googlefonts/robotomono)
|
||||
License: Apache License, version 2.0
|
||||
License URI: http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
- Roboto Slab, Copyright 2018 The Roboto Slab Project Authors (https://github.com/googlefonts/robotoslab)
|
||||
License: Apache License, version 2.0
|
||||
License URI: http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
- Source Code Pro, Copyright 2010, 2012 Adobe Systems Incorporated. All Rights Reserved.
|
||||
License: SIL Open Font License, Version 1.1
|
||||
License URI: http://scripts.sil.org/OFL
|
||||
- Source Sans Pro, Copyright 2010, 2012, 2014 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name Source.
|
||||
License: SIL Open Font License, Version 1.1
|
||||
License URI: http://scripts.sil.org/OFL
|
||||
- Source Serif Pro, Copyright 2014, 2015, 2016 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'.
|
||||
License: SIL Open Font License, Version 1.1
|
||||
License URI: http://scripts.sil.org/OFL
|
||||
|
|
|
@ -75,9 +75,8 @@ get_header();
|
|||
</article>
|
||||
<?php endif; ?>
|
||||
</main>
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
get_sidebar();
|
||||
get_footer();
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
|
||||
if ( is_active_sidebar( 'widgets' ) ) {
|
||||
?>
|
||||
<hr class="separator">
|
||||
|
||||
<?php
|
||||
$marianne_widgets_class = 'site-secondary';
|
||||
|
||||
|
@ -21,6 +19,10 @@ if ( is_active_sidebar( 'widgets' ) ) {
|
|||
}
|
||||
?>
|
||||
<aside id="secondary"<?php marianne_add_class( $marianne_widgets_class ); ?> role="complementary">
|
||||
<?php if ( 'two-column-left-sidebar' !== marianne_get_theme_mod( 'marianne_global_layout' ) ) : ?>
|
||||
<hr class="separator">
|
||||
<?php endif; ?>
|
||||
|
||||
<?php dynamic_sidebar( 'widgets' ); ?>
|
||||
</aside>
|
||||
<?php
|
||||
|
|
|
@ -27,9 +27,8 @@ get_header();
|
|||
}
|
||||
?>
|
||||
</main>
|
||||
|
||||
<?php get_sidebar(); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
get_sidebar();
|
||||
get_footer();
|
||||
|
|
208
style.css
208
style.css
|
@ -4,10 +4,10 @@ Theme URI: https://github.com/te2dy/marianne
|
|||
Author: Teddy
|
||||
Author URI: https://chezteddy.fr/
|
||||
Description: Are you looking for a simple theme to highlight your writings? Marianne is a rare minimalistic theme in an ocean of maximalism. It gives a touch of old school blogging to your site, refreshed, with customization options that make it flexible. If you believe that less graphism complexity means less distraction and more readability, this theme is made for you. Whether you are a simple blogger, a writer, a journalist or an intellectual, Marianne will delight you… and your readers.
|
||||
Tags: blog, one-column, custom-logo, custom-menu, featured-images, sticky-post, theme-options, threaded-comments, translation-ready, wide-blocks
|
||||
Version: 1.3.6
|
||||
Tags: blog, one-column, two-columns, left-sidebar, custom-logo, custom-menu, featured-images, sticky-post, theme-options, threaded-comments, translation-ready, wide-blocks
|
||||
Version: 1.8
|
||||
Requires at least: 5.3
|
||||
Tested up to: 5.7.2
|
||||
Tested up to: 5.8.1
|
||||
Requires PHP: 5.2
|
||||
License: GNU General Public License v3 or later
|
||||
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
@ -238,16 +238,11 @@ body {
|
|||
}
|
||||
.site {
|
||||
margin: 0 auto;
|
||||
max-width: var(--page-width);
|
||||
word-wrap: break-word;
|
||||
}
|
||||
.site-header {
|
||||
margin: 2em 0 4em;
|
||||
text-align: var(--site-header-align);
|
||||
}
|
||||
.site-content {
|
||||
margin: 4em 0;
|
||||
}
|
||||
.site-primary {
|
||||
margin-bottom: 4em;
|
||||
}
|
||||
|
@ -459,16 +454,12 @@ dd {
|
|||
.alignwide {
|
||||
width: 75vw;
|
||||
margin-top: 2em;
|
||||
margin-right: calc(-75vw / 2 + var(--page-width) / 2);
|
||||
margin-bottom: 2em;
|
||||
margin-left: calc(-75vw / 2 + var(--page-width) / 2);
|
||||
}
|
||||
.alignfull {
|
||||
width: 100vw;
|
||||
margin-top: 2em;
|
||||
margin-right: calc(-100vw / 2 + var(--page-width) / 2);
|
||||
margin-bottom: 2em;
|
||||
margin-left: calc(-100vw / 2 + var(--page-width) / 2);
|
||||
}
|
||||
.blocks-gallery-grid figcaption,
|
||||
.wp-block-gallery figcaption {
|
||||
|
@ -531,8 +522,8 @@ hr {
|
|||
width: 50%;
|
||||
}
|
||||
|
||||
/* Feather Icons */
|
||||
.feather {
|
||||
/* Icons */
|
||||
.feather-icons {
|
||||
border: 0;
|
||||
fill: transparent;
|
||||
stroke: var(--color-body-text-secondary);
|
||||
|
@ -541,20 +532,26 @@ hr {
|
|||
stroke-linejoin: round;
|
||||
transition: all .2s ease-in-out;
|
||||
}
|
||||
.simple-icons {
|
||||
border: 0;
|
||||
fill: var(--color-body-text-secondary);
|
||||
stroke: transparent;
|
||||
stroke-width: 0;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
transition: all .2s ease-in-out;
|
||||
}
|
||||
.site-social {
|
||||
margin: 1em auto;
|
||||
}
|
||||
.site-social .feather-rss {
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: butt;
|
||||
.site-header-align-left .social-links li {
|
||||
margin: .25em .25em .25em 0;
|
||||
}
|
||||
.social-links li a:hover .feather,
|
||||
.social-links li a:focus .feather {
|
||||
stroke: var(--color-body-background);
|
||||
transition: all .2s ease-in-out;
|
||||
.site-header-align-center .social-links li {
|
||||
margin: .25em .125em;
|
||||
}
|
||||
.social-links li {
|
||||
margin: 0 .25em;
|
||||
.site-header-align-right .social-links li {
|
||||
margin: .25em 0 .25em .25em;
|
||||
}
|
||||
.social-links li:first-child {
|
||||
margin-left: 0;
|
||||
|
@ -562,6 +559,28 @@ hr {
|
|||
.social-links li:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
.site-social .icon-email,
|
||||
.site-social .icon-phone,
|
||||
.site-social .icon-link {
|
||||
fill: transparent;
|
||||
stroke: var(--color-body-text-secondary);
|
||||
stroke-width: 2;
|
||||
}
|
||||
.social-links li a:hover .simple-icons,
|
||||
.social-links li a:focus .simple-icons {
|
||||
fill: var(--color-body-background);
|
||||
transition: all .2s ease-in-out;
|
||||
}
|
||||
.social-links li a:hover .icon-email,
|
||||
.social-links li a:focus .icon-email,
|
||||
.social-links li a:hover .icon-phone,
|
||||
.social-links li a:focus .icon-phone,
|
||||
.social-links li a:hover .icon-link,
|
||||
.social-links li a:focus .icon-link {
|
||||
fill: transparent;
|
||||
stroke: var(--color-body-background);
|
||||
transition: all .2s ease-in-out;
|
||||
}
|
||||
.social-icon-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
@ -750,11 +769,13 @@ iframe {
|
|||
padding: 0;
|
||||
vertical-align: middle;
|
||||
}
|
||||
#menu-primary .menu-item-has-children .sub-menu-toggle[aria-expanded="true"] .feather {
|
||||
#menu-primary .menu-item-has-children .sub-menu-toggle[aria-expanded="true"] .feather-icons {
|
||||
stroke: var(--color-link-hover);
|
||||
}
|
||||
#menu-primary .sub-menu-toggle-icon {
|
||||
fill: transparent;
|
||||
stroke-width: 3;
|
||||
stroke: var(--color-body-text-secondary);
|
||||
}
|
||||
#menu-primary .sub-menu {
|
||||
clip: rect(1px, 1px, 1px, 1px);
|
||||
|
@ -986,7 +1007,12 @@ iframe {
|
|||
*/
|
||||
.entry-meta {
|
||||
font-size: .9em;
|
||||
margin: .5em 0;
|
||||
}
|
||||
.entry-header .entry-meta {
|
||||
margin-bottom: .5em;
|
||||
}
|
||||
.entry-footer .entry-meta {
|
||||
margin-top: .5em;
|
||||
}
|
||||
.entry-sticky {
|
||||
border-left: 4px solid var(--color-border);
|
||||
|
@ -995,15 +1021,23 @@ iframe {
|
|||
margin: 1em 0 .5em;
|
||||
}
|
||||
.entry-categories li + li:before {
|
||||
content: "\00B7";
|
||||
content: "\00B7";
|
||||
}
|
||||
.post-title,
|
||||
.page-title {
|
||||
font-size: 1.5em;
|
||||
margin: 1em 0;
|
||||
}
|
||||
.entry-thumbnail-wide .wp-post-image {
|
||||
width: var(--page-width);
|
||||
.entry-info {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.entry-info-avatar .avatar {
|
||||
border-radius: 50%;
|
||||
margin-right: .5em;
|
||||
}
|
||||
.entry-info-separator {
|
||||
margin: 0 .2em;
|
||||
}
|
||||
.post-content p,
|
||||
.page-content p {
|
||||
|
@ -1072,6 +1106,33 @@ iframe {
|
|||
.post-footer {
|
||||
margin-top: 2em;
|
||||
}
|
||||
.post-signature {
|
||||
display: flex;
|
||||
margin: 2em 0;
|
||||
}
|
||||
.post-signature-align-top {
|
||||
align-items: flex-start;
|
||||
}
|
||||
.post-signature-align-center {
|
||||
align-items: center;
|
||||
}
|
||||
.post-signature-avatar .avatar {
|
||||
border-radius: 50%;
|
||||
margin-right: 1em;
|
||||
}
|
||||
.post-signature-author-name {
|
||||
font-size: 1em;
|
||||
margin: 0;
|
||||
}
|
||||
.post-signature-author-name cite {
|
||||
font-style: normal;
|
||||
}
|
||||
.post-signature-author-description {
|
||||
margin-top: .5em;
|
||||
}
|
||||
.post-signature-author-description p {
|
||||
margin: .25em 0 0;
|
||||
}
|
||||
.post-page-numbers {
|
||||
border: 1px solid var(--color-border);
|
||||
padding: .25em .5em;
|
||||
|
@ -1180,9 +1241,6 @@ iframe {
|
|||
}
|
||||
.site-footer-block {
|
||||
margin-top: 1em;
|
||||
}
|
||||
.site-footer-align-center .navigation-menu .menu-item {
|
||||
|
||||
}
|
||||
.site-footer-align-right .navigation-menu .menu-item {
|
||||
border-right: 0;
|
||||
|
@ -1197,6 +1255,20 @@ iframe {
|
|||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
#back-to-top {
|
||||
border: 0;
|
||||
color: var(--color-body-text-secondary);
|
||||
display: inline;
|
||||
padding: 0;
|
||||
}
|
||||
#back-to-top:hover,
|
||||
#back-to-top:focus {
|
||||
color: var(--color-link-hover);
|
||||
}
|
||||
#back-to-top:hover .feather-icons,
|
||||
#back-to-top:focus .feather-icons {
|
||||
stroke: var(--color-link-hover);
|
||||
}
|
||||
|
||||
/**
|
||||
* Search form
|
||||
|
@ -1315,80 +1387,6 @@ iframe {
|
|||
z-index: 100000;
|
||||
}
|
||||
|
||||
/**
|
||||
* On small screens
|
||||
*/
|
||||
@media all and (max-width: 848px) {
|
||||
.page-width-720 {
|
||||
margin-right: 4em;
|
||||
margin-left: 4em;
|
||||
}
|
||||
.alignwide {
|
||||
width: 100%;
|
||||
margin: 2em 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width: 664px) {
|
||||
.page-width-600 {
|
||||
margin-right: 2em;
|
||||
margin-left: 2em;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width: 532px) {
|
||||
.site {
|
||||
margin-right: 1em;
|
||||
margin-left: 1em;
|
||||
}
|
||||
.site-content {
|
||||
margin: 2em auto;
|
||||
}
|
||||
.site-header {
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
.entry-loop.sticky {
|
||||
margin-right: -.5rem;
|
||||
margin-left: -.5rem;
|
||||
padding: .5rem;
|
||||
}
|
||||
.entry-loop.sticky figure {
|
||||
margin-right: -.5rem;
|
||||
margin-left: -.5rem;
|
||||
}
|
||||
.nav-links {
|
||||
display: block;
|
||||
justify-content: unset;
|
||||
}
|
||||
.nav-links .nav-link-previous,
|
||||
.nav-links .nav-link-next {
|
||||
max-width: unset;
|
||||
}
|
||||
.nav-links .nav-link-previous {
|
||||
padding-right: 0;
|
||||
}
|
||||
.nav-links .nav-link-next {
|
||||
padding-top: .5em;
|
||||
padding-left: 0;
|
||||
text-align: right;
|
||||
}
|
||||
.nav-links-one .nav-link-next {
|
||||
text-align: right;
|
||||
}
|
||||
.comment-list .parent .comment {
|
||||
padding: .5em 0 0 .5em;
|
||||
}
|
||||
|
||||
/* Blocks */
|
||||
.wp-block-media-text {
|
||||
display: block;
|
||||
}
|
||||
.alignfull {
|
||||
margin-right: -1em;
|
||||
margin-left: -1em;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* On print
|
||||
*/
|
||||
|
|
2
style.min.css
vendored
2
style.min.css
vendored
File diff suppressed because one or more lines are too long
|
@ -18,9 +18,27 @@
|
|||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="entry-meta text-secondary">
|
||||
<a href="<?php the_permalink(); ?>"><?php marianne_the_date(); ?></a>
|
||||
</div>
|
||||
<?php
|
||||
$marianne_post_info_args = array();
|
||||
|
||||
if ( true === marianne_get_theme_mod( 'marianne_loop_author_name' ) ) {
|
||||
$marianne_post_info_args[] = 'author_name';
|
||||
|
||||
if ( true === marianne_get_theme_mod( 'marianne_loop_author_name_prefix' ) ) {
|
||||
$marianne_post_info_args[] = 'author_prefix';
|
||||
}
|
||||
}
|
||||
|
||||
if ( true === marianne_get_theme_mod( 'marianne_loop_author_avatar' ) ) {
|
||||
$marianne_post_info_args[] = 'author_avatar';
|
||||
}
|
||||
|
||||
if ( true === marianne_get_theme_mod( 'marianne_loop_post_time' ) ) {
|
||||
$marianne_post_info_args[] = 'time';
|
||||
}
|
||||
|
||||
marianne_post_info( 'entry-meta text-secondary', $marianne_post_info_args );
|
||||
?>
|
||||
|
||||
<?php marianne_the_categories( 'entry-meta entry-categories text-secondary' ); ?>
|
||||
|
||||
|
@ -41,6 +59,15 @@
|
|||
|
||||
<?php
|
||||
$marianne_single_classes = 'entry-content loop-content';
|
||||
|
||||
$marianne_loop_content = marianne_get_theme_mod( 'marianne_loop_content' );
|
||||
|
||||
if ( 'full' !== $marianne_loop_content ) {
|
||||
$marianne_single_classes = 'entry-content loop-content';
|
||||
} else {
|
||||
$marianne_single_classes = 'entry-content post-content';
|
||||
}
|
||||
|
||||
$marianne_single_classes .= ' text-align-' . marianne_get_theme_mod( 'marianne_content_text_align' );
|
||||
|
||||
if ( true === marianne_get_theme_mod( 'marianne_content_hyphens' ) ) {
|
||||
|
@ -48,9 +75,13 @@
|
|||
}
|
||||
?>
|
||||
<section <?php marianne_add_class( $marianne_single_classes, false ); ?>>
|
||||
<a href="<?php the_permalink(); ?>">
|
||||
<?php the_excerpt(); ?>
|
||||
</a>
|
||||
<?php if ( 'full' !== $marianne_loop_content ) : ?>
|
||||
<a href="<?php the_permalink(); ?>">
|
||||
<?php the_excerpt(); ?>
|
||||
</a>
|
||||
<?php else : ?>
|
||||
<?php the_content(); ?>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
|
||||
<?php marianne_loop_comments( 'entry-footer loop-footer text-secondary' ); ?>
|
||||
|
|
|
@ -15,6 +15,10 @@
|
|||
<header class="entry-header">
|
||||
<?php the_title( '<h1 class="entry-title page-title">', '</h1>' ); ?>
|
||||
</header>
|
||||
<?php elseif ( is_front_page() && true === marianne_get_theme_mod( 'static_front_page_title' ) ) : ?>
|
||||
<header class="entry-header">
|
||||
<?php the_title( '<h1 class="entry-title page-title">', '</h1>' ); ?>
|
||||
</header>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
|
|
|
@ -19,7 +19,39 @@
|
|||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
marianne_the_date( 'entry-meta entry-date post-date text-secondary' );
|
||||
if ( 'top' === marianne_get_theme_mod( 'marianne_post_author_position' ) ) {
|
||||
$marianne_post_info_args = array();
|
||||
|
||||
if ( 'name' === marianne_get_theme_mod( 'marianne_post_author_info' ) ) {
|
||||
$marianne_post_info_args[] = 'author_name';
|
||||
} elseif ( 'avatar' === marianne_get_theme_mod( 'marianne_post_author_info' ) ) {
|
||||
$marianne_post_info_args[] = 'author_avatar';
|
||||
} else {
|
||||
$marianne_post_info_args[] = 'author_name';
|
||||
$marianne_post_info_args[] = 'author_avatar';
|
||||
}
|
||||
|
||||
if ( true === marianne_get_theme_mod( 'marianne_post_author_name_prefix' ) ) {
|
||||
$marianne_post_info_args[] = 'author_prefix';
|
||||
}
|
||||
|
||||
if ( true === marianne_get_theme_mod( 'marianne_post_post_time' ) ) {
|
||||
$marianne_post_info_args[] = 'time';
|
||||
}
|
||||
|
||||
marianne_post_info( 'entry-meta text-secondary', $marianne_post_info_args );
|
||||
} else {
|
||||
$marianne_date_args = array(
|
||||
'date' => true,
|
||||
'time' => false,
|
||||
);
|
||||
|
||||
if ( true === marianne_get_theme_mod( 'marianne_post_post_time' ) ) {
|
||||
$marianne_date_args['time'] = true;
|
||||
}
|
||||
|
||||
marianne_the_date( 'entry-meta entry-date post-date text-secondary', $marianne_date_args );
|
||||
}
|
||||
|
||||
marianne_the_categories( 'entry-meta entry-categories text-secondary' );
|
||||
|
||||
|
@ -55,8 +87,10 @@
|
|||
?>
|
||||
</section>
|
||||
|
||||
<?php if ( has_tag() || true === marianne_get_theme_mod( 'marianne_post_nav' ) || true === marianne_get_theme_mod( 'marianne_print_info' ) ) : ?>
|
||||
<?php if ( has_tag() || 'bottom' === marianne_get_theme_mod( 'marianne_post_author_position' ) || true === marianne_get_theme_mod( 'marianne_post_nav' ) || true === marianne_get_theme_mod( 'marianne_print_info' ) ) : ?>
|
||||
<footer class="entry-footer post-footer">
|
||||
<?php marianne_post_signature( 'post-signature' ); ?>
|
||||
|
||||
<div class="entry-tags post-tags text-secondary">
|
||||
<?php the_tags(); ?>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Reference in a new issue