mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
FIX: Layout with Gravatar fixed
This commit is contained in:
parent
7721c20e80
commit
152137d475
@ -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;
|
||||
}
|
||||
|
@ -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,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EAAE,IAAI;;AAGpB,sBAAgB;EACf,MAAM,EAAE,iBAAiB;EACzB,aAAa,EAAE,GAAG;EAClB,OAAO,EAAE,aAAa;;AAGvB,mCAA2B;EAC1B,KAAK,EAAE,IAAI;EACX,YAAY,EAAE,IAAI;EAClB,MAAM,EAAE,UAAU;EAClB,WAAW,EAAE,eAAe;;AAE5B,8DAA2B;EAC1B,OAAO,EAAE,MAAM;;AAEhB,2DAAwB;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"
|
||||
|
@ -79,7 +79,7 @@
|
||||
clear:both;
|
||||
list-style-type: none;
|
||||
overflow: hidden;
|
||||
padding: 20px 0 10px;
|
||||
padding: 20px 0 20px 0;
|
||||
position: relative;
|
||||
|
||||
&.author-comment {
|
||||
@ -105,12 +105,21 @@
|
||||
}
|
||||
}
|
||||
|
||||
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 15% 0 20px;
|
||||
padding: 0 20px 0 20px;
|
||||
min-height: 130px;
|
||||
white-space: pre;
|
||||
white-space: pre-wrap;
|
||||
white-space: pre-line;
|
||||
@ -121,6 +130,14 @@
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user