diff --git a/app/assets/stylesheets/admin.scss b/app/assets/stylesheets/admin.scss
index 05581b774..c6e72a248 100644
--- a/app/assets/stylesheets/admin.scss
+++ b/app/assets/stylesheets/admin.scss
@@ -315,7 +315,7 @@ $table-header: #ecf1f6;
}
.admin-content {
- .proposal-form {
+ .proposal-new {
padding-top: 0;
}
}
diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss
index fe57dab83..e49fb0e52 100644
--- a/app/assets/stylesheets/application.scss
+++ b/app/assets/stylesheets/application.scss
@@ -38,7 +38,9 @@
@import "tags";
@import "admin/**/*";
@import "budgets/**/*";
+@import "debates/**/*";
@import "layout/**/*";
+@import "proposals/**/*";
@import "sdg/**/*";
@import "sdg_management/*";
@import "sdg_management/**/*";
diff --git a/app/assets/stylesheets/budgets/investments/form.scss b/app/assets/stylesheets/budgets/investments/form.scss
index 6d84a466d..4d8c15d01 100644
--- a/app/assets/stylesheets/budgets/investments/form.scss
+++ b/app/assets/stylesheets/budgets/investments/form.scss
@@ -1,62 +1,3 @@
.budget-investment-form {
-
- .required-fields {
- @include full-width-background($adjust-padding: true);
- background: $light;
- margin-bottom: $line-height;
- padding-top: $line-height;
- }
-
- > fieldset > legend {
- float: left;
- font-size: rem-calc(36);
- font-weight: bold;
- margin-bottom: $line-height;
- text-transform: uppercase;
-
- + * {
- clear: left;
- }
- }
-
- select {
- min-height: $line-height * 2;
-
- @include breakpoint(medium) {
- &:not(.js-add-language):not(.js-select-language) {
- width: 50%;
- }
- }
- }
-
- .globalize-languages,
- .translatable-fields {
- @include grid-row-nest;
- @include grid-column-gutter;
- }
-
- .sdg-related-list-selector {
- padding-left: 0;
- padding-right: 0;
- }
-
- [type="submit"] {
- @include regular-button;
- font-size: map-get($button-sizes, large);
- margin-top: $line-height;
- }
-
- .actions {
- border: 6px solid $border;
- border-radius: rem-calc(12);
- margin-left: auto;
- margin-right: auto;
- margin-top: $line-height * 2;
- padding: $line-height * 2 $line-height;
- text-align: center;
-
- @include breakpoint(medium) {
- width: 75%;
- }
- }
+ @extend %public-form;
}
diff --git a/app/assets/stylesheets/budgets/investments/new.scss b/app/assets/stylesheets/budgets/investments/new.scss
index f13325fbf..95d1e2e09 100644
--- a/app/assets/stylesheets/budgets/investments/new.scss
+++ b/app/assets/stylesheets/budgets/investments/new.scss
@@ -1,85 +1,7 @@
.budget-investment-new {
- $border-width: 4px;
- @include grid-column-gutter;
-
- > :first-child:not(.print-info) {
- @include full-width-background($adjust-padding: true);
- background: $light;
- margin-top: -$line-height;
- padding-top: $line-height;
- }
+ @extend %public-form-header;
h1 {
- margin-bottom: 0;
- }
-
- header {
- @include has-fa-icon(building, regular, after);
- align-items: center;
- background-color: $body-background;
- border: $border-width solid;
- color: $brand-secondary;
- border-bottom-right-radius: rem-calc(12);
- border-top-right-radius: rem-calc(12);
- display: flex;
- margin-top: $line-height * 2;
-
- @include breakpoint(large) {
- padding-right: $line-height;
- }
-
- &::after {
- display: none;
-
- @include breakpoint(large) {
- display: block;
- font-size: rem-calc(100);
- margin-left: $line-height;
- }
- }
-
- h1 {
- @include brand-background($brand-secondary);
- @include background-till-left-of-screen;
- @include has-fa-icon(chart-pie, solid, after);
- align-items: center;
- display: flex;
- flex: 1;
- font-size: rem-calc(36);
- padding: $line-height * 2 0;
-
- @include breakpoint(large) {
- clip-path: polygon(
- -100vw -#{$border-width},
- 100% -#{$border-width},
- calc(100% - #{rem-calc(20)}) 50%,
- 100% calc(100% + #{$border-width}),
- -100vw calc(100% + #{$border-width})
- );
- font-size: rem-calc(44);
- }
-
- &::before {
- top: -$border-width;
- height: calc(100% + 2 * #{$border-width});
- }
-
- &::after {
- display: none;
-
- @include breakpoint(medium) {
- display: block;
- font-size: 2em;
- margin-left: auto;
- margin-right: rem-calc(60);
- }
- }
-
- span span {
- display: block;
- font-size: 0.75em;
- margin-top: $line-height / 2;
- }
- }
+ @include has-fa-icon(chart-pie, solid, after);
}
}
diff --git a/app/assets/stylesheets/debates/form.scss b/app/assets/stylesheets/debates/form.scss
new file mode 100644
index 000000000..749053aee
--- /dev/null
+++ b/app/assets/stylesheets/debates/form.scss
@@ -0,0 +1,3 @@
+.debate-form {
+ @extend %public-form;
+}
diff --git a/app/assets/stylesheets/debates/new.scss b/app/assets/stylesheets/debates/new.scss
new file mode 100644
index 000000000..5c212c2c9
--- /dev/null
+++ b/app/assets/stylesheets/debates/new.scss
@@ -0,0 +1,15 @@
+.debate-new {
+ @extend %public-form-header;
+
+ h1 {
+ @include has-fa-icon(comment-alt, regular, after);
+ }
+
+ aside {
+ margin-top: $line-height;
+ }
+
+ .recommendations li::before {
+ color: $debates;
+ }
+}
diff --git a/app/assets/stylesheets/layout.scss b/app/assets/stylesheets/layout.scss
index ec9aef363..bb15ed9c0 100644
--- a/app/assets/stylesheets/layout.scss
+++ b/app/assets/stylesheets/layout.scss
@@ -64,6 +64,20 @@ body {
}
}
+main {
+ display: block;
+
+ &.budget-investment-new,
+ &.debate-new,
+ &.proposal-new,
+ &.sdg-goals-index,
+ &.sdg-goal-show,
+ &.topic-edit,
+ &.topic-new {
+ @include grid-column-gutter;
+ }
+}
+
h1,
h2,
h3,
diff --git a/app/assets/stylesheets/mixins/forms.scss b/app/assets/stylesheets/mixins/forms.scss
new file mode 100644
index 000000000..c321b6acb
--- /dev/null
+++ b/app/assets/stylesheets/mixins/forms.scss
@@ -0,0 +1,178 @@
+@import "mixins/icons";
+@import "mixins/layouts";
+
+@mixin public-form-header {
+ $border-width: 4px;
+
+ h1 {
+ margin-bottom: 0;
+ }
+
+ header {
+ $icon-size: $line-height * 4;
+ $padding-right: rem-calc(20);
+ $icon-size-with-padding: $icon-size + $padding-right;
+ $polygon-size: $icon-size / 2;
+ @include background-till-left-of-screen;
+ @include brand-background($brand-secondary);
+ border: $border-width solid $brand-secondary;
+ border-bottom-right-radius: rem-calc(12);
+ border-top-right-radius: rem-calc(12);
+ margin-top: $line-height * 2;
+ padding: $line-height * 2 0;
+ position: relative;
+
+ @include breakpoint(small) {
+ &::after {
+ display: none;
+ }
+ }
+
+ @include breakpoint(large) {
+ $rounding-error: 6px;
+ padding-right: $icon-size-with-padding;
+ background-image: linear-gradient(
+ to right,
+ #{$brand-secondary} 0,
+ #{$brand-secondary} calc(100% - #{$icon-size-with-padding} - 1px),
+ #{$body-background} calc(100% - #{$icon-size-with-padding}),
+ #{$body-background} 100%
+ );
+
+ &::after {
+ background: $body-background;
+ content: "";
+ clip-path: polygon(50% 0, 100% 0, 100% 100%, 50% calc(100% + 1px), 0 50%);
+ display: block;
+ position: absolute;
+ right: calc(#{$icon-size-with-padding} - #{$rounding-error});
+ top: 0;
+ height: 100%;
+ width: $polygon-size;
+ }
+ }
+
+ &::before {
+ top: -$border-width;
+ height: calc(100% + #{$border-width * 2});
+ }
+
+ h1 {
+ $heading-icon-size: $icon-size * 0.85;
+ @include has-fa-icon(building, regular);
+ font-size: rem-calc(36);
+
+ @include breakpoint(small) {
+ &::after,
+ &::before {
+ display: none;
+ position: absolute;
+ top: 50%;
+ transform: translateY(-50%);
+ }
+ }
+
+ @include breakpoint(medium) {
+ padding-right: $heading-icon-size * 2.5;
+
+ &::after {
+ display: block;
+ font-size: $heading-icon-size;
+ right: $heading-icon-size;
+ }
+ }
+
+ @include breakpoint(large) {
+ font-size: rem-calc(44);
+
+ &::after {
+ right: $icon-size-with-padding + $polygon-size + $heading-icon-size / 2;
+ }
+
+ &::before {
+ color: $brand-secondary;
+ display: block;
+ font-size: $icon-size;
+ right: $padding-right;
+ }
+ }
+
+ span {
+ display: block;
+ font-size: 0.75em;
+ margin-top: $line-height / 2;
+ }
+ }
+
+ a {
+ color: inherit;
+ text-decoration: underline;
+ }
+ }
+}
+
+%public-form-header {
+ @include public-form-header;
+}
+
+@mixin public-form {
+
+ .required-fields {
+ @include full-width-background($adjust-padding: true);
+ background: $light;
+ margin-bottom: $line-height;
+ padding-top: $line-height;
+ }
+
+ > fieldset > legend {
+ float: left;
+ font-size: rem-calc(36);
+ font-weight: bold;
+ margin-bottom: $line-height;
+ text-transform: uppercase;
+
+ + * {
+ clear: left;
+ }
+ }
+
+ select {
+ min-height: $line-height * 2;
+
+ @include breakpoint(medium) {
+ &:not(.js-add-language):not(.js-select-language) {
+ width: 50%;
+ }
+ }
+ }
+
+ .globalize-languages,
+ .translatable-fields {
+ @include grid-row-nest;
+ @include grid-column-gutter;
+ }
+
+ [type="submit"] {
+ @include regular-button;
+ font-size: map-get($button-sizes, large);
+ margin-top: $line-height;
+ }
+
+ .actions {
+ border: 6px solid $border;
+ border-radius: rem-calc(12);
+ margin-left: auto;
+ margin-right: auto;
+ margin-top: $line-height * 2;
+ padding: $line-height * 2 $line-height;
+ text-align: center;
+
+ @include breakpoint(medium) {
+ width: 75%;
+ }
+ }
+}
+
+%public-form {
+ @include public-form;
+}
diff --git a/app/assets/stylesheets/mixins/layouts.scss b/app/assets/stylesheets/mixins/layouts.scss
index 445e8e6f0..fecb67d2c 100644
--- a/app/assets/stylesheets/mixins/layouts.scss
+++ b/app/assets/stylesheets/mixins/layouts.scss
@@ -87,7 +87,7 @@
position: relative;
&::before {
- background: inherit;
+ background-color: inherit;
content: "";
height: 100%;
position: absolute;
diff --git a/app/assets/stylesheets/participation.scss b/app/assets/stylesheets/participation.scss
index 1a1228b3c..e2e9d9eda 100644
--- a/app/assets/stylesheets/participation.scss
+++ b/app/assets/stylesheets/participation.scss
@@ -244,71 +244,23 @@
// 02. New participation
// ---------------------
-.debate-form,
-.proposal-form,
-.budget-investment-form,
-.document-form,
-.topic-new,
-.topic-form {
-
- .icon-debates,
- .icon-proposals,
- .icon-budget,
- .icon-image {
- font-size: rem-calc(50);
- line-height: $line-height;
- opacity: 0.5;
- }
-
- .icon-debates {
- color: $debates;
- }
-
- .icon-proposals,
- .icon-image {
- color: $proposals;
- }
-
- .icon-budget {
- color: $budget;
- }
-}
-
.recommendations {
list-style-type: none;
margin-left: 0;
margin-top: $line-height;
li {
- font-size: $small-font-size;
+ @include has-fa-icon(check, solid);
margin: $line-height / 2 0;
&::before {
- content: "l ";
- font-family: "icons" !important;
+ margin-right: $font-icon-margin * 1.5;
}
}
}
-.debate-form {
-
- .recommendations li::before {
- color: $debates;
- }
-}
-
-.proposal-form,
-.document-form,
-.topic-form,
-.topic-new {
-
- .recommendations li::before {
- color: $proposals;
- }
-}
-
.budget-investment-new,
-.proposal-form,
+.proposal-new,
.proposal-edit,
.polls-form,
.poll-question-form,
diff --git a/app/assets/stylesheets/proposals/form.scss b/app/assets/stylesheets/proposals/form.scss
new file mode 100644
index 000000000..a3a8bf538
--- /dev/null
+++ b/app/assets/stylesheets/proposals/form.scss
@@ -0,0 +1,3 @@
+.proposal-form {
+ @extend %public-form;
+}
diff --git a/app/assets/stylesheets/proposals/new.scss b/app/assets/stylesheets/proposals/new.scss
new file mode 100644
index 000000000..50e9aa694
--- /dev/null
+++ b/app/assets/stylesheets/proposals/new.scss
@@ -0,0 +1,15 @@
+.proposal-new {
+ @extend %public-form-header;
+
+ header h1 {
+ @include has-fa-icon(lightbulb, regular, after);
+ }
+
+ aside {
+ margin-top: $line-height;
+ }
+
+ .recommendations li::before {
+ color: $proposals;
+ }
+}
diff --git a/app/assets/stylesheets/sdg/goals/index.scss b/app/assets/stylesheets/sdg/goals/index.scss
index 9ca2002f7..91588aaaa 100644
--- a/app/assets/stylesheets/sdg/goals/index.scss
+++ b/app/assets/stylesheets/sdg/goals/index.scss
@@ -1,5 +1,4 @@
.sdg-goals-index {
- @include grid-column-gutter;
.section-header {
diff --git a/app/assets/stylesheets/sdg/goals/show.scss b/app/assets/stylesheets/sdg/goals/show.scss
index f0ddce8a6..f86539b6a 100644
--- a/app/assets/stylesheets/sdg/goals/show.scss
+++ b/app/assets/stylesheets/sdg/goals/show.scss
@@ -1,5 +1,4 @@
.sdg-goal-show {
- @include grid-column-gutter;
.sdg-goal {
diff --git a/app/assets/stylesheets/sdg/related_list_selector.scss b/app/assets/stylesheets/sdg/related_list_selector.scss
index 7b32edaf7..cf97da3f7 100644
--- a/app/assets/stylesheets/sdg/related_list_selector.scss
+++ b/app/assets/stylesheets/sdg/related_list_selector.scss
@@ -1,5 +1,4 @@
.sdg-related-list-selector {
- @include grid-column-gutter;
clear: both;
> legend {
diff --git a/app/assets/stylesheets/sdg_management/relations/edit.scss b/app/assets/stylesheets/sdg_management/relations/edit.scss
deleted file mode 100644
index a719b4336..000000000
--- a/app/assets/stylesheets/sdg_management/relations/edit.scss
+++ /dev/null
@@ -1,6 +0,0 @@
-.sdg-relations-edit {
-
- .sdg-related-list-selector {
- padding: 0;
- }
-}
diff --git a/app/components/budgets/investments/new_component.html.erb b/app/components/budgets/investments/new_component.html.erb
new file mode 100644
index 000000000..49ff6f2f2
--- /dev/null
+++ b/app/components/budgets/investments/new_component.html.erb
@@ -0,0 +1,7 @@
+
<%= t("proposals.form.tags_instructions") %>
- - - -