display comment acount on front page

This commit is contained in:
邱博亞 2020-11-16 23:07:37 +08:00
parent 13b9b850ce
commit b7c36af497
1 changed files with 14 additions and 6 deletions

View File

@ -79,8 +79,8 @@
hover_color = '#0095CF' if hover_color.blank?
bg_color = site.orbit_bar_background_color rescue nil
bg_color = bg_color.blank? ? '#3a3b3c' : lighten_color(bg_color,-40)
color1 = complementaryColor(bg_color)
color2 = lighten_color(color1,30)
color1 = lighten_color(bg_color,-40)
color2 = lighten_color(complementaryColor(bg_color),40)
%>
<style type="text/css">
div[contentEditable=true]:empty:before{
@ -92,8 +92,9 @@
}
.announcement-comment {
margin-top: 1em;
background: <%= bg_color %>;
color: <%= color2 %>;
border: solid 0.2em <%= bg_color %>;
background: <%= color2 %>;
color: <%= bg_color %>;
font-size: 1.15em;
padding: 0.3em 0 0.3em 3%;
border-radius: 0.7em;
@ -101,7 +102,7 @@
width: 80%;
outline: 0;
}
.annc-comment-div{
.annc-comment-div,.annc-comments{
display: flex;
align-items: center;
flex-wrap: wrap;
@ -121,15 +122,21 @@
color: <%= color2 %>;
background-color: <%= hover_color %>;
}
.annc-comments-nickname {
margin-top: 1em;
margin-left: 3%;
color: <%= bg_color %>;
}
.comment-time{
padding-left: 1em;
width: 100%;
color: <%= bg_color %>;
}
.annc-comments{
margin: 1.5em 0;
}
@media (max-width: 767px) {
.annc-comment-div{
.annc-comment-div,.annc-comments{
justify-content: center;
}
.announcement-comment {
@ -160,6 +167,7 @@
<div class="announcement-comment">
<%= comment.comment.html_safe %>
</div>
<div class="annc-comments-nickname">by <%= comment.account %></div>
<br>
</div>
<% end %>