-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3f58311
commit d800344
Showing
32 changed files
with
286 additions
and
449 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,45 @@ | ||
<%= link_to resource_path, class: classes[:default], id: resource_id do %> | ||
<div class="<%= classes[:img] %>"> | ||
<%= link_to resource_path, class: "card__list", id: resource_id do %> | ||
<div class="card__list-image"> | ||
<% if has_image? %> | ||
<%= image_tag resource_image_url, alt: alt_title %> | ||
<%= image_tag resource_image_url, class: "w-full h-full object-cover" %> | ||
<% else %> | ||
<%= external_icon "media/images/placeholder-card-g.svg", class: "card__placeholder-g" %> | ||
<div class="w-full h-full relative"> | ||
<div class="w-full h-full bg-primary opacity-10 absolute top-0 left-0 z-10"> | ||
</div> | ||
<%= external_icon "media/images/placeholder-card-l.svg", class: "card__placeholder-l" %> | ||
</div> | ||
<% end %> | ||
</div> | ||
<div class="<%= classes[:text] %>"> | ||
<%= content_tag title_tag, title, class: title_class %> | ||
<span class="challenge-status <%= resource_state %>"><%= t(resource_state, scope: 'decidim.challenges.states') %></span> | ||
<%= description %> | ||
|
||
<% if metadata_cell.present? %> | ||
<div class="<%= classes[:metadata] %>"> | ||
<%= cell metadata_cell, resource, links: false, **options %> | ||
</div> | ||
<div class="card__list-content"> | ||
<%= content_tag title_tag, class: "h4 card__list-title" do %> | ||
<%= title %> | ||
<% end %> | ||
|
||
<div class="card__sdg"> | ||
<div class="card_text--sdg--image"> | ||
<div class="ods challenges"> | ||
<% if resource_sdg %> | ||
<div class="text-container"> | ||
<p><%= t(resource_sdg + ".logo.line1", scope: "decidim.components.sdgs") %></p> | ||
<p><%= t(resource_sdg + ".logo.line2", scope: "decidim.components.sdgs") %></p> | ||
<div class="card__list-text"> | ||
<%= description %> | ||
<% if has_sdgs? %> | ||
<div class="card__sdg"> | ||
<div class="card_text--sdg--image"> | ||
<div class="ods challenges"> | ||
<% if resource_sdg_index %> | ||
<%= image_pack_tag "media/images/ods-#{resource_sdg_index}.svg", alt: "Logo SDG #{resource_sdg_index}", class: "challenge--view" %> | ||
<% end %> | ||
</div> | ||
<% end %> | ||
<% if resource_sdg_index %> | ||
<%= image_pack_tag "media/images/ods-#{resource_sdg_index}.svg", alt: "Logo SDG #{resource_sdg_index}", class: "challenge--view" %> | ||
<% end %> | ||
</div> | ||
<div class="card_text--sdg--text"> | ||
<% if resource_sdg %> | ||
<strong><%= t_sdg(resource_sdg) %></strong> | ||
<% end %> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="card_text--sdg--text"> | ||
<% if resource_sdg %> | ||
<p><%= t('sdg', scope: "activemodel.attributes.challenge") %></p> | ||
<strong><%= t_sdg(resource_sdg) %></strong> | ||
<% end %> | ||
<% end %> | ||
</div> | ||
<div class="card__list-metadata"> | ||
<div> | ||
<span class="label challenge-status <%= resource_state %>"> | ||
<%= t(resource_state, scope: 'decidim.challenges.states') %> | ||
</span> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="card__status"> | ||
</div> | ||
<div class="card__footer"> | ||
</div> | ||
<% end %> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
128 changes: 47 additions & 81 deletions
128
app/packs/stylesheets/decidim/challenges/challenges.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,94 +1,60 @@ | ||
@import "stylesheets/decidim/sdgs/ods.scss"; | ||
@import "stylesheets/decidim/sdgs/sdgs_filter/button.scss"; | ||
@import "stylesheets/decidim/sdgs/sdgs_filter/modal.scss"; | ||
|
||
.card__highlight-text { | ||
.proposal { | ||
color: rgb(254, 174, 2); | ||
} | ||
|
||
.executing { | ||
color: rgb(0, 163, 144); | ||
} | ||
|
||
.finished { | ||
color: rgb(0, 188, 255); | ||
} | ||
|
||
.card_text--sdg--image { | ||
display: inline-block; | ||
width: 20%; | ||
|
||
img { | ||
vertical-align: bottom; | ||
} | ||
.card__list { | ||
.card__list-content { | ||
width: 100%; | ||
} | ||
|
||
.card__sdg { | ||
display: inline-flex; | ||
.card__list-image { | ||
margin-right: 14px; | ||
} | ||
|
||
.card_text--sdg--text { | ||
display: inline-block; | ||
width: 75%; | ||
padding-left: 5px; | ||
|
||
|
||
.card__list-text { | ||
display: flex; | ||
|
||
p { | ||
margin-bottom: 8px; | ||
width: 650px; | ||
min-width: 650px; | ||
} | ||
|
||
.card__sdg { | ||
margin-right: 20px; | ||
} | ||
|
||
.card_text--sdg--image { | ||
width: 48px; | ||
|
||
img { | ||
vertical-align: bottom; | ||
} | ||
} | ||
|
||
.card_text--sdg--text { | ||
font-size: 12px; | ||
} | ||
} | ||
|
||
.card__text--paragraph--status { | ||
font-weight: bold; | ||
display: inline; | ||
text-transform: uppercase; | ||
padding-right: 5px; | ||
} | ||
|
||
.card__text--paragraph p:first-of-type { | ||
display: inline; | ||
|
||
.card__list-metadata { | ||
.label.proposal { | ||
background-color: rgb(254, 174, 2); | ||
color: rgb(86, 59, 1); | ||
} | ||
|
||
.label.executing { | ||
background-color: rgb(0, 163, 144); | ||
color: rgb(0, 49, 43); | ||
} | ||
|
||
.label.finished { | ||
background-color: rgb(0, 188, 255); | ||
color: rgb(0, 49, 43); | ||
} | ||
} | ||
} | ||
|
||
.challenge-status { | ||
text-transform: uppercase; | ||
font-weight: bold; | ||
} | ||
|
||
.defininition-data__title { | ||
text-transform: uppercase; | ||
} | ||
|
||
.definition-data__image { | ||
padding-top: 0.1em; | ||
} | ||
|
||
.section p.tags{ | ||
color: #D04040; | ||
font-weight: 600; | ||
} | ||
|
||
.ods.challenges { | ||
display: flex; | ||
justify-content: center; | ||
cursor: default; | ||
&:hover { | ||
-webkit-box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.0); | ||
-moz-box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.0); | ||
box-shadow: 0px 0px 0px 0px rgba(0, 0, 0, 0.0); | ||
transition: all 0.0s ease; | ||
} | ||
|
||
img.challenge--view { | ||
width: 100%; | ||
max-width: 100px; | ||
.layout-item__aside { | ||
.ods.challenges { | ||
width: 150px; | ||
} | ||
} | ||
|
||
.card-associated-problem { | ||
padding: 5px 10px; | ||
} | ||
|
||
.card-proposed-solution { | ||
padding: 5px 10px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1 @@ | ||
<div class="column"> | ||
<%= card_for challenge, highlight: true, size: :g %> | ||
</div> | ||
<%= card_for challenge, highlight: true, size: :g, has_sdgs: %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
app/views/decidim/challenges/challenges/_filters_small_view.html.erb
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.