[go: nahoru, domu]

Skip to content

Commit

Permalink
stylized comments
Browse files Browse the repository at this point in the history
  • Loading branch information
DataKinds committed Jun 1, 2015
1 parent e13a6f5 commit b29e824
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
8 changes: 6 additions & 2 deletions public/postview.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
font-weight: 400;
font-size: 14px;
text-align: left;
width: 100%;
width: calc(100% - 30px);
float: right;
word-wrap: break-word;
word-break: break-all;
Expand All @@ -31,7 +31,6 @@
max-width: 100%;
word-wrap: break-word;
word-break: break-all;
table-layout: fixed;
}

.commentLength {
Expand All @@ -40,4 +39,9 @@
font-weight: 400;
font-size: 14px;
text-align: right;
}

.singleComment {
overflow: hidden;
margin-bottom: 20px;
}
12 changes: 6 additions & 6 deletions views/postview.erb
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ require_relative "../helperFunctions"
<button type="submit" id="commentSubmit">Submit</button>
<span id="commentLength" class="commentLength" style="color: red;">0/1000 (you need at least 5 characters to post)</span>
</form>
<table class="commentTable">
<div class="commentTable">
<% if postHash.length > 1 #if there have actually been replies
(1..postHash.length-1).reverse_each do |postIndex| %>
<tr>
<th class="ipColorBox">
<div class="singleComment">
<div class="ipColorBox">
<span class="ipColor" style="background: <%= getColorFromIP(postHash[postIndex.to_s]["ip"]) %>">
<span class="colorText"><%= getShowableColorFromIP(postHash[postIndex.to_s]["ip"]) %></span>
</span>
</th>
<th class="commentText"><%=p "#{postHash[postIndex.to_s]["body"]}"%></th>
</tr>
</div>
<div class="commentText"><%=p "#{postHash[postIndex.to_s]["body"]}"%></div>
</div>
<% end
end %>
</table>
Expand Down

0 comments on commit b29e824

Please sign in to comment.