Style Preview Pdf
- Customized the preview as shown by email - Added two svg for quote icons. (Need convert to font) - Ceate two class for quote icons. - Added tag strong into yml for text decoration - Customize css
This commit is contained in:
committed by
taitus
parent
b6b49c435c
commit
667039b127
18
app/assets/fonts/quote-after.svg
Normal file
18
app/assets/fonts/quote-after.svg
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
width="40px" height="40px" viewBox="0 0 40 40" enable-background="new 0 0 40 40" xml:space="preserve">
|
||||||
|
<g>
|
||||||
|
<path d="M9.223,5.404c-4.342,0-7.979,3.634-7.979,7.977c0,4.342,3.028,7.27,6.865,7.27c0.809,0,1.617-0.102,2.02-0.303
|
||||||
|
c-0.898,3.602-4.307,7.642-7.512,9.387c-0.008,0.003-0.013,0.008-0.019,0.011c-0.024,0.013-0.048,0.031-0.071,0.044l0.003,0.002
|
||||||
|
c-0.354,0.19-0.604,0.553-0.604,0.983c0,0.388,0.207,0.713,0.505,0.916l-0.025,0.024l4.196,2.649l0.013-0.011
|
||||||
|
c0.189,0.143,0.413,0.242,0.669,0.242c0.184,0,0.35-0.055,0.504-0.133l0.021,0.02c6.26-4.443,10.401-11.206,10.401-18.78
|
||||||
|
C18.207,9.139,13.967,5.404,9.223,5.404z"/>
|
||||||
|
<path d="M29.77,5.404c-4.342,0-7.979,3.634-7.979,7.977c0,4.342,3.028,7.27,6.865,7.27c0.809,0,1.617-0.102,2.021-0.303
|
||||||
|
c-0.899,3.602-4.308,7.642-7.513,9.387c-0.008,0.003-0.013,0.008-0.019,0.011c-0.024,0.013-0.048,0.031-0.071,0.044l0.004,0.002
|
||||||
|
c-0.355,0.19-0.605,0.553-0.605,0.983c0,0.388,0.208,0.713,0.505,0.916l-0.024,0.024l4.195,2.649l0.014-0.011
|
||||||
|
c0.188,0.143,0.412,0.242,0.668,0.242c0.184,0,0.35-0.055,0.504-0.133l0.021,0.02c6.26-4.443,10.401-11.206,10.401-18.78
|
||||||
|
C38.754,9.139,34.514,5.404,29.77,5.404z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.5 KiB |
16
app/assets/fonts/quote-before.svg
Normal file
16
app/assets/fonts/quote-before.svg
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||||
|
<svg version="1.1" id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
width="40px" height="40px" viewBox="0 0 40 40" enable-background="new 0 0 40 40" xml:space="preserve">
|
||||||
|
<path d="M11.572,19.713c-0.809,0-1.617,0.101-2.02,0.303c0.899-3.602,4.307-7.642,7.513-9.387c0.007-0.003,0.012-0.008,0.018-0.011
|
||||||
|
c0.024-0.013,0.048-0.031,0.071-0.044l-0.003-0.002c0.355-0.19,0.605-0.552,0.605-0.983c0-0.388-0.208-0.713-0.505-0.916
|
||||||
|
l0.025-0.024l-4.196-2.65L13.067,6.01c-0.189-0.143-0.413-0.242-0.668-0.242c-0.184,0-0.35,0.054-0.504,0.132l-0.021-0.019
|
||||||
|
c-6.26,4.442-10.401,11.206-10.401,18.78c0,6.562,4.241,10.297,8.985,10.297c4.342,0,7.978-3.634,7.978-7.978
|
||||||
|
C18.437,22.641,15.409,19.713,11.572,19.713z"/>
|
||||||
|
<path d="M32.119,19.713c-0.809,0-1.617,0.101-2.02,0.303c0.898-3.602,4.307-7.642,7.512-9.387c0.008-0.003,0.013-0.008,0.019-0.011
|
||||||
|
c0.024-0.013,0.048-0.031,0.071-0.044l-0.003-0.002c0.354-0.19,0.604-0.552,0.604-0.983c0-0.388-0.207-0.713-0.505-0.916
|
||||||
|
l0.025-0.024l-4.196-2.65L33.613,6.01c-0.188-0.143-0.412-0.242-0.668-0.242c-0.184,0-0.35,0.054-0.504,0.132l-0.021-0.019
|
||||||
|
c-6.26,4.442-10.401,11.206-10.401,18.78c0,6.562,4.242,10.297,8.985,10.297c4.343,0,7.978-3.634,7.978-7.978
|
||||||
|
C38.984,22.641,35.956,19.713,32.119,19.713z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.5 KiB |
@@ -446,18 +446,22 @@
|
|||||||
.dashboard-poster-preview {
|
.dashboard-poster-preview {
|
||||||
|
|
||||||
.poster-header {
|
.poster-header {
|
||||||
background: $brand;
|
//background: $brand;
|
||||||
|
background: #0300ff;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
padding: $line-height * 2 $line-height $line-height * 6;
|
padding: $line-height * 2 $line-height $line-height * 2;
|
||||||
|
height: rem-calc(600);
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: rem-calc(80);
|
font-size: rem-calc(60);
|
||||||
line-height: rem-calc(80);
|
line-height: rem-calc(80);
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
font-size: rem-calc(24);
|
font-size: rem-calc(18);
|
||||||
|
max-width: 60%;
|
||||||
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.intro {
|
.intro {
|
||||||
@@ -469,28 +473,40 @@
|
|||||||
|
|
||||||
.proposal-image {
|
.proposal-image {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
max-width: 80%;
|
max-width: 90%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
background: #ff9e00;
|
background: #ff9e00;
|
||||||
content: '';
|
content: '';
|
||||||
height: rem-calc(120);
|
height: rem-calc(120);
|
||||||
left: -36px;
|
left: -30px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: -180px;
|
top: -20px;
|
||||||
width: rem-calc(120);
|
width: rem-calc(120);
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
|
box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
|
||||||
margin-top: rem-calc(-144);
|
//margin-top: rem-calc(-144);
|
||||||
|
margin-top: rem-calc(10);
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
|
// color: $text-medium;
|
||||||
|
margin: $line-height 0;
|
||||||
|
// margin-left: 10%;
|
||||||
|
// text-align: left;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.poster-content {
|
||||||
|
margin-top: rem-calc(260);
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: rem-calc(28);
|
||||||
color: $text-medium;
|
color: $text-medium;
|
||||||
margin: $line-height 0;
|
margin: $line-height 0;
|
||||||
margin-left: 10%;
|
margin-left: 10%;
|
||||||
@@ -498,37 +514,45 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
color: $brand;
|
//color: $brand;
|
||||||
|
color: #0300ff;
|
||||||
font-size: rem-calc(50);
|
font-size: rem-calc(50);
|
||||||
margin-bottom: $line-height * 2;
|
margin-bottom: $line-height * 2;
|
||||||
|
margin-top: $line-height * 2;
|
||||||
|
max-width: 80%;
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
|
||||||
.title-quote {
|
.title-quote {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
top: rem-calc(-12);
|
font-size: rem-calc(50);
|
||||||
vertical-align: baseline;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.poster-footer {
|
.poster-footer {
|
||||||
border-left: 2px solid $border;
|
border-left: 2px solid $border;
|
||||||
font-size: rem-calc(20);
|
font-size: rem-calc(19);
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding-left: $line-height / 2;
|
padding-left: $line-height / 2;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
|
margin-top: rem-calc(50);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 11. Poster PDF
|
// 11. Poster PDF
|
||||||
// --------------
|
// --------------
|
||||||
|
|
||||||
.dashboard-poster-pdf {
|
@page { margin: 0; }
|
||||||
|
|
||||||
|
.dashboard-poster-pdf {
|
||||||
.poster-header {
|
.poster-header {
|
||||||
background: $brand;
|
background: $brand;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
padding: rem-calc(320) rem-calc(160) rem-calc(640);
|
padding: $line-height * 2 $line-height $line-height * 2;
|
||||||
|
//padding: rem-calc(320) rem-calc(160) rem-calc(160);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: rem-calc(250);
|
font-size: rem-calc(250);
|
||||||
@@ -552,7 +576,6 @@
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
max-width: rem-calc(2000);
|
max-width: rem-calc(2000);
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&::before {
|
&::before {
|
||||||
background: #ff9e00;
|
background: #ff9e00;
|
||||||
content: '';
|
content: '';
|
||||||
@@ -565,26 +588,34 @@
|
|||||||
|
|
||||||
img {
|
img {
|
||||||
box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
|
box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
|
||||||
margin-top: rem-calc(-600);
|
margin-top: rem-calc(50);
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
// color: $text-medium;
|
||||||
|
font-size: rem-calc(80);
|
||||||
|
margin-top: rem-calc(80);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.poster-content {
|
.poster-content {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
max-width: rem-calc(2000);
|
max-width: rem-calc(2000);
|
||||||
}
|
|
||||||
|
|
||||||
h2{
|
h2{
|
||||||
color: $text-medium;
|
max-width: 60%;
|
||||||
font-size: rem-calc(80);
|
text-align:left;
|
||||||
margin-top: rem-calc(80);
|
margin-top: rem-calc(100);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
color: $brand;
|
color: $brand;
|
||||||
font-size: rem-calc(200);
|
font-size: rem-calc(170);
|
||||||
line-height: rem-calc(240);
|
line-height: rem-calc(240);
|
||||||
margin: rem-calc(80) 0;
|
margin: rem-calc(80) 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
@@ -292,3 +292,25 @@
|
|||||||
.icon-bars::before {
|
.icon-bars::before {
|
||||||
content: '\22';
|
content: '\22';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-quote-before::before {
|
||||||
|
content: '';
|
||||||
|
background-size: cover;
|
||||||
|
display: block;
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
background-image: url(quote-before.svg);
|
||||||
|
fill:red;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-quote-after::before {
|
||||||
|
content: '';
|
||||||
|
background-size: cover;
|
||||||
|
display: block;
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
background-image: url(quote-after.svg);
|
||||||
|
fill:red;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,13 +5,13 @@
|
|||||||
<h1>
|
<h1>
|
||||||
<%= t("dashboard.poster.index.poster_title") %>
|
<%= t("dashboard.poster.index.poster_title") %>
|
||||||
<br>
|
<br>
|
||||||
|
<span class="icon-search"></span>
|
||||||
<%= t("dashboard.poster.index.poster_subtitle") %>
|
<%= t("dashboard.poster.index.poster_subtitle") %>
|
||||||
</h1>
|
</h1>
|
||||||
<p class="intro"><%= t("dashboard.poster.index.intro_text") %></p>
|
<p class="intro"><%= t("dashboard.poster.index.intro_text").html_safe %></p>
|
||||||
<p class="text-center">
|
<p class="text-center">
|
||||||
<strong><%= t("dashboard.poster.index.proposal_code", code: proposal.code) %></strong>
|
<strong><%= t("dashboard.poster.index.proposal_code", code: proposal.code) %></strong>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="proposal-image">
|
<div class="proposal-image">
|
||||||
<% if proposal.image.present? %>
|
<% if proposal.image.present? %>
|
||||||
@@ -20,16 +20,14 @@
|
|||||||
<%= image_tag "default_mailing.jpg" %>
|
<%= image_tag "default_mailing.jpg" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="poster-content text-center">
|
<div class="poster-content">
|
||||||
<h2><%= t("dashboard.poster.index.support") %></h2>
|
<h2><%= t("dashboard.poster.index.support") %></h2>
|
||||||
<h3>
|
<span class="title-quote icon-quote-before"></span>
|
||||||
<span class="title-quote">"</span>
|
<h3><%= proposal.title %></h3>
|
||||||
<%= proposal.title %>
|
<span class="title-quote icon-quote-after"></span>
|
||||||
<span class="title-quote">"</span>
|
<p class="poster-footer"><%= t("dashboard.poster.index.footer").html_safe %></p>
|
||||||
</h3>
|
|
||||||
|
|
||||||
<p class="poster-footer"><%= t("dashboard.poster.index.footer") %></p>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
<p class="text-center">
|
<p class="text-center">
|
||||||
<strong><%= t("dashboard.poster.index.proposal_code", code: proposal.code) %></strong>
|
<strong><%= t("dashboard.poster.index.proposal_code", code: proposal.code) %></strong>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="proposal-image">
|
<div class="proposal-image">
|
||||||
<% if proposal.image.present? %>
|
<% if proposal.image.present? %>
|
||||||
@@ -25,10 +24,12 @@
|
|||||||
<% else %>
|
<% else %>
|
||||||
<%= wicked_pdf_image_tag "default_mailing.jpg" %>
|
<%= wicked_pdf_image_tag "default_mailing.jpg" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<h2 class="text-center"><%= t("dashboard.poster.index.support") %></h2>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="poster-content">
|
<div class="poster-content">
|
||||||
<h2><%= t("dashboard.poster.index.support") %></h2>
|
|
||||||
<h3>
|
<h3>
|
||||||
<span class="title-quote">"</span>
|
<span class="title-quote">"</span>
|
||||||
<%= proposal.title %>
|
<%= proposal.title %>
|
||||||
|
|||||||
@@ -566,7 +566,7 @@ en:
|
|||||||
poster_title: "Do not keep looking,"
|
poster_title: "Do not keep looking,"
|
||||||
poster_subtitle: "back me up! ;)"
|
poster_subtitle: "back me up! ;)"
|
||||||
intro_text:
|
intro_text:
|
||||||
I am participating in Decide Madrid with my own citizen proposal and only if you also add you can I achieve the
|
<strong>I am participating in Decide Madrid</strong> with my own citizen proposal and only if you also add you can I achieve the
|
||||||
necessary support to make Madrid the city we all want.
|
necessary support to make Madrid the city we all want.
|
||||||
proposal_code: "Code of the proposal: %{code}"
|
proposal_code: "Code of the proposal: %{code}"
|
||||||
support: Support my proposal
|
support: Support my proposal
|
||||||
|
|||||||
@@ -563,14 +563,14 @@ es:
|
|||||||
poster:
|
poster:
|
||||||
index:
|
index:
|
||||||
title: Previsualización del poster
|
title: Previsualización del poster
|
||||||
poster_title: "No te quedes mirando"
|
poster_title: "No te quedes mirando,"
|
||||||
poster_subtitle: "¡apóyame! ;)"
|
poster_subtitle: "¡apóyame! ;)"
|
||||||
intro_text:
|
intro_text:
|
||||||
Estoy participando en Decide Madrid con mi propia propuesta ciudadana y sólo si tú también te sumas podré lograr el
|
<strong>Estoy participando en Decide Madrid</strong> con mi propia propuesta ciudadana y sólo si tú también te sumas podré lograr el
|
||||||
apoyo necesario para hacer de madrid la ciudad que todos queremos.
|
apoyo necesario para hacer de madrid la ciudad que todos queremos.
|
||||||
proposal_code: "Código de la propuesta: %{code}"
|
proposal_code: "Código de la propuesta: %{code}"
|
||||||
support: Apoya mi propuesta
|
support: Apoya mi propuesta
|
||||||
footer: Entra en decide.madrid.es y apoya esta propuesta. Necesitamos ser muchos. Decide tu también. ¡Gracias!
|
footer: <strong>Entra en decide.madrid.es y apoya esta propuesta.</strong> Necesitamos ser muchos. Decide tu también. ¡Gracias!
|
||||||
new:
|
new:
|
||||||
title: Funcionalidad de póster
|
title: Funcionalidad de póster
|
||||||
options:
|
options:
|
||||||
|
|||||||
Reference in New Issue
Block a user