diff --git a/assets/javascripts/discourse/components/google-dfp-ad.js.es6 b/assets/javascripts/discourse/components/google-dfp-ad.js.es6 index d82b820..adea1bb 100755 --- a/assets/javascripts/discourse/components/google-dfp-ad.js.es6 +++ b/assets/javascripts/discourse/components/google-dfp-ad.js.es6 @@ -6,7 +6,6 @@ var const_height = ''; var _loaded = false, _promise = null; - function splitWidthInt(value) { var str = value.substring(0, 3); return str.trim(); @@ -78,6 +77,10 @@ export default Ember.Component.extend({ return "div-gpt-ad-" + this.get('placement'); }.property('placement'), + adWrapperStyle: function() { + return `width: ${this.get('const_width')}px; height: ${this.get('const_height')}px;`.htmlSafe(); + }.property('const_width', 'const_height'), + _initGoogleDFP: function() { var self = this; loadGoogle(this.siteSettings).then(function() { diff --git a/assets/javascripts/discourse/templates/components/google-dfp-ad.hbs b/assets/javascripts/discourse/templates/components/google-dfp-ad.hbs index 62ecab0..16cb096 100755 --- a/assets/javascripts/discourse/templates/components/google-dfp-ad.hbs +++ b/assets/javascripts/discourse/templates/components/google-dfp-ad.hbs @@ -1,10 +1,8 @@

Google Ad Plugin Display

-
+
{{#if loadedGoogletag}} {{/if}}
- - diff --git a/auto_generated/plugin_35b7129bb0cbeb4d26e08da97f26fb7cc56cd329.css b/auto_generated/plugin_5e03562e98e357709eaba07c3a0e9054afdd7697.css similarity index 65% rename from auto_generated/plugin_35b7129bb0cbeb4d26e08da97f26fb7cc56cd329.css rename to auto_generated/plugin_5e03562e98e357709eaba07c3a0e9054afdd7697.css index 9b1f860..677144a 100644 --- a/auto_generated/plugin_35b7129bb0cbeb4d26e08da97f26fb7cc56cd329.css +++ b/auto_generated/plugin_5e03562e98e357709eaba07c3a0e9054afdd7697.css @@ -1,20 +1,20 @@ -.discourse-google-dfp { +.google-dfp-ad { padding: 3px; margin-bottom: 10px; clear: both; } -.discourse-google-dfp .dfp-ad-unit { +.google-dfp-ad .dfp-ad-unit { margin: 0 auto; } -.discourse-google-dfp .google-dfp-ad-label { +.google-dfp-ad .google-dfp-ad-label { width: 728px; margin: 0 auto; } -.discourse-google-dfp .google-dfp-ad-label h2 { +.google-dfp-ad .google-dfp-ad-label h2 { margin: 4px 0 !important; color: #858a8c; text-transform: uppercase;