Skip to content

Commit

Permalink
Add new feature
Browse files Browse the repository at this point in the history
  • Loading branch information
rrrene committed Jul 6, 2016
1 parent bedcb9f commit eabc438
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 4 deletions.
Binary file added priv/static/images/elixirweekly-thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions web/static/css/app/component.post.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@
.post--sign-in-to-post {
background: transparent;
border: none;
margin-top: 0;
padding-top: 0;
a.btn {
margin-top: 10px;
vertical-align: middle;
}
}

Expand Down
12 changes: 12 additions & 0 deletions web/static/css/app/component.sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,15 @@ a.sidebar-nav-item:focus {
border: none;
}
}

.badge {
font-size: 0.675rem;
padding: 3px;
border-radius: 3px;
vertical-align: text-top;
}

.badge--new {
background: #e2d20b;
color: #6d561b;
}
2 changes: 1 addition & 1 deletion web/templates/posting/index.html.eex
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
just_created_by_me?: @created_posting == posting
%>
<%= if index == 2 do %>
<%= render ElixirStatus.SharedView, "promo_credo.html", conn: @conn %>
<%= render ElixirStatus.SharedView, "promo_elixirweekly.html", conn: @conn %>
<% end %>
<% end %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion web/templates/posting/show.html.eex
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@
belongs_to_me?: ElixirStatus.Auth.belongs_to_current_user?(@conn, @posting),
just_created_by_me?: @created_posting == @posting %>

<%= render ElixirStatus.SharedView, "promo_credo.html", conn: @conn %>
<%= render ElixirStatus.SharedView, "promo_elixirweekly.html", conn: @conn %>
12 changes: 12 additions & 0 deletions web/templates/shared/promo_elixirweekly.html.eex
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<div class="post" style="margin-bottom:0">
<div class="post__avatar">
</div>

<div class="post__body">
<p>
<a href="http://elixirweekly.net" target="_blank" style=""><img src="<%= static_path(@conn, "/images/elixirweekly-thumb.png") %>" style="display: inline-block; width: 64px; margin-right: 10px;vertical-align: middle;"/></a>
Get your <span style="background: #ffa;">Elixir news once a week</span> by email:
<a href="http://elixirweekly.net" target="_blank" style="font-weight: bold;">ElixirWeekly</a>
</p>
</div>
</div>
1 change: 1 addition & 0 deletions web/templates/shared/sidebar.html.eex
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<% end %>
<a class="sidebar-nav-item" href="<%= page_path(@conn, :about) %>"><%= gettext "About" %></a>
<span class="sidebar-nav-item"><%= gettext "You can follow via" %></span>
<a class="sidebar-nav-item" href="http://elixirweekly.net/" target="_blank"><span class="badge badge--new">NEW!</span> ElixirWeekly</a>
<a class="sidebar-nav-item" href="https://twitter.com/elixirstatus" target="_blank">Twitter</a>
<a class="sidebar-nav-item" href="/rss">RSS</a>
<span class="sidebar-nav-item"><%= gettext "Running on Phoenix!" %></span>
Expand Down

0 comments on commit eabc438

Please sign in to comment.