Skip to content

Commit

Permalink
update newsletter & logos
Browse files Browse the repository at this point in the history
  • Loading branch information
microstudi committed Dec 19, 2023
1 parent 59fcaf4 commit c105d4b
Show file tree
Hide file tree
Showing 8 changed files with 310 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ GIT

GIT
remote: https://github.com/openpoke/decidim-module-newsletter_agenda.git
revision: 339ad715995b371eec30240491086e8162c2c14c
revision: deee50dff3d86df32dd7f5966a2061e6db29649a
specs:
decidim-newsletter_agenda (1.1.0)
date_range_formatter
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,303 @@
<style>
table.main.container {
width: 580px !important;
margin: 0 auto !important;
padding: 0 !important;
}

.introduction-text,
.introduction-text p {
font-size: 18px !important;
color: #ffffff !important;
}

.intro-button a {
color: <%= background_color %> !important;
background-color: #ffffff !important;
font-size: 12px;
font-weight: 300;
text-transform: uppercase;
text-align: center;
display: inline-block;
vertical-align: middle;
margin-right: 0px;
margin-bottom: 16px;
padding: 10px 24px;
border-radius: 4px;
line-height: 1;
cursor: pointer;
}

.footer-social__wrap {
text-align: right;
}

.footer-box__image img {
width: 100%;
}

.footer-social {
vertical-align: middle;
text-align: left;
margin-top: 10px;
}

.footer-social__icon {
display: inline-block;
margin-right: 0.5rem;
width: 20px;
height: 20px;
}

.footer-social__icon:last-child {
margin-right: 0;
}

.footer-logos img {
width: auto;
height: 25px;
}

img {
-ms-interpolation-mode: nearest-neighbor;
-ms-interpolation-mode: bicubic;
}

@media only screen and (max-width: 400px) {
td.mobile-responsive {
width: 100% !important;
display: block !important;
margin: 0 auto !important;
}

td.mobile-responsive.logos-block {
padding: 0 32px !important;
}

.mobile-responsive img {
width: 100% !important;
height: auto !important;
}

.footer-logo {
padding-top: 20px !important;
padding-left: 0 !important;
}

.footer-logo img {
height: 30px !important;
width: auto !important;
}

.social-links {
padding-top: 20px !important;
}
}
</style>

<table class="main container" width="100%" border="0" cellspacing="0" cellpadding="0" style="background-color: #ffffff;">
<tr>
<td>
<!-- Logo -->
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" style="padding-top: 24px; padding-bottom: 24px;">
<%= image_tag asset_pack_url("media/images/logo_head.png", **host_options), height: "45" %>
</td>
</tr>
</table>

<!-- Intro-content -->
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="background-color: <%= background_color %>;">
<tr>
<td align="center" style="padding: 48px; width: 653px; height: 436px;">
<% if has_image?(:main_image) %>
<%= image_tag image_url(:main_image, resize_to_fit: [653, 436]), alt: "Intro Image", width: "653", height: "436" %>
<% end %>
</td>
</tr>
<tr>
<td align="left" style="padding: 0 48px 32px; color: #FFFFFF; font-size:30px;line-height:30px;font-weight: bold;">
<%= translated_text_for :intro_title %>
</td>
</tr>
<tr>
<td align="left" style="padding: 0 48px;" class="introduction-text">
<%= translated_text_for :intro_text %>
</td>
</tr>
<tr>
<td align="center" style="padding: 20px;" class="intro-button">
<% link = link_for(:intro_link_url) %>
<%= link_to translated_text_for(:intro_link_text), link, target: :blank if link %>
</td>
</tr>
</table>

<!--Boxes-->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="padding: 32px;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<% (1..4).each do |num| %>
<% if num.odd? %>
<tr>
<% end %>

<td class="mobile-responsive" style="width: 50%; vertical-align: top; padding: 0 8px;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<!-- 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}"), width: "238", height: "134", style: "width:100%; max-width:500px; display:block; margin:0 auto;") %>
<% end %>
<% end %>

<!-- Date -->
<p style="text-align:left; color: <%= link_color %>; font-size: 16px; font-weight: bold; padding-top: 10px;margin: 0;">
<%= translated_text_for "body_box_date_time_#{num}" %>
</p>

<!-- Title -->
<h2 style="text-align:left; color: <%= link_color %>; font-size: 18px; font-weight: bold; padding: 0;">
<%= translated_text_for "body_box_title_#{num}" %>
</h2>

<!-- Text -->
<p style="text-align:left; font-size: 16px; padding: 5px 0;">
<%= translated_text_for "body_box_description_#{num}" %>
</p>

<!-- Link -->
<% link = link_for("body_box_link_url_#{num}") %>
<% if link %>
<p style="text-align:left; padding-top: 10px;">
<%= link_to translated_text_for("body_box_link_text_#{num}"), link,
style: "color: #{link_color};font-weight: bold; text-decoration: underline;",
target: :blank %>
</p>
<% end %>
</td>
</tr>
</table>
</td>

<% if num.even? && num != 4 %>
</tr>
<% end %>
<% end %>
</table>
</td>
</tr>
</table>

<!--Footer-->
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="background-color: <%= background_color %>">
<tr>
<td align="left" style="padding: 32px 32px 0 40px; color: #FFFFFF; font-size:30px;line-height:28px;">
<%= translated_text_for :footer_title %>
</td>
</tr>
<!--Footer boxes-->
<tr>
<td style="padding: 32px;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<% (1..3).each do |num| %>
<td class="mobile-responsive footer-box__image" style="width: 33.33%; vertical-align: top; padding: 08px;">
<!-- Image -->
<% if has_image?("footer_box_image_#{num}") %>
<%= image_tag(image_url("footer_box_image_#{num}", resize_to_fill: [198, 132]), width: "198", height: "132", style: "width: 100%; height: auto;") %>
<% end %>
<!-- Date -->
<table width="100%">
<tr>
<td style="text-align:left; color: #ffffff; font-size: 15px; font-weight: bold; padding-top: 10px;
margin: 0;">
<%= translated_text_for "footer_box_date_time_#{num}" %>
</td>
</tr>
</table>
<!-- Title -->
<table width="100%">
<tr>
<td style="text-align:left; color: #ffffff; font-size: 16px; font-weight: bold; padding: 0;">
<%= translated_text_for "footer_box_title_#{num}" %>
</td>
</tr>
</table>
<!-- Text -->
<table width="100%">
<tr>
<td style="text-align:left; color: #ffffff; font-size: 14px; padding: 5px 0;">
<%= translated_text_for "footer_box_description_#{num}" %>
</td>
</tr>
</table>
<!-- Link -->
<table width="100%">
<tr>
<td style="text-align:left; padding-top: 10px;">
<% link = link_for("footer_box_link_url_#{num}") %>
<%= link_to translated_text_for("footer_box_link_text_#{num}"), link,
style: "color: #ffffff; text-decoration: underline; font-size: 12px; font-weight: bold;",
target: :blank if link %>
</td>
</tr>
</table>
</td>
<% end %>
</tr>
</table>
</td>
</tr>
<!-- Divider -->
<tr>
<td style="padding: 10px 32px;">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style="border-top: 1px solid #ccc;"></td>
</tr>
</table>
</td>
</tr>
<!--Footer bottom-->
<tr>
<td style="padding: 0 0 20px 0">
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="background-color: <%= background_color %>">
<tr>
<!-- Social -->
<td class="mobile-responsive social-links" style="padding: 0 32px;">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" class="footer-social__wrap" style="color: #ffffff; font-size: 12px">
<%= translated_text_for :footer_social_links_title %>
<div class="footer-social">
<%= social_links.join.html_safe %>
</div>
</td>
</tr>
</table>
</td>
<!-- Logos -->
<td class="mobile-responsive logos-block" style="padding: 0 32px 0 0;vertical-align: bottom;">
<table border="0" cellspacing="0" cellpadding="0">
<tr class="footer-logos">
<td align="right" class="footer-logo" style="padding-left: 16px;"><%= image_tag asset_pack_url("media/images/capitalitat_footer_logos.png", **host_options), height: "25" %></td>
</tr>
</table>
</td>
</tr>
<!-- Additional text -->
<tr>
<td colspan="2" style="padding: 20px 32px; color: #ffffff; font-size: 10px;"><%= translated_text_for(:footer_additional_text) %></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<% end %>
</div>
<div class="footer-logo">
<%= link_to "https://compromismetropolita.cat/", target: "_blank" do %>
<%= link_to "https://compromismetropolita.cat/ca/compromis-metropolita-2030#section-56", target: "_blank" do %>
<%=image_pack_tag("media/images/logo_footer_2.png") %>
<% end %>
</div>
Expand Down
Binary file added app/packs/images/capitalitat_footer_logos.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/packs/images/logo_head.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c105d4b

Please sign in to comment.