-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
42f6cae
commit d378172
Showing
8 changed files
with
82 additions
and
232 deletions.
There are no files selected for viewing
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<article class="news_item"> | ||
<header class="news_item-header"> | ||
<p class="news_item-source"> | ||
<%= link to: PersonView.profile_path(@post.author), title: @post.author.name, class: "news_item-source-image" do %> | ||
<%= SharedHelpers.lazy_image(PersonView.avatar_url(@post.author), @post.author.name, width: 70, height: 70) %> | ||
<% end %> | ||
|
||
<%= link("changelog.com/posts", to: ~p"/posts", title: "Changelog Posts") %> | ||
</p> | ||
|
||
<h2 class="news_item-title"><%= link(@post.title, to: ~p"/posts/#{@post.slug}") %></h2> | ||
</header> | ||
|
||
<div class="news_item-toolbar"> | ||
<div class="news_item-toolbar-item news_item-toolbar-meta"> | ||
<span class="news_item-toolbar-meta-item"> | ||
by <strong><%= link(@post.author.name, to: PersonView.profile_path(@post.author)) %></strong> | ||
</span> | ||
|
||
<span class="news_item-toolbar-meta-item"> | ||
<%= TimeView.ts(@post.published_at, :date) %> | ||
</span> | ||
|
||
<%= if Enum.any?(@post.topics) do %> | ||
<% {main_topics, additional_topics} = Enum.split(@post.topics, 1) %> | ||
|
||
<span class="news_item-toolbar-meta-item"> | ||
<%= for topic <- main_topics do %> | ||
<%= link("##{topic.slug}", to: ~p"/topic/#{topic.slug}", title: "View #{topic.name}") %> | ||
<% end %> | ||
|
||
<%= if Enum.any?(additional_topics) do %> | ||
<span class="has-tooltip">+<%= length(additional_topics) %></span> | ||
<div class="tooltip tooltip--topics"> | ||
<div class="tooltip-arrow"></div> | ||
<div class="tooltip-wrap"> | ||
<ul class="tooltip-list"> | ||
<%= for topic <- additional_topics do %> | ||
<li> | ||
<%= link("##{topic.slug}", to: ~p"/topic/#{topic.slug}", title: "View #{topic.name}") %> | ||
</li> | ||
<% end %> | ||
</ul> | ||
</div> | ||
</div> | ||
<% end %> | ||
</span> | ||
<% end %> | ||
</div> | ||
|
||
</div> | ||
|
||
<div class="news_item-content richtext"> | ||
<%= @post.tldr |> SharedHelpers.md_to_html() |> raw() %> | ||
</div> | ||
|
||
<footer class="news_item-footer"> | ||
<span class="news_item-footer-item"> | ||
<%= link("Read On", to: ~p"/posts/#{@post.slug}") %> • | ||
<%= link("Discuss", to: ~p"/posts/#{@post.slug}" <> "#discussion") %> | ||
• <%= link("Share", to: ~p"/posts/#{@post.slug}", title: "Copy URL for easy sharing", data: [copy: true]) %> | ||
</span> | ||
</footer> | ||
|
||
</article> |
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,9 +1,10 @@ | ||
<section> | ||
<a id="feed" class="anchor"></a> | ||
<div class="feed"> | ||
<%= for item <- @items do %> | ||
<%= render(NewsItemView, "_summary.html", Map.merge(assigns, %{item: item, style: "date"})) %> | ||
<%= if Enum.any?(@page.entries) do %> | ||
<%= render_many(@page, __MODULE__, "_item.html") %> | ||
|
||
<%= render(SharedView, "_more_button.html", assigns) %> | ||
<% end %> | ||
<%= render(SharedView, "_more_button.html", assigns) %> | ||
</div> | ||
</section> |
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