From accfc6c489f0a36fee05f9547ee3c23bb2f5d4f9 Mon Sep 17 00:00:00 2001 From: BenSibley Date: Fri, 3 Apr 2020 09:17:30 -0400 Subject: [PATCH] copied image styles to editor --- js/build/postMessage.min.js | 2 +- js/postMessage.js | 2 ++ rtl.css | 1 - sass/_base.scss | 2 -- sass/editor-style.scss | 8 +++++++- style.css | 1 - styles/editor-style.css | 13 +++++++++++-- 7 files changed, 21 insertions(+), 8 deletions(-) diff --git a/js/build/postMessage.min.js b/js/build/postMessage.min.js index da75fdf..642c51a 100644 --- a/js/build/postMessage.min.js +++ b/js/build/postMessage.min.js @@ -1 +1 @@ -!function(a){var b=a("html",window.parent.document),c=a("body"),d=a("#site-title"),e=(a(".tagline"),a("#ct-apex-style-inline-css"));wp.customize("blogname",function(a){a.bind(function(a){0==d.find("img").length&&d.children("a").text(a)})}),wp.customize("blogdescription",function(b){b.bind(function(b){var c=a(".tagline");0==c.length&&a("#title-container").append('

'),c.text(b)})}),wp.customize("logo_upload",function(a){a.bind(function(a){var c=d.children("a");c.html(""!=a?'':b.find("#customize-control-blogname").find("input").val())})});var f=b.find("#customize-control-custom_css").find("textarea").val(),g=e.text();g=g.replace(f,""),e.text(g),c.append('");var h="custom_css";b.find("#sub-accordion-section-custom_css").length&&(h="custom_css[apex]"),wp.customize(h,function(b){b.bind(function(b){a("#style-inline-custom-css").remove(),""!=b&&(b='",c.append(b))})});var i=b.find("#sub-accordion-section-ct_apex_social_media_icons").find(".customize-control-title"),j=4.7;0==i.length&&(i=b.find("#accordion-section-ct_apex_social_media_icons").find(".customize-control-title"),j=4.6);var k=[],l=["twitter","vimeo","youtube","pinterest","reddit","tumblr","steam","xing","github","google-plus","behance","facebook"];i.each(function(){k.push(a(this).text())}),a.each(k,function(c,d){var e=d.replace(/\s+/g,"-").toLowerCase();"email-address"===e&&(e="email"),"contact-form"===e&&(e="email-form"),"ok.ru"===e&&(e="ok-ru"),wp.customize(e,function(c){c.bind(function(){var c=a(".social-media-icons");if(!c.length){a("#menu-primary-container").append('');var c=a(".social-media-icons")}c.empty();var d=b.find("#sub-accordion-section-ct_apex_social_media_icons").find("input");4.7!=j&&(d=b.find("#accordion-section-ct_apex_social_media_icons").find("input")),d.each(function(){if(a(this).val().length>0){var b=a(this).attr("data-customize-setting-link");if(a.inArray(b,l)>-1)var d="fab fa-"+b+"-square";else if("rss"==b)var d="fas fa-rss";else if("email-form"==b)var d="far fa-envelope";else if("podcast"==b)var d="fas fa-podcast";else if("ok-ru"==b)var d="fab fa-odnoklassniki";else if("wechat"==b)var d="fab fa-weixin";else if("phone"==b)var d="fas fa-phone";else var d="fab fa-"+b;c.append("email"==b?'
  • ':'
  • ')}})})})})}(jQuery); \ No newline at end of file +!function(a){var b=a("html",window.parent.document),c=a("body"),d=a("#site-title"),e=(a(".tagline"),a("#ct-apex-style-inline-css"));wp.customize("blogname",function(a){a.bind(function(a){0==d.find("img").length&&d.children("a").text(a)})}),wp.customize("blogdescription",function(b){b.bind(function(b){var c=a(".tagline");0==c.length&&a("#title-container").append('

    '),c.text(b)})}),wp.customize("logo_upload",function(a){a.bind(function(a){var c=d.children("a");c.html(""!=a?'':b.find("#customize-control-blogname").find("input").val())})});var f=b.find("#customize-control-custom_css").find("textarea").val(),g=e.text();g=g.replace(f,""),e.text(g),c.append('");var h="custom_css";b.find("#sub-accordion-section-custom_css").length&&(h="custom_css[apex]"),wp.customize(h,function(b){b.bind(function(b){a("#style-inline-custom-css").remove(),""!=b&&(b='",c.append(b))})});var i=b.find("#sub-accordion-section-ct_apex_social_media_icons").find(".customize-control-title"),j=4.7;0==i.length&&(i=b.find("#accordion-section-ct_apex_social_media_icons").find(".customize-control-title"),j=4.6);var k=[],l=["twitter","vimeo","youtube","pinterest","reddit","tumblr","steam","xing","github","google-plus","behance","facebook"];i.each(function(){k.push(a(this).text())}),a.each(k,function(c,d){var e=d.replace(/\s+/g,"-").toLowerCase();"email-address"===e&&(e="email"),"contact-form"===e&&(e="email-form"),"ok.ru"===e&&(e="ok-ru"),wp.customize(e,function(c){c.bind(function(){var c=a(".social-media-icons");if(!c.length){a("#menu-primary-container").append('');var c=a(".social-media-icons")}c.empty();var d=b.find("#sub-accordion-section-ct_apex_social_media_icons").find("input");4.7!=j&&(d=b.find("#accordion-section-ct_apex_social_media_icons").find("input")),d.each(function(){if(a(this).val().length>0){var b=a(this).attr("data-customize-setting-link");if(a.inArray(b,l)>-1)var d="fab fa-"+b+"-square";else if("rss"==b)var d="fas fa-rss";else if("email-form"==b)var d="far fa-envelope";else if("podcast"==b)var d="fas fa-podcast";else if("ok-ru"==b)var d="fab fa-odnoklassniki";else if("wechat"==b)var d="fab fa-weixin";else if("phone"==b)var d="fas fa-phone";else if("pocket"==b)var d="fab fa-get-pocket";else var d="fab fa-"+b;c.append("email"==b?'
  • ':'
  • ')}})})})})}(jQuery); \ No newline at end of file diff --git a/js/postMessage.js b/js/postMessage.js index f8a0f12..fd1d211 100644 --- a/js/postMessage.js +++ b/js/postMessage.js @@ -151,6 +151,8 @@ var siteClass = 'fab fa-weixin'; } else if ( siteName == 'phone') { var siteClass = 'fas fa-phone'; + } else if ( siteName == 'pocket') { + var siteClass = 'fab fa-get-pocket'; } else { var siteClass = 'fab fa-' + siteName; } diff --git a/rtl.css b/rtl.css index 246675b..d1e84a6 100644 --- a/rtl.css +++ b/rtl.css @@ -179,7 +179,6 @@ hr { margin: 1.5em 0; } -/* Table styles */ /* Table styles */ table { border-spacing: 0; diff --git a/sass/_base.scss b/sass/_base.scss index e191ebe..dbeaaf6 100644 --- a/sass/_base.scss +++ b/sass/_base.scss @@ -116,8 +116,6 @@ hr { margin: $baseline-height 0; } -/* Table styles */ - /* Table styles */ table { border-spacing: 0; diff --git a/sass/editor-style.scss b/sass/editor-style.scss index bea7742..4b6e7d4 100644 --- a/sass/editor-style.scss +++ b/sass/editor-style.scss @@ -166,6 +166,10 @@ th { .alignnone { margin: $baseline-height 0; } +.wp-block-image { + margin: $baseline-height 0; +} +img, .alignright, .alignleft, .aligncenter, @@ -178,7 +182,9 @@ th { max-width: 100%; height: auto; } -.wp-caption-text { +.wp-caption-text, +.gallery-caption, +.wp-block-image figcaption { @extend %twelve-pixels; margin: 0 0 $baseline-height; } diff --git a/style.css b/style.css index 1343727..42f94b7 100644 --- a/style.css +++ b/style.css @@ -179,7 +179,6 @@ hr { margin: 1.5em 0; } -/* Table styles */ /* Table styles */ table { border-spacing: 0; diff --git a/styles/editor-style.css b/styles/editor-style.css index 7525bf8..cb8ccee 100644 --- a/styles/editor-style.css +++ b/styles/editor-style.css @@ -25,7 +25,9 @@ h3 { /* 24px */ } -.wp-block-table figcaption, .wp-caption-text { +.wp-block-table figcaption, .wp-caption-text, +.gallery-caption, +.wp-block-image figcaption { font-size: 0.75em; /* 12px / 16px */ line-height: 1.5; @@ -189,6 +191,11 @@ th { margin: 1.5em 0; } +.wp-block-image { + margin: 1.5em 0; +} + +img, .alignright, .alignleft, .aligncenter, @@ -202,7 +209,9 @@ th { height: auto; } -.wp-caption-text { +.wp-caption-text, +.gallery-caption, +.wp-block-image figcaption { margin: 0 0 1.5em; }