Improve all the things

This commit is contained in:
2018-06-17 16:15:02 +02:00
parent 5436469128
commit c074ccf460
5 changed files with 102 additions and 44 deletions
+9 -4
View File
@@ -1,16 +1,21 @@
{{#each proposals as |proposal|}} {{#each proposals as |proposal|}}
<li data-proposal-id={{proposal.id}} title="{{proposal.description}}"> <li data-proposal-id={{proposal.id}} title="{{proposal.description}}"
class={{if proposal.isExecuted "confirmed" "unconfirmed"}}>
<p class="meta"> <p class="meta">
<span class="category {{proposal.kind}}">♥ ({{proposal.kind}})</span> <span class="category {{proposal.kind}}">♥ ({{proposal.kind}})</span>
<span class="recipient">{{proposal.contributor.name}}:</span> <span class="recipient">{{proposal.contributor.name}}:</span>
</p>
<p class="kredits-amount">
<span class="amount">{{proposal.amount}}</span><span class="symbol">₭S</span> <span class="amount">{{proposal.amount}}</span><span class="symbol">₭S</span>
</p>
<p class="description">
<span class="description">{{proposal.description}}</span>
</p>
<p class="voting">
{{#unless proposal.isExecuted}} {{#unless proposal.isExecuted}}
<span class="votes">({{proposal.votesCount}}/{{proposal.votesNeeded}} votes)</span> <span class="votes">({{proposal.votesCount}}/{{proposal.votesNeeded}} votes)</span>
<button {{action "confirm" proposal.id}}>+1</button> <button {{action "confirm" proposal.id}}>+1</button>
{{/unless}} {{/unless}}
</p> </p>
<p class="description">
<span class="description">{{proposal.description}}</span>
</p>
</li> </li>
{{/each}} {{/each}}
+6 -4
View File
@@ -22,21 +22,23 @@ main {
grid-row-gap: 2rem; grid-row-gap: 2rem;
grid-template-columns: 2fr 4fr; grid-template-columns: 2fr 4fr;
grid-template-areas: grid-template-areas:
"people contributions" "people contributions";
} }
} }
} }
main section { main section {
margin-bottom: 8rem; margin-bottom: 5rem;
&:first-of-type { &:first-of-type {
margin-top: 2rem; margin-top: 2rem;
} }
@include media($mobile) { @include media($mobile) {
margin-bottom: 5rem; margin-bottom: 5rem;
&:first-of-type {
margin-top: 2rem; &#proposals-open, &#proposals-closed {
margin-top: 0;
} }
} }
+9 -1
View File
@@ -43,7 +43,7 @@ h1, h2, h3, h4, h5, input, button {
section { section {
h2 { h2 {
font-size: 2rem; font-size: 1.4rem;
color: $primaryColor; color: $primaryColor;
} }
@@ -97,6 +97,14 @@ button, input[type=submit] {
} }
} }
@media (min-width: 550px) {
section {
h2 {
font-size: 2rem;
}
}
}
@import "components/topbar"; @import "components/topbar";
@import "components/loading-spinner"; @import "components/loading-spinner";
@import "components/contributor-list"; @import "components/contributor-list";
+57 -9
View File
@@ -4,26 +4,35 @@ ul.proposal-list {
list-style: none; list-style: none;
li { li {
display: block; display: grid;
grid-template-columns: auto 5rem;
grid-row-gap: 0.5rem;
padding: 1rem 1.2rem; padding: 1rem 1.2rem;
background-color: rgba(255,255,255,0.1); background-color: rgba(255,255,255,0.1);
font-size: 1.2rem; font-size: 1.2rem;
border-bottom: 1px solid rgba(255,255,255,0.2); border-bottom: 1px solid rgba(255,255,255,0.2);
&:first-of-type { &:first-of-type {
border-top: 1px solid rgba(255,255,255,0.2); border-top: 1px solid rgba(255,255,255,0.2);
} }
p { p {
align-self: center;
margin: 0; margin: 0;
font-size: inherit; font-size: inherit;
line-height: 2rem; line-height: 2rem;
&.meta { &.kredits-amount, &.voting {
margin-bottom: 0.5rem; text-align: right;
}
&.description {
grid-column-start: span 2;
}
&.voting {
grid-column-start: span 2;
} }
// &.description {
// line-height: 2rem;
// }
} }
span { span {
@@ -32,6 +41,7 @@ ul.proposal-list {
.description { .description {
line-height: 1.4em; line-height: 1.4em;
font-size: 1rem;
} }
.category { .category {
@@ -43,26 +53,28 @@ ul.proposal-list {
&.docs { color: $green; } &.docs { color: $green; }
&.ops { color: $purple; } &.ops { color: $purple; }
} }
.amount { .amount {
font-weight: 500; font-weight: 500;
} }
.symbol { .symbol {
font-size: 1rem; font-size: 1rem;
font-weight: 500; font-weight: 500;
padding-left: 0.2rem; padding-left: 0.2rem;
} }
.recipient { .recipient {
font-weight: 500; font-weight: 500;
} }
.votes { .votes {
font-size: 1rem; font-size: 1rem;
color: $primaryColor; color: $primaryColor;
padding-left: 0.5rem; margin-right: 0.5rem;
} }
button { button {
float: right;
margin-top: 1.1rem;
height: 2rem; height: 2rem;
line-height: 2rem; line-height: 2rem;
padding: 0 0.6rem; padding: 0 0.6rem;
@@ -70,3 +82,39 @@ ul.proposal-list {
} }
} }
@media (min-width: 550px) {
ul.proposal-list {
li {
grid-template-columns: auto 10rem;
grid-row-gap: 0.5rem;
p {
&.kredits-amount, &.voting {
text-align: right;
}
}
&.unconfirmed {
p {
&.kredits-amount, &.voting {
text-align: right;
}
&.description {
grid-column-start: span 1;
}
&.voting {
grid-column-start: span 1;
}
}
}
.description {
font-size: inherit;
}
}
}
}
+21 -26
View File
@@ -25,13 +25,6 @@
{{proposal-list proposals=proposalsOpenSorted {{proposal-list proposals=proposalsOpenSorted
confirmProposal=(action "confirmProposal") confirmProposal=(action "confirmProposal")
contractInteractionEnabled=kredits.hasAccounts}} contractInteractionEnabled=kredits.hasAccounts}}
{{!-- TODO: We need a better naming --}}
{{#if kredits.hasAccounts}}
<p class="actions">
{{#link-to 'proposals.new'}}Create new proposal{{/link-to}}
</p>
{{/if}}
</div> </div>
</section> </section>
{{/if}} {{/if}}
@@ -43,29 +36,31 @@
<div class="content"> <div class="content">
{{proposal-list proposals=proposalsClosedSorted {{proposal-list proposals=proposalsClosedSorted
confirmProposal=(action "confirmProposal")}} confirmProposal=(action "confirmProposal")}}
{{!-- TODO: We need a better naming --}}
{{#if kredits.hasAccounts}}
<p class="actions">
{{#link-to 'proposals.new'}}Create new proposal{{/link-to}}
</p>
{{/if}}
</div> </div>
{{!-- TODO: We need a better naming --}}
{{#if kredits.hasAccounts}}
<p class="actions">
{{#link-to 'proposals.new'}}Create new proposal{{/link-to}}
</p>
{{/if}}
</section> </section>
</div> </div>
<section id="add-contributor"> {{#if kredits.hasAccounts}}
<header> <section id="add-contributor">
<h2>Add Contributor</h2> <header>
</header> <h2>Add Contributor</h2>
</header>
<div class="content"> <div class="content">
{{#if kredits.currentUser.isCore}} {{#if kredits.currentUser.isCore}}
{{add-contributor contributors=contributors save=(action 'save')}} {{add-contributor contributors=contributors save=(action 'save')}}
{{else}} {{else}}
Only core team members can add new contributors. Please ask someone to set you up. Only core team members can add new contributors. Please ask someone to set you up.
{{/if}} {{/if}}
</div> </div>
</section> </section>
{{/if}}
</main> </main>