Further reduce preview mode

This commit is contained in:
Rico Sta. Cruz 2017-10-01 04:29:04 +08:00
parent bc91162888
commit fdd535afdf
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
7 changed files with 14 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{% assign identifier = include.page.url | remove: '.html' | remove_first: '/' %} {% assign identifier = include.page.url | remove: '.html' | remove_first: '/' %}
{% if site.data.disqus.enabled %} {% if site.data.disqus.enabled %}
<section class='comments-area' id='comments'> <section class='comments-area' id='comments' data-js-no-preview>
<div class='container'> <div class='container'>
<details class='comments-details'> <details class='comments-details'>
<summary> <summary>

View File

@ -11,7 +11,7 @@
| sort: "weight", "last" | sort: "weight", "last"
%} %}
{% assign size = site.pages | size %} {% assign size = site.pages | size %}
<footer class='related-posts-area' id='related'> <footer class='related-posts-area' id='related' data-js-no-preview>
<div class='container'> <div class='container'>
<div class='related-posts-section'> <div class='related-posts-section'>
<div class='callout'> <div class='callout'>

View File

@ -1,4 +1,4 @@
<footer class='search-footer'> <footer class='search-footer' data-js-no-preview>
<div class='container'> <div class='container'>
<div class='search-footer-section'> <div class='search-footer-section'>
<div class='search'> <div class='search'>

View File

@ -4,7 +4,7 @@ Params:
- noedit - noedit
- noback - noback
{% endcomment %} {% endcomment %}
<nav class='top-nav'> <nav class='top-nav' data-js-no-preview>
<div class='container'> <div class='container'>
{% unless include.page.noback %} {% unless include.page.noback %}
<div class='left'> <div class='left'>

View File

@ -38,7 +38,7 @@
</main> </main>
</div> </div>
<div class='pre-footer'><i class='icon'></i></div> <div class='pre-footer' data-js-no-preview><i class='icon'></i></div>
{% include 2017/comments-area.html page=page %} {% include 2017/comments-area.html page=page %}
{% include 2017/search-footer.html %} {% include 2017/search-footer.html %}

View File

@ -50,3 +50,11 @@
background: lighten($gray-text, 40%); background: lighten($gray-text, 40%);
} }
} }
/**
* Add some space in preview mode
*/
.PreviewMode .main-heading {
margin-top: 16px;
}

View File

@ -5,6 +5,7 @@
$(function () { $(function () {
if (~window.location.search.indexOf('preview=1')) { if (~window.location.search.indexOf('preview=1')) {
$('[data-js-no-preview]').remove() $('[data-js-no-preview]').remove()
$('html').addClass('PreviewMode')
} }
}) })