-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add config_accessor, add new template
- Loading branch information
1 parent
eb5f785
commit fd59863
Showing
4 changed files
with
445 additions
and
373 deletions.
There are no files selected for viewing
375 changes: 2 additions & 373 deletions
375
app/cells/decidim/newsletter_agenda/agenda_events/show.erb
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,373 +1,2 @@ | ||
<style> | ||
table.container { | ||
font-family: Inter, sans-serif !important; | ||
background: <%= background_color %> !important; | ||
max-width: 816px !important; | ||
width: 100%; | ||
} | ||
|
||
table.container, | ||
table.container th, | ||
table.container td, | ||
table.container p, | ||
table.container .intro-link, | ||
table.introduction td a, | ||
.footer-bottom a, | ||
.footer-box-link a, | ||
.footnote a { | ||
color: <%= font_color_over_bg %> !important; | ||
font-family: Inter, sans-serif !important; | ||
font-weight: 300; | ||
} | ||
|
||
table.container a { | ||
text-decoration: underline; | ||
font-family: Inter, sans-serif !important; | ||
} | ||
|
||
table.container th { | ||
padding-left: 0; | ||
padding-right: 0; | ||
} | ||
|
||
td.introduction, | ||
.middle, | ||
.footer { | ||
padding: 30px 10% 0 10%; | ||
} | ||
|
||
table.introduction, | ||
table.introduction td, | ||
table.introduction td p { | ||
padding: 20px 0; | ||
} | ||
|
||
.introduction-text p { | ||
text-align: center; | ||
font-size: 20px !important; | ||
} | ||
|
||
td.agenda .top { | ||
color: #000000 !important; | ||
height: 387px; | ||
width: 774px; | ||
border-radius: 50% 50% 0 0 / 100% 100% 0 0; | ||
background: #ffffff; | ||
} | ||
|
||
td.agenda .bottom { | ||
color: #000000 !important; | ||
height: 387px; | ||
width: 774px; | ||
border-radius: 0 0 50% 50% / 0 0 100% 100%; | ||
background: #ffffff; | ||
} | ||
|
||
table.agenda td, | ||
table.agenda p { | ||
background: #ffffff !important; | ||
color: #000000 !important; | ||
} | ||
|
||
td.footer { | ||
} | ||
|
||
.body-subtitle { | ||
color: <%= background_color %>; | ||
font-size: 36px; | ||
} | ||
|
||
.body-box-title { | ||
font-size: 24px; | ||
font-weight: bold; | ||
margin: 10px 0; | ||
color: <%= background_color %>; | ||
} | ||
|
||
.box-image { | ||
margin-bottom: 20px; | ||
} | ||
|
||
.box-link, | ||
.box-link a { | ||
color: <%= background_color %> !important; | ||
margin-top: 20px; | ||
} | ||
|
||
td.bottom img { | ||
margin-top: 1rem; | ||
} | ||
|
||
.footer-title { | ||
margin: 5% auto; | ||
min-width: 70%; | ||
text-align: center; | ||
} | ||
|
||
.footer-box-title { | ||
font-size: 18px; | ||
font-weight: bold; | ||
margin: 10px 0; | ||
} | ||
|
||
.footer-social { | ||
margin: 20px 0; | ||
} | ||
|
||
.footer-address { | ||
width: 50%; | ||
} | ||
|
||
.footer-address p { | ||
font-size: 90%; | ||
} | ||
|
||
.footer-bottom { | ||
width: 100%; | ||
margin: 50px 0 20px 0; | ||
} | ||
|
||
.footer-social__wrap { | ||
text-align: right; | ||
} | ||
|
||
.footer-social { | ||
vertical-align: middle; | ||
} | ||
|
||
.footer-social__icon { | ||
display: inline-block; | ||
margin-right: 0.5rem; | ||
width: 20px; | ||
height: 20px; | ||
} | ||
|
||
.footer-social__icon:last-child { | ||
margin-right: 0; | ||
} | ||
|
||
.footnote center { | ||
width: 90%; | ||
margin: 0 auto; | ||
} | ||
|
||
@media only screen and (max-width: 500px) { | ||
.top, | ||
.bottom { | ||
height: 250px !important; | ||
} | ||
} | ||
|
||
@media only screen and (max-width: 400px) { | ||
.top, | ||
.bottom { | ||
height: 200px !important; | ||
} | ||
|
||
.body-title { | ||
font-size: 1.1rem !important; | ||
} | ||
} | ||
|
||
@media only screen and (max-width: 600px) { | ||
td { | ||
display: block !important; | ||
} | ||
|
||
.body-title { | ||
font-size: 1.3rem !important; | ||
padding: 0 10% !important; | ||
} | ||
|
||
.top, | ||
.bottom { | ||
display: table-cell !important; | ||
vertical-align: middle !important; | ||
height: 300px !important; | ||
} | ||
|
||
.event-box, | ||
.footer-box { | ||
width: 100% !important; | ||
display: block !important; | ||
} | ||
|
||
.box-image { | ||
width: 100% !important; | ||
} | ||
|
||
.footer-bottom { | ||
display: block; | ||
text-align: center; | ||
} | ||
|
||
.footer-social__wrap { | ||
text-align: left; | ||
} | ||
|
||
.footer-address { | ||
display: block; | ||
} | ||
|
||
.footer-social__wrap { | ||
display: block; | ||
} | ||
|
||
.footer-social { | ||
display: block; | ||
} | ||
} | ||
</style> | ||
|
||
<table class="main container"> | ||
<tr> | ||
<td class="introduction"> | ||
<table class="introduction"> | ||
<% if has_organization_logo? %> | ||
<tr> | ||
<td style="text-align:center;padding-bottom: 50px;" colspan="2"> | ||
<%= image_tag organization_logo_url %> | ||
</td> | ||
</tr> | ||
<% end %> | ||
<tr> | ||
<td style="font-size:30px;line-height:30px;font-weight: bold;text-align:center;" colspan="2"> | ||
<%= translated_text_for :intro_title %> | ||
</td> | ||
</tr> | ||
<% if has_image?(:main_image) %> | ||
<tr> | ||
<td> | ||
<table class="row content image"> | ||
<tr> | ||
<th class="small-12 first columns"> | ||
<%= image_tag image_url(:main_image, resize_to_fit: [653, 436]) %> | ||
</th> | ||
<th class="expander"></th> | ||
</tr> | ||
</table> | ||
</td> | ||
</tr> | ||
<% end %> | ||
<tr> | ||
<td class="introduction-text"> | ||
<%= translated_text_for :intro_text %> | ||
</td> | ||
</tr> | ||
</table> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td class="agenda"> | ||
<table class="agenda"> | ||
<tr> | ||
<td class="top" style="vertical-align: middle;" colspan="2"> | ||
<div class="body-title" style="text-align: center;margin: 60px 0 40px;padding: 5% 2% 0;color: #000000 | ||
!important;font-size:24px"> | ||
<%= translated_text_for :body_title %> | ||
</div> | ||
<div class="body-subtitle" style="text-align: center;"> | ||
<%= translated_text_for :body_subtitle %> | ||
</div> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td class="middle"> | ||
<table cellpadding="0" cellspacing="0" border="0" align="center"> | ||
<% (1..4).each_slice(2) do |boxes| %> | ||
<tr> | ||
<% boxes.each do |num| %> | ||
<td class="event-box" style="padding: 10px;margin-bottom: 30px;" width="50%"> | ||
<div class="box-image"> | ||
<% if has_image?("body_box_image_#{num}") %> | ||
<%= link_to link_for("body_box_link_url_#{num}") do %> | ||
<%= image_tag(image_url("body_box_image_#{num}")) %> | ||
<% end %> | ||
<% end %> | ||
</div> | ||
<div class="box_date_time"> | ||
<%= translated_text_for "body_box_date_time_#{num}" %> | ||
</div> | ||
<div class="body-box-title"> | ||
<%= translated_text_for "body_box_title_#{num}" %> | ||
</div> | ||
<div class="box-text"> | ||
<%= translated_text_for "body_box_description_#{num}" %> | ||
</div> | ||
<div class="box-link"> | ||
<% link = link_for("body_box_link_url_#{num}") %> | ||
<%= link_to translated_text_for("body_box_link_text_#{num}"), link, target: :blank if link %> | ||
</div> | ||
</td> | ||
<% end %> | ||
</tr> | ||
<% end %> | ||
</table> | ||
</td> | ||
</tr> | ||
<tr style="text-align: center;vertical-align: middle;"> | ||
<td class="bottom" style="text-align: center;vertical-align: middle;"> | ||
<%= translated_text_for :body_final_text %> | ||
<%= image_tag asset_pack_url("media/images/arrow-down.png", **host_options) %> | ||
</td> | ||
</tr> | ||
</table> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td class="footer"> | ||
<table> | ||
<tr> | ||
<h3 class="footer-title" style="padding: 0 10%"><%= translated_text_for :footer_title %></h3> | ||
</tr> | ||
</table> | ||
<table cellpadding="0" cellspacing="0" border="0" align="center"> | ||
<tr> | ||
<% (1..3).each do |num| %> | ||
<td class="footer-box" style="padding: 10px;margin-bottom: 30px;" width="33%"> | ||
<div class="box-image"> | ||
<%= image_tag(image_url("footer_box_image_#{num}", resize_to_fill: [198, 132])) if has_image?("footer_box_image_#{num}") %> | ||
</div> | ||
<div class="footer-box-date-time"> | ||
<%= translated_text_for "footer_box_date_time_#{num}" %> | ||
</div> | ||
<div class="footer-box-title"> | ||
<%= translated_text_for "footer_box_title_#{num}" %> | ||
</div> | ||
<div class="footer-box-link"> | ||
<% link = link_for("footer_box_link_url_#{num}") %> | ||
<%= link_to(translated_text_for("footer_box_link_text_#{num}"), link, target: :blank) if link %> | ||
</div> | ||
</td> | ||
<% end %> | ||
</tr> | ||
</table> | ||
<table class="footer-bottom"> | ||
<tr> | ||
<td class="footer-address"> | ||
<%= translated_text_for :footer_address_text %> | ||
</td> | ||
<td class="footer-social__wrap"> | ||
<%= translated_text_for :footer_social_links_title %> | ||
<div class="footer-social"> | ||
<%= social_links.join.html_safe %> | ||
</div> | ||
</td> | ||
</tr> | ||
</table> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td> | ||
<% if has_footer_image? %> | ||
<table class="footer-logo" style="margin: 5% 0;"> | ||
<tr> | ||
<td class="footer-bottom"> | ||
<%= image_tag footer_image_url %> | ||
</td> | ||
</tr> | ||
</table> | ||
<% end %> | ||
</td> | ||
</tr> | ||
</table> | ||
<% theme_partial_name = "themes/#{Decidim::NewsletterAgenda.current_theme}" %> | ||
<%= render theme_partial_name %> |
Oops, something went wrong.