improves styles for external links on proposal show

This commit is contained in:
decabeza
2017-08-25 13:45:50 +02:00
parent 7d95edf93e
commit e85c71fe9a
5 changed files with 26 additions and 15 deletions

View File

@@ -43,6 +43,7 @@ $budget: #7e328a;
$budget-hover: #7571bf; $budget-hover: #7571bf;
$highlight: #e7f2fc; $highlight: #e7f2fc;
$highlight-soft: #f3f8fd;
$light: #f5f7fa; $light: #f5f7fa;
$featured: #ffdc5c; $featured: #ffdc5c;

View File

@@ -428,33 +428,30 @@
.document-link, .document-link,
.video-link { .video-link {
border: 1px solid $border; background: $highlight-soft;
border: 1px solid $highlight;
display: block; display: block;
margin: $line-height / 2 0; margin: $line-height / 2 0;
padding: $line-height / 2; padding: $line-height / 2;
position: relative; position: relative;
a { a {
padding-left: rem-calc(24); word-wrap: break-word;
} }
::before { [class^="icon-"] {
color: #007bb7; display: inline-block;
content: 'G';
font-family: "icons" !important;
font-size: rem-calc(24); font-size: rem-calc(24);
left: rem-calc(6); line-height: $line-height;
padding-top: rem-calc(3); vertical-align: middle;
position: absolute;
top: 0;
} }
}
.video-link { .icon-document {
color: #007bb7;
}
::before { .icon-video {
color: #cc181e; color: #cc181e;
content: 'D';
} }
} }

View File

@@ -77,14 +77,23 @@
<% if @proposal.external_url.present? %> <% if @proposal.external_url.present? %>
<div class="document-link"> <div class="document-link">
<%= text_with_links @proposal.external_url %> <p>
<span class="icon-document"></span>&nbsp;
<strong><%= t('proposals.show.title_external_url') %></strong>
</p>
<%= text_with_links @proposal.external_url %>
</div> </div>
<% end %> <% end %>
<% if @proposal.video_url.present? %> <% if @proposal.video_url.present? %>
<div class="video-link"> <div class="video-link">
<p>
<span class="icon-video"></span>&nbsp;
<strong><%= t('proposals.show.title_video_url') %></strong>
</p>
<%= text_with_links @proposal.video_url %> <%= text_with_links @proposal.video_url %>
</div> </div>
<% end %> <% end %>
<h4><%= @proposal.question %></h4> <h4><%= @proposal.question %></h4>

View File

@@ -406,6 +406,8 @@ en:
send_notification: Send notification send_notification: Send notification
no_notifications: "This proposal has any notifications." no_notifications: "This proposal has any notifications."
embed_video_title: "Video on %{proposal}" embed_video_title: "Video on %{proposal}"
title_external_url: "Additional documentation"
title_video_url: "External video"
update: update:
form: form:
submit_button: Save changes submit_button: Save changes

View File

@@ -406,6 +406,8 @@ es:
share: Compartir share: Compartir
no_notifications: "Esta propuesta no tiene notificaciones." no_notifications: "Esta propuesta no tiene notificaciones."
embed_video_title: "Vídeo en %{proposal}" embed_video_title: "Vídeo en %{proposal}"
title_external_url: "Documentación adicional"
title_video_url: "Vídeo externo"
update: update:
form: form:
submit_button: Guardar cambios submit_button: Guardar cambios