Refactor layout and button styles
* Add single-column layout for forms * Add optional nav/buttons to section headers
This commit is contained in:
@@ -52,7 +52,6 @@
|
|||||||
{{input type="submit"
|
{{input type="submit"
|
||||||
disabled=inProgress
|
disabled=inProgress
|
||||||
value=(if inProgress "Processing" "Save")}}
|
value=(if inProgress "Processing" "Save")}}
|
||||||
{{#link-to "index"}}Cancel{{/link-to}}
|
|
||||||
</p>
|
</p>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
button, input[type=submit] {
|
button, input[type=submit], .button {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 0.6rem 2rem;
|
padding: 0.6rem 2rem;
|
||||||
background-color: rgba(22, 21, 40, 0.6);
|
background-color: rgba(22, 21, 40, 0.6);
|
||||||
@@ -6,6 +6,7 @@ button, input[type=submit] {
|
|||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
color: $primary-color;
|
color: $primary-color;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
text-decoration: none;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
letter-spacing: 0.1em;
|
letter-spacing: 0.1em;
|
||||||
@@ -22,9 +23,20 @@ button, input[type=submit] {
|
|||||||
&.danger {
|
&.danger {
|
||||||
color: $red;
|
color: $red;
|
||||||
background-color: rgba(40, 21, 21, 0.6);
|
background-color: rgba(40, 21, 21, 0.6);
|
||||||
|
border-color: rgba(40, 21, 21, 1);
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: rgba(40, 21, 21, 0.8);
|
background-color: rgba(40, 21, 21, 0.8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.green {
|
||||||
|
color: $green;
|
||||||
|
background-color: rgba(21, 40, 21, 0.6);
|
||||||
|
border-color: rgba(21, 40, 21, 1);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: rgba(21, 40, 21, 0.8);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ section#add-proposal {
|
|||||||
form {
|
form {
|
||||||
|
|
||||||
p {
|
p {
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1.5rem;
|
||||||
|
|
||||||
&.actions {
|
&.actions {
|
||||||
padding-top: 1rem;
|
padding-top: 1.5rem;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
a {
|
a {
|
||||||
color: $primary-color;
|
color: $primary-color;
|
||||||
|
|||||||
+42
-3
@@ -13,6 +13,21 @@ main {
|
|||||||
"stats"
|
"stats"
|
||||||
"contributions";
|
"contributions";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.center-column {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
section {
|
||||||
|
width: 600px;
|
||||||
|
max-width: 100%;
|
||||||
|
|
||||||
|
header {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 550px) {
|
@media (min-width: 550px) {
|
||||||
@@ -39,11 +54,35 @@ main section {
|
|||||||
}
|
}
|
||||||
|
|
||||||
header {
|
header {
|
||||||
padding-bottom: 3rem;
|
margin-bottom: 3rem;
|
||||||
text-align: center;
|
|
||||||
|
&.with-nav {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: auto 5rem;
|
||||||
|
grid-template-areas:
|
||||||
|
"title" "actions";
|
||||||
|
|
||||||
|
@include media-min(medium) {
|
||||||
|
grid-template-columns: auto 5rem 1.2rem;
|
||||||
|
grid-template-areas:
|
||||||
|
"title" "actions" "padding";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
display: inline-block;
|
||||||
|
// padding-left: 1.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
|
||||||
@include media-max(small) {
|
@include media-max(small) {
|
||||||
padding-bottom: 2rem;
|
margin-bottom: 2rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
<section id="add-contribution">
|
<main class="center-column">
|
||||||
|
|
||||||
|
<section id="add-contribution">
|
||||||
<header>
|
<header>
|
||||||
<h2>Submit a contribution</h2>
|
<h2>Submit a contribution</h2>
|
||||||
</header>
|
</header>
|
||||||
@@ -6,5 +8,6 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
{{add-contribution contributors=sortedContributors save=(action "save")}}
|
{{add-contribution contributors=sortedContributors save=(action "save")}}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
|||||||
@@ -33,8 +33,13 @@
|
|||||||
<div id="contributions">
|
<div id="contributions">
|
||||||
{{#if contributionsUnconfirmed}}
|
{{#if contributionsUnconfirmed}}
|
||||||
<section id="contributions-unconfirmed">
|
<section id="contributions-unconfirmed">
|
||||||
<header>
|
<header class="with-nav">
|
||||||
<h2>Latest Contributions</h2>
|
<h2>Latest Contributions</h2>
|
||||||
|
{{#if kredits.hasAccounts}}
|
||||||
|
<nav>
|
||||||
|
{{link-to "add" "contributions.new" title="Submit a contribution" class="button small green"}}
|
||||||
|
</nav>
|
||||||
|
{{/if}}
|
||||||
</header>
|
</header>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
{{!-- TODO: We need a better naming for kredits.hasAccounts --}}
|
{{!-- TODO: We need a better naming for kredits.hasAccounts --}}
|
||||||
@@ -53,13 +58,6 @@
|
|||||||
{{contribution-list contributions=contributionsConfirmedSorted
|
{{contribution-list contributions=contributionsConfirmedSorted
|
||||||
vetoContribution=(action "vetoContribution")}}
|
vetoContribution=(action "vetoContribution")}}
|
||||||
</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>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user