FIX: Layout with Gravatar fixed

This commit is contained in:
Gordon Anderson 2016-02-15 17:05:17 +07:00
parent 7721c20e80
commit 152137d475
4 changed files with 221 additions and 193 deletions

View File

@ -61,7 +61,7 @@
clear: both;
list-style-type: none;
overflow: hidden;
padding: 20px 0 10px;
padding: 20px 0 20px 0;
position: relative;
}
.comment.author-comment:after {
@ -79,12 +79,20 @@
.comment.spam .comment-text {
border: 1px dashed orange;
}
.comment img.gravatar {
float: left;
margin: 20px;
width: 90px;
height: 90px;
border: none;
}
.comment .comment-text {
background-color: #fff;
border: 1px solid #ddd;
box-shadow: none;
margin: 0;
padding: 0 15% 0 20px;
padding: 0 20px 0 20px;
min-height: 130px;
white-space: pre;
white-space: pre-wrap;
white-space: pre-line;
@ -93,6 +101,10 @@
.comment .comment-text p:last-child {
margin-bottom: 0;
}
.comment .comment-text.hasGravatar {
padding: 0 20px 0 130px;
min-height: 130px;
}
.comment .date {
font-size: 16px;
}

View File

@ -1,6 +1,6 @@
{
"version": 3,
"mappings": "AAAA,0BAA2B;EAC1B,KAAK,EAAE,IAAI;;AAEX,iCAAO;EACN,KAAK,EAAE,IAAI;;AAGZ;kCACQ;EACP,SAAS,EAAE,KAAK;;AAGjB,+BAAK;EACJ,KAAK,EAAE,IAAI;EACX,YAAY,EAAE,GAAG;;AAGlB,qCAAW;EACV,WAAW,EAAE,IAAI;EACjB,aAAa,EAAE,CAAC;;AAGjB,yCAAe;EACd,MAAM,EAAE,CAAC;;AAGV,yCAAe;EACd,MAAM,EAAE,MAAM;;AAIf,2CAAiB;EAChB,UAAU,EAAE,IAAI;;AAEhB,sDAAU;EACT,WAAW,EAAE,MAAM;;AAIrB,+CAAqB;EACpB,UAAU,EAAE,GAAG;EACf,UAAU,EAAE,KAAK;;AAEjB,6DAAc;EACb,MAAM,EAAE,WAAW;;AAEnB,gEAAG;EACF,OAAO,EAAE,MAAM;EACf,eAAe,EAAE,IAAI;EACrB,WAAW,EAAE,IAAI;;AAEjB,4EAAc;EACb,WA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;EACvB,OAAO,EAAE,UAAU;;;AAKtB,yBAA0B;EACzB,WAAW,EAAE,CAAC;;;AAGf,mBAAoB;EACnB,KAAK,EAAE,KAAK;;;AAGb,2BAA4B;EAC3B,KAAK,EAAE,IAAI;;;AAGZ,qBAAsB;EACrB,MAAM,EAAE,WAAW;;AAEnB,wCAAmB;EAClB,YAAY,EAAE,IAAI;;;AAIpB,uBAAwB;EACvB,UAAU,EAAE,IAAI",
"sources": ["../scss/comments.scss"],
"names": [],
"file": "comments.css"

View File

@ -1,185 +1,202 @@
.comments-holder-container {
clear: both;
.field {
clear: left;
}
.num,
.author {
font-size: 1.3em;
}
.num {
color: #999;
margin-right: 5px;
}
.num-total {
line-height: 40px;
margin-bottom: 0;
}
.comments-list {
margin: 0;
}
.comment-count {
margin: 15px 0;
}
// The comment form
.commenting-area {
margin-top: 50px;
label.left{
font-weight: normal;
}
}
.commenting-rss-feed {
margin-top: 4em;
text-align: right;
.action-links {
margin: 20px 0 10px;
li {
display: inline;
list-style-type: none;
margin-left: 20px;
&:first-child {
margin-left: 0;
}
&.comment-reply-action {
float: right;
}
}
a {
background-image: none;
&::first-letter {
text-transform: capitalize;
}
}
}
}
.no-comments-yet {
display: inline-block;
margin-top: 10px;
}
}
// A published comment
.comment {
clear:both;
list-style-type: none;
overflow: hidden;
padding: 20px 0 10px;
position: relative;
&.author-comment {
&:after {
content: 'Author';
float: right;
position: absolute;
top: 1.5em;
right: 0.5em;
font-size: 1em;
font-weight: bold;
}
> .comment-text {
border: 1px solid blue;
}
}
&.spam {
.comment-text {
border: 1px dashed orange;
}
}
.comment-text {
background-color: #fff;
border: 1px solid #ddd;
box-shadow: none;
margin: 0;
padding: 0 15% 0 20px;
white-space: pre;
white-space: pre-wrap;
white-space: pre-line;
word-wrap: break-word;
p:last-child {
margin-bottom: 0;
}
}
.date {
font-size: 16px;
&:before {
content: '\0000a0\0000a0\0000a0\0000a0';
}
}
&.unmoderated {
> .comment-text {
border: 1px solid yellow;
}
}
.info {
margin-bottom: 10px;
}
&.spam .comment {
border: 1px dashed orange;
border-radius: 4px;
padding: 2.5em 1em 1em;
}
.comment-replies-container {
clear: both;
padding-left: 10px;
margin: 80px 0 0 0;
border-left: 1px dashed #999;
.comment-reply-form-holder {
padding: 0 10px; // Prevent clipping issues on slideUp/Down
}
.comment-replies-holder {
padding: 0 0 0 10px;
}
}
}
.comments-list.root-level {
margin-left: 0;
}
.comment-reply-link {
float: right;
}
.comment-moderation-options {
float: left;
}
.comment-action-links {
margin: 20px 0 10px;
a:not(:last-child) {
margin-right: 12px;
}
}
.commenting-rss-feed ul {
list-style: none;
}
.comments-holder-container {
clear: both;
.field {
clear: left;
}
.num,
.author {
font-size: 1.3em;
}
.num {
color: #999;
margin-right: 5px;
}
.num-total {
line-height: 40px;
margin-bottom: 0;
}
.comments-list {
margin: 0;
}
.comment-count {
margin: 15px 0;
}
// The comment form
.commenting-area {
margin-top: 50px;
label.left{
font-weight: normal;
}
}
.commenting-rss-feed {
margin-top: 4em;
text-align: right;
.action-links {
margin: 20px 0 10px;
li {
display: inline;
list-style-type: none;
margin-left: 20px;
&:first-child {
margin-left: 0;
}
&.comment-reply-action {
float: right;
}
}
a {
background-image: none;
&::first-letter {
text-transform: capitalize;
}
}
}
}
.no-comments-yet {
display: inline-block;
margin-top: 10px;
}
}
// A published comment
.comment {
clear:both;
list-style-type: none;
overflow: hidden;
padding: 20px 0 20px 0;
position: relative;
&.author-comment {
&:after {
content: 'Author';
float: right;
position: absolute;
top: 1.5em;
right: 0.5em;
font-size: 1em;
font-weight: bold;
}
> .comment-text {
border: 1px solid blue;
}
}
&.spam {
.comment-text {
border: 1px dashed orange;
}
}
img.gravatar {
float: left;
margin: 20px;
width: 90px;
height: 90px;
border: none;
}
.comment-text {
background-color: #fff;
border: 1px solid #ddd;
box-shadow: none;
margin: 0;
padding: 0 20px 0 20px;
min-height: 130px;
white-space: pre;
white-space: pre-wrap;
white-space: pre-line;
word-wrap: break-word;
p:last-child {
margin-bottom: 0;
}
}
.comment-text.hasGravatar {
// leave enough space on the left for the default gravatar size
padding: 0 20px 0 130px;
// Ensure there is enough vertical space for the Gravatar
min-height: 130px;
}
.date {
font-size: 16px;
&:before {
content: '\0000a0\0000a0\0000a0\0000a0';
}
}
&.unmoderated {
> .comment-text {
border: 1px solid yellow;
}
}
.info {
margin-bottom: 10px;
}
&.spam .comment {
border: 1px dashed orange;
border-radius: 4px;
padding: 2.5em 1em 1em;
}
.comment-replies-container {
clear: both;
padding-left: 10px;
margin: 80px 0 0 0;
border-left: 1px dashed #999;
.comment-reply-form-holder {
padding: 0 10px; // Prevent clipping issues on slideUp/Down
}
.comment-replies-holder {
padding: 0 0 0 10px;
}
}
}
.comments-list.root-level {
margin-left: 0;
}
.comment-reply-link {
float: right;
}
.comment-moderation-options {
float: left;
}
.comment-action-links {
margin: 20px 0 10px;
a:not(:last-child) {
margin-right: 12px;
}
}
.commenting-rss-feed ul {
list-style: none;
}

View File

@ -6,13 +6,12 @@
<span class="author">$AuthorName.XML</span>
<% end_if %>
<span class="date">$Created.Nice ($Created.Ago)</span>
<% if $Gravatar %>
<img class="gravatar" src="$Gravatar.ATT" alt="Gravatar for $Name.ATT" title="Gravatar for $Name.ATT" />
<% end_if %>
</p>
<% end_if %>
<div class="comment-text" id="<% if $isPreview %>comment-preview<% end_if %>">
<% if $Gravatar %>
<img class="gravatar" src="$Gravatar.ATT" alt="Gravatar for $Name.ATT" title="Gravatar for $Name.ATT" />
<% end_if %>
<div class="comment-text<% if $Gravatar %> hasGravatar<% end_if %>" id="<% if $isPreview %>comment-preview<% else %>$Permalink<% end_if %>">
<p>$EscapedComment</p>
</div>