Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix recent questions on shadow page #6342

Merged
merged 1 commit into from
Nov 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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