Skip to content

Commit

Permalink
Fix recent questions on shadow page
Browse files Browse the repository at this point in the history
  • Loading branch information
CleverFool77 committed Oct 2, 2019
1 parent 7e2ebf0 commit a9e77f8
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 42 deletions.
75 changes: 34 additions & 41 deletions app/views/questions/_recent_questions_shadow.html.erb
Original file line number Diff line number Diff line change
@@ -1,49 +1,42 @@
<div class = "recent-card">
<% @questions.limit(3).each_with_index do |node,i| %>
<div class="row">
<div class="image">
<img src="<%= node.author.profile_image %>" width="25" height="25"/>
</div>
<div class= "recent-questions">
<h5><a class = "questions"<% if @widget %>target="_blank"<% end %> href="<%= node.path(:question) %>"><%= node.title %></a></h5>
</div>
<div class="by-author">
by <a href="/profile/<%= node.author.name %>">@<%= node.author.name %></a>
</div>
<div class="row justify-content-center">
<div class = "card col-md-9" style="padding:1em;">
<% @questions.limit(3).each_with_index do |node,i| %>
<span style="padding:0.5em;">
<img class="img" src="<%= node.author.profile_image %>" width="25" height="25"/>
<a class="ml-3 questions"<% if @widget %>target="_blank"<% end %> href="<%= node.path(:question) %>"><%= node.title %></a>
<span class="by-author">by <a href="/profile/<%= node.author.name %>">@<%= node.author.name %></a></span>
</span>
<% end %>
</div>
<% end %>
</div>
<style>
.recent-card{
background-color: #fff;
border: 1px solid;
border-color: #D3D3D3;
border-radius: 6px;
width : 70%;
margin-left: 10em;
align-items: center;
padding: 20px;
}

.questions{
font-size: 15px;
color: black;
margin-left: 6px;
}
.card {
background-color: #fff;
border: 1px solid;
border-color: #D3D3D3;
border-radius: 6px;
}

.image{
border-radius: 50%;
margin-left: 10px;
}
.questions{
font-size: 16px;
color: black;
font-family:"Junction Regular";
}

.by-author{
color: #A9A9A9;
font-size: 13px;
margin-left: 6px;
margin-top: 4px;
}
.img{
border-color:#555;
border-radius: 50%;
margin-left: 10px;
}

.by-author{
color: #A9A9A9;
font-size: 15px;
}

.by-author a{
color: #A9A9A9;
}

.by-author a{
color: #A9A9A9;
}
</style>
4 changes: 3 additions & 1 deletion app/views/questions/index_shadow.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@
<span class="d-none d-lg-inline"><h2>Recent questions </h2></span>
</div>

<%= render partial: "questions/recent_questions_shadow" %>
<div class="col-md-12">
<%= render partial: "questions/recent_questions_shadow" %>
</div>

<style>
.question-area{
Expand Down

0 comments on commit a9e77f8

Please sign in to comment.