Click here to open in a new window |
After the blog app I finished yesterday, this app didn't seem that different. This is a Reddit type app that looks a lot like a blog but users add web links with a title. The site also has the ability to vote on each link. The highest rated link is shown first in the index.
This is due to the acts as votable gem.
<% @links.order(cached_votes_up: :desc).each do |link| %>
<div class="link row clearfix">
<h2>
<%= link_to link.title, link %>
<small class="author">Submitted <%= time_ago_in_words(link.created_at) %> by <%= link.user.name %></small>
<div class="btn-group">
<a class="btn btn-default btn-sm" href="<%= link.url %>">Visit Link</a>
<%= link_to like_link_path(link), method: :put, class: "btn btn-default btn-sm" do %>
<span class="glyphicon glyphicon-chevron-up"></span>Upvote<%= link.get_upvotes.size %>
<% end %>
<%= link_to dislike_link_path(link), method: :put, class: "btn btn-default btn-sm" do %>
<span class="glyphicon glyphicon-chevron-down"></span>Downvote<%= link.get_downvotes.size %>
<% end %>
</div>
</div>
<% end %>
I was able to load this app with a seed file as well which makes the app look great right out the box. Visit here
Well its week one and I have already finished two apps and I have published them on Heroku. Take a look, leave a comment below and check out my github page for more apps. Follow this blog as I take the journey from novice to working web developer. Lets see if I can finish these 12 apps in 6 weeks.
Features I would like to add:
1. Social media shareability |
2. Display who submitted the comment |
3. Posting pictures & gifs, videos. |
4. Rich text formating |
5. Search function |
6. Social media shareability |
Kenyacode
No comments:
Post a Comment