Browse Source

Fix spacing of comments form

tags/v1.0.0
hawkeye116477 6 years ago
parent
commit
56b124cdcc
No account linked to committer's email address
2 changed files with 30 additions and 12 deletions
  1. 22
    4
      assets/css/style.css
  2. 8
    8
      layouts/partials/post_comments.html

+ 22
- 4
assets/css/style.css View File

background: #57cbcc; background: #57cbcc;
} }


hr {
border-top: 1px solid rgba(255,255,255,.1);
}

figure { figure {
margin: 0; margin: 0;
} }


/* Staticman Comments */ /* Staticman Comments */


#staticman-form:before {
display: block;
height: 90px;
margin-top: -90px;
visibility: hidden;
content: "";
}

@media (max-width: 768px) {
#staticman-form:before {
display: block;
height: 80px;
margin-top: -80px;
visibility: hidden;
content: "";
}
}

.post-comment { .post-comment {
background-color: #292f36;; background-color: #292f36;;
padding: 20px; padding: 20px;
display: none; display: none;
} }


.mb--50 {
margin-bottom: -50px;
}

/*================================================================= /*=================================================================
Footer section Footer section
==================================================================*/ ==================================================================*/

+ 8
- 8
layouts/partials/post_comments.html View File

{{ if .Site.Data.blog.staticmanComments.enable }} {{ if .Site.Data.blog.staticmanComments.enable }}
<section class="mt-5">
<section class="mt-4">
<h3>{{ i18n "comments" }}</h3> <h3>{{ i18n "comments" }}</h3>
{{ $postSlug := .File.BaseFileName }} {{ $postSlug := .File.BaseFileName }}
{{ $.Scratch.Add "entryId" $postSlug }} {{ $.Scratch.Add "entryId" $postSlug }}
<div class="post-comment-header"> <div class="post-comment-header">
<img class="post-comment-avatar" src="https://www.gravatar.com/avatar/{{ .email }}?s=70&pg&d=identicon"> <img class="post-comment-avatar" src="https://www.gravatar.com/avatar/{{ .email }}?s=70&pg&d=identicon">
<p class="post-comment-info"> <p class="post-comment-info">
<span class="post-comment-name">{{ .name }} </span>
<br>
<i><span class="tf-ion-forward"></span> <span>{{ ( $.Scratch.Get "parentName" ) }}</span></i>
<br>
<span class="post-comment-name">{{ .name }} </span>
<br>
<i><span class="tf-ion-forward"></span> <span>{{ ( $.Scratch.Get "parentName" ) }}</span></i>
<br>
<a href="#commentid-{{ ._id }}" title="{{ i18n "permalinkComment" }}"> <a href="#commentid-{{ ._id }}" title="{{ i18n "permalinkComment" }}">
<time class="post-time">{{ dateFormat "02.01.2006, 15:04" .date }}</time> <time class="post-time">{{ dateFormat "02.01.2006, 15:04" .date }}</time>
</a> </a>




{{ if eq ($.Scratch.Get "hasComments") 0 }} {{ if eq ($.Scratch.Get "hasComments") 0 }}
<p class="mb--50">{{ i18n "noComments" }}</p>
<p>{{ i18n "noComments" }}</p>
{{ end }} {{ end }}
</section> </section>
<div class="clearfix"></div> <div class="clearfix"></div>
<section id="staticman-form" class="pt-4">
<h3 class="pt-5">{{ i18n "tellSomething" }}</h3>
<section id="staticman-form">
<h3>{{ i18n "tellSomething" }}</h3>
<script>var submitted=false;</script> <script>var submitted=false;</script>
<iframe name="hidden_iframe" id="hidden_iframe" onload='if(submitted){swal("{{ i18n "thanksForComment" }}!", "{{ i18n "commentSent" }} 😊", "success");}'></iframe> <iframe name="hidden_iframe" id="hidden_iframe" onload='if(submitted){swal("{{ i18n "thanksForComment" }}!", "{{ i18n "commentSent" }} 😊", "success");}'></iframe>
<form class="form-control-meghna" method="POST" action="{{ .Site.Data.blog.staticmanComments.api }}" target="hidden_iframe" onsubmit="submitted=true;"> <form class="form-control-meghna" method="POST" action="{{ .Site.Data.blog.staticmanComments.api }}" target="hidden_iframe" onsubmit="submitted=true;">

Loading…
Cancel
Save