Compare commits

..

10 Commits
2.0.0 ... 2.0.2

Author SHA1 Message Date
kirrg001
5cafa756ef Upgrading Casper to 2.0.2 2017-08-01 10:32:11 +04:00
Phoenix Eve Aspacio
08e5cbe021 Prevent floating navigation from blocking the text header in fragmented urls (#334)
Prevent floating header from covering the header when a fragment identifier enabled URL is opened.
2017-08-01 09:50:32 +04:00
John O'Nolan
615d8a9001 Fixed broken author links due to z-index issue
Closes https://github.com/TryGhost/Casper/issues/333
2017-07-31 19:44:07 +04:00
John O'Nolan
f08f07fd7e Fixed Firefox responsive video bug
Closes https://github.com/TryGhost/Casper/issues/330

As usual Firefox is the bane of fucking everything and despite IE7 calling multiple times wanting its rendering back, here we are. Responsive video embeds insider a flexbox element do not work in Firefox and require an additional (very specific) wrapping div. I've adjusted the Fitvids.js script here to include that div in its injection along with the requisite styles. It's a horrible hack. Spent 2 hours trying to find another way but I cant.
2017-07-31 19:38:16 +04:00
John O'Nolan
2565c16916 Fix minor visual bug with clipped descenders in floating header 2017-07-31 17:14:00 +04:00
Hannah Wolfe
4b66223bb3 🐛 Only show related posts widget if there are posts available (#332)
no issue

- use a block param and if combo to add a guard to the get helper
- this ensures that the widget is only displayed if there is content available to display
2017-07-28 19:10:54 +04:00
John O'Nolan
35e91ecee9 Better support for iframes 2017-07-27 13:12:04 +04:00
kirrg001
2b2d6e6d14 Upgrading Casper to 2.0.1 2017-07-27 11:48:43 +04:00
John O'Nolan
cd4e0e03f5 Better support for the video element 2017-07-27 11:15:19 +04:00
Hannah Wolfe
3993cbdcfa Update disqus embed to use {{comment_id}}
refs TryGhost/Ghost#8760

- disqus code must use `{{comment_id}}` instead of `{{id}}` from 1.0.0 onwards.
2017-07-26 23:01:14 +04:00
6 changed files with 27 additions and 14 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -135,7 +135,7 @@ body {
.site-header-content {
position: relative;
z-index: 100;
z-index: 300;
display: flex;
flex-direction: column;
justify-content: center;
@@ -696,13 +696,15 @@ The first (most recent) post in the list is styled to be bigger than the others
margin-top: 0;
}
.post-full-content img {
.post-full-content img,
.post-full-content video {
display: block;
margin: 1.5em auto;
max-width: 1040px;
}
@media (max-width: 1040px) {
.post-full-content img {
.post-full-content img,
.post-full-content video {
width: 100%;
}
}
@@ -716,6 +718,10 @@ Super neat trick courtesy of @JoelDrapper
max-width: none;
}
.post-full-content iframe {
margin: 0 auto 1.5em;
}
.post-full-content blockquote {
margin: 0 0 1.5em 0;
padding: 1.5em 0;
@@ -802,6 +808,8 @@ Super neat trick courtesy of @JoelDrapper
.post-full-content h4,
.post-full-content h5,
.post-full-content h6 {
padding-top: 75px;
margin-top: -75px;
color: color(var(--darkgrey) l(-5%));
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}
@@ -1317,6 +1325,7 @@ Super neat trick courtesy of @JoelDrapper
align-items: center;
color: var(--darkgrey);
font-weight: 700;
line-height: 1.1em;
}
.floating-header-logo a:hover {

View File

@@ -1,10 +1,12 @@
/*jshint browser:true */
/*!
* FitVids 1.1
* FitVids 1.3
*
* Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com
*
* Copyright 2017, Chris Coyier + Dave Rupert + Ghost Foundation
* This is an unofficial release, ported by John O'Nolan
* Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
* Released under the WTFPL license - http://sam.zoy.org/wtfpl/
* Released under the MIT license
*
*/
@@ -21,7 +23,7 @@
if(!document.getElementById('fit-vids-style')) {
// appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js
var head = document.head || document.getElementsByTagName('head')[0];
var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}';
var css = '.fluid-width-video-container{flex-grow: 1;width:100%;}.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}';
var div = document.createElement("div");
div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>';
head.appendChild(div.childNodes[1]);
@@ -74,7 +76,7 @@
$this.attr('name', videoName);
$.fn.fitVids._count++;
}
$this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+'%');
$this.wrap('<div class="fluid-width-video-container"><div class="fluid-width-video-wrapper"></div></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100)+'%');
$this.removeAttr('height').removeAttr('width');
});
});

View File

@@ -2,7 +2,7 @@
"name": "casper",
"description": "The default personal blogging theme for Ghost. Beautiful, minimal and responsive.",
"demo": "https://demo.ghost.io",
"version": "2.0.0",
"version": "2.0.2",
"engines": {
"ghost": ">=1.0.0"
},

View File

@@ -80,7 +80,7 @@ into the {body} of the default.hbs template --}}
<script>
var disqus_config = function () {
this.page.url = '{{url absolute="true"}}';
this.page.identifier = 'ghost-{{id}}';
this.page.identifier = 'ghost-{{comment_id}}';
};
(function() {
var d = document, s = d.createElement('script');
@@ -102,7 +102,8 @@ into the {body} of the default.hbs template --}}
<div class="inner">
<div class="read-next-feed">
{{#get "posts" filter="tags:{{tags.[0].slug}}+id:-{{id}}" limit="3"}}
{{#get "posts" filter="tags:{{tags.[0].slug}}+id:-{{id}}" limit="3" as |related_posts|}}
{{#if related_posts}}
<article class="read-next-card"
{{#if ../tags.[0].feature_image}}
style="background-image: url({{../tags.[0].feature_image}})"
@@ -118,7 +119,7 @@ into the {body} of the default.hbs template --}}
<div class="read-next-divider">{{> "icons/infinity"}}</div>
<div class="read-next-card-content">
<ul>
{{#foreach posts}}
{{#foreach related_posts}}
<li><a href="{{url}}">{{title}}</a></li>
{{/foreach}}
</ul>
@@ -127,6 +128,7 @@ into the {body} of the default.hbs template --}}
<a href="{{@blog.url}}/tag/{{../tags.[0].slug}}/">{{plural meta.pagination.total empty='No posts' singular='% post' plural='See all % posts'}} →</a>
</footer>
</article>
{{/if}}
{{/get}}
{{!-- If there's a next post, display it using the same markup included from - partials/post-card.hbs --}}