From 9cc5d2a38a5a65bbe469593e9f9c59398d3ec7e5 Mon Sep 17 00:00:00 2001 From: Andrew Misplon Date: Thu, 23 Nov 2017 13:16:42 +0200 Subject: [PATCH 01/18] Update theme settings CSS --- inc/settings.php | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/inc/settings.php b/inc/settings.php index 36f66ee..e01d168 100644 --- a/inc/settings.php +++ b/inc/settings.php @@ -447,7 +447,6 @@ function siteorigin_corp_font_settings( $settings ) { function siteorigin_corp_settings_custom_css( $css ) { // Custom CSS. $css .= '/* style */ - /**** /private/var/folders/_s/htpl50fd5d70c9hb2nnvjnjh0000gn/T/B6bssz/sass/style.css ***/ body,button,input,select,optgroup,textarea { color: ${typography_text}; .font( ${typography_body_font} ); @@ -519,24 +518,30 @@ function siteorigin_corp_settings_custom_css( $css ) { a:hover,a:focus,a:active { color: ${typography_text}; } + .main-navigation ul ul li a { + background: ${navigation_drop_down_background}; + border-bottom: 1px solid ${navigation_drop_down_divider}; + color: ${navigation_drop_down_link}; + } .main-navigation ul ul li:hover > a { color: ${navigation_drop_down_link_hover}; } .main-navigation ul ul li:first-of-type { border-top: 2px solid ${navigation_link_accent}; } - .main-navigation ul ul a { - background: ${navigation_drop_down_background}; - border-bottom: 1px solid ${navigation_drop_down_divider}; - color: ${navigation_drop_down_link}; - } .main-navigation ul li { .font( ${typography_heading_font} ); } - .main-navigation ul a { + .main-navigation ul li a { border-bottom: 2px solid ${header_background}; color: ${navigation_link}; } + .main-navigation ul .menu-button a { + background: ${typography_accent}; + } + .main-navigation ul .menu-button a:hover { + background: .rgba( ${typography_accent}, .8); + } .main-navigation div > ul > li:hover > a { border-color: ${navigation_link_accent}; } @@ -647,10 +652,10 @@ function siteorigin_corp_settings_custom_css( $css ) { .widget #wp-calendar tfoot #prev a:hover,.widget #wp-calendar tfoot #next a:hover { color: ${typography_accent}; } - .widget_categories .cat-item { + .widget_archive li,.widget_categories li { color: ${typography_secondary_text}; } - .widget_categories .cat-item a { + .widget_archive li a,.widget_categories li a { color: ${typography_heading}; } .widget_recent_comments .recentcomments { From 0a4942a0613ea301e171dbd9db37d87174cb95fc Mon Sep 17 00:00:00 2001 From: Andrew Misplon Date: Fri, 24 Nov 2017 16:36:34 +0200 Subject: [PATCH 02/18] Finish styling the post format gallery slider --- inc/template-tags.php | 8 ++++---- sass/media/_flexslider.scss | 23 ++++++++++++----------- style.css | 22 +++++++++++++--------- 3 files changed, 29 insertions(+), 24 deletions(-) diff --git a/inc/template-tags.php b/inc/template-tags.php index 0427973..04c4e7a 100644 --- a/inc/template-tags.php +++ b/inc/template-tags.php @@ -142,8 +142,8 @@ function siteorigin_corp_display_icon( $type ) { - - + + - - + + Date: Fri, 24 Nov 2017 16:39:26 +0200 Subject: [PATCH 03/18] Finalise image caption styling --- sass/media/_captions.scss | 7 ++++--- style.css | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/sass/media/_captions.scss b/sass/media/_captions.scss index ff3a5a2..5ec23ea 100644 --- a/sass/media/_captions.scss +++ b/sass/media/_captions.scss @@ -1,5 +1,6 @@ .wp-caption { - font-size: 14px; + color: $color__text-light; + font-size: 13px; max-width: 100%; img[class*="wp-image-"] { @@ -7,10 +8,10 @@ } .wp-caption-text { - margin: 12px 0; + margin: 14px 0; } } .wp-caption-text { - text-align: center; + text-align: left; } diff --git a/style.css b/style.css index 75dd7b2..e2f8ca4 100644 --- a/style.css +++ b/style.css @@ -2167,17 +2167,18 @@ object { ## Captions --------------------------------------------------------------*/ .wp-caption { - font-size: 14px; + color: #929292; + font-size: 13px; max-width: 100%; } .wp-caption img[class*="wp-image-"] { display: block; margin-left: auto; margin-right: auto; } .wp-caption .wp-caption-text { - margin: 12px 0; } + margin: 14px 0; } .wp-caption-text { - text-align: center; } + text-align: left; } /*-------------------------------------------------------------- ## - FlexSlider From 0c16a42798571e79758df5dd640724d558125081 Mon Sep 17 00:00:00 2001 From: Andrew Misplon Date: Fri, 24 Nov 2017 16:43:08 +0200 Subject: [PATCH 04/18] Improve blog loop description --- loops/loop-blog.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loops/loop-blog.php b/loops/loop-blog.php index 5a74b16..9713d08 100644 --- a/loops/loop-blog.php +++ b/loops/loop-blog.php @@ -1,6 +1,6 @@ Date: Fri, 24 Nov 2017 19:40:31 +0200 Subject: [PATCH 05/18] Complete full posts slider application * Jetpack Featured Content slider. * Post Loop widget slider. * Final font size styling to follow. --- functions.php | 2 +- inc/extras.php | 7 +++- inc/jetpack.php | 9 +++++ inc/template-tags.php | 38 +++++++++++++++++++ loops/loop-slider.php | 46 ++++++++++++++++++++++ sass/media/_flexslider.scss | 4 ++ sass/media/_media.scss | 2 +- sass/media/_posts-slider.scss | 61 +++++++++++++----------------- style.css | 45 ++++++++++------------ template-parts/featured-slider.php | 54 ++++++++++++++++++++++++++ 10 files changed, 204 insertions(+), 64 deletions(-) create mode 100644 loops/loop-slider.php create mode 100644 template-parts/featured-slider.php diff --git a/functions.php b/functions.php index 6a52a62..08deb03 100644 --- a/functions.php +++ b/functions.php @@ -168,7 +168,7 @@ function siteorigin_corp_scripts() { // Flexslider. wp_register_script( 'jquery-flexslider', get_template_directory_uri() . '/js/jquery.flexslider' . SITEORIGIN_THEME_JS_PREFIX . '.js', array( 'jquery' ), '2.6.3', true ); - if ( is_single() && has_post_format( 'gallery' ) ) { + if ( is_home() && siteorigin_corp_has_featured_posts() ) { wp_enqueue_script( 'jquery-flexslider' ); } diff --git a/inc/extras.php b/inc/extras.php index b3c9c9c..5d1c21f 100644 --- a/inc/extras.php +++ b/inc/extras.php @@ -16,6 +16,11 @@ */ function siteorigin_corp_body_classes( $classes ) { + // Header margin. + if ( is_home() && siteorigin_corp_has_featured_posts() ) { + $classes[] = 'no-header-margin'; + } + // Mobile compatibility classes. $classes[] = 'css3-animations'; $classes[] = 'no-js'; @@ -33,7 +38,7 @@ function siteorigin_corp_body_classes( $classes ) { if ( ! empty( $page_settings['layout'] ) ) $classes[] = 'page-layout-' . $page_settings['layout']; if ( empty( $page_settings['header_margin'] ) ) $classes[] = 'no-header-margin'; if ( empty( $page_settings['footer_margin'] ) ) $classes[] = 'no-footer-margin'; - } + } // Responsive layout. $classes[] = 'responsive'; diff --git a/inc/jetpack.php b/inc/jetpack.php index a9fd9e9..4c46c88 100644 --- a/inc/jetpack.php +++ b/inc/jetpack.php @@ -15,6 +15,15 @@ * See: https://jetpack.me/support/responsive-videos/ */ function siteorigin_corp_jetpack_setup() { + /* + * Enable support for Jetpack Featured Content. + * See https://jetpack.com/support/featured-content/ + */ + add_theme_support( 'featured-content', array( + 'filter' => 'siteorigin_corp_get_featured_posts', + 'post_types' => array( 'post' ), + ) ); + /* * Enable support for Jetpack Infinite Scroll. * See https://jetpack.com/support/infinite-scroll/ diff --git a/inc/template-tags.php b/inc/template-tags.php index 04c4e7a..36fe114 100644 --- a/inc/template-tags.php +++ b/inc/template-tags.php @@ -365,6 +365,44 @@ function siteorigin_corp_footer_text() { } endif; +/** + * Add a filter for Jetpack Featured Content. + */ +function siteorigin_corp_get_featured_posts() { + return apply_filters( 'siteorigin_corp_get_featured_posts', array() ); +} + +/** + * Check the Jetpack Featured Content. + */ +function siteorigin_corp_has_featured_posts( $minimum = 1 ) { + if ( is_paged() ) + return false; + + $minimum = absint( $minimum ); + $featured_posts = apply_filters( 'siteorigin_corp_get_featured_posts', array() ); + + if ( ! is_array( $featured_posts ) ) + return false; + + if ( $minimum > count( $featured_posts ) ) + return false; + + return true; +} + +if ( ! function_exists( 'siteorigin_corp_display_featured_posts' ) ) : +/** + * Output the Jetpack Featured Content. + */ +function siteorigin_corp_display_featured_posts() { + if ( is_home() && siteorigin_corp_has_featured_posts() ) { + get_template_part( 'template-parts/featured', 'slider' ); + } +} +endif; +add_action( 'siteorigin_corp_content_before', 'siteorigin_corp_display_featured_posts' ); + if ( ! function_exists( 'siteorigin_corp_strip_gallery' ) ) : /** * Remove gallery. diff --git a/loops/loop-slider.php b/loops/loop-slider.php new file mode 100644 index 0000000..ae81cd4 --- /dev/null +++ b/loops/loop-slider.php @@ -0,0 +1,46 @@ + + + + + diff --git a/sass/media/_flexslider.scss b/sass/media/_flexslider.scss index a97fcef..41f120c 100644 --- a/sass/media/_flexslider.scss +++ b/sass/media/_flexslider.scss @@ -73,6 +73,10 @@ text-align: center; width: 100%; + @media (max-width: 480px) { + display: none; + } + li { display: inline-block; margin: 0 5px; diff --git a/sass/media/_media.scss b/sass/media/_media.scss index 66258dc..277f848 100644 --- a/sass/media/_media.scss +++ b/sass/media/_media.scss @@ -7,7 +7,7 @@ padding: 0; } -/* Make sure embeds and iframes fit their containers. */ +// Make sure embeds and iframes fit their containers. embed, iframe, object { diff --git a/sass/media/_posts-slider.scss b/sass/media/_posts-slider.scss index 32f7d1d..acf39e9 100644 --- a/sass/media/_posts-slider.scss +++ b/sass/media/_posts-slider.scss @@ -9,7 +9,8 @@ background-color: $color__text-medium; background-position: center; background-size: cover; - height: 520px; + height: 500px; + position: relative; @media (max-width: 768px) { height: 380px; @@ -17,46 +18,54 @@ @media (max-width: 480px) { height: 155px; - } - + } + .overlay a { - background: rgba(0, 0, 0, .5); + background: rgba(0, 0, 0, .3); display: block; height: 100%; position: absolute; width: 100%; - } + } .slide-content { text-align: center; - padding: 160px 10% 0; + margin-top: -37.5px; position: absolute; + top: 50%; width: 100%; z-index: 3; - @media (max-width: 768px) { - padding-top: 80px; - } - @media (max-width: 480px) { - padding-top: 30px; - } + margin-top: -15.5px; + } @at-root .widget_siteorigin-panels-postloop & { - padding: 15% 10%; + + } + + .entry-meta span { + color: #fff; + margin-bottom: 20px; + + @media (max-width: 480px) { + display: none; + } + + a:hover { + color: #fff; + } } .entry-title { font-size: 46px; + font-weight: normal; margin-bottom: 0; position: relative; - text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); z-index: 3; @media (max-width: 768px) { font-size: 41px; - line-height: 1.1; - margin-bottom: 10px; } @media (max-width: 480px) { @@ -65,26 +74,8 @@ a { color: #fff; - - &:hover { - color: rgba(255, 255, 255, .8); - } } - } - - .entry-excerpt { - color: rgba(255, 255, 255, .9); - font-size: 18px; - text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); - - @media (max-width: 768px) { - font-size: 16px; - } - - @media (max-width: 480px) { - display: none; - } - } + } } } } diff --git a/style.css b/style.css index e2f8ca4..b416a03 100644 --- a/style.css +++ b/style.css @@ -2157,7 +2157,6 @@ body:not(.single) .hentry { margin-top: 0; padding: 0; } -/* Make sure embeds and iframes fit their containers. */ embed, iframe, object { @@ -2234,6 +2233,9 @@ object { position: absolute; text-align: center; width: 100%; } + @media (max-width: 480px) { + .flexslider .flex-control-nav { + display: none; } } .flexslider .flex-control-nav li { display: inline-block; margin: 0 5px; } @@ -2299,7 +2301,8 @@ object { background-color: #626262; background-position: center; background-size: cover; - height: 520px; } + height: 500px; + position: relative; } @media (max-width: 768px) { .featured-posts-slider .slides .slide { height: 380px; } } @@ -2307,52 +2310,42 @@ object { .featured-posts-slider .slides .slide { height: 155px; } } .featured-posts-slider .slides .slide .overlay a { - background: rgba(0, 0, 0, 0.5); + background: rgba(0, 0, 0, 0.3); display: block; height: 100%; position: absolute; width: 100%; } .featured-posts-slider .slides .slide .slide-content { text-align: center; - padding: 160px 10% 0; + margin-top: -37.5px; position: absolute; + top: 50%; width: 100%; z-index: 3; } - @media (max-width: 768px) { - .featured-posts-slider .slides .slide .slide-content { - padding-top: 80px; } } @media (max-width: 480px) { .featured-posts-slider .slides .slide .slide-content { - padding-top: 30px; } } - .widget_siteorigin-panels-postloop .featured-posts-slider .slides .slide .slide-content { - padding: 15% 10%; } + margin-top: -15.5px; } } + .featured-posts-slider .slides .slide .slide-content .entry-meta span { + color: #fff; + margin-bottom: 20px; } + @media (max-width: 480px) { + .featured-posts-slider .slides .slide .slide-content .entry-meta span { + display: none; } } + .featured-posts-slider .slides .slide .slide-content .entry-meta span a:hover { + color: #fff; } .featured-posts-slider .slides .slide .slide-content .entry-title { font-size: 46px; + font-weight: normal; margin-bottom: 0; position: relative; - text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); z-index: 3; } @media (max-width: 768px) { .featured-posts-slider .slides .slide .slide-content .entry-title { - font-size: 41px; - line-height: 1.1; - margin-bottom: 10px; } } + font-size: 41px; } } @media (max-width: 480px) { .featured-posts-slider .slides .slide .slide-content .entry-title { font-size: 26px; } } .featured-posts-slider .slides .slide .slide-content .entry-title a { color: #fff; } - .featured-posts-slider .slides .slide .slide-content .entry-title a:hover { - color: rgba(255, 255, 255, 0.8); } - .featured-posts-slider .slides .slide .slide-content .entry-excerpt { - color: rgba(255, 255, 255, 0.9); - font-size: 18px; - text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); } - @media (max-width: 768px) { - .featured-posts-slider .slides .slide .slide-content .entry-excerpt { - font-size: 16px; } } - @media (max-width: 480px) { - .featured-posts-slider .slides .slide .slide-content .entry-excerpt { - display: none; } } /*# sourceMappingURL=sass/maps/style.css.map */ diff --git a/template-parts/featured-slider.php b/template-parts/featured-slider.php new file mode 100644 index 0000000..1260657 --- /dev/null +++ b/template-parts/featured-slider.php @@ -0,0 +1,54 @@ + + + + + From f86e03b79ac85516e8404092e8002cd9715a9e8b Mon Sep 17 00:00:00 2001 From: Andrew Misplon Date: Sat, 25 Nov 2017 12:56:22 +0200 Subject: [PATCH 06/18] Add the new calendar widget styling --- sass/site/secondary/_widgets.scss | 32 +++++++++++++++-------- sass/variables-site/_colors.scss | 6 ++--- style.css | 42 ++++++++++++++++++------------- 3 files changed, 48 insertions(+), 32 deletions(-) diff --git a/sass/site/secondary/_widgets.scss b/sass/site/secondary/_widgets.scss index 8d0a1f7..5968266 100644 --- a/sass/site/secondary/_widgets.scss +++ b/sass/site/secondary/_widgets.scss @@ -14,7 +14,7 @@ // Set the font size of elements below the widget title to 14px. ~ * { - font-size: .9333em; + font-size: 14px; } } @@ -43,15 +43,22 @@ /*-------------------------------------------------------------- ## Calendar Widgets --------------------------------------------------------------*/ +.calendar_wrap { + background: #fff; + border: 1px solid $color__background-hr; + padding-left: 6px; +} + .widget #wp-calendar { border: 0; + font-size: 13px; margin: 0; caption { color: $color__text-dark; - font-weight: bold; + font-size: 14px; font-weight: 600; - text-align: left; + padding-top: 14px; } tr:nth-child(2n+2) { @@ -65,14 +72,13 @@ } thead { - border-bottom: 2px solid $color__background-hr; tr { background: none; } th { - padding: 8px 0; + padding: 13px 0 8px; text-align: center; } } @@ -83,21 +89,25 @@ background: none; } - tr:first-of-type td { - padding-top: 8px; - } - td { padding-bottom: 8px; text-align: center; - } + + a { + color: $color__accent; + + &:hover { + color: $color__text-medium; + } + } + } } tfoot { #prev, #next { - padding-top: 4px; + padding: 4px 20px 17px; a { color: $color__text-dark; diff --git a/sass/variables-site/_colors.scss b/sass/variables-site/_colors.scss index cf53f4a..f8da439 100644 --- a/sass/variables-site/_colors.scss +++ b/sass/variables-site/_colors.scss @@ -25,7 +25,7 @@ $color__navigation_link_accent: #f14e4e; $color__navigation-drop-down-background: #262627; $color__navigation-drop-down-divider: #353538; $color__navigation-drop-down-link: #b2b2b2; -$color__navigation-drop-down-link-hover: #ffffff; +$color__navigation-drop-down-link-hover: #fff; $color__navigation-search-overlay_text: #b2b2b2; $color__navigation-search-overlay-background: #090d14; @@ -34,12 +34,12 @@ $color__site_title: #2d2d2d; $color__site_tagline: #929292; // Footer. -$color__footer-widget-title: #ffffff; +$color__footer-widget-title: #fff; $color__footer-widget-text: #b4b5b8; $color__footer-widget-link: #ffffff; $color__footer-widget-link-hover: #b4b5b8; $color__footer-background: #363a43; $color__bottom-bar-text: #b4b5b8; $color__bottom-bar-link: #b4b5b8; -$color__bottom-bar-link-hover: #ffffff; +$color__bottom-bar-link-hover: #fff; $color__bottom-bar-background: #2f333b; diff --git a/style.css b/style.css index b416a03..3226810 100644 --- a/style.css +++ b/style.css @@ -554,7 +554,7 @@ a { padding: 12px 20px; white-space: nowrap; } .main-navigation ul ul li:hover > a { - color: #ffffff; } + color: #fff; } .main-navigation ul ul li:hover > ul, .main-navigation ul ul li.focus > ul { left: 100%; } @@ -710,7 +710,7 @@ a { text-transform: uppercase; width: 100% !important; } #mobile-navigation ul li a:hover { - color: #ffffff; } + color: #fff; } #mobile-navigation ul li.menu-item-has-children > a { padding-right: 40px; } #mobile-navigation ul li .dropdown-toggle { @@ -723,7 +723,7 @@ a { top: -2px; transition: none; } #mobile-navigation ul li .dropdown-toggle:hover { - color: #ffffff; } + color: #fff; } #mobile-navigation ul li .dropdown-toggle.toggle-open { transform: rotate(-180deg); } #mobile-navigation ul ul { @@ -1119,7 +1119,7 @@ a { text-transform: uppercase; } .widget-area .widget .widget-title ~ *, .site-footer .widget .widget-title ~ * { - font-size: .9333em; } + font-size: 14px; } .widget-area .widget a, .site-footer .widget a { @@ -1143,37 +1143,43 @@ a { /*-------------------------------------------------------------- ## Calendar Widgets --------------------------------------------------------------*/ +.calendar_wrap { + background: #fff; + border: 1px solid #e6e6e6; + padding-left: 6px; } + .widget #wp-calendar { border: 0; + font-size: 13px; margin: 0; } .widget #wp-calendar caption { color: #2d2d2d; - font-weight: bold; + font-size: 14px; font-weight: 600; - text-align: left; } + padding-top: 14px; } .widget #wp-calendar tr:nth-child(2n+2) { background: none; } .widget #wp-calendar th, .widget #wp-calendar td { border: 0; padding: 0; } - .widget #wp-calendar thead { - border-bottom: 2px solid #e6e6e6; } - .widget #wp-calendar thead tr { - background: none; } - .widget #wp-calendar thead th { - padding: 8px 0; - text-align: center; } + .widget #wp-calendar thead tr { + background: none; } + .widget #wp-calendar thead th { + padding: 13px 0 8px; + text-align: center; } .widget #wp-calendar tbody .pad { background: none; } - .widget #wp-calendar tbody tr:first-of-type td { - padding-top: 8px; } .widget #wp-calendar tbody td { padding-bottom: 8px; text-align: center; } + .widget #wp-calendar tbody td a { + color: #f14e4e; } + .widget #wp-calendar tbody td a:hover { + color: #626262; } .widget #wp-calendar tfoot #prev, .widget #wp-calendar tfoot #next { - padding-top: 4px; } + padding: 4px 20px 17px; } .widget #wp-calendar tfoot #prev a, .widget #wp-calendar tfoot #next a { color: #2d2d2d; } @@ -2107,7 +2113,7 @@ body:not(.single) .hentry { margin: 0 2.75% 95px 0; float: left; } .site-footer .widgets .widget .widget-title { - color: #ffffff; + color: #fff; font-size: 1.0666em; font-weight: 500; } .site-footer .widgets .widget ~ * { @@ -2144,7 +2150,7 @@ body:not(.single) .hentry { .site-footer .bottom-bar a { color: #b4b5b8; } .site-footer .bottom-bar a:hover { - color: #ffffff; } + color: #fff; } /*-------------------------------------------------------------- # Media From 12890830946003e2a55fcb1a2a02a186c2f99312 Mon Sep 17 00:00:00 2001 From: Andrew Misplon Date: Sat, 25 Nov 2017 13:00:45 +0200 Subject: [PATCH 07/18] Update settings CSS --- inc/settings.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/inc/settings.php b/inc/settings.php index e01d168..2ce3cb3 100644 --- a/inc/settings.php +++ b/inc/settings.php @@ -640,11 +640,17 @@ function siteorigin_corp_settings_custom_css( $css ) { .widget-area .widget a:hover,.site-footer .widget a:hover { color: ${typography_accent}; } + .calendar_wrap { + border: 1px solid ${typography_border}; + } .widget #wp-calendar caption { color: ${typography_heading}; } - .widget #wp-calendar thead { - border-bottom: 2px solid ${typography_border}; + .widget #wp-calendar tbody td a { + color: ${typography_accent}; + } + .widget #wp-calendar tbody td a:hover { + color: ${typography_text}; } .widget #wp-calendar tfoot #prev a,.widget #wp-calendar tfoot #next a { color: ${typography_heading}; @@ -879,6 +885,9 @@ function siteorigin_corp_settings_custom_css( $css ) { .site-footer .bottom-bar a:hover { color: ${footer_bottom_bar_link_hover}; } + .wp-caption { + color: ${typography_secondary_text}; + } .featured-posts-slider .slides .slide { background-color: ${typography_text}; }'; From 95131de3a0ef865e02586dea4f4156c47584d2e0 Mon Sep 17 00:00:00 2001 From: Andrew Misplon Date: Sat, 25 Nov 2017 14:15:41 +0200 Subject: [PATCH 08/18] Add bottom bar footer social widget * Redo layout structure for bottom bar --- footer.php | 12 ++++++++- inc/settings.php | 8 ++++++ sass/navigation/_menus.scss | 7 +++--- sass/site/_footer.scss | 49 ++++++++++++++++++++++++++++++------- style.css | 42 ++++++++++++++++++++++--------- 5 files changed, 94 insertions(+), 24 deletions(-) diff --git a/footer.php b/footer.php index 46db334..6ef19fd 100644 --- a/footer.php +++ b/footer.php @@ -53,7 +53,17 @@ } ?> - 'menu-2', 'container_class' => 'footer-menu', 'depth' => 1, 'fallback_cb' => '' ) ); ?> + + + diff --git a/inc/settings.php b/inc/settings.php index 2ce3cb3..107f622 100644 --- a/inc/settings.php +++ b/inc/settings.php @@ -331,6 +331,14 @@ function siteorigin_corp_settings_init() { 'description' => esc_html__( 'Hide the SiteOrigin link in your footer.', 'siteorigin-corp' ), 'teaser' => true, ), + 'social_widget' => array( + 'type' => 'widget', + 'widget_class' => 'SiteOrigin_Widget_SocialMediaButtons_Widget', + 'bundle_widget' => 'social-media-buttons', + 'plugin' => 'so-widgets-bundle', + 'plugin_name' => esc_html__( 'SiteOrigin Widgets Bundle', 'siteorigin-corp' ), + 'description' => esc_html__( 'Add social icons to bottom bar menu.', 'siteorigin-corp' ), + ), 'widget_title' => array( 'type' => 'color', 'label' => esc_html__( 'Widget Title Color', 'siteorigin-corp' ), diff --git a/sass/navigation/_menus.scss b/sass/navigation/_menus.scss index 4778e1e..3f74500 100644 --- a/sass/navigation/_menus.scss +++ b/sass/navigation/_menus.scss @@ -499,18 +499,19 @@ $sel: ''; ## Footer Menu --------------------------------------------------------------*/ .footer-menu { - float: right; font-size: 13px; text-align: right; - width: 70%; @media (max-width: 768px) { - float: none; padding-top: 15px; text-align: center; width: 100%; } + > div { + display: inline-block; + } + .menu { list-style: none; margin: 0; diff --git a/sass/site/_footer.scss b/sass/site/_footer.scss index dfb4ee0..10384f1 100644 --- a/sass/site/_footer.scss +++ b/sass/site/_footer.scss @@ -53,10 +53,8 @@ } .site-info { - float: left; font-size: 13px; text-align: left; - width: 30%; @media (max-width: 768px) { float: none; @@ -69,13 +67,7 @@ background: $color__bottom-bar-background; color: $color__bottom-bar-text; overflow: auto; - padding: 25px 0; - - div:only-of-type { - float: none; - text-align: center; - width: 100%; - } + padding: 25px 0; a { color: $color__bottom-bar-link; @@ -84,5 +76,44 @@ color: $color__bottom-bar-link-hover; } } + + .corp-container { + -ms-flex-align: center; + -webkit-align-items: center; + -webkit-box-align: center; + align-items: center; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-justify-content: space-between; + justify-content: space-between; + width: 100%; + + @media (max-width: 768px) { + flex-direction: column; + } + + div:only-of-type { + float: none; + text-align: center; + width: 100%; + } + } + + .widget { + display: inline-block; + margin: 0 0 0 15px; + + @media (max-width: 768px) { + margin: 0; + padding-top: 15px; + text-align: center; + width: 100%; + } + + a { + + } + } } } diff --git a/style.css b/style.css index 3226810..dcae92b 100644 --- a/style.css +++ b/style.css @@ -874,16 +874,15 @@ a { ## Footer Menu --------------------------------------------------------------*/ .footer-menu { - float: right; font-size: 13px; - text-align: right; - width: 70%; } + text-align: right; } @media (max-width: 768px) { .footer-menu { - float: none; padding-top: 15px; text-align: center; width: 100%; } } + .footer-menu > div { + display: inline-block; } .footer-menu .menu { list-style: none; margin: 0; @@ -2129,10 +2128,8 @@ body:not(.single) .hentry { float: none; width: 100% !important; } } .site-footer .site-info { - float: left; font-size: 13px; - text-align: left; - width: 30%; } + text-align: left; } @media (max-width: 768px) { .site-footer .site-info { float: none; @@ -2143,14 +2140,37 @@ body:not(.single) .hentry { color: #b4b5b8; overflow: auto; padding: 25px 0; } - .site-footer .bottom-bar div:only-of-type { - float: none; - text-align: center; - width: 100%; } .site-footer .bottom-bar a { color: #b4b5b8; } .site-footer .bottom-bar a:hover { color: #fff; } + .site-footer .bottom-bar .corp-container { + -ms-flex-align: center; + -webkit-align-items: center; + -webkit-box-align: center; + align-items: center; + display: -ms-flexbox; + display: -webkit-flex; + display: flex; + -webkit-justify-content: space-between; + justify-content: space-between; + width: 100%; } + @media (max-width: 768px) { + .site-footer .bottom-bar .corp-container { + flex-direction: column; } } + .site-footer .bottom-bar .corp-container div:only-of-type { + float: none; + text-align: center; + width: 100%; } + .site-footer .bottom-bar .widget { + display: inline-block; + margin: 0 0 0 15px; } + @media (max-width: 768px) { + .site-footer .bottom-bar .widget { + margin: 0; + padding-top: 15px; + text-align: center; + width: 100%; } } /*-------------------------------------------------------------- # Media From 56bb0b69efb3acbccdcf9f85e86776ba20213405 Mon Sep 17 00:00:00 2001 From: Andrew Misplon Date: Sat, 25 Nov 2017 14:21:52 +0200 Subject: [PATCH 09/18] Fix indenting --- footer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/footer.php b/footer.php index 6ef19fd..bb138ee 100644 --- a/footer.php +++ b/footer.php @@ -58,7 +58,7 @@ if ( has_nav_menu( 'menu-2' ) || ! empty( $widget['networks'] ) ) : ?>