UX: Hide campaign button on goal completion (#81)

UX: Hide campaign button on goal completion (#81)

diff --git a/assets/javascripts/discourse/templates/components/campaign-banner.hbs b/assets/javascripts/discourse/templates/components/campaign-banner.hbs
index d9ecfc9..9c1a4b8 100644
--- a/assets/javascripts/discourse/templates/components/campaign-banner.hbs
+++ b/assets/javascripts/discourse/templates/components/campaign-banner.hbs
@@ -13,22 +13,21 @@
       background-size: cover;
       background-repeat: no-repeat;' ''}}">
       {{#if isGoalMet}}
-         <h2 class="campaign-banner-info-header">{{i18n 'discourse_subscriptions.campaign.success_title'}}</h2>
+        <h2 class="campaign-banner-info-header">{{i18n 'discourse_subscriptions.campaign.success_title'}}</h2>
         <p class="campaign-banner-info-description">{{i18n 'discourse_subscriptions.campaign.success_body'}}</p>
       {{else}}
         <h2 class="campaign-banner-info-header">{{i18n 'discourse_subscriptions.campaign.title'}}</h2>
         <p class="campaign-banner-info-description">{{i18n 'discourse_subscriptions.campaign.body'}}</p>
+        {{#if product}}
+          {{#link-to "s.show" product disabled=product.subscribed class="btn btn-primary campaign-banner-info-button"}}
+            {{d-icon "far-heart"}} {{d-icon "heart" class="hover-heart"}} {{i18n 'discourse_subscriptions.campaign.button'}}
+          {{/link-to}}
+        {{else}}
+          {{#link-to "s" class="btn btn-primary campaign-banner-info-button"}}
+            {{d-icon "far-heart"}} {{d-icon "heart" class="hover-heart"}} {{i18n 'discourse_subscriptions.campaign.button'}}
+          {{/link-to}}
+        {{/if}}
       {{/if}}
-      {{#if product}}
-        {{#link-to "s.show" product disabled=product.subscribed class="btn btn-primary campaign-banner-info-button"}}
-          {{d-icon "far-heart"}} {{d-icon "heart" class="hover-heart"}} {{i18n 'discourse_subscriptions.campaign.button'}}
-        {{/link-to}}
-      {{else}}
-        {{#link-to "s" class="btn btn-primary campaign-banner-info-button"}}
-          {{d-icon "far-heart"}} {{d-icon "heart" class="hover-heart"}} {{i18n 'discourse_subscriptions.campaign.button'}}
-        {{/link-to}}
-      {{/if}}
-      
     </div>
     <div class="campaign-banner-progress">
       {{#if isGoalMet}}
diff --git a/assets/stylesheets/common/campaign.scss b/assets/stylesheets/common/campaign.scss
index 287b334..4ec9460 100644
--- a/assets/stylesheets/common/campaign.scss
+++ b/assets/stylesheets/common/campaign.scss
@@ -153,6 +153,7 @@ body.archetype-regular {
         text-align: center;
       }
     }
+
     &-button {
       grid-area: right;
       height: 2.5em;
@@ -244,6 +245,20 @@ body.archetype-regular {
   }
 }
 
+html:not(.mobile-view) {
+  .subscriptions-campaign,
+  .subscriptions-campaign-sidebar,
+  .subscriptions-campaign-topic-footer {
+    .goal-met .campaign-banner {
+      .campaign-banner-info {
+        &-description {
+          margin: 1em auto !important;
+        }
+      }
+    }
+  }
+}
+
 // Topic Footer Version
 html:not(.mobile-view) .subscriptions-campaign-topic-footer .campaign-banner {
   margin-top: 2em;

GitHub sha: d660149ad25d2620f83f86d25a903c0cfa050c2b

This commit appears in #81 which was approved by eviltrout. It was merged by justindirose.