Do not print the comments form (#1195)

Add `.page__comments-form` to "non-printing" selectors in print styles
This commit is contained in:
Lars Olesen 2017-08-22 20:46:18 +02:00 committed by Michael Rose
parent ded8afcc32
commit 2939d45ecc
2 changed files with 43 additions and 40 deletions

View file

@ -47,49 +47,51 @@
<!-- End static comments --> <!-- End static comments -->
<!-- Start new comment form --> <!-- Start new comment form -->
<h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_label | default: "Leave a Comment" }}</h4> <div class="page__comments-form">
<p class="small">{{ site.data.ui-text[site.locale].comment_form_info | default: "Your email address will not be published. Required fields are marked" }} <span class="required">*</span></p> <h4 class="page__comments-title">{{ site.data.ui-text[site.locale].comments_label | default: "Leave a Comment" }}</h4>
<form id="new_comment" class="page__comments-form js-form form" method="post" action="https://api.staticman.net/v1/entry/{{ site.repository }}/{{ site.staticman.branch }}"> <p class="small">{{ site.data.ui-text[site.locale].comment_form_info | default: "Your email address will not be published. Required fields are marked" }} <span class="required">*</span></p>
<div class="form__spinner"> <form id="new_comment" class="page__comments-form js-form form" method="post" action="https://api.staticman.net/v1/entry/{{ site.repository }}/{{ site.staticman.branch }}">
<i class="fa fa-spinner fa-spin fa-3x fa-fw"></i> <div class="form__spinner">
<span class="sr-only">{{ site.data.ui-text[site.locale].loading_label | default: "Loading..." }}</span> <i class="fa fa-spinner fa-spin fa-3x fa-fw"></i>
</div> <span class="sr-only">{{ site.data.ui-text[site.locale].loading_label | default: "Loading..." }}</span>
</div>
<fieldset> <fieldset>
<label for="comment-form-message">{{ site.data.ui-text[site.locale].comment_form_comment_label | default: "Comment" }} <small class="required">*</small></label> <label for="comment-form-message">{{ site.data.ui-text[site.locale].comment_form_comment_label | default: "Comment" }} <small class="required">*</small></label>
<textarea type="text" rows="3" id="comment-form-message" name="fields[message]" tabindex="1"></textarea> <textarea type="text" rows="3" id="comment-form-message" name="fields[message]" tabindex="1"></textarea>
<div class="small help-block"><a href="https://daringfireball.net/projects/markdown/">{{ site.data.ui-text[site.locale].comment_form_md_info | default: "Markdown is supported." }}</a></div> <div class="small help-block"><a href="https://daringfireball.net/projects/markdown/">{{ site.data.ui-text[site.locale].comment_form_md_info | default: "Markdown is supported." }}</a></div>
</fieldset> </fieldset>
<fieldset> <fieldset>
<label for="comment-form-name">{{ site.data.ui-text[site.locale].comment_form_name_label | default: "Name" }} <small class="required">*</small></label> <label for="comment-form-name">{{ site.data.ui-text[site.locale].comment_form_name_label | default: "Name" }} <small class="required">*</small></label>
<input type="text" id="comment-form-name" name="fields[name]" tabindex="2" /> <input type="text" id="comment-form-name" name="fields[name]" tabindex="2" />
</fieldset> </fieldset>
<fieldset> <fieldset>
<label for="comment-form-email">{{ site.data.ui-text[site.locale].comment_form_email_label | default: "Email address" }} <small class="required">*</small></label> <label for="comment-form-email">{{ site.data.ui-text[site.locale].comment_form_email_label | default: "Email address" }} <small class="required">*</small></label>
<input type="email" id="comment-form-email" name="fields[email]" tabindex="3" /> <input type="email" id="comment-form-email" name="fields[email]" tabindex="3" />
</fieldset> </fieldset>
<fieldset> <fieldset>
<label for="comment-form-url">{{ site.data.ui-text[site.locale].comment_form_website_label | default: "Website (optional)" }}</label> <label for="comment-form-url">{{ site.data.ui-text[site.locale].comment_form_website_label | default: "Website (optional)" }}</label>
<input type="url" id="comment-form-url" name="fields[url]" tabindex="4"/> <input type="url" id="comment-form-url" name="fields[url]" tabindex="4"/>
</fieldset> </fieldset>
<fieldset class="hidden" style="display: none;"> <fieldset class="hidden" style="display: none;">
<input type="hidden" name="options[slug]" value="{{ page.slug }}"> <input type="hidden" name="options[slug]" value="{{ page.slug }}">
<label for="comment-form-location">Not used. Leave blank if you are a human.</label> <label for="comment-form-location">Not used. Leave blank if you are a human.</label>
<input type="text" id="comment-form-location" name="fields[hidden]" autocomplete="off"/> <input type="text" id="comment-form-location" name="fields[hidden]" autocomplete="off"/>
</fieldset> </fieldset>
<!-- Start comment form alert messaging --> <!-- Start comment form alert messaging -->
<p class="hidden js-notice"> <p class="hidden js-notice">
<strong class="js-notice-text"></strong> <strong class="js-notice-text"></strong>
</p> </p>
<!-- End comment form alert messaging --> <!-- End comment form alert messaging -->
<fieldset> <fieldset>
<button type="submit" id="comment-form-submit" tabindex="5" class="btn btn--large">{{ site.data.ui-text[site.locale].comment_btn_submit | default: "Submit Comment" }}</button> <button type="submit" id="comment-form-submit" tabindex="5" class="btn btn--large">{{ site.data.ui-text[site.locale].comment_btn_submit | default: "Submit Comment" }}</button>
</fieldset> </fieldset>
</form> </form>
</div>
<!-- End new comment form --> <!-- End new comment form -->
{% endif %} {% endif %}
</section> </section>
{% when "custom" %} {% when "custom" %}
<section id="custom-comments"></section> <section id="custom-comments"></section>
{% endcase %} {% endcase %}
</div> </div>

View file

@ -228,6 +228,7 @@
.pagination, .pagination,
.ads, .ads,
.page__footer, .page__footer,
.page__comments-form,
.author__avatar, .author__avatar,
.author__content, .author__content,
.author__urls-wrapper, .author__urls-wrapper,
@ -235,4 +236,4 @@
.adsbygoogle { .adsbygoogle {
display: none !important; display: none !important;
} }
} }