- {{
- t.price
- }}
+ {{ t.price }}
+ ${{ discountPrice(t.price) }}
forever
- per month
+ {{
+ discount ? "the first month" : "per month"
+ }}
-
@@ -130,13 +143,18 @@
import { mapGetters } from "vuex";
import { db } from "src/firebase";
import { legacy_tiers } from "src/utils/generalConstants";
+import PromoBanner from "./PromoBanner.vue";
export default {
name: "Tiers",
+ components: {
+ PromoBanner,
+ },
data() {
return {
loading: true,
show_storage: false,
+ discount: undefined,
default_benefits: [
"Combat tracker",
"Encounter builder",
@@ -191,6 +209,13 @@ export default {
tier: t.name,
});
},
+ setDiscount(discount) {
+ this.discount = discount;
+ },
+ discountPrice(price) {
+ price = Number(price.slice(1));
+ return (price * (1 - this.discount / 100)).toFixed(2);
+ },
},
};
@@ -210,10 +235,18 @@ export default {
.top {
padding: 15px;
+
.price {
font-size: 25px;
font-weight: bold;
margin-right: 5px;
+
+ &.strike {
+ text-decoration: line-through;
+ font-weight: normal;
+ color: $neutral-2;
+ font-size: 20px;
+ }
}
i.sub {
display: block;
diff --git a/src/css/styles.scss b/src/css/styles.scss
index e1752b07..572955e1 100644
--- a/src/css/styles.scss
+++ b/src/css/styles.scss
@@ -1014,7 +1014,7 @@ html body {
}
.breadcrumb {
- margin-bottom: 20px;
+ margin-bottom: 1rem;
background: $neutral-6;
border-radius: $border-radius;
padding: 10px 15px;
diff --git a/src/layouts/authenticated.vue b/src/layouts/authenticated.vue
index 44758f3b..2d5b8a29 100644
--- a/src/layouts/authenticated.vue
+++ b/src/layouts/authenticated.vue
@@ -6,6 +6,7 @@
@@ -27,6 +28,7 @@ import ContentSideRight from "src/components/ContentSideRight";
import OverEncumbered from "src/components/userContent/OverEncumbered";
import PaymentDeclined from "src/components/PaymentDeclined.vue";
import PatreonLinkDialog from "src/components/dialogs/PatreonLinkDialog.vue";
+import PromoBanner from "src/components/PromoBanner.vue";
export default {
name: "AuthenticatedLayout",
@@ -36,6 +38,7 @@ export default {
ContentSideRight,
OverEncumbered,
PaymentDeclined,
+ PromoBanner,
},
preFetch({ store, redirect }) {
if (!store.getters.user) {