FEATURE: New styling of product page
This commit is contained in:
parent
954beeb094
commit
83002fab3c
|
@ -4,6 +4,7 @@ import { isEmpty } from "@ember/utils";
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
|
classNames: ["product-list"],
|
||||||
@discourseComputed("products")
|
@discourseComputed("products")
|
||||||
emptyProducts(products) {
|
emptyProducts(products) {
|
||||||
return isEmpty(products);
|
return isEmpty(products);
|
||||||
|
|
|
@ -5,15 +5,20 @@
|
||||||
<div class="product">
|
<div class="product">
|
||||||
<h2>{{product.name}}</h2>
|
<h2>{{product.name}}</h2>
|
||||||
|
|
||||||
<p>
|
<p class="product-description">
|
||||||
{{product.description}}
|
{{product.description}}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{{#if isLoggedIn}}
|
{{#if isLoggedIn}}
|
||||||
<div class="pull-right">
|
<div class="product-purchase">
|
||||||
|
{{#if product.subscribed}}
|
||||||
|
<span class="purchased">✓ {{i18n 'discourse_subscriptions.subscribe.purchased'}}</span>
|
||||||
|
<a class="billing-link" href="/my/billing">{{I18n 'discourse_subscriptions.subscribe.go_to_billing'}}</a>
|
||||||
|
{{else}}
|
||||||
{{#link-to "s.show" product.id disabled=product.subscribed class="btn btn-primary"}}
|
{{#link-to "s.show" product.id disabled=product.subscribed class="btn btn-primary"}}
|
||||||
{{i18n 'discourse_subscriptions.subscribe.title'}}
|
{{i18n 'discourse_subscriptions.subscribe.title'}}
|
||||||
{{/link-to}}
|
{{/link-to}}
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1 @@
|
||||||
|
{{product-list products=model}}
|
||||||
<div id="product-list">
|
|
||||||
{{product-list products=model}}
|
|
||||||
</div>
|
|
||||||
|
|
|
@ -35,9 +35,32 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#product-list {
|
.product-list {
|
||||||
padding: 40px 120px;
|
display: flex;
|
||||||
|
flex-flow: row wrap;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
.product {
|
.product {
|
||||||
margin-bottom: 60px;
|
display: flex;
|
||||||
|
flex-flow: column nowrap;
|
||||||
|
border: 1px solid $primary-low;
|
||||||
|
padding: 1.5rem;
|
||||||
|
margin: 1rem;
|
||||||
|
width: calc(50% - 240px);
|
||||||
|
|
||||||
|
.product-description {
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
.product-purchase {
|
||||||
|
align-self: baseline;
|
||||||
|
display: flex;
|
||||||
|
flex-flow: column nowrap;
|
||||||
|
.purchased {
|
||||||
|
color: $success;
|
||||||
|
}
|
||||||
|
.billing-link {
|
||||||
|
font-size: $font-down-1;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
.mobile-view {
|
||||||
|
.product-list {
|
||||||
|
flex-flow: column nowrap;
|
||||||
|
.product {
|
||||||
|
width: unset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -64,6 +64,8 @@ en:
|
||||||
title: Customer Details
|
title: Customer Details
|
||||||
buttons:
|
buttons:
|
||||||
subscribe: Subscribe
|
subscribe: Subscribe
|
||||||
|
purchased: Purchased
|
||||||
|
go_to_billing: Go to Billing
|
||||||
billing:
|
billing:
|
||||||
name: Full name
|
name: Full name
|
||||||
email: Email
|
email: Email
|
||||||
|
|
Loading…
Reference in New Issue