From e32affd4c9ec0be435fbbbdb06706fa33f9edc6b Mon Sep 17 00:00:00 2001 From: David Morgan Date: Fri, 30 Nov 2018 10:41:33 -0500 Subject: [PATCH] Gutenberg optimization and more * Gutenberg optimization updates * Fixed issue with header video not working on home template * Updated flexslider.js script * Updated recommended plugins * Allow date range to be displayed * Past tour dates now display * Conditional style fixes * General cleanup --- README.txt | 14 +- content/loop-page.php | 2 +- content/loop-tour-home.php | 29 +- css/gutenberg.css | 186 +++++++++ css/style-conditionals.css | 22 +- css/style-editor.css | 715 --------------------------------- css/style-mobile.css | 9 + functions.php | 34 +- includes/plugin-activation.php | 61 ++- includes/typefaces.php | 2 +- js/jquery.custom.admin.js | 4 +- style.css | 197 ++++++--- 12 files changed, 465 insertions(+), 810 deletions(-) create mode 100644 css/gutenberg.css delete mode 100644 css/style-editor.css diff --git a/README.txt b/README.txt index 6621535..05296ab 100644 --- a/README.txt +++ b/README.txt @@ -1,10 +1,10 @@ === Music Lite === -Version: 1.2.2 +Version: 1.3 Contributors: organicthemes, itsdavidmorgan Tags: blog, portfolio, one-column, two-columns, right-sidebar, custom-background, custom-header, custom-menu, custom-logo, featured-images, featured-image-header, flexible-header, full-width-template, translation-ready, sticky-post, threaded-comments, editor-style, theme-options, footer-widgets Requires at least: 4.8 -Tested up to: 4.9.2 +Tested up to: 5.0 License: GPLv2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html @@ -48,6 +48,16 @@ Music Lite is distributed under the terms of the GNU GPL == Changelog == +== 1.3 == +* Gutenberg optimization updates +* Fixed issue with header video not working on home template +* Updated flexslider.js script +* Updated recommended plugins +* Allow date range to be displayed +* Past tour dates now display +* Conditional style fixes +* General cleanup + == 1.2.2 == * Fixed issue of custom admin submenu link overwriting other links diff --git a/content/loop-page.php b/content/loop-page.php index 9cdb889..17aef98 100644 --- a/content/loop-page.php +++ b/content/loop-page.php @@ -43,7 +43,7 @@ - + diff --git a/content/loop-tour-home.php b/content/loop-tour-home.php index 7fe1df7..05d23a4 100644 --- a/content/loop-tour-home.php +++ b/content/loop-tour-home.php @@ -10,29 +10,20 @@ 'tour-date', - 'suppress_filters' => 0, - 'posts_per_page' => 4, - 'orderby' => 'meta_value', - 'meta_key' => 'tour_date_info_timestamp', - 'order' => 'ASC', - 'meta_query' => array(array( - 'key' => 'tour_date_info_timestamp', - 'value' => strtotime( '-5 days' ), - 'compare' => '>', - 'type' => 'NUMERIC', - ), - ), + 'post_type' => 'tour-date', + 'suppress_filters' => 0, + 'posts_per_page' => 4, + 'order' => 'ASC', )); if ( $wp_query->have_posts() ) : while ( $wp_query->have_posts() ) : $wp_query->the_post(); - $previous_date = organic_cc_tour_date_get_meta( 'tour_date_info_timestamp' ) < strtotime( '-1 days' ) ? true : false; - $tour_date = organic_cc_tour_date_get_meta( 'tour_date_info_date' ); - $tour_date_time = organic_cc_tour_date_get_meta( 'tour_date_info_time' ); - $tour_date_venue = organic_cc_tour_date_get_meta( 'tour_date_info_venue' ); + $previous_date = organic_cc_tour_date_get_meta( 'tour_date_info_timestamp' ) < strtotime( '-1 days' ) ? true : false; + $tour_date = organic_cc_tour_date_get_meta( 'tour_date_info_date' ); + $tour_date_time = organic_cc_tour_date_get_meta( 'tour_date_info_time' ); + $tour_date_venue = organic_cc_tour_date_get_meta( 'tour_date_info_venue' ); $tour_date_venue_url = organic_cc_tour_date_get_meta( 'tour_date_info_venue_ticketing_url' ); - $tour_date_location = organic_cc_tour_date_get_meta( 'tour_date_info_location_city_state_province_country_etc_' ); + $tour_date_location = organic_cc_tour_date_get_meta( 'tour_date_info_location_city_state_province_country_etc_' ); ?> @@ -67,4 +58,4 @@ - + diff --git a/css/gutenberg.css b/css/gutenberg.css new file mode 100644 index 0000000..913d741 --- /dev/null +++ b/css/gutenberg.css @@ -0,0 +1,186 @@ +/************************************************ +Gutenberg Editor +************************************************/ + +body.block-editor-page .edit-post-visual-editor .editor-post-title__block, +body.block-editor-page .edit-post-visual-editor .editor-default-block-appender, +body.block-editor-page .edit-post-visual-editor .editor-block-list__block { + max-width: 760px; +} +body.block-editor-page .edit-post-visual-editor .editor-block-list__block[data-align="wide"] { + max-width: 920px; +} +body.block-editor-page .edit-post-visual-editor .editor-block-list__block[data-align="full"] { + max-width: none; +} + +/* Body */ + +.mce-content-body, +.editor-rich-text__tinymce { + color: rgba(0, 0, 0, 0.7); + font-family: 'Roboto'; + font-size: 1rem; + line-height: 1.65; +} +.edit-post-visual-editor h1.editor-rich-text__tinymce, +.edit-post-visual-editor h2.editor-rich-text__tinymce, +.edit-post-visual-editor h3.editor-rich-text__tinymce, +.edit-post-visual-editor h4.editor-rich-text__tinymce, +.edit-post-visual-editor h5.editor-rich-text__tinymce, +.edit-post-visual-editor h6.editor-rich-text__tinymce, +.editor-post-title__block .editor-post-title__input { + color: #000000; + font-family: 'Oswald'; + font-weight: 400; + line-height: 1.1; + text-transform: uppercase; + word-wrap: break-word; +} +.editor-post-title__block .editor-post-title__input { + text-align: center; +} +.edit-post-visual-editor h1.editor-rich-text__tinymce, +.editor-post-title__block .editor-post-title__input { + font-size: 3.2rem; +} +.edit-post-visual-editor h2.editor-rich-text__tinymce { + font-size: 2.8rem; +} +.edit-post-visual-editor h3.editor-rich-text__tinymce { + font-size: 2.4rem; +} +.edit-post-visual-editor h4.editor-rich-text__tinymce { + font-size: 2rem; +} +.edit-post-visual-editor h5.editor-rich-text__tinymce { + font-size: 1.6rem; +} +.edit-post-visual-editor h6.editor-rich-text__tinymce { + font-size: 1.3rem; +} +.edit-post-visual-editor .wp-block-code { + color: #666666; + font-family: Courier, sans-serif; + line-height: 1.4; + margin: 24px 0px; + padding: 12px; + border: 2px solid rgba(0, 0, 0, 0.24); + box-shadow: inset 0px 0px 6px rgba(0, 0, 0, 0.12); + box-sizing: border-box; + border-radius: 3px; +} + +/* Blockquotes */ + +blockquote.wp-block-quote { + margin: 24px 0px; + padding: 12px 18px; + border-left: 2px solid rgba(0, 0, 0, 0.12); +} +blockquote.wp-block-quote:not(.is-large):not(.is-style-large) { + padding-left: 18px; + border-left: 2px solid rgba(0, 0, 0, 0.12); +} +blockquote.wp-block-quote .editor-rich-text__tinymce p { + font-size: 130%; + line-height: 1.5; +} +blockquote.wp-block-quote cite, +blockquote.wp-block-quote footer, +blockquote.wp-block-quote .wp-block-quote__citation { + display: block; + color: rgba(0, 0, 0, 0.4); + font-size: 0.85rem; + margin-top: 12px; +} +blockquote.wp-block-quote cite::before, +blockquote.wp-block-quote footer::before, +blockquote.wp-block-quote .wp-block-quote__citation::before { + content: '— ' +} + +/* Tables */ + +.edit-post-visual-editor table { + width: 100%; + margin: 24px 0px; + padding: 0px; + border-collapse: collapse; + border-spacing: 0; +} +.edit-post-visual-editor table thead, +.edit-post-visual-editor table tfoot { + border: 1px solid #dddddd; + border: 1px solid rgba(0, 0, 0, 0.12); +} +.edit-post-visual-editor table thead th, +.edit-post-visual-editor table tfoot td { + border: none; +} +.edit-post-visual-editor table th { + font-size: 1.2rem; + margin: 0px; + padding: 12px; + border: 1px solid #dddddd; + border: 1px solid rgba(0, 0, 0, 0.12); + box-sizing: border-box; +} +.edit-post-visual-editor table td { + padding: 12px; + margin: 0px; + border: 1px solid #dddddd; + border: 1px solid rgba(0, 0, 0, 0.12); + box-sizing: border-box; +} +.edit-post-visual-editor table .wp-block-table__cell-content { + padding: 0px; +} +.edit-post-visual-editor table.wp-block-table.is-style-stripes { + border-collapse: collapse; +} +.edit-post-visual-editor table.wp-block-table.is-style-stripes td { + border: 1px solid #dddddd; + border: 1px solid rgba(0, 0, 0, 0.12); +} + +/* Theme Styles */ + +.wp-block-image { + max-width: none; + margin: 16px auto; + padding: 0px; +} +.wp-block-image figcaption { + width: 100%; +} +.wp-block-gallery .blocks-gallery-item { + margin-left: 0px; + margin-right: 0px; + padding: 0px; +} +.wp-block-gallery .blocks-gallery-image { + margin-left: 0px; + margin-right: 0px; +} +.wp-block-gallery .blocks-gallery-image figcaption, +.wp-block-gallery .blocks-gallery-item figcaption { + box-sizing: border-box; +} +.wp-block-cover-image { + margin: 16px auto; + padding: 24px 0px; +} +.wp-block-cover-image.has-background-dim, +.wp-block-cover-image.has-background-dim h2 { + color: #ffffff; +} +.wp-block-button { + position: relative; + text-align: center; + box-sizing: border-box; +} +.wp-block-button.alignwide a { + display: block; + position: relative; +} diff --git a/css/style-conditionals.css b/css/style-conditionals.css index 849652c..b82c4ef 100644 --- a/css/style-conditionals.css +++ b/css/style-conditionals.css @@ -184,18 +184,20 @@ .music-lite-bg-dark .headline { color: #ffffff; } -.music-lite-bg-dark, .music-lite-bg-dark p, .music-lite-bg-dark blockquote { +.music-lite-bg-dark, .music-lite-bg-dark p, .music-lite-bg-dark figcaption, +.music-lite-bg-dark cite, .music-lite-bg-dark blockquote { color: rgba(255, 255, 255, 0.8); } .music-lite-bg-dark blockquote { - border-color: rgba(255, 255, 255, 1); + border-color: rgba(255, 255, 255, 1) !important; } .music-lite-bg-light h1, .music-lite-bg-light h2, .music-lite-bg-light h3, .music-lite-bg-light h4, .music-lite-bg-light h5, .music-lite-bg-light h6, +.music-lite-bg-dark .wp-block-organic-profile-block h3, .music-lite-bg-light .headline { color: #000000; } -.music-lite-bg-light, .music-lite-bg-light p, .music-lite-bg-light blockquote { +.music-lite-bg-light, .music-lite-bg-light p, .music-lite-bg-light cite, .music-lite-bg-light blockquote, .music-lite-bg-dark .wp-block-organic-profile-block p { color: rgba(0, 0, 0, 0.6); } .music-lite-bg-light blockquote { @@ -295,6 +297,20 @@ .music-lite-desc-inactive #masthead { display: none; } +.page.music-sidebar-inactive .alignfull, +.single.music-sidebar-inactive .alignfull { + width: 100vw; + left: calc(-50vw + 50%); + margin-left: 0px; + margin-right: 0px; +} +.page.music-sidebar-inactive .alignwide, +.single.music-sidebar-inactive .alignwide { + width: calc(100% + 120px); + left: -60px; + margin-left: 0px; + margin-right: 0px; +} /* Elements */ diff --git a/css/style-editor.css b/css/style-editor.css deleted file mode 100644 index e5638eb..0000000 --- a/css/style-editor.css +++ /dev/null @@ -1,715 +0,0 @@ -body { - background-color: #111111; - color: #666666; - color: rgba(0, 0, 0, 0.7); - font-family: 'Roboto'; - font-size: 1em; - font-weight: 300; - line-height: 1.65; - margin: 0px; - padding: 0px; -} -body#tinymce, -body.wp-autoresize { - background-color: #ffffff; - box-sizing: border-box; - padding: 12px 24px !important; -} - -/************************************************ -0. Global -************************************************/ - -p { - padding: 16px 0px; - margin: 0px; -} -p:empty { - display: none; -} -dfn, cite, em, i { - font-style: italic; -} -strong, b { - font-weight: bold; -} -big { - font-size: 140%; -} -small { - font-size: 60%; -} -s { - text-decoration: line-through; -} -mark { - background: #ff0; - color: #000; -} -sub, sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} -sup { - top: -0.5em; -} -sub { - bottom: -0.25em; -} -div { - display: block; -} -span { - display: inline; -} -hr { - border: 0; - width: 100%; - height: 1px; - color: #dddddd; - background-color: #dddddd; - margin: 6px 0px 8px 0px; - padding: 0px; -} -ol, ul { - list-style: none; - margin: 6px 0px; - padding: 0px 0px 0px 12px; -} -ol li { - list-style: inside; - list-style-type: decimal; - margin: 6px 0px; - padding: 0px 0px 0px 12px; -} -ul li { - list-style: inside; - list-style-type: square; - margin: 6px 0px; - padding: 0px 0px 0px 12px; -} -ul ol li, ul ol ul ol li { - list-style-type: decimal; -} -ol ul li, ol ul ol ul li { - list-style-type: square; -} -blockquote { - font-size: 130%; - margin: 18px 0px; - padding: 12px 24px; - border-left: 2px solid rgba(0, 0, 0, 0.12); -} -blockquote p { - margin: 0px; - padding: 0px; -} -blockquote, q { - quotes: none; -} -blockquote:before, blockquote:after, -q:before, q:after { - content: ''; - content: none; -} -code, pre { - background: rgba(0, 0, 0, 0.04); - font-family: Courier, sans-serif; - font-size: 14px; - line-height: 1.4; - margin: 24px 0px; - padding: 6px 8px; - border: 1px solid rgba(0, 0, 0, 0.12); - border-radius: 3px; -} -code { - display: inline; - white-space: normal; -} -pre { - display: block; - white-space: pre-line; -} -pre code { - padding: 0px; - border: none; - box-shadow: none; -} -img { - -ms-interpolation-mode: bicubic; - height: auto; -} -img, object, embed { - max-width: 100%; - margin: 0px auto 0px; -} - -/************************************************ -1. Hyperlinks -************************************************/ - -a img { - border: none; -} -a, a:link, a:visited { - color: #cc00cc; - text-decoration: none; - word-wrap: break-word; -} -a:focus, a:hover, a:active { - color: #ff33cc; - text-decoration: underline; -} - -/************************************************ -2. Headings -************************************************/ - -h1, h2, h3, h4, h5, h6 { - color: #000000; - font-family: 'Anton'; - font-weight: 400; - line-height: 1.1; - word-wrap: break-word; - text-transform: uppercase; - letter-spacing: 1px; - margin: 6px 0px; - padding: 6px 0px; -} -h1 { - font-size: 3.2em; -} -h2 { - font-size: 2.8em; -} -h3 { - font-size: 2.4em; -} -h4 { - font-size: 2em; -} -h5 { - font-size: 1.6em; -} -h6 { - font-size: 1.3em; -} -h1 a, h2 a, h3 a, h4 a, h5 a, h6 a, -h1 a:link, h2 a:link, h3 a:link, h4 a:link, h5 a:link, h6 a:link, -h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited { - color: #ffffff; - text-decoration: none; - border: none; -} -h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover, -h1 a:focus, h2 a:focus, h3 a:focus, h4 a:focus, h5 a:focus, h6 a:focus, -h1 a:active, h2 a:active, h3 a:active, h4 a:active, h5 a:active, h6 a:active { - color: #ff33cc; - text-decoration: none; - border: none; -} - -/************************************************ -8. Pagination -************************************************/ - -.pagination { - display: block; - width: 100%; - font-weight: bold; - text-align: center; - line-height: 36px; - width: -webkit-fit-content; - width: -moz-fit-content; - width: fit-content; - margin: 0px auto; - padding: 0px; - position: relative; - border: 1px solid rgba(0, 0, 0, 0.12); - overflow: hidden; - z-index: 7; -} -.pagination .page-numbers { - float: left; - background: #ffffff; - color: #666666; - min-height: 36px; - min-width: 36px; - text-decoration: none; - margin: 0px; - padding: 0px; - border-left: 1px solid #dddddd; - border-left: 1px solid rgba(0, 0, 0, 0.12); -} -.pagination .page-numbers:first-child { - border-left: none; -} -.pagination .page-numbers:hover, -.pagination .page-numbers:active { - background: #eeeeee; - min-height: 36px; - min-width: 36px; - line-height: 36px; - padding: 0px; -} -.pagination .page-numbers.current { - background: #eeeeee; - min-height: 36px; - min-width: 36px; - line-height: 36px; - padding: 0px; -} - -/************************************************ -9. Images -************************************************/ - -.avatar { - background: #ffffff; - margin: 10px 20px 10px 0px; - padding: 6px; -} -.author-avatar { - float: left; - display: block; - width: 20%; - margin-top: 20px; - padding-right: 3.6%; -} -.author-avatar .avatar { - display: block; - margin: 0px; - padding: 0px; - border: none; -} -img.hide-img { - line-height: 0; - margin-left: -999em; - padding: 0px; -} -img.aligncenter { - display: block; - margin: 6px auto 6px; - padding: 0px; -} -img.alignnone { - padding: 0px; - margin: 6px 0px; - display: inline; -} -img.alignright { - padding: 0px; - margin: 12px 0px 12px 24px; - display: inline; -} -img.alignleft { - display: inline; - padding: 0px; - margin: 12px 24px 12px 0px; -} -.aligncenter { - display: block; - margin: 6px auto 6px; -} -.alignright { - float: right; - margin: 6px 0px 6px 24px; -} -.alignleft { - float: left; - margin: 6px 24px 6px 0px; -} -.wp-caption { - max-width: 100%; - line-height: 0; - margin-top: 12px; - margin-bottom: 12px; - padding: 0px; - overflow: hidden; -} -.wp-caption a { - display: block; -} -.wp-caption img { - width: 100%; - margin: 0px auto 0px; - padding: 0px; -} -.wp-caption p.wp-caption-text, -.wp-caption-dd { - font-size: 0.85em; - line-height: 1.6; - margin: 4px 0px; - padding: 6px 12px; - border-left: 2px solid rgba(255, 255, 255, 0.24); -} - -/************************************************ -12. WordPress Gallery -************************************************/ - -.gallery { - display: block; - text-align: center; - clear: both; - overflow: hidden; - margin: 12px auto 12px; - width: -webkit-fit-content; - width: -moz-fit-content; - width: fit-content; -} -.gallery .gallery-row { - display:block; - clear: both; - overflow: hidden; - margin: 0; -} -.gallery .gallery-item { - overflow: hidden; - float: left; - margin: 0; - text-align: center; - list-style: none; - padding: 0; - position: absolute - bottom: 0 -} -.gallery .gallery-item a { - display: block; - margin: 6px; - padding: 0px; - border: none; -} -.gallery .gallery-item img, -.gallery .gallery-item img.thumbnail { - display: block; - background: #f4f4f4; - height: auto; - margin: 0 auto; - padding: 6px; - border: none !important; - border-radius: 2px; - box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.12); - transition: all .25s; - -moz-transition: all .25s; - -webkit-transition: all .25s; - -o-transition: all .25s; -} -.gallery .gallery-item a:hover img { - background: #cc00cc; -} -.gallery-caption { - margin-left: 0; -} - -/************************************************ -21. Buttons -************************************************/ - -.button, a.button, #prevLink a, #nextLink a, a.more-link, -input[type=submit], input.button { - display: inline-block; - position: relative; - background-color: #cc00cc; - color: #cccccc !important; - color: rgba(255, 255, 255, .7) !important; - font-style: normal; - font-weight: 600; - font-size: 80%; - text-transform: uppercase; - letter-spacing: 1px; - padding: 12px 24px; - border-radius: 24px; - border: none; - -webkit-appearance: none; -} -.button:hover, a.button:hover, #prevLink a:hover, #nextLink a:hover, a.more-link:hover, -input[type=submit]:hover, input.button:hover { - background-color: #ff33cc; - color: #ffffff !important; - text-decoration: none; - text-shadow: -1px -1px 0px rgba(0, 0, 0, .15); - box-shadow: inset 0px 3px 0px rgba(0, 0, 0, .2); - cursor: pointer; -} -p a.more-link { - margin-top: 24px; -} - -/************************************************ -22. Columns -************************************************/ - -.content-columns { - display: block; - width: 100%; - overflow: hidden; - clear: both; -} -.content-column { - float: left; - position: relative; - margin-right: 4%; - padding-top: 24px; - padding-bottom: 24px; -} -.content-column:last-child { - float: right; - margin-right: 0; - clear: right; -} -.content-column:after { - content: ''; - display: block; - height: 0; - clear: both; - visibility: hidden; -} -.content-column.one-half { - width:48%; -} -.content-column.one-third { - width:30.66%; -} -.content-column.two-third { - width:65.33%; -} -.content-column.one-fourth { - width:22%; -} -.content-column.three-fourth { - width:74%; -} -.content-column.one-fifth { - width:16.8%; -} -.content-column.two-fifth { - width:37.6%; -} -.content-column.three-fifth { - width:58.4%; -} -.content-column.four-fifth { - width:67.2%; -} -.content-column.one-sixth { - width:13.33%; -} -.content-column.five-sixth { - width:82.67%; -} - -/************************************************ -23. Tables -************************************************/ - -table { - width: 100%; - margin: 18px 0px; - padding: 0px; - border-collapse: collapse; - border-spacing: 0; -} -table thead, -table tfoot { - border: 1px solid #dddddd; - border: 1px solid rgba(0, 0, 0, 0.12); -} -table thead th, -table tfoot td { - border: none; -} -table th { - background: #eeeeee; - background: rgba(0, 0, 0, 0.08); - font-size: 1.2em; - text-align: center; - margin: 0px; - padding: 8px 12px; - border: 1px solid #dddddd; - border: 1px solid rgba(0, 0, 0, 0.12); - box-sizing: border-box; -} -table td { - padding: 6px 12px; - margin: 0px; - border: 1px solid #dddddd; - border: 1px solid rgba(0, 0, 0, 0.12); - box-sizing: border-box; -} - -/************************************************ -24. Forms -************************************************/ - -form { - display: block; -} -form div { - display: block; - margin-bottom: 8px; - overflow: hidden; -} -form span { - margin-bottom: 8px; - overflow: hidden; -} -form span.required { - display: inline; -} -form li, -form ul, -form ol { - list-style: none; - margin: 0px; - padding: 0px; -} -form legend { - font-weight: bold; - padding-top: 10px; -} -form label { - margin-top: 6px; -} -form li > label { - font-weight: bold; -} -form li li > label { - font-weight: normal; -} -form span label { - font-size: 0.8em; -} -form input, -form input[type='url'], -form input[type='tel'], -form input[type='email'], -form input[type='text'], -form input[type='password'], -form input[type='number'], -form textarea { - display: block; - box-sizing: border-box; - background-color: rgba(0, 0, 0, 0.04); - font-family: inherit; - font-size: 1em; - line-height: 1.4; - padding: 8px; - border: 4px solid rgba(0, 0, 0, 0.12); -} -form input[type='url'], -form input[type='tel'], -form input[type='email'], -form input[type='text'], -form input[type='password'], -form input[type='number'] { - width: 50%; -} -form textarea { - width: 100%; -} -form input[type='checkbox'], -form input[type='radio'] { - margin-left: 0px; - margin-right: 6px; -} -form input[type='submit'] { - margin-top: 0px; -} -form .form-submit { - padding: 8px 0px; -} -textarea { - overflow: auto; -} -address { - margin: 12px 0px; -} -select { - display: block; - background-color: rgba(0, 0, 0, 0.04); - color: rgba(0, 0, 0, 0); - text-shadow: 0 0 0 rgba(0, 0, 0, 0.4); - width: auto; - max-width: 100%; - font-size: 1.2em; - line-height: 1.6; - margin-bottom: 6px; - padding: 6px 46px 6px 8px !important; - box-shadow: none; - border-radius: 0px; - border: 4px solid rgba(0, 0, 0, 0.12); - -webkit-transition: all .25s ease-in-out; - -moz-transition: all .25s ease-in-out; - -o-transition: all .25s ease-in-out; - transition: all .25s ease-in-out; - - background-image: - linear-gradient(45deg, transparent 50%, gray 50%), - linear-gradient(135deg, gray 50%, transparent 50%), - linear-gradient(to right, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.12)); - background-position: - calc(100% - 16px) 50%, - calc(100% - 11px) 50%, - calc(100% - 32px) 6px; - background-size: - 5px 5px, - 5px 5px, - 1px 1.5em; - background-repeat: no-repeat; - - /* reset */ - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; - -webkit-appearance: none; - -moz-appearance: none; -} -input:focus, -select:focus, -textarea:focus, -button:focus { - outline: none; -} - -/************************************************ -25. CSS3 Styles -************************************************/ - -a, button, .button, #submit, #searchsubmit { - transition: all .25s ease-in-out; - -moz-transition: all .25s ease-in-out; - -webkit-transition: all .25s ease-in-out; - -o-transition: all .25s ease-in-out; -} -.shadow { - box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.12); - -moz-box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.12); - -webkit-box-shadow: 0px 0px 12px rgba(0, 0, 0, 0.12); -} -.radius-full { - border-radius: 3px; - -moz-border-radius: 3px; - -khtml-border-radius: 3px; - -webkit-border-radius: 3px; -} -.radius-top { - border-radius: 3px 3px 0px 0px; - -moz-border-radius: 3px 3px 0px 0px; - -khtml-border-radius: 3px 3px 0px 0px; - -webkit-border-radius: 3px 3px 0px 0px; -} -.radius-bottom { - border-radius: 0px 0px 3px 3px; - -moz-border-radius: 0px 0px 3px 3px; - -khtml-border-radius: 0px 0px 3px 3px; - -webkit-border-radius: 0px 0px 3px 3px; -} -.radius-half { - border-radius: 50%; - -moz-border-radius: 50%; - -khtml-border-radius: 50%; - -webkit-border-radius: 50%; -} diff --git a/css/style-mobile.css b/css/style-mobile.css index 78f7ff6..344333d 100644 --- a/css/style-mobile.css +++ b/css/style-mobile.css @@ -313,6 +313,15 @@ margin-left: -24px; box-sizing: border-box; } + .page.music-sidebar-inactive .alignfull, + .single.music-sidebar-inactive .alignfull, + .page.music-sidebar-inactive .alignwide, + .single.music-sidebar-inactive .alignwide { + width: calc(100% + 48px); + left: -24px; + margin-left: 0px; + margin-right: 0px; + } /* Grid */ diff --git a/functions.php b/functions.php index 58b2322..934c665 100644 --- a/functions.php +++ b/functions.php @@ -32,6 +32,11 @@ function music_lite_setup() { */ add_theme_support( 'customize-selective-refresh-widgets' ); + /* + * Enable support for wide alignment class for Gutenberg blocks. + */ + add_theme_support( 'align-wide' ); + /* * Enable support for post thumbnails. */ @@ -228,6 +233,27 @@ function music_lite_enqueue_admin_scripts( $hook ) { } add_action( 'admin_enqueue_scripts', 'music_lite_enqueue_admin_scripts' ); +/* +------------------------------------------------------------------------------------------------------- + Gutenberg Editor Styles +------------------------------------------------------------------------------------------------------- +*/ + +/** + * Enqueue WordPress theme styles within Gutenberg. + */ +function music_lite_gutenberg_styles() { + // Load the theme styles within Gutenberg. + wp_enqueue_style( + 'music-lite-gutenberg', + get_theme_file_uri( '/css/gutenberg.css' ), + false, + '1.0', + 'all' + ); +} +add_action( 'enqueue_block_editor_assets', 'music_lite_gutenberg_styles' ); + /* ------------------------------------------------------------------------------------------------------- Admin Support and Upgrade Link @@ -243,7 +269,7 @@ function music_lite_support_link() { function music_lite_upgrade_link() { global $submenu; - $upgrade_link = esc_url( 'https://organicthemes.com/theme/music-theme/' ); + $upgrade_link = esc_url( 'https://organicthemes.com/theme/music-theme/?utm_source=lite_upgrade' ); $submenu['themes.php'][] = array( __( 'Theme Upgrade', 'music-lite' ), 'manage_options', $upgrade_link ); } add_action( 'admin_menu', 'music_lite_upgrade_link' ); @@ -707,6 +733,12 @@ function music_lite_body_class( $classes ) { $classes[] = 'music-lite-sidebar-1'; } + if ( is_active_sidebar( 'sidebar-1' ) && ! is_page_template( 'template-full.php' ) ) { + $classes[] = 'music-sidebar-active'; + } else { + $classes[] = 'music-sidebar-inactive'; + } + if ( '' != get_theme_mod( 'background_image' ) ) { // This class will render when a background image is set // regardless of whether the user has set a color as well. diff --git a/includes/plugin-activation.php b/includes/plugin-activation.php index 635bc8e..9b07dbc 100644 --- a/includes/plugin-activation.php +++ b/includes/plugin-activation.php @@ -37,25 +37,52 @@ * This function is hooked into `tgmpa_register`, which is fired on the WP `init` action on priority 10. */ function music_lite_register_required_plugins() { - /* - * Array of plugin arrays. Required keys are name and slug. - * If the source is NOT from the .org repo, then source is also required. - */ - $plugins = array( - // Require Organic Custom Content from Github. - array( - 'name' => 'Organic Custom Content', - 'slug' => 'organic-custom-content', - 'required' => true, - ), - array( - 'name' => 'Organic Builder Widgets', // The plugin name. - 'slug' => 'organic-customizer-widgets', // The plugin slug (typically the folder name). - 'required' => true, // If false, the plugin is only 'recommended' instead of required. - ), + if ( class_exists( 'Organic_Widgets_Pro' ) ) { + /* + * Array of plugin arrays. Required keys are name and slug. + * If the source is NOT from the .org repo, then source is also required. + */ + $plugins = array( - ); + // Require Organic Custom Content from Github. + array( + 'name' => 'Organic Custom Content', + 'slug' => 'organic-custom-content', + 'required' => true, + ), + array( + 'name' => 'Organic Profile Block', // The plugin name. + 'slug' => 'organic-profile-block', // The plugin slug (typically the folder name). + 'required' => false, // If false, the plugin is only 'recommended' instead of required. + ), + + ); + + } else { + + $plugins = array( + + // Require Organic Custom Content from Github. + array( + 'name' => 'Organic Custom Content', + 'slug' => 'organic-custom-content', + 'required' => true, + ), + array( + 'name' => 'Organic Builder Widgets', // The plugin name. + 'slug' => 'organic-customizer-widgets', // The plugin slug (typically the folder name). + 'required' => false, // If false, the plugin is only 'recommended' instead of required. + ), + array( + 'name' => 'Organic Profile Block', // The plugin name. + 'slug' => 'organic-profile-block', // The plugin slug (typically the folder name). + 'required' => false, // If false, the plugin is only 'recommended' instead of required. + ), + + ); + + } /* * Array of configuration settings. Amend each line as needed. diff --git a/includes/typefaces.php b/includes/typefaces.php index f232938..a01022b 100644 --- a/includes/typefaces.php +++ b/includes/typefaces.php @@ -72,6 +72,6 @@ function music_lite_scripts_styles() { * @since Music Lite 1.0 */ function music_lite_editor_styles() { - add_editor_style( array( 'css/style-editor.css', music_lite_fonts_url() ) ); + add_editor_style( array( 'style.css', music_lite_fonts_url() ) ); } add_action( 'after_setup_theme', 'music_lite_editor_styles' ); diff --git a/js/jquery.custom.admin.js b/js/jquery.custom.admin.js index 97d8126..0a84504 100644 --- a/js/jquery.custom.admin.js +++ b/js/jquery.custom.admin.js @@ -4,11 +4,11 @@ function modifyAdmin() { - $( '.theme-browser .theme.active .theme-screenshot' ).after( '

Upgrade available. Upgrade now

' ); + $( '.theme-browser .theme.active .theme-screenshot' ).after( '

Upgrade available. Upgrade now

' ); $( '.theme-browser .theme.active' ).click(function() { setTimeout( function() { - $( '.theme-overlay.active .theme-author' ).after( '

Upgrade Available

Upgrade to the premium version for additional theme options, colors, page templates, demo content, and customer support. View details or upgrade now.

' ); + $( '.theme-overlay.active .theme-author' ).after( '

Upgrade Available

Upgrade to the premium version for additional theme options, colors, page templates, demo content, and customer support. View details or upgrade now.

' ); }, 200); }); diff --git a/style.css b/style.css index 89e833b..99e9c69 100644 --- a/style.css +++ b/style.css @@ -2,12 +2,12 @@ Theme Name: Music Lite Theme URI: https://organicthemes.com/theme/music-lite/ - Description: A simple and sleek WordPress theme for musicians. Music Lite is the perfect theme for bands, singers, instrumentalists, DJs and musical artists of any type or genre. The theme features the ability to add tour dates, and works seamlessly with the native WordPress audio player. Also, the theme is great for other professionals in the entertainment industry such as comedians, motivational speakers, theatrical performers and more. Additionally, the Organic Customizer Widgets plugin can be used to build pages with custom content sections for displaying albums, band members and more. Demo: (https://organicthemes.com/demo/?demo=music-lite) + Description: A simple and sleek WordPress theme for musicians. Music Lite is the perfect theme for bands, singers, instrumentalists, DJs and musical artists of any type or genre. The theme features the ability to add tour dates, and works seamlessly with the native WordPress audio player. Also, the theme is great for other professionals in the entertainment industry such as comedians, motivational speakers, theatrical performers and more. Additionally, the Organic Customizer Widgets plugin can be used to build pages with custom content sections for displaying albums, band members and more. Additionally, the theme is optimized for the WordPress 5.0 Gutenberg content editor. Demo: (https://organicthemes.com/demo/?demo=music-lite) Author: Organic Themes Author URI: https://organicthemes.com License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html - Version: 1.2.2 + Version: 1.3 Text Domain: music-lite Domain Path: /languages/ Tags: blog, portfolio, one-column, two-columns, right-sidebar, custom-background, custom-header, custom-menu, custom-logo, featured-images, featured-image-header, flexible-header, full-width-template, translation-ready, threaded-comments, editor-style, theme-options, footer-widgets @@ -48,6 +48,7 @@ 26. Woocommerce 27. Organic Widgets 28. Shortcodes + 29. Gutenberg *******************************************************************************************************************/ @@ -154,7 +155,8 @@ ul ol li, ul ol ul ol li { ol ul li, ol ul ol ul li { list-style-type: square; } -blockquote { +blockquote, +blockquote.wp-block-quote { font-size: 130%; margin: 18px 0px; padding: 12px 24px; @@ -172,7 +174,7 @@ q:before, q:after { content: ''; content: none; } -code, pre { +code, pre, .wp-block-code { background: rgba(0, 0, 0, 0.04); font-family: Courier, sans-serif; font-size: 14px; @@ -1157,6 +1159,7 @@ body.music-landing-page { margin-bottom: 36px; } .banner-img img { + line-height: 0; margin-left: -9999px; } .banner-img .headline { @@ -1196,26 +1199,36 @@ img.hide-img { margin-left: -999em; padding: 0px; } -img.aligncenter { +img.aligncenter, +.wp-block-image.aligncenter { display: block; margin: 6px auto 6px; padding: 0px; } -img.alignnone { +img.alignnone, +.wp-block-image.alignnone { padding: 0px; margin: 6px 0px; display: inline; } -img.alignright { +img.alignright, +.wp-block-image.alignright { padding: 0px; margin: 12px 0px 12px 24px; display: inline; } -img.alignleft { +img.alignleft, +.wp-block-image.alignleft { display: inline; padding: 0px; margin: 12px 24px 12px 0px; } +.alignwide, .alignfull { + position: relative; + width: 100%; + margin-left: 0px; + margin-right: 0px; +} .aligncenter { display: block; margin: 6px auto 6px; @@ -1259,57 +1272,44 @@ img.alignleft { ************************************************/ .gallery { - display: block; - text-align: center; - clear: both; - overflow: hidden; - margin: 12px auto 12px; - width: -webkit-fit-content; - width: -moz-fit-content; - width: fit-content; -} -.gallery .gallery-row { - display:block; - clear: both; - overflow: hidden; - margin: 0; + margin: 18px auto 18px !important; } .gallery .gallery-item { - overflow: hidden; float: left; - margin: 0; + margin-top: 0 !important; text-align: center; - list-style: none; - padding: 0; - position: absolute - bottom: 0 + width: 33%; + padding: 6px; + box-sizing: border-box; } -.gallery .gallery-item a { +.gallery-item a { display: block; + line-height: 0; +} +.gallery img { + border: 6px solid rgba(255, 255, 255, 0.4) !important; margin: 6px; padding: 0px; - border: none; -} -.gallery .gallery-item img, -.gallery .gallery-item img.thumbnail { - display: block; - background: #f4f4f4; - height: auto; - margin: 0 auto; - padding: 6px; - border: none !important; border-radius: 2px; - box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.12); + box-sizing: border-box; transition: all .25s; -moz-transition: all .25s; -webkit-transition: all .25s; -o-transition: all .25s; } -.gallery .gallery-item a:hover img { - background: #cc00cc; +.gallery img:hover { + border-color: #ffffff !important; +} +.gallery .gallery-caption { + font-size: 12px; + line-height: 1.65; + margin: 2px 0px 6px 0px; +} +.gallery dl, .gallery dt { + margin: 0px; } -.gallery-caption { - margin-left: 0; +.gallery br+br { + display: none; } /************************************************ @@ -1849,7 +1849,8 @@ p a.more-link { 21. Tables ************************************************/ -table { +table, +table.wp-block-table { width: 100%; margin: 18px 0px; padding: 0px; @@ -1857,15 +1858,20 @@ table { border-spacing: 0; } table thead, -table tfoot { +table tfoot, +table.wp-block-table thead, +table.wp-block-table tfoot { border: 1px solid #dddddd; border: 1px solid rgba(0, 0, 0, 0.12); } table thead th, -table tfoot td { +table tfoot td, +table.wp-block-table thead th, +table.wp-block-table tfoot td { border: none; } -table th { +table th, +table.wp-block-table th { background: #eeeeee; background: rgba(0, 0, 0, 0.08); font-size: 1.2em; @@ -1876,13 +1882,24 @@ table th { border: 1px solid rgba(0, 0, 0, 0.12); box-sizing: border-box; } -table td { +table td, +table.wp-block-table td { padding: 6px 12px; margin: 0px; border: 1px solid #dddddd; border: 1px solid rgba(0, 0, 0, 0.12); box-sizing: border-box; } +table.wp-block-table.is-style-stripes { + border-collapse: collapse; +} +table.wp-block-table.is-style-stripes td { + border: 1px solid #dddddd; + border: 1px solid rgba(0, 0, 0, 0.12); +} +table.wp-block-table.is-style-stripes tr:nth-child(2n+1) { + background-color: rgba(255, 255, 255, 0.06); +} /************************************************ 22. Forms @@ -2264,3 +2281,85 @@ a, button, .button, #submit, #searchsubmit { #wrapper .organic-box .box-content h5, #wrapper .organic-box .box-content h6 { color: #333333; } + +/************************************************ +29. Gutenberg +************************************************/ + +div[class*="wp-block"], +figure[class*="wp-block"], +blockquote[class*="wp-block"] { + margin-top: 32px; + margin-bottom: 32px; +} +.wp-block-image { + max-width: none; + margin: 32px auto; + padding: 0px; +} +.wp-block-image .aligncenter, +.wp-block-image .alignleft, +.wp-block-image .alignright, +.wp-block-image.is-resized { + display: inline; +} +.wp-block-image .aligncenter > figcaption, +.wp-block-image .alignleft > figcaption, +.wp-block-image .alignright > figcaption, +.wp-block-image.is-resized > figcaption { + display: block; +} +.wp-block-gallery .blocks-gallery-item { + margin-left: 0px; + margin-right: 0px; + padding: 0px; +} +.wp-block-gallery .blocks-gallery-image { + margin-left: 0px; + margin-right: 0px; +} +.wp-block-gallery .blocks-gallery-image figcaption, +.wp-block-gallery .blocks-gallery-item figcaption { + box-sizing: border-box; +} +.wp-block-cover, +.wp-block-cover-image { + margin-top: 32px; + margin-bottom: 32px; +} +.wp-block-cover-image.has-background-dim, +.wp-block-cover-image.has-background-dim h2 { + color: #ffffff; +} +.wp-block-button { + position: relative; + text-align: center; + box-sizing: border-box; +} +.wp-block-button.alignwide a { + display: block; + position: relative; +} +.wp-block-quote:not(.is-large):not(.is-style-large) { + padding-left: 18px; + border-left: 2px solid rgba(0, 0, 0, 0.12); +} +.wp-block-quote__citation, +.wp-block-quote cite, +.wp-block-quote footer { + display: block; + color: rgba(0, 0, 0, 0.4); + font-size: 0.85rem; + margin-top: 12px; +} +.wp-block-quote cite::before, +.wp-block-quote footer::before { + content: '— ' +} +.wp-block-audio { + margin-left: 0px; + margin-right: 0px; +} +.wp-block-audio audio { + width: 100%; +}