Compare commits

...

204 Commits

Author SHA1 Message Date
96aac80081 v4.0.1 2021-03-18 17:35:03 +00:00
3fa7f25147 Add Facebook link to the header
Fixes #776
2021-03-18 14:31:56 +08:00
b16671d8a7 v4.0.0 2021-03-15 23:33:48 +00:00
3d6a3dc68f v4.0.0-rc.2 2021-03-12 20:27:07 +00:00
48d06196c2 Fix horizontal scrolling caused by scaling on the subscribe CTA h2 (#765) 2021-03-12 09:53:43 -05:00
573e384381 Add space between gallery/image cards with caption (#766)
Co-authored-by: John O'Nolan <john@ghost.org>
2021-03-12 08:29:53 -05:00
5f127c395b Fix traditional Instagram embeds (#767)
Highly specific styles for traditional Instagram embeds

Co-authored-by: John O'Nolan <john@ghost.org>
2021-03-12 08:27:58 -05:00
3cc9cb0988 Fix headings typography scale (#771) 2021-03-12 08:25:37 -05:00
ca36c4fe91 Only use post-card-large variation if feature_image exists (#764) 2021-03-11 13:44:10 -05:00
260d5ec4e6 Fix horizontal alignment of smaller post images (#759)
Co-authored-by: John O'Nolan <john@ghost.org>
2021-03-11 13:37:58 -05:00
410ec1a9d5 Fix logo size in header on small screens (#760)
Co-authored-by: John O'Nolan <john@ghost.org>
2021-03-11 13:37:00 -05:00
e72f4236be Fix long links causing horizontal scrolling on small screens (#761)
Co-authored-by: John O'Nolan <john@ghost.org>
2021-03-11 13:36:13 -05:00
c0d5a3d999 Fix broken card layout caused by long strings (#762) 2021-03-11 13:33:25 -05:00
b927cf62ed Adjust infinite scroll selector to target article.post-card (#763)
The tag archive header shares the same classes as post cards, but have different elements.

This changes the selector to target article.post-card, which ignores header.post-card
2021-03-11 13:32:57 -05:00
91ced578c5 Updated tagName in release script
no issue

- as of 4.0, we're shipping tags with the preceding `v`, but this script
  ignored that and so the release was incorrect
- this commit updates the tagName to have the preceding `v`
2021-03-10 21:11:23 +00:00
87772282c8 v4.0.0-rc.1 2021-03-10 21:08:10 +00:00
bcfeb9be74 Update dependency gscan to v4 2021-03-10 21:04:49 +00:00
5b310a00f4 Merged 4.0 into main
no issue

- Casper is now ready for 4.0 so this commit merges the branch in to try
  and keep the Git history as clean as possible
2021-03-10 21:03:13 +00:00
a6a5d1eba1 3.1.3 2021-03-10 21:00:57 +00:00
fa8cc4cf2e Update dependency gulp-zip to v5.1.0 2021-03-10 09:48:00 +00:00
3a5fda7009 Spacing fix on author profile 2021-03-09 22:23:47 -05:00
4f2fe7eb43 Update page template style 2021-03-09 22:02:35 -05:00
be0600a603 Update end of post CTA bg color 2021-03-09 21:33:13 -05:00
e4faa3141a Update dependency postcss to v8.2.8 2021-03-09 22:41:13 +00:00
a78784decf Fix codeblock specificity, props @pauladamdavis 2021-03-09 09:27:47 -05:00
a516282b73 Correct logo height in navbar 2021-03-09 09:04:50 -05:00
ea6942a7fe Fix bug with :not unfixing previous fix of ::not which it turns out is not a thing 2021-03-09 09:03:54 -05:00
b5c2869ff6 Fix bug where incorrect styles were applied if codeblocks have captions 2021-03-08 16:08:47 -05:00
b7faac9eda Dark codeblocks by default 2021-03-08 15:59:11 -05:00
372dca859b Reinstate a class which as it turns out was not unused after all 2021-03-08 11:46:41 -05:00
30cd8d97e0 Remove unused old script from homepage 2021-03-08 11:30:16 -05:00
0584a58c6c Remove overlays from cover image, these only worked when CSS bg image, not img tag 2021-03-08 11:28:11 -05:00
2231274b07 Remove unused old class 2021-03-08 11:25:46 -05:00
715f95d209 Typography fixes 2021-03-06 21:54:43 -05:00
1e0e813931 Update dependency autoprefixer to v10.2.5 2021-03-05 15:52:56 +00:00
2c356f1cc4 Update dates to be locale-friendly, props @levee223 2021-03-05 10:13:14 -05:00
140666ee44 v4.0.0-rc.0 2021-03-05 14:07:06 +00:00
70f71e9839 Updated built JS assets
no issue

- these weren't rebuilt when changing the code
2021-03-05 14:05:57 +00:00
bd1dbd51c7 Updated default Ghost compatibility in release script
no issue

- not important, but it saves manually entering it during the release
  process
- Casper is only compatible with Ghost 4.0 moving forwards
2021-03-05 13:28:15 +00:00
f590fb029a Tag archive 2021-03-04 18:31:29 -05:00
7617c7baf2 Author profile 2021-03-04 17:22:45 -05:00
b5d0589222 And so the lord said unto Moses, let us obliterate this CSS 2021-03-04 08:05:28 -05:00
Naz
e95293cc22 Updated deprecated @site.lang to @site.locale
refs https://github.com/TryGhost/Team/issues/509
refs b0f80be408

- @site.lang property is being deprecated with Ghsot 4.0 and @site.locale is advised to be used instead
2021-03-04 19:48:58 +13:00
2d27e13f14 Remove visibility parameter 2021-03-04 12:20:10 +08:00
0d1cf89cc0 Update dependency postcss to v8.2.7 2021-03-04 00:43:23 +00:00
a43c6b3cbc Fixed logic for checking GitHub token
no issue 

- the check needs to be inverted to ensure we're being passed a token
2021-03-04 00:29:56 +00:00
1365eab4ae Cleanup 2021-03-03 15:44:30 -05:00
cf24eccdf2 Added Renovate to package.json
no issue

- the renovate.json file was removed to clean up the repository files,
  but we still want Renovate to update dependencies
- Renovate allows us to configure the config in the package.json, so
  this commit moves the previous contents there
2021-03-03 13:24:16 +00:00
f12ce05454 Removed the need for config.json when releasing
no issue

- we previously needed a config.json to provide the GitHub token for
  publishing new Casper releases
- this commit removes the need for this file by pulling the token from
  the environment variable, which everyone in the Core team has set up
2021-03-03 13:20:58 +00:00
44e33120cb Cleanup 2021-03-03 08:11:16 -05:00
6c7cf02111 Style refresh 2021-03-02 21:48:32 -05:00
609507d22d Keep bookmark author and publisher classes for GScan 2021-03-02 16:53:53 +08:00
fd89c6575c Remove specific selectors from bookmark metadata 2021-03-02 13:59:05 +08:00
c680f4efcd Style refresh 2021-03-01 20:34:12 -05:00
Naz
b59893091c Removed conditions which used @labs.members helper
refs https://github.com/TryGhost/Team/issues/332
refs 870a09b109

- The {{@labs.members}} always evaluates to "true" starting with Ghost 4.0 and will be "null" coercing to "false" starting Ghost 5.0
- Enabled all conditionals be default to pass the build in main Ghost repository. These changes should be reviewed - special attentio to the left out RSS feed which was surrounded with {{unless @labs.members}} condition
2021-03-01 19:44:07 +13:00
5fd447b815 Style refresh 2021-02-28 20:10:09 -05:00
9ac38156da Update dependency inquirer to v8 2021-02-26 00:59:59 +00:00
f9d9b1fab5 Disable dark mode by default
Dark mode is disabled by default, but can be enabled by adding a class dark-mode to html element.
2021-02-25 21:58:09 +08:00
Naz
1ea3ad649b Updated ghost-engine to v4
refs https://github.com/TryGhost/Team/issues/221
26e20d223d

- The default engine for Casper shipping with Ghost v4 has to match up.
This way it uses all the correct APIs
2021-02-25 03:17:07 +13:00
fc8cf0b2f4 Update dependency @tryghost/release-utils to v0.6.12 2021-02-22 08:14:53 +00:00
676b73172f Increase contrast of excerpts 2021-02-18 15:16:42 +08:00
2505089a41 Use old font size for primary tags 2021-02-18 15:09:33 +08:00
957d3049aa Fix link hover effect 2021-02-18 14:50:59 +08:00
8f81522907 Remove focus state from buttons 2021-02-18 14:48:24 +08:00
28d63e1cd2 Accent color for subscribe overlay button 2021-02-18 14:36:49 +08:00
b374b88126 Dark grey as subscribe form border 2021-02-18 12:17:40 +08:00
0449bf5537 Use grey for blockquotes 2021-02-18 12:16:27 +08:00
e985805958 Try a new default accent color 2021-02-18 12:05:56 +08:00
c1fcece376 Use accent color as header background when there is no cover image 2021-02-18 11:40:20 +08:00
306f7b2d9b Accent color usage and subscribe form design update 2021-02-18 11:32:40 +08:00
7e3e891338 Update dependency postcss to v8.2.6 2021-02-10 19:29:09 +00:00
69f5108a39 Update dependency @tryghost/release-utils to v0.6.11 2021-02-09 12:07:09 +00:00
44fa55be19 Update dependency postcss to v8.2.5 2021-02-08 01:10:50 +00:00
df4bfbffb2 Disable dark mode with code injection
It's now possible to disable the dark mode with code injection instead of removing the CSS and rebuilding it, by simply adding a class no-dark to html element.
2021-02-01 12:06:56 +08:00
bcfbc21b8e Lock file maintenance 2021-02-01 00:51:05 +00:00
41330614cd Update dependency autoprefixer to v10.2.4 2021-01-29 18:49:55 +00:00
069280eea2 Apply scroll-margin-top to all elements with id attribute instead of only headings 2021-01-27 17:06:11 +08:00
52f763859a Replace subscribe link with account link for logged in users
refs: #751
2021-01-27 16:44:24 +08:00
e3fd4d707e 2021 2021-01-25 15:58:47 +00:00
854880747d Fix text fragment scrolling which behind the floating top bar
refs: #749
2021-01-22 10:02:51 +08:00
6b9df8bb51 Rebuild assets 2021-01-22 09:52:32 +08:00
1360ed83bd Update dependency autoprefixer to v10.2.3 2021-01-19 19:59:47 +00:00
adfb47009e Updated links to ghost.org sites
no issue

Follow-up task of the updated Ghost Docs structure. Updated links reflecting the new structure to prevent unnecessary 404s and redirects
2021-01-19 13:30:21 +13:00
4752bf03c9 Update dependency @tryghost/release-utils to v0.6.10 2021-01-12 17:05:11 +00:00
a17155a3b6 Update dependency postcss to v8.2.4 2021-01-11 00:05:06 +00:00
a1bf3f3823 Update dependency autoprefixer to v10.2.1 2021-01-08 02:05:45 +00:00
d063fb2806 Update dependency postcss to v8.2.3 2021-01-07 14:05:36 +00:00
4a6dfa8e04 Added main as a deploy branch for theme uploading
no issue

- we will be switching to main soon, and want to update this workflow to show how it should be used
2021-01-07 13:50:49 +00:00
e4a5e96d06 Update dependency autoprefixer to v10.2.0 2021-01-06 03:05:42 +00:00
35e68f6d3f Show members-only posts in the post loop by default 2021-01-05 15:47:56 +08:00
f631f874f7 Update dependency beeper to v2.1.0 2021-01-04 00:07:18 +00:00
74d787831e Lock file maintenance 2021-01-01 00:04:53 +00:00
739deb3e4d Update dependency postcss to v8.2.2 2020-12-29 22:05:17 +00:00
bc3e072d31 Update dependency @tryghost/release-utils to v0.6.9 2020-12-14 04:56:45 +00:00
838c4ecca2 Update dependency gscan to v3.6.1 2020-12-11 10:41:29 +00:00
7a61bf55ed Update dependency postcss to v8.2.1 2020-12-09 13:06:09 +00:00
9baffdd03f Update CSS preprocessors 2020-12-08 07:49:27 +00:00
30ccbca28a Update dependency postcss to v8.1.14 2020-12-04 00:26:02 +00:00
def78b102b Update dependency postcss to v8.1.13 2020-12-03 03:20:22 +00:00
dfb6444b25 Update dependency postcss to v8.1.11 2020-12-03 01:49:56 +00:00
4c298b97cf Lock file maintenance 2020-12-01 00:05:39 +00:00
6c8a048bad Update dependency autoprefixer to v10.0.4 2020-11-27 21:39:19 +00:00
fd02a6c722 Update dependency autoprefixer to v10.0.3 2020-11-26 22:06:52 +00:00
493da38cff Update jQuery version to 3.5.1 2020-11-24 12:01:31 +08:00
19cf4adb74 Update dependency postcss to v8.1.10 2020-11-23 22:25:18 +00:00
daa69cbd31 Update dependency postcss to v8.1.9 2020-11-23 00:05:38 +00:00
267fd00802 Update dependency postcss to v8.1.8 2020-11-19 16:00:59 +00:00
8fefeca41b 3.1.2 2020-11-17 12:32:25 +00:00
45f5c83118 Update dependency postcss to v8.1.7 2020-11-10 18:06:13 +00:00
c3cb51711a Changed bookmark card metadata styling to be consistent with the editor
Classes for author and publisher are temporarily swapped to make sure the changes are backwards compatible until Ghost 4.0
2020-11-10 18:17:11 +01:00
3d189760a8 Update dependency autoprefixer to v10.0.2 2020-11-10 15:05:07 +00:00
8087366537 Update dependency postcss to v8.1.6 2020-11-05 17:05:11 +00:00
7748f8c781 Update dependency postcss to v8.1.5 2020-11-05 15:54:45 +00:00
8783bd4ee8 Update dependency @tryghost/release-utils to v0.6.8 2020-11-05 04:41:15 +00:00
006b056adc Lock file maintenance 2020-11-01 00:04:25 +00:00
fe690d4048 Update dependency postcss to v8.1.4 2020-10-26 00:06:23 +00:00
c3c0374ca6 Update dependency postcss to v8.1.3 2020-10-23 02:25:21 +00:00
0429f85774 Update dependency gscan to v3.6.0 2020-10-21 10:22:37 +00:00
1f8df12a7c Update actions/checkout action to v2 2020-10-20 16:04:56 +00:00
75e68ce5b7 Update TryGhost/action-deploy-theme action to v1.4.1 2020-10-20 14:07:13 +00:00
fa15a48192 Update dependency postcss to v8.1.2 2020-10-19 01:06:17 +00:00
0c36dc5235 3.1.1 2020-10-16 09:19:06 +01:00
aa3c83ec35 Updated built assets 2020-10-16 09:18:36 +01:00
38481aac9a Fixed post content input color issue on dark mode
Fixes #718
2020-10-08 11:36:41 +08:00
0052c2ddc3 Added subscribe failure notification
Fixes #738
2020-10-08 10:22:49 +08:00
9d12bc32f0 Update screen.css (#735)
Fix instance of color() to color-mod()
2020-10-03 11:17:29 +07:00
cb674ab56c Lock file maintenance 2020-10-01 00:16:07 +00:00
c86ee63b86 Pin dependency postcss to 8.1.1 2020-09-30 12:49:12 +00:00
b92f18e55a Added postcss as a dev dependency (required by gulp-postcss) 2020-09-30 13:48:11 +01:00
827940c836 Update dependency autoprefixer to v10.0.1 2020-09-28 00:05:40 +00:00
db0af7f759 Update dependency gulp-postcss to v9 2020-09-23 19:04:44 +00:00
af87b9b3b0 Update dependency @tryghost/release-utils to v0.6.7 2020-09-22 03:39:15 +00:00
ec03acff02 Update dependency autoprefixer to v10 2020-09-15 19:04:52 +00:00
fa48995326 Updated action-deploy-theme to v1.3.1
- hopefully fixes a bug with `theme-name` not being passed through
2020-09-10 13:15:53 +01:00
6350790798 Fix close button in the subscribe success message 2020-09-10 12:28:44 +08:00
ab521da23a Update dependency gscan to v3.5.7 2020-09-07 16:28:49 +00:00
91185016eb Lock file maintenance 2020-09-01 00:05:19 +00:00
0af8d2d8bc Update dependency @tryghost/release-utils to v0.6.6 2020-08-11 17:42:19 +00:00
f50f663ef7 Update dependency @tryghost/release-utils to v0.6.5 2020-08-11 11:52:54 +00:00
a467e31457 Update dependency gscan to v3.5.6 2020-08-10 15:09:56 +00:00
807018ca97 Fix background color of slash of darkmode <hr> (#733) 2020-08-09 00:34:53 +07:00
ce9918de2f Update dependency @tryghost/release-utils to v0.6.4 2020-08-07 15:08:43 +00:00
df2d20caab 3.1.0 2020-08-04 10:59:14 +01:00
c6cb667fea Lock file maintenance 2020-08-01 00:29:35 +00:00
a1d9eae840 Update dependency autoprefixer to v9.8.6 2020-07-30 20:40:44 +00:00
59eefa3659 Updated call to actions/checkout to use v2
refs https://github.com/TryGhost/action-deploy-theme/issues/30

- actions/checkout has changed their default branch name from master to main, which shows warnings.
2020-07-28 12:53:07 +01:00
78bde5f3dc Fix broken link 2020-07-28 00:59:13 +07:00
e637d809f6 Upgraded to color-mod, native CSS vars
Dropping final support for IE11 and moving to newer color-mod package to replace the old deprecated one
2020-07-28 00:52:31 +07:00
e4793cc743 Update dependency gscan to v3.5.5 2020-07-24 10:15:20 +00:00
cd7016493e Update dependency inquirer to v7.3.3 2020-07-23 02:35:30 +00:00
7421cff4fe 3.0.13 2020-07-21 13:41:23 +01:00
c465d95e14 Added new build assets
no issue
2020-07-21 13:40:03 +01:00
c1c6fed941 Update dependency inquirer to v7.3.2 2020-07-13 17:15:27 +00:00
5664f81564 Update dependency autoprefixer to v9.8.5 2020-07-13 00:04:56 +00:00
8838afe43f Lock file maintenance 2020-07-10 19:01:32 +01:00
f53b6b3435 Update dependency inquirer to v7.3.1 2020-07-10 15:46:29 +00:00
be77dad00e Update dependency inquirer to v7.3.0 2020-07-02 05:04:53 +00:00
408cf0cc1e Update dependency gulp-zip to v5.0.2 2020-06-29 00:27:17 +00:00
cfdc8a3b85 Update dependency autoprefixer to v9.8.4 2020-06-24 03:40:53 +00:00
e6a24de5c4 Update dependency autoprefixer to v9.8.3 2020-06-23 14:43:53 +00:00
6d0a3a8899 Update dependency autoprefixer to v9.8.2 2020-06-22 00:21:02 +00:00
b54c3debd4 Update dependency autoprefixer to v9.8.1 2020-06-19 21:33:26 +00:00
0e0589cb04 Disabled yarn-error.log file export to zip (#725) 2020-06-17 19:07:34 +01:00
5bfc82bf0c Update dependency inquirer to v7.2.0 2020-06-15 02:35:55 +00:00
d3ffc71b34 Update dependency @tryghost/release-utils to v0.6.3 2020-05-26 16:22:16 +00:00
871fc4075f Update dependency autoprefixer to v9.8.0 2020-05-18 01:14:52 +00:00
6f37e5a148 Update dependency @tryghost/release-utils to v0.6.2 2020-05-08 16:13:01 +00:00
adc055495c Update dependency gscan to v3.5.4 2020-05-01 09:41:56 +00:00
2ed7ea8f13 Lock file maintenance (#709)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-01 15:16:09 +07:00
4ddbaae803 Update dependency gscan to v3.5.3 2020-04-22 17:12:58 +00:00
7e0e45c643 Change border-left on blockquote to use color variables (#705) 2020-04-22 18:44:54 +07:00
e0771bfc7e Update dependency gscan to v3.5.2 2020-04-20 19:15:57 +00:00
8f1a15296a Update dependency @tryghost/release-utils to v0.6.1 2020-04-16 13:44:16 +00:00
2bd82a30e8 Update dependency @tryghost/release-utils to v0.6.0 2020-04-07 12:16:10 +00:00
feb7f3aac6 3.0.12 2020-04-07 09:15:05 +01:00
eed15fd9a5 Update dependency autoprefixer to v9.7.6 2020-04-06 21:22:19 +00:00
201b1924cf Update dependency gscan to v3.4.1 2020-04-06 17:10:14 +00:00
387a2aa3f0 Switch testing to built-in Nodejs
no issue
2020-04-06 13:49:51 +01:00
690ca22fb7 Removed test addition 2020-04-03 16:17:14 +01:00
31d43860ac Updated release script
no issue
2020-04-03 16:16:26 +01:00
14f7cc4e31 Updated built files
no issue
2020-04-03 16:04:41 +01:00
7646f90556 Updated theme name in deploy GitHub Actions
no issue

- the theme name cannot be the same as the default
2020-04-03 09:53:48 +01:00
8e17cdc1fb update sdeploy theme (#692) 2020-04-03 14:39:02 +07:00
2da322d93b Lock file maintenance (#699)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-04-03 14:36:14 +07:00
709c7196b9 Post cards > Lazyload (#701)
Co-authored-by: Rafael Gomes <rgomes@lesite.ca>
2020-04-03 14:35:58 +07:00
c97b847002 Update dependency @tryghost/release-utils to v0.5.0 2020-04-01 12:17:28 +00:00
7d37adb3cd Update dependency autoprefixer to v9.7.5 2020-03-31 17:33:06 +00:00
4fe7010f4e Update dependency @tryghost/release-utils to v0.4.2 2020-03-31 15:11:06 +00:00
6bf34a5a70 Moved Casper release code into gulpfile
no issue
2020-03-31 16:10:30 +01:00
c9a54e25ab Enabled CI for Renovate branches
no issue
2020-03-31 15:54:56 +01:00
3281f75945 Update dependency gscan to v3.4.0 2020-03-31 15:53:14 +01:00
c8abe3a7c4 3.0.11 2020-03-26 14:29:11 +00:00
150b698b1c Updated Renovate config with new structure
no issue
2020-03-26 10:56:13 +00:00
9ff3aa7858 3.0.10 2020-03-23 12:23:44 +00:00
8886056719 Fixed navigation scrollbar bug
no refs.
- fixed issue that made top navigation scrollbar appear for sites with secondary navigation and members turned off
2020-03-11 13:46:20 +01:00
93628dc7f0 3.0.9 2020-03-09 10:49:09 +00:00
702b2cbf1f Refined width of image captions
no refs.
- updated max width of image caption text
2020-03-04 15:34:15 +01:00
e5969f93da Improved author and tag header styles
no refs.

- added default avatar for authors template
- fixed typography inconsistencies, alignment and spacing issues for author and tags headers
- applied CSSComb
2020-03-04 14:34:03 +01:00
9e29e145fc 🐛 Subscribe overlay fixes
refs. https://github.com/TryGhost/Casper/issues/630

- added a dedicated close button element for the subscribe overlay which sits on top of all elements to ensure the modal is always closable
- fixed alignment and spacing of "Subscribe" button for mobile sizes
2020-03-04 11:26:27 +01:00
74ae3d5140 🐛 Fixed image alignment for small images
refs. https://github.com/TryGhost/Casper/issues/517

- updated styles to center align small images with long caption text
2020-03-03 17:29:34 +01:00
1ec7a12d43 Bumped dependency versions
no issue
2020-03-02 18:36:18 +00:00
9ec0f08a48 3.0.8 2020-03-02 12:02:24 +00:00
b09e846fd2 Update dependency postcss-custom-properties to v9.1.1 2020-03-01 02:18:49 +00:00
92d9174b24 Update dependency @tryghost/release-utils to v0.4.1 2020-03-01 01:18:39 +00:00
36 changed files with 3038 additions and 4360 deletions

View File

@ -1,17 +0,0 @@
# http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.hbs]
insert_final_newline = false
[*.md]
trim_trailing_whitespace = false

View File

@ -1,19 +0,0 @@
Do you need help or have a question? Please come chat in our forum: https://forum.ghost.org 👫.
If you're filing a bug 🐛, please include the following information:
### Screenshot
![]()
### Steps to Reproduce
1. This is the first step
2. This may be the post content used to cause an issue...
### Technical details
* Casper Version:
* Ghost Version:
* Browser Version:
* OS Version:

View File

@ -1,15 +0,0 @@
name: Deploy Theme
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@master
- uses: TryGhost/action-deploy-theme@v1.2.0
with:
api-url: ${{ secrets.GHOST_ADMIN_API_URL }}
api-key: ${{ secrets.GHOST_ADMIN_API_KEY }}
theme-name: "casper-master"

View File

@ -1,32 +0,0 @@
name: Test
on:
pull_request:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-18.04
strategy:
matrix:
node: [ '10' ]
name: Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v1
- name: Cache node modules
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: npm install yarn
- run: yarn install
- run: yarn test:ci

View File

@ -1,2 +0,0 @@
version-tag-prefix ""
version-git-message "%s"

View File

@ -1,4 +1,4 @@
Copyright (c) 2013-2020 Ghost Foundation
Copyright (c) 2013-2021 Ghost Foundation
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation

View File

@ -12,7 +12,7 @@ The default theme for [Ghost](http://github.com/tryghost/ghost/). This is the la
Ghost uses a simple templating language called [Handlebars](http://handlebarsjs.com/) for its themes.
This theme has lots of code comments to help explain what's going on just by reading the code. Once you feel comfortable with how everything works, we also have full [theme API documentation](https://ghost.org/docs/api/handlebars-themes/) which explains every possible Handlebars helper and template.
This theme has lots of code comments to help explain what's going on just by reading the code. Once you feel comfortable with how everything works, we also have full [theme API documentation](https://ghost.org/docs/themes/) which explains every possible Handlebars helper and template.
**The main files are:**
@ -54,8 +54,7 @@ yarn zip
# PostCSS Features Used
- Autoprefixer - Don't worry about writing browser prefixes of any kind, it's all done automatically with support for the latest 2 major versions of every browser.
- Variables - Simple pure CSS variables
- [Color Function](https://github.com/postcss/postcss-color-function)
- [Color Mod](https://github.com/jonathantneal/postcss-color-mod-function)
# SVG Icons
@ -67,4 +66,4 @@ You can add your own SVG icons in the same manner.
# Copyright & License
Copyright (c) 2013-2020 Ghost Foundation - Released under the [MIT license](LICENSE).
Copyright (c) 2013-2021 Ghost Foundation - Released under the [MIT license](LICENSE).

View File

@ -1,9 +0,0 @@
# Reporting Security Vulnerabilities
Potential security vulnerabilities can be reported directly us at `security@ghost.org`. The Ghost Security Team communicates privately and works in a secured, isolated repository for tracking, testing, and resolving security-related issues.
The full, up-to-date details of our security policy and procedure can always be found in our documentation:
https://ghost.org/docs/concepts/security/
Please refer to this before emailing us. Thanks for helping make Ghost safe for everyone 🙏.

View File

@ -1,2 +1,2 @@
!function(n){"use strict";n.fn.fitVids=function(e){var i={customSelector:null,ignore:null};if(!document.getElementById("fit-vids-style")){var t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("div");r.innerHTML='<p>x</p><style id="fit-vids-style">.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%;}</style>',t.appendChild(r.childNodes[1])}return e&&n.extend(i,e),this.each(function(){var e=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];i.customSelector&&e.push(i.customSelector);var r=".fitvidsignore";i.ignore&&(r=r+", "+i.ignore);var t=n(this).find(e.join(","));(t=(t=t.not("object object")).not(r)).each(function(){var e=n(this);if(!(0<e.parents(r).length||"embed"===this.tagName.toLowerCase()&&e.parent("object").length||e.parent(".fluid-width-video-wrapper").length)){e.css("height")||e.css("width")||!isNaN(e.attr("height"))&&!isNaN(e.attr("width"))||(e.attr("height",9),e.attr("width",16));var t=("object"===this.tagName.toLowerCase()||e.attr("height")&&!isNaN(parseInt(e.attr("height"),10))?parseInt(e.attr("height"),10):e.height())/(isNaN(parseInt(e.attr("width"),10))?e.width():parseInt(e.attr("width"),10));if(!e.attr("name")){var i="fitvid"+n.fn.fitVids._count;e.attr("name",i),n.fn.fitVids._count++}e.wrap('<div class="fluid-width-video-container"><div class="fluid-width-video-wrapper"></div></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*t+"%"),e.removeAttr("height").removeAttr("width")}})})},n.fn.fitVids._count=0}(window.jQuery||window.Zepto),function(e,t){t.addEventListener("DOMContentLoaded",function(){t.querySelectorAll(".kg-gallery-image img").forEach(function(e){var t=e.closest(".kg-gallery-image"),i=e.attributes.width.value/e.attributes.height.value;t.style.flex=i+" 1 0%"})})}(window,document),function(t,i){var r=i.querySelector("link[rel=next]");if(r){var n=i.querySelector(".post-feed");if(n){var o=300,s=!1,a=!1,d=t.scrollY,l=t.innerHeight,c=i.documentElement.scrollHeight;t.addEventListener("scroll",f,{passive:!0}),t.addEventListener("resize",v),h()}}function u(){if(404===this.status)return t.removeEventListener("scroll",f),void t.removeEventListener("resize",v);this.response.querySelectorAll(".post-card").forEach(function(e){n.appendChild(i.importNode(e,!0))});var e=this.response.querySelector("link[rel=next]");e?r.href=e.href:(t.removeEventListener("scroll",f),t.removeEventListener("resize",v)),c=i.documentElement.scrollHeight,a=s=!1}function e(){if(!a)if(d+l<=c-o)s=!1;else{a=!0;var e=new t.XMLHttpRequest;e.responseType="document",e.addEventListener("load",u),e.open("GET",r.href),e.send(null)}}function h(){s||t.requestAnimationFrame(e),s=!0}function f(){d=t.scrollY,h()}function v(){l=t.innerHeight,c=i.documentElement.scrollHeight,h()}}(window,document),function(s,a){s.Casper||(s.Casper={}),s.Casper.stickyNavTitle=function(e){var t=a.querySelector(e.navSelector),i=a.querySelector(e.titleSelector),r=s.scrollY,n=!1;function o(){i.getBoundingClientRect().top+s.scrollY+(i.offsetHeight+35)<=r?t.classList.add(e.activeClass):t.classList.remove(e.activeClass),n=!1}s.addEventListener("scroll",function(){r=s.scrollY,function(){n||requestAnimationFrame(o);n=!0}()},{passive:!0}),o()}}(window,document);
!function(o){"use strict";o.fn.fitVids=function(e){var t,i,n={customSelector:null,ignore:null};return document.getElementById("fit-vids-style")||(t=document.head||document.getElementsByTagName("head")[0],(i=document.createElement("div")).innerHTML='<p>x</p><style id="fit-vids-style">.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%;}</style>',t.appendChild(i.childNodes[1])),e&&o.extend(n,e),this.each(function(){var e=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];n.customSelector&&e.push(n.customSelector);var r=".fitvidsignore";n.ignore&&(r=r+", "+n.ignore);e=o(this).find(e.join(","));(e=(e=e.not("object object")).not(r)).each(function(){var e,t,i=o(this);0<i.parents(r).length||"embed"===this.tagName.toLowerCase()&&i.parent("object").length||i.parent(".fluid-width-video-wrapper").length||(i.css("height")||i.css("width")||!isNaN(i.attr("height"))&&!isNaN(i.attr("width"))||(i.attr("height",9),i.attr("width",16)),e=("object"===this.tagName.toLowerCase()||i.attr("height")&&!isNaN(parseInt(i.attr("height"),10))?parseInt(i.attr("height"),10):i.height())/(isNaN(parseInt(i.attr("width"),10))?i.width():parseInt(i.attr("width"),10)),i.attr("name")||(t="fitvid"+o.fn.fitVids._count,i.attr("name",t),o.fn.fitVids._count++),i.wrap('<div class="fluid-width-video-container"><div class="fluid-width-video-wrapper"></div></div>').parent(".fluid-width-video-wrapper").css("padding-top",100*e+"%"),i.removeAttr("height").removeAttr("width"))})})},o.fn.fitVids._count=0}(window.jQuery||window.Zepto),function(e){e.addEventListener("DOMContentLoaded",function(){e.querySelectorAll(".kg-gallery-image img").forEach(function(e){var t=e.closest(".kg-gallery-image"),e=e.attributes.width.value/e.attributes.height.value;t.style.flex=e+" 1 0%"})})}((window,document)),function(t,i){var r,n,o,d,s,a,l,c=i.querySelector("link[rel=next]");function h(){if(404===this.status)return t.removeEventListener("scroll",f),void t.removeEventListener("resize",m);this.response.querySelectorAll("article.post-card").forEach(function(e){r.appendChild(i.importNode(e,!0))});var e=this.response.querySelector("link[rel=next]");e?c.href=e.href:(t.removeEventListener("scroll",f),t.removeEventListener("resize",m)),l=i.documentElement.scrollHeight,d=o=!1}function e(){var e;d||(s+a<=l-n?o=!1:(d=!0,(e=new t.XMLHttpRequest).responseType="document",e.addEventListener("load",h),e.open("GET",c.href),e.send(null)))}function u(){o||t.requestAnimationFrame(e),o=!0}function f(){s=t.scrollY,u()}function m(){a=t.innerHeight,l=i.documentElement.scrollHeight,u()}!c||(r=i.querySelector(".post-feed"))&&(d=o=!(n=300),s=t.scrollY,a=t.innerHeight,l=i.documentElement.scrollHeight,t.addEventListener("scroll",f,{passive:!0}),t.addEventListener("resize",m),u())}(window,document);
//# sourceMappingURL=casper.js.map

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
a,abbr,acronym,address,applet,article,aside,audio,big,blockquote,body,canvas,caption,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,ul,var,video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}img{max-width:100%}html{box-sizing:border-box;font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}*,:after,:before{box-sizing:inherit}a{background-color:transparent}a:active,a:hover{outline:0}b,strong{font-weight:700}dfn,em,i{font-style:italic}h1{margin:.67em 0;font-size:2em}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}mark{background-color:#fdffb6}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;color:inherit;font:inherit}button{overflow:visible;border:none}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input:focus{outline:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}legend{padding:0;border:0}textarea{overflow:auto}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}html{overflow-y:scroll;font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body,html{overflow-x:hidden}body{color:#313b3f;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;font-size:1.6rem;line-height:1.6em;font-weight:400;font-style:normal;letter-spacing:0;text-rendering:optimizeLegibility;background:#fff;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-font-feature-settings:"liga" on}::-moz-selection{text-shadow:none;background:#cbeafb}::selection{text-shadow:none;background:#cbeafb}hr{position:relative;display:block;width:100%;margin:2.5em 0 3.5em;padding:0;height:1px;border:0;border-top:1px solid #e3e9ed}audio,canvas,iframe,img,svg,video{vertical-align:middle}fieldset{margin:0;padding:0;border:0}textarea{resize:vertical}blockquote,dl,ol,p,ul{margin:0 0 1.5em}ol,ul{padding-left:1.3em;padding-right:1.5em}ol ol,ol ul,ul ol,ul ul{margin:.5em 0 1em}ul{list-style:disc}ol{list-style:decimal}ol,ul{max-width:100%}li{margin:.5em 0;padding-left:.3em;line-height:1.6em}dt{float:left;margin:0 20px 0 0;width:120px;color:#15171a;font-weight:500;text-align:right}dd{margin:0 0 5px;text-align:left}blockquote{margin:1.5em 0;padding:0 1.6em;border-left:.5em solid #e5eff5}blockquote p{margin:.8em 0;font-size:1.2em;font-weight:300}blockquote small{display:inline-block;margin:.8em 0 .8em 1.5em;font-size:.9em;opacity:.8}blockquote small:before{content:"\2014 \00A0"}blockquote cite{font-weight:700}blockquote cite a{font-weight:400}a{color:#26a8ed;text-decoration:none}a:hover{text-decoration:underline}h1,h2,h3,h4,h5,h6{margin-top:0;line-height:1.15;font-weight:600;text-rendering:optimizeLegibility}h1{margin:0 0 .5em;font-size:5.5rem;font-weight:600}@media (max-width:500px){h1{font-size:2.2rem}}h2{margin:1.5em 0 .5em;font-size:2.2rem}@media (max-width:500px){h2{font-size:1.8rem}}h3{margin:1.5em 0 .5em;font-size:1.8rem;font-weight:500}@media (max-width:500px){h3{font-size:1.7rem}}h4{margin:1.5em 0 .5em;font-size:1.6rem;font-weight:500}h5,h6{margin:1.5em 0 .5em;font-size:1.4rem;font-weight:500}
a,abbr,acronym,address,applet,article,aside,audio,big,blockquote,body,canvas,caption,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,ul,var,video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}img{max-width:100%;height:auto}html{box-sizing:border-box;font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}*,:after,:before{box-sizing:inherit}a{background-color:transparent}a:active,a:hover{outline:0}b,strong{font-weight:700}dfn,em,i{font-style:italic}h1{margin:.67em 0;font-size:2em}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}mark{background-color:#fdffb6}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;color:inherit;font:inherit}button{overflow:visible;border:none}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input:focus{outline:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}legend{padding:0;border:0}textarea{overflow:auto}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{color:#35373a;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;font-size:1.6rem;line-height:1.6em;font-weight:400;font-style:normal;letter-spacing:0;text-rendering:optimizeLegibility;background:#fff;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-font-feature-settings:"liga" on}::-moz-selection{text-shadow:none;background:#daf2fd}::selection{text-shadow:none;background:#daf2fd}hr{position:relative;display:block;width:100%;margin:2.5em 0 3.5em;padding:0;height:1px;border:0;border-top:1px solid #f0f0f0}audio,canvas,iframe,img,svg,video{vertical-align:middle}fieldset{margin:0;padding:0;border:0}textarea{resize:vertical}::not(.gh-content) blockquote,::not(.gh-content) dl,::not(.gh-content) ol,::not(.gh-content) p,::not(.gh-content) ul{margin:0 0 1.5em}ol,ul{padding-left:1.3em;padding-right:1.5em}ol ol,ol ul,ul ol,ul ul{margin:.5em 0 1em}ul{list-style:disc}ol{list-style:decimal}ol,ul{max-width:100%}li{margin:.5em 0;padding-left:.3em;line-height:1.6em}dt{float:left;margin:0 20px 0 0;width:120px;color:#daf2fd;font-weight:500;text-align:right}dd{margin:0 0 5px;text-align:left}blockquote{margin:1.5em 0;padding:0 1.6em;border-left:#daf2fd}blockquote p{margin:.8em 0;font-size:1.2em;font-weight:300}blockquote small{display:inline-block;margin:.8em 0 .8em 1.5em;font-size:.9em;opacity:.8}blockquote small:before{content:"\2014 \00A0"}blockquote cite{font-weight:700}blockquote cite a{font-weight:400}a{color:#15171a;text-decoration:none}h1,h2,h3,h4,h5,h6{margin-top:0;line-height:1.15;font-weight:600;text-rendering:optimizeLegibility;letter-spacing:-.01em}h1{margin:0 0 .5em;font-size:4.8rem;font-weight:700;letter-spacing:-.015em}@media (max-width:600px){h1{font-size:2.8rem}}h2{margin:1.5em 0 .5em;font-size:2.8rem;font-weight:700}@media (max-width:600px){h2{font-size:2.3rem}}h3{margin:1.5em 0 .5em;font-size:2.4rem;font-weight:600}@media (max-width:600px){h3{font-size:1.7rem}}h4{font-size:2.2rem}h4,h5{margin:1.5em 0 .5em}h5{font-size:2rem}h6{margin:1.5em 0 .5em;font-size:1.8rem}
/*# sourceMappingURL=global.css.map */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,22 +1,3 @@
/* Variables
/* ---------------------------------------------------------- */
:root {
/* Colours */
--blue: #3eb0ef;
--green: #a4d037;
--purple: #ad26b4;
--yellow: #fecd35;
--red: #f05230;
--darkgrey: #15171A;
--midgrey: #738a94;
--lightgrey: #c5d2d9;
--whitegrey: #e5eff5;
--pink: #fa3a57;
--brown: #a3821a;
--darkmode: color(var(--darkgrey) l(+2%));
}
/* Reset
/* ---------------------------------------------------------- */
@ -128,6 +109,7 @@ table {
}
img {
max-width: 100%;
height: auto;
}
html {
box-sizing: border-box;
@ -273,15 +255,12 @@ th {
========================================================================== */
html {
overflow-x: hidden;
overflow-y: scroll;
font-size: 62.5%;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
body {
overflow-x: hidden;
color: color(var(--midgrey) l(-30%));
color: #35373A;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
font-size: 1.6rem;
line-height: 1.6em;
@ -298,7 +277,7 @@ body {
::selection {
text-shadow: none;
background: color(var(--blue) lightness(+30%));
background: #daf2fd;
}
hr {
@ -309,7 +288,7 @@ hr {
padding: 0;
height: 1px;
border: 0;
border-top: 1px solid color(var(--lightgrey) l(+10%));
border-top: 1px solid #f0f0f0;
}
audio,
@ -331,11 +310,11 @@ textarea {
resize: vertical;
}
p,
ul,
ol,
dl,
blockquote {
::not(.gh-content) p,
::not(.gh-content) ul,
::not(.gh-content) ol,
::not(.gh-content) dl,
::not(.gh-content) blockquote {
margin: 0 0 1.5em 0;
}
@ -375,7 +354,7 @@ dt {
float: left;
margin: 0 20px 0 0;
width: 120px;
color: var(--darkgrey);
color: #daf2fd;
font-weight: 500;
text-align: right;
}
@ -388,7 +367,7 @@ dd {
blockquote {
margin: 1.5em 0;
padding: 0 1.6em 0 1.6em;
border-left: var(--whitegrey) 0.5em solid;
border-left: #daf2fd;
}
blockquote p {
@ -416,14 +395,10 @@ blockquote cite a {
}
a {
color: color(var(--blue) l(-5%));
color: #15171A;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
h1,
h2,
h3,
@ -434,35 +409,38 @@ h6 {
line-height: 1.15;
font-weight: 600;
text-rendering: optimizeLegibility;
letter-spacing: -0.01em;
}
h1 {
margin: 0 0 0.5em 0;
font-size: 5.5rem;
font-weight: 600;
font-size: 4.8rem;
font-weight: 700;
letter-spacing: -0.015em;
}
@media (max-width: 500px) {
@media (max-width: 600px) {
h1 {
font-size: 2.2rem;
font-size: 2.8rem;
}
}
h2 {
margin: 1.5em 0 0.5em 0;
font-size: 2.2rem;
font-size: 2.8rem;
font-weight: 700;
}
@media (max-width: 500px) {
@media (max-width: 600px) {
h2 {
font-size: 1.8rem;
font-size: 2.3rem;
}
}
h3 {
margin: 1.5em 0 0.5em 0;
font-size: 1.8rem;
font-weight: 500;
font-size: 2.4rem;
font-weight: 600;
}
@media (max-width: 500px) {
@media (max-width: 600px) {
h3 {
font-size: 1.7rem;
}
@ -470,18 +448,15 @@ h3 {
h4 {
margin: 1.5em 0 0.5em 0;
font-size: 1.6rem;
font-weight: 500;
font-size: 2.2rem;
}
h5 {
margin: 1.5em 0 0.5em 0;
font-size: 1.4rem;
font-weight: 500;
font-size: 2rem;
}
h6 {
margin: 1.5em 0 0.5em 0;
font-size: 1.4rem;
font-weight: 500;
font-size: 1.8rem;
}

File diff suppressed because it is too large Load Diff

View File

@ -43,7 +43,7 @@
}
// append contents
var postElements = this.response.querySelectorAll('.post-card');
var postElements = this.response.querySelectorAll('article.post-card');
postElements.forEach(function (item) {
// document.importNode is important, without it the item's owner
// document will be different which can break resizing of

View File

@ -1,61 +0,0 @@
/* eslint-env browser */
/**
* Nav/Title replacement
* Used on invividual post pages, displays the post title in place of the nav
* bar when scrolling past the title
*
* Usage:
* ```
* Casper.stickyTitle({
* navSelector: '.site-nav-main',
* titleSelector: '.post-full-title',
* activeClass: 'nav-post-title-active'
* });
* ```
*/
(function (window, document) {
// set up Casper as a global object
if (!window.Casper) {
window.Casper = {};
}
window.Casper.stickyNavTitle = function stickyNavTitle(options) {
var nav = document.querySelector(options.navSelector);
var title = document.querySelector(options.titleSelector);
var lastScrollY = window.scrollY;
var ticking = false;
function onScroll() {
lastScrollY = window.scrollY;
requestTick();
}
function requestTick() {
if (!ticking) {
requestAnimationFrame(update);
}
ticking = true;
}
function update() {
var trigger = title.getBoundingClientRect().top + window.scrollY;
var triggerOffset = title.offsetHeight + 35;
// show/hide post title
if (lastScrollY >= trigger + triggerOffset) {
nav.classList.add(options.activeClass);
} else {
nav.classList.remove(options.activeClass);
}
ticking = false;
}
window.addEventListener('scroll', onScroll, {passive: true});
update();
};
})(window, document);

View File

@ -1,59 +1,57 @@
{{!< default}}
{{!-- The tag above means - insert everything in this file into the {body} of the default.hbs template --}}
{{#author}}
{{!-- Everything inside the #author tags pulls data from the author --}}
<header class="site-archive-header">
{{> site-header}}
{{> header-background background=cover_image}} {{!--Special header-image.hbs partial to generate the background image--}}
<div class="inner">
<div class="site-header-content author-header">
{{#if profile_image}}
<img class="author-profile-image" src="{{profile_image}}" alt="{{name}}" />
{{/if}}
<div class="author-header-content">
<h1 class="site-title">{{name}}</h1>
{{#if bio}}
<h2 class="author-bio">{{bio}}</h2>
{{/if}}
<div class="author-meta">
{{#if location}}
<div class="author-location">{{location}}</div>
{{/if}}
<div class="author-stats">
{{plural ../pagination.total empty='No posts' singular='% post' plural='% posts'}}
</div>
{{#if website}}
<span class="author-social-link"><a href="{{website}}" target="_blank" rel="noopener">Website</a></span>
{{/if}}
{{#if twitter}}
<span class="author-social-link"><a href="{{twitter_url}}" target="_blank" rel="noopener">Twitter</a></span>
{{/if}}
{{#if facebook}}
<span class="author-social-link"><a href="{{facebook_url}}" target="_blank" rel="noopener">Facebook</a></span>
{{/if}}
</div>
</div>
</div>
</div>
</div>
</header>
{{/author}}
{{!-- The main content area --}}
<main id="site-main" class="site-main outer">
<section class="outer">
<div class="inner posts">
<header class="author-profile">
{{#author}}
{{!-- Everything inside the #author tags pulls data from the author --}}
<div class="author-profile-content">
{{#if profile_image}}
<img class="author-profile-pic" src="{{profile_image}}" alt="{{name}}" />
{{else}}
<span class="author-profile-pic">{{> "icons/avatar"}}</span>
{{/if}}
<h1>{{name}}</h1>
<p>
{{#if bio}}
{{bio}}
{{else}}
{{plural ../pagination.total empty='No posts' singular='% post' plural='% posts'}} published
{{/if}}
</p>
<div class="author-profile-meta">
{{#if location}}
<div class="author-profile-location">📍 {{location}}</div>
{{/if}}
{{#if website}}
<span ></span><a class="author-profile-social-link" href="{{website}}" target="_blank" rel="noopener">{{website}}</a></span>
{{/if}}
{{#if twitter}}
<span ></span><a class="author-profile-social-link" href="{{twitter_url}}" target="_blank" rel="noopener">{{twitter_url}}</a></span>
{{/if}}
{{#if facebook}}
<span ></span><a class="author-profile-social-link" href="{{facebook_url}}" target="_blank" rel="noopener">{{facebook_url}}</a></span>
{{/if}}
</div>
</div>
{{/author}}
</header>
<div class="post-feed">
{{#foreach posts}}
{{!-- The tag below includes the markup for each post - partials/post-card.hbs --}}
{{> "post-card"}}
{{/foreach}}
</div>
</div>
</main>
</section>

View File

@ -1,6 +0,0 @@
{
"github": {
"username": "<username>",
"token": "<gh-personal-access-token>"
}
}

View File

@ -1,129 +1,105 @@
<!DOCTYPE html>
<html lang="{{@site.lang}}">
<html lang="{{@site.locale}}">
<head>
{{!-- Document Settings --}}
{{!-- Basic meta - advanced meta is output with {ghost_head} below --}}
<title>{{meta_title}}</title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
{{!-- Base Meta --}}
<title>{{meta_title}}</title>
<meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{{!-- Styles'n'Scripts --}}
{{!-- Theme assets - use the {asset} helper to reference styles & scripts,
this will take care of caching and cache-busting automatically --}}
<link rel="stylesheet" type="text/css" href="{{asset "built/screen.css"}}" />
{{!-- This tag outputs SEO meta+structured data and other important settings --}}
{{!-- This tag outputs all your advanced SEO meta, structured data, and other important settings,
it should always be the last tag before the closing head tag --}}
{{ghost_head}}
</head>
<body class="{{body_class}}">
<div class="viewport">
<div class="site-wrapper">
<header id="gh-head" class="gh-head {{#if @site.cover_image}}has-cover{{/if}}">
<nav class="gh-head-inner inner gh-container">
{{!-- All the main content gets inserted here, index.hbs, post.hbs, etc --}}
<div class="gh-head-brand">
<a class="gh-head-logo" href="{{@site.url}}">
{{#if @site.logo}}
<img src="{{@site.logo}}" alt="{{@site.title}}" />
{{else}}
{{@site.title}}
{{/if}}
</a>
<a class="gh-burger" role="button">
<div class="gh-burger-box">
<div class="gh-burger-inner"></div>
</div>
</a>
</div>
<div class="gh-head-menu">
{{navigation}}
</div>
<div class="gh-head-actions">
<div class="gh-social">
{{#if @site.facebook}}
<a class="gh-social-facebook" href="{{facebook_url @site.facebook}}" title="Facebook" target="_blank" rel="noopener">{{> "icons/facebook"}}</a>
{{/if}}
{{#if @site.twitter}}
<a class="gh-social-twitter" href="{{twitter_url @site.twitter}}" title="Twitter" target="_blank" rel="noopener">{{> "icons/twitter"}}</a>
{{/if}}
</div>
{{#unless @member}}
<a class="gh-head-button" href="#/portal">Subscribe</a>
{{else}}
<a class="gh-head-button" href="#/portal/account">Account</a>
{{/unless}}
</div>
</nav>
</header>
<main>
{{!-- All other templates get inserted here, index.hbs, post.hbs, etc --}}
{{{body}}}
</main>
{{!-- The footer at the very bottom of the screen --}}
<footer class="site-footer outer">
<div class="site-footer-content inner">
<section class="copyright"><a href="{{@site.url}}">{{@site.title}}</a> &copy; {{date format="YYYY"}}</section>
<nav class="site-footer-nav">
<a href="{{@site.url}}">Latest Posts</a>
{{#if @site.facebook}}<a href="{{facebook_url @site.facebook}}" target="_blank" rel="noopener">Facebook</a>{{/if}}
{{#if @site.twitter}}<a href="{{twitter_url @site.twitter}}" target="_blank" rel="noopener">Twitter</a>{{/if}}
<a href="https://ghost.org" target="_blank" rel="noopener">Ghost</a>
</nav>
</div>
</footer>
</div>
{{!-- The big email subscribe modal content --}}
{{#if @labs.members}}
<div class="subscribe-success-message">
<a class="subscribe-close" href="javascript:;"></a>
You've successfully subscribed to {{@site.title}}!
</div>
<div id="subscribe" class="subscribe-overlay">
<a class="subscribe-close" href="#"></a>
<div class="subscribe-overlay-content">
{{#if @site.logo}}
<img class="subscribe-overlay-logo" src="{{@site.logo}}" alt="{{@site.title}}" />
{{/if}}
<div class="subscribe-form">
<h1 class="subscribe-overlay-title">Subscribe to {{@site.title}}</h1>
<p class="subscribe-overlay-description">Stay up to date! Get all the latest & greatest posts delivered straight to your inbox</p>
<form data-members-form="subscribe">
<div class="form-group">
<input class="subscribe-email" data-members-email placeholder="youremail@example.com"
autocomplete="false" />
<button class="button primary" type="submit">
<span class="button-content">Subscribe</span>
<span class="button-loader">{{> "icons/loader"}}</span>
</button>
</div>
<div class="message-success">
<strong>Great!</strong> Check your inbox and click the link to confirm your subscription.
</div>
<div class="message-error">
Please enter a valid email address!
</div>
</form>
</div>
{{!-- The global footer at the very bottom of the screen --}}
<footer class="site-footer outer">
<div class="inner">
<section class="copyright"><a href="{{@site.url}}">{{@site.title}}</a> &copy; {{date format="YYYY"}}</section>
<nav class="site-footer-nav">
{{navigation type="secondary"}}
</nav>
<div><a href="https://ghost.org/" target="_blank" rel="noopener">Powered by Ghost</a></div>
</div>
</div>
{{/if}}
</footer>
{{!-- jQuery, required for fitvids --}}
<script
src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous">
</script>
{{!-- Fitvids (for responsive video embeds), infinite scroll, floating header, and gallery card support --}}
<script src="{{asset "built/casper.js"}}"></script>
</div>
{{!-- /.viewport --}}
{{!-- Scripts for Members subscription --}}
<script>
// Parse the URL parameter
function getParameterByName(name, url) {
if (!url) url = window.location.href;
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"),
results = regex.exec(url);
if (!results) return null;
if (!results[2]) return '';
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
// Give the parameter a variable name
var action = getParameterByName('action');
{{!-- Scripts - handle member signups, responsive videos, infinite scroll, floating headers, and galleries --}}
<script
src="https://code.jquery.com/jquery-3.5.1.min.js"
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
crossorigin="anonymous">
</script>
<script src="{{asset "built/casper.js"}}"></script>
<script>
$(document).ready(function () {
// Mobile Menu Trigger
$('.gh-burger').click(function () {
$('body').toggleClass('gh-head-open');
});
// FitVids - Makes video embeds responsive
$(".gh-content").fitVids();
});
</script>
$(document).ready(function () {
if (action == 'subscribe') {
$('body').addClass("subscribe-success");
}
$('.subscribe-success-message .subscribe-close').click(function () {
$('.subscribe-success-message').addClass('close');
});
// Reset form on opening subscrion overlay
$('.subscribe-button').click(function() {
$('.subscribe-overlay form').removeClass();
$('.subscribe-email').val('');
});
});
</script>
{{!-- The #block helper will pull in data from the #contentFor other template files. In this case, there's some JavaScript which we only want to use in post.hbs, but it needs to be included down here, after jQuery has already loaded. --}}
{{{block "scripts"}}}
{{!-- Ghost outputs important scripts and data with this tag - it should always be the very last thing before the closing body tag --}}
{{ghost_foot}}
{{!-- Ghost outputs required functional scripts with this tag - it should always be the last thing before the closing body tag --}}
{{ghost_foot}}
</body>
</html>

View File

@ -1,30 +1,37 @@
{{!< default}}
{{!--
This error template is used for all 404 errors, which might occur on your site.
It's a good idea to keep this template as minimal as possible in terms of both file size and complexity.
There are two error files in this theme, one for 404s and one for all other errors.
This file is the former, and handles all 404 Page Not Found errors.
The 404 error is the most common error that a visitor might see, for example when
following a broken link
Keep this template as lightweight as you can!
--}}
{{!< default}}
{{!-- The tag above means: insert everything in this file
into the {body} of the default.hbs template --}}
<header class="site-header">
{{> site-header}}
</header>
<main id="site-main" class="site-main outer error-content">
<section class="outer error-content">
<div class="inner">
<section class="error-message">
<h1 class="error-code">{{statusCode}}</h1>
<p class="error-description">{{message}}</p>
<a class="error-link" href="{{@site.url}}">Go to the front page →</a>
</section>
</div>
</section>
{{#get "posts" limit="3" include="authors,tags"}}
<div class="post-feed">
{{#foreach posts}}
{{> "post-card"}}
{{!-- Given that people landing on this page didn't find what they
were looking for, let's give them some alternative stuff to read. --}}
<aside class="read-more-wrap">
<div class="read-more inner">
{{#get "posts" include="authors" limit="3" as |more_posts|}}
{{#if more_posts}}
{{#foreach more_posts}}
{{> "post-card"}}
{{/foreach}}
</div>
{{/if}}
{{/get}}
</div>
</main>
</aside>

View File

@ -1,7 +1,15 @@
{{!--
This error template is used for all 400/500 errors, except 404, which might occur on your site.
It's a good idea to keep this template as minimal as possible in terms of both file size and complexity.
You'll notice that we *don't* use any JavaScript, or ghost_head / ghost_foot in this file.
There are two error files in this theme, one for 404s and one for all other errors.
This file is the latter, and handle all 400/500 errors that might occur.
Because 500 errors in particular usuall happen when a server is struggling, this
template is as simple as possible. No template dependencies, no JS, no API calls.
This is to prevent rendering the error-page itself compounding the issue causing
the error in the first place.
Keep this template as lightweight as you can!
--}}
<!DOCTYPE html>
@ -32,7 +40,7 @@ You'll notice that we *don't* use any JavaScript, or ghost_head / ghost_foot in
</div>
</header>
<main id="site-main" class="site-main outer error-content">
<main class="outer error-content">
<div class="inner">
<section class="error-message">

View File

@ -1,5 +1,8 @@
const {series, watch, src, dest, parallel} = require('gulp');
const pump = require('pump');
const path = require('path');
const releaseUtils = require('@tryghost/release-utils');
const inquirer = require('inquirer');
// gulp plugins and utils
const livereload = require('gulp-livereload');
@ -12,11 +15,14 @@ const fs = require('fs');
// postcss plugins
const autoprefixer = require('autoprefixer');
const colorFunction = require('postcss-color-function');
const colorFunction = require('postcss-color-mod-function');
const cssnano = require('cssnano');
const customProperties = require('postcss-custom-properties');
const easyimport = require('postcss-easy-import');
const REPO = 'TryGhost/Casper';
const REPO_READONLY = 'TryGhost/Casper';
const CHANGELOG_PATH = path.join(process.cwd(), '.', 'changelog.md');
function serve(done) {
livereload.listen();
done();
@ -39,17 +45,14 @@ function hbs(done) {
}
function css(done) {
const processors = [
easyimport,
customProperties({preserve: false}),
colorFunction(),
autoprefixer(),
cssnano()
];
pump([
src('assets/css/*.css', {sourcemaps: true}),
postcss(processors),
postcss([
easyimport,
colorFunction(),
autoprefixer(),
cssnano()
]),
dest('assets/built/', {sourcemaps: '.'}),
livereload()
], handleError(done));
@ -70,18 +73,17 @@ function js(done) {
}
function zipper(done) {
const targetDir = 'dist/';
const themeName = require('./package.json').name;
const filename = themeName + '.zip';
const filename = require('./package.json').name + '.zip';
pump([
src([
'**',
'!node_modules', '!node_modules/**',
'!dist', '!dist/**'
'!dist', '!dist/**',
'!yarn-error.log'
]),
zip(filename),
dest(targetDir)
dest('dist/')
], handleError(done));
}
@ -89,128 +91,83 @@ const cssWatcher = () => watch('assets/css/**', css);
const hbsWatcher = () => watch(['*.hbs', 'partials/**/*.hbs'], hbs);
const watcher = parallel(cssWatcher, hbsWatcher);
const build = series(css, js);
const dev = series(build, serve, watcher);
exports.build = build;
exports.zip = series(build, zipper);
exports.default = dev;
exports.default = series(build, serve, watcher);
// release imports
const path = require('path');
const releaseUtils = require('@tryghost/release-utils');
let config;
try {
config = require('./config');
} catch (err) {
config = null;
}
const REPO = 'TryGhost/Casper';
const USER_AGENT = 'Casper';
const CHANGELOG_PATH = path.join(process.cwd(), '.', 'changelog.md');
const changelog = ({previousVersion}) => {
const changelog = new releaseUtils.Changelog({
changelogPath: CHANGELOG_PATH,
folder: path.join(process.cwd(), '.')
});
changelog
.write({
githubRepoPath: `https://github.com/${REPO}`,
lastVersion: previousVersion
})
.sort()
.clean();
};
const previousRelease = () => {
return releaseUtils
.releases
.get({
userAgent: USER_AGENT,
uri: `https://api.github.com/repos/${REPO}/releases`
})
.then((response) => {
if (!response || !response.length) {
console.log('No releases found. Skipping');
return;
}
let prevVersion = response[0].tag_name || response[0].name;
console.log(`Previous version ${prevVersion}`);
return prevVersion;
});
};
/**
*
* `yarn ship` will trigger `postship` task.
*
* [optional] For full automation
*
* `GHOST=2.10.1,2.10.0 yarn ship`
* First value: Ships with Ghost
* Second value: Compatible with Ghost/GScan
*
* You can manually run in case the task has thrown an error.
*
* `npm_package_version=0.5.0 gulp release`
*/
const release = () => {
exports.release = async () => {
// @NOTE: https://yarnpkg.com/lang/en/docs/cli/version/
// require(./package.json) can run into caching issues, this re-reads from file everytime on release
var packageJSON = JSON.parse(fs.readFileSync('./package.json'));
let packageJSON = JSON.parse(fs.readFileSync('./package.json'));
const newVersion = packageJSON.version;
let shipsWithGhost = '{version}';
let compatibleWithGhost = '2.10.0';
const ghostEnvValues = process.env.GHOST || null;
if (ghostEnvValues) {
shipsWithGhost = ghostEnvValues.split(',')[0];
compatibleWithGhost = ghostEnvValues.split(',')[1];
if (!compatibleWithGhost) {
compatibleWithGhost = '2.10.0';
}
}
if (!newVersion || newVersion === '') {
console.log('Invalid version.');
console.log(`Invalid version: ${newVersion}`);
return;
}
console.log(`\nDraft release for ${newVersion}.`);
console.log(`\nCreating release for ${newVersion}...`);
if (!config || !config.github || !config.github.username || !config.github.token) {
console.log('Please copy config.example.json and configure Github token.');
const githubToken = process.env.GST_TOKEN;
if (!githubToken) {
console.log('Please configure your environment with a GitHub token located in GST_TOKEN');
return;
}
return previousRelease()
.then((previousVersion) => {
changelog({previousVersion});
try {
const result = await inquirer.prompt([{
type: 'input',
name: 'compatibleWithGhost',
message: 'Which version of Ghost is it compatible with?',
default: '4.0.0'
}]);
return releaseUtils
.releases
.create({
draft: true,
preRelease: false,
tagName: newVersion,
releaseName: newVersion,
userAgent: USER_AGENT,
uri: `https://api.github.com/repos/${REPO}/releases`,
github: {
username: config.github.username,
token: config.github.token
},
content: [`**Ships with Ghost ${shipsWithGhost} Compatible with Ghost >= ${compatibleWithGhost}**\n\n`],
changelogPath: CHANGELOG_PATH
})
.then((response) => {
console.log(`\nRelease draft generated: ${response.releaseUrl}\n`);
});
const compatibleWithGhost = result.compatibleWithGhost;
const releasesResponse = await releaseUtils.releases.get({
userAgent: 'Casper',
uri: `https://api.github.com/repos/${REPO_READONLY}/releases`
});
};
exports.release = release;
if (!releasesResponse || !releasesResponse) {
console.log('No releases found. Skipping...');
return;
}
let previousVersion = releasesResponse[0].tag_name || releasesResponse[0].name;
console.log(`Previous version: ${previousVersion}`);
const changelog = new releaseUtils.Changelog({
changelogPath: CHANGELOG_PATH,
folder: path.join(process.cwd(), '.')
});
changelog
.write({
githubRepoPath: `https://github.com/${REPO}`,
lastVersion: previousVersion
})
.sort()
.clean();
const newReleaseResponse = await releaseUtils.releases.create({
draft: true,
preRelease: false,
tagName: 'v' + newVersion,
releaseName: newVersion,
userAgent: 'Casper',
uri: `https://api.github.com/repos/${REPO}/releases`,
github: {
token: githubToken
},
content: [`**Compatible with Ghost ≥ ${compatibleWithGhost}**\n\n`],
changelogPath: CHANGELOG_PATH
});
console.log(`\nRelease draft generated: ${newReleaseResponse.releaseUrl}\n`);
} catch (err) {
console.error(err);
process.exit(1);
}
};

101
index.hbs
View File

@ -2,23 +2,29 @@
{{!-- The tag above means: insert everything in this file
into the {body} of the default.hbs template --}}
<header class="site-home-header">
{{> header-background background=@site.cover_image}} {{!--Special header-image.hbs partial to generate the background image--}}
<div class="inner">
{{> "site-nav"}}
<div class="site-header-content">
<h1 class="site-title">
{{#if @site.logo}}
<img class="site-logo" src="{{img_url @site.logo size="l"}}" alt="{{@site.title}}" />
{{else}}
{{@site.title}}
{{/if}}
</h1>
<h2 class="site-description">{{@site.description}}</h2>
</div>
</div>
</div>
</header>
<div class="site-header-content">
{{#if @site.cover_image}}
{{!-- This is a responsive image, it loads different sizes depending on device
https://medium.freecodecamp.org/a-guide-to-responsive-images-with-ready-to-use-templates-c400bd65c433 --}}
<img class="site-header-cover"
srcset="{{img_url @site.cover_image size="s"}} 300w,
{{img_url @site.cover_image size="m"}} 600w,
{{img_url @site.cover_image size="l"}} 1000w,
{{img_url @site.cover_image size="xl"}} 2000w"
sizes="100vw"
src="{{img_url @site.cover_image size="xl"}}"
alt=""
/>
{{/if}}
<h1 class="site-title">
{{#if @site.logo}}
<img class="site-logo" src="{{img_url @site.logo size="m"}}" alt="{{@site.title}}" />
{{else}}
{{@site.title}}
{{/if}}
</h1>
<p>{{@site.description}}</p>
</div>
{{!-- The main content area --}}
<main id="site-main" class="site-main outer">
@ -35,64 +41,3 @@ into the {body} of the default.hbs template --}}
</div>
</main>
{{> site-header}}
{{!-- The #contentFor helper here will send everything inside it up to the matching #block helper found in default.hbs --}}
{{#contentFor "scripts"}}
<script>
// NOTE: Scroll performance is poor in Safari
// - this appears to be due to the events firing much more slowly in Safari.
// Dropping the scroll event and using only a raf loop results in smoother
// scrolling but continuous processing even when not scrolling
$(document).ready(function () {
var nav = document.querySelector('.site-nav-main .site-nav');
var feed = document.querySelector('.post-feed');
var lastScrollY = window.scrollY;
var lastWindowHeight = window.innerHeight;
var lastDocumentHeight = $(document).height();
var ticking = false;
function onScroll() {
lastScrollY = window.scrollY;
requestTick();
}
function onResize() {
lastWindowHeight = window.innerHeight;
lastDocumentHeight = $(document).height();
requestTick();
}
function requestTick() {
if (!ticking) {
requestAnimationFrame(update);
}
ticking = true;
}
function update() {
var trigger = feed.getBoundingClientRect().top + window.scrollY;
var progressMax = lastDocumentHeight - lastWindowHeight;
// show/hide nav
if (lastScrollY >= trigger - 20) {
nav.classList.add('fixed-nav-active');
} else {
nav.classList.remove('fixed-nav-active');
}
ticking = false;
}
window.addEventListener('scroll', onScroll, { passive: true });
window.addEventListener('resize', onResize, false);
update();
});
</script>
{{/contentFor}}

View File

@ -2,10 +2,10 @@
"name": "casper",
"description": "A clean, minimal default theme for the Ghost publishing platform",
"demo": "https://demo.ghost.io",
"version": "3.0.7",
"version": "4.0.1",
"engines": {
"ghost": ">=3.0.0",
"ghost-api": "v3"
"ghost": ">=4.0.0",
"ghost-api": "v4"
},
"license": "MIT",
"screenshots": {
@ -25,7 +25,7 @@
"author": {
"name": "Ghost Foundation",
"email": "hello@ghost.org",
"url": "https://ghost.org"
"url": "https://ghost.org/"
},
"gpm": {
"type": "theme",
@ -46,19 +46,20 @@
"bugs": "https://github.com/TryGhost/Casper/issues",
"contributors": "https://github.com/TryGhost/Casper/graphs/contributors",
"devDependencies": {
"@tryghost/release-utils": "0.3.3",
"autoprefixer": "9.7.1",
"beeper": "2.0.0",
"@tryghost/release-utils": "0.6.12",
"autoprefixer": "10.2.5",
"beeper": "2.1.0",
"cssnano": "4.1.10",
"gscan": "3.3.0",
"gscan": "4.0.0",
"gulp": "4.0.2",
"gulp-concat": "2.6.1",
"gulp-livereload": "4.0.2",
"gulp-postcss": "8.0.0",
"gulp-postcss": "9.0.0",
"gulp-uglify": "3.0.2",
"gulp-zip": "5.0.1",
"postcss-color-function": "4.1.0",
"postcss-custom-properties": "9.0.2",
"gulp-zip": "5.1.0",
"inquirer": "8.0.0",
"postcss": "8.2.8",
"postcss-color-mod-function": "3.0.3",
"postcss-easy-import": "3.0.0",
"pump": "3.0.0"
},
@ -87,5 +88,10 @@
"width": 2000
}
}
},
"renovate": {
"extends": [
"@tryghost:theme"
]
}
}

View File

@ -1,65 +1,40 @@
{{!< default}}
{{!-- The tag above means: insert everything in this file
into the {body} of the default.hbs template --}}
into the {body} tag of the default.hbs template --}}
{{!-- The big featured header, it uses blog cover image as a BG if available --}}
<header class="site-header">
<div class="outer site-nav-main">
<div class="inner">
{{> "site-nav"}}
</div>
</div>
</header>
{{!-- Everything inside the #post tags pulls data from the post --}}
{{#post}}
{{!-- Everything inside the #post block pulls data from the page --}}
<main id="site-main" class="site-main outer">
<div class="inner">
<article class="article {{post_class}}">
<article class="post-full {{post_class}} {{#unless feature_image}}no-image{{/unless}}">
<header class="article-header gh-canvas">
{{#if feature_image}}
<figure class="article-image">
{{!-- This is a responsive image, it loads different sizes depending on device
https://medium.freecodecamp.org/a-guide-to-responsive-images-with-ready-to-use-templates-c400bd65c433 --}}
<img
srcset="{{img_url feature_image size="s"}} 300w,
{{img_url feature_image size="m"}} 600w,
{{img_url feature_image size="l"}} 1000w,
{{img_url feature_image size="xl"}} 2000w"
sizes="(min-width: 1400px) 1400px, 92vw"
src="{{img_url feature_image size="xl"}}"
alt="{{title}}"
/>
</figure>
{{/if}}
</header>
<header class="post-full-header">
<h1 class="post-full-title">{{title}}</h1>
</header>
<section class="gh-content gh-canvas">
{{#if feature_image}}
<figure class="post-full-image">
{{!-- This is a responsive image, it loads different sizes depending on device
https://medium.freecodecamp.org/a-guide-to-responsive-images-with-ready-to-use-templates-c400bd65c433 --}}
<img
srcset="{{img_url feature_image size="s"}} 300w,
{{img_url feature_image size="m"}} 600w,
{{img_url feature_image size="l"}} 1000w,
{{img_url feature_image size="xl"}} 2000w"
sizes="(max-width: 800px) 400px,
(max-width: 1170px) 1170px,
2000px"
src="{{img_url feature_image size="xl"}}"
alt="{{title}}"
/>
</figure>
{{/if}}
<h1 class="article-title">{{title}}</h1>
<section class="post-full-content">
<div class="post-content">
{{content}}
</div>
</section>
{{content}}
</article>
</section>
</div>
</main>
</article>
{{/post}}
{{!-- The #contentFor helper here will send everything inside it up to the matching #block helper found in default.hbs --}}
{{#contentFor "scripts"}}
<script>
$(function() {
var $postContent = $(".post-full-content");
$postContent.fitVids();
});
</script>
{{/contentFor}}
{{/post}}

View File

@ -1,47 +0,0 @@
{{!--
Wow what the hell is going on in here even?
Ok so, several templates use this big header with a giant BG image. Nice idea, but big images
have a heavy impact on performance, so it's a good idea to make them responsive. Because we
can only get the image dynamically using Handlebars, and we can only set the image to properly
be a background image using CSS, we end up with a handful of inline styles.
If the template in question has a background image, then we render responsive image styles
for it, and apply those styles to the <header> tag. Else, we just output a <header> tag
with a `no-image` class so we can style it accordingly.
--}}
{{#if background}}
<style type="text/css">
.responsive-header-img {
background-image: url({{img_url background size='xl'}});
}
@media(max-width: 1000px) {
.responsive-header-img {
background-image: url({{img_url background size='l'}});
background-image: -webkit-image-set(url({{img_url background size='l'}}) 1x,
url({{img_url background size='xl'}}) 2x);
background-image: image-set(url({{img_url background size='l'}}) 1x,
url({{img_url background size='xl'}}) 2x);
}
}
@media(max-width: 600px) {
.responsive-header-img {
background-image: url({{img_url background size='m'}});
background-image: -webkit-image-set(url({{img_url background size='m'}}) 1x,
url({{img_url background size='l'}}) 2x);
background-image: image-set(url({{img_url background size='m'}}) 1x,
url({{img_url background size='l'}}) 2x);
}
}
</style>
<div class="outer site-header-background responsive-header-img">
{{else}}
<div class="outer site-header-background no-image">
{{/if}}

View File

@ -1,4 +1,7 @@
<article class="post-card {{post_class}} {{#unless feature_image}}no-image{{else}}{{#is "home"}}{{#has index="nth:6"}}post-card-large{{/has}}{{/is}}{{/unless}}">
{{!-- This is a partial file used to generate a post "card"
which templates loop over to generate a list of posts. --}}
<article class="post-card {{post_class}} {{#is "home"}}{{#if feature_image}}{{#has index="0"}}post-card-large{{/has}}{{/if}}{{/is}}">
{{#if feature_image}}
<a class="post-card-image-link" href="{{url}}">
@ -9,9 +12,10 @@
{{img_url feature_image size="m"}} 600w,
{{img_url feature_image size="l"}} 1000w,
{{img_url feature_image size="xl"}} 2000w"
sizes="(max-width: 1000px) 400px, 700px"
sizes="(max-width: 1000px) 400px, 800px"
src="{{img_url feature_image size="m"}}"
alt="{{title}}"
loading="lazy"
/>
</a>
{{/if}}
@ -19,7 +23,6 @@
<div class="post-card-content">
<a class="post-card-content-link" href="{{url}}">
<header class="post-card-header">
{{#if primary_tag}}
{{#primary_tag}}
@ -28,26 +31,15 @@
{{/if}}
<h2 class="post-card-title">{{title}}</h2>
</header>
<section class="post-card-excerpt">
{{#if feature_image}}
<p>{{excerpt words="30"}}</p>
{{else}}
<p>{{excerpt words="44"}}</p>
{{/if}}
<p>{{excerpt}}</p>
</section>
</a>
<footer class="post-card-meta">
<ul class="author-list">
{{#foreach authors}}
<li class="author-list-item">
<div class="author-name-tooltip">
{{name}}
</div>
{{#if profile_image}}
<a href="{{url}}" class="static-avatar">
<img class="author-profile-image" src="{{img_url profile_image size="xs"}}" alt="{{name}}" />
@ -60,7 +52,7 @@
</ul>
<div class="post-card-byline-content">
<span>{{#has author="count:>2"}}Multiple authors{{else}}{{authors}}{{/has}}</span>
<span class="post-card-byline-date"><time datetime="{{date format="YYYY-MM-DD"}}">{{date format="D MMM YYYY"}}</time> <span class="bull">&bull;</span> {{reading_time}}</span>
<span class="post-card-byline-date"><time datetime="{{date format="YYYY-MM-DD"}}">{{date}}</time> <span class="bull">&bull;</span> {{reading_time}}</span>
</div>
</footer>

View File

@ -1,5 +0,0 @@
<div class="outer site-nav-main">
<div class="inner">
{{> "site-nav"}}
</div>
</div>

View File

@ -1,40 +0,0 @@
<nav class="site-nav">
<div class="site-nav-left-wrapper">
<div class="site-nav-left">
{{#if @site.logo}}
<a class="site-nav-logo" href="{{@site.url}}"><img src="{{@site.logo}}" alt="{{@site.title}}" /></a>
{{else}}
<a class="site-nav-logo" href="{{@site.url}}">{{@site.title}}</a>
{{/if}}
<div class="site-nav-content">
{{#if @site.navigation}}
{{navigation}}
{{/if}}
{{#is "post"}}
<span class="nav-post-title {{#unless @site.logo}}dash{{/unless}}">{{post.title}}</span>
{{/is}}
</div>
</div>
</div>
<div class="site-nav-right">
{{#if @site.secondary_navigation}}
{{navigation type="secondary"}}
{{else}}
<div class="social-links">
{{#if @site.facebook}}
<a class="social-link social-link-fb" href="{{facebook_url @site.facebook}}" title="Facebook" target="_blank" rel="noopener">{{> "icons/facebook"}}</a>
{{/if}}
{{#if @site.twitter}}
<a class="social-link social-link-tw" href="{{twitter_url @site.twitter}}" title="Twitter" target="_blank" rel="noopener">{{> "icons/twitter"}}</a>
{{/if}}
</div>
{{#unless @labs.members}}
<a class="rss-button" href="https://feedly.com/i/subscription/feed/{{@site.url}}/rss/" title="RSS" target="_blank" rel="noopener">{{> "icons/rss"}}</a>
{{/unless}}
{{/if}}
{{#if @labs.members}}
<a class="subscribe-button" href="#subscribe">Subscribe</a>
{{/if}}
</div>
</nav>

View File

@ -1,19 +0,0 @@
<section class="subscribe-form">
<h3 class="subscribe-form-title">Subscribe to {{@site.title}}</h3>
<p class="subscribe-form-description">Get the latest posts delivered right to your inbox</p>
<form data-members-form="subscribe">
<div class="form-group">
<input class="subscribe-email" data-members-email placeholder="youremail@example.com" autocomplete="false" />
<button class="button primary" type="submit">
<span class="button-content">Subscribe</span>
<span class="button-loader">{{> "icons/loader"}}</span>
</button>
</div>
<div class="message-success">
<strong>Great!</strong> Check your inbox and click the link to confirm your subscription.
</div>
<div class="message-error">
Please enter a valid email address!
</div>
</form>
</section>

297
post.hbs
View File

@ -1,214 +1,117 @@
{{!< default}}
{{!-- The tag above means: insert everything in this file
into the {body} of the default.hbs template --}}
into the {body} tag of the default.hbs template --}}
<header class="site-header">
{{> site-header}}
</header>
{{!-- Everything inside the #post tags pulls data from the post --}}
{{#post}}
{{!-- Everything inside the #post block pulls data from the post --}}
<main id="site-main" class="site-main outer">
<div class="inner">
<article class="article {{post_class}}">
<article class="post-full {{post_class}} {{#unless feature_image}}no-image{{/unless}}">
<header class="article-header gh-canvas">
<header class="post-full-header">
{{#if primary_tag}}
<section class="article-tag">
<a href="{{primary_tag.url}}">{{primary_tag.name}}</a>
</section>
{{/if}}
{{#if primary_tag}}
<section class="post-full-tags">
{{#primary_tag}}
<a href="{{url}}">{{name}}</a>
{{/primary_tag}}
</section>
{{/if}}
<h1 class="article-title">{{title}}</h1>
<h1 class="post-full-title">{{title}}</h1>
{{#if custom_excerpt}}
<p class="article-excerpt">{{custom_excerpt}}</p>
{{/if}}
{{#if custom_excerpt}}
<p class="post-full-custom-excerpt">{{custom_excerpt}}</p>
{{/if}}
<div class="post-full-byline">
<section class="post-full-byline-content">
<ul class="author-list">
{{#foreach authors}}
<li class="author-list-item">
<div class="author-card">
{{#if profile_image}}
<img class="author-profile-image" src="{{img_url profile_image size="xs"}}" alt="{{name}}" />
{{else}}
<div class="author-profile-image">{{> "icons/avatar"}}</div>
{{/if}}
<div class="author-info">
{{#if bio}}
<div class="bio">
<h2>{{name}}</h2>
<p>{{bio}}</p>
<p><a href="{{url}}">More posts</a> by {{name}}.</p>
</div>
{{else}}
<h2>{{name}}</h2>
<p>Read <a href="{{url}}">more posts</a> by this author.</p>
{{/if}}
</div>
</div>
{{#if profile_image}}
<a href="{{url}}" class="author-avatar">
<img class="author-profile-image" src="{{img_url profile_image size="xs"}}" alt="{{name}}" />
</a>
{{else}}
<a href="{{url}}" class="author-avatar author-profile-image">{{> "icons/avatar"}}</a>
{{/if}}
</li>
{{/foreach}}
</ul>
<section class="post-full-byline-meta">
<h4 class="author-name">{{authors}}</h4>
<div class="byline-meta-content">
<time class="byline-meta-date" datetime="{{date format="YYYY-MM-DD"}}">{{date format="D MMM YYYY"}}</time>
<span class="byline-reading-time"><span class="bull">&bull;</span> {{reading_time}}</span>
</div>
</section>
</section>
</div>
</header>
{{#if feature_image}}
<figure class="post-full-image">
{{!-- This is a responsive image, it loads different sizes depending on device
https://medium.freecodecamp.org/a-guide-to-responsive-images-with-ready-to-use-templates-c400bd65c433 --}}
<img
srcset="{{img_url feature_image size="s"}} 300w,
{{img_url feature_image size="m"}} 600w,
{{img_url feature_image size="l"}} 1000w,
{{img_url feature_image size="xl"}} 2000w"
sizes="(max-width: 800px) 400px,
(max-width: 1170px) 1170px,
2000px"
src="{{img_url feature_image size="xl"}}"
alt="{{title}}"
/>
</figure>
{{/if}}
<section class="post-full-content">
<div class="post-content">
{{content}}
</div>
</section>
{{!-- Email subscribe form at the bottom of the page --}}
{{#if @labs.members}}
{{> subscribe-form}}
{{/if}}
{{!--
<section class="post-full-comments">
If you want to embed comments, this is a good place to do it!
</section>
--}}
</article>
</div>
</main>
{{!-- Links to Previous/Next posts --}}
<aside class="read-next outer">
<div class="inner">
<div class="read-next-feed">
{{#if primary_tag}}
{{#get "posts" filter="tags:{{primary_tag.slug}}+id:-{{id}}" limit="3" as |related_posts|}}
{{#if related_posts}}
<article class="read-next-card">
<header class="read-next-card-header">
{{#../primary_tag}}
<h3><span>More in</span> <a href="{{url}}">{{name}}</a></h3>
{{/../primary_tag}}
</header>
<div class="read-next-card-content">
<ul>
{{#foreach related_posts}}
<li>
<h4><a href="{{url}}">{{title}}</a></h4>
<div class="read-next-card-meta">
<p><time datetime="{{date format="YYYY-MM-DD"}}">{{date format="D MMM YYYY"}}</time>
{{reading_time}}</p>
</div>
</li>
{{/foreach}}
</ul>
<div class="article-byline">
<section class="article-byline-content">
<ul class="author-list">
{{#foreach authors}}
<li class="author-list-item">
{{#if profile_image}}
<a href="{{url}}" class="author-avatar">
<img class="author-profile-image" src="{{img_url profile_image size="xs"}}" alt="{{name}}" />
</a>
{{else}}
<a href="{{url}}" class="author-avatar author-profile-image">{{> "icons/avatar"}}</a>
{{/if}}
</li>
{{/foreach}}
</ul>
<div class="article-byline-meta">
<h4 class="author-name">{{authors}}</h4>
<div class="byline-meta-content">
<time class="byline-meta-date" datetime="{{date format="YYYY-MM-DD"}}">{{date}}</time>
<span class="byline-reading-time"><span class="bull">&bull;</span> {{reading_time}}</span>
</div>
<footer class="read-next-card-footer">
<a href="{{#../primary_tag}}{{url}}{{/../primary_tag}}">{{plural meta.pagination.total empty='No posts' singular='% post' plural='See all % posts'}}
→</a>
</footer>
</article>
{{/if}}
{{/get}}
{{/if}}
{{!-- If there's a next post, display it using the same markup included from - partials/post-card.hbs --}}
{{#next_post}}
{{> "post-card"}}
{{/next_post}}
{{!-- If there's a previous post, display it using the same markup included from - partials/post-card.hbs --}}
{{#prev_post}}
{{> "post-card"}}
{{/prev_post}}
</div>
</section>
</div>
{{#if feature_image}}
<figure class="article-image">
{{!-- This is a responsive image, it loads different sizes depending on device
https://medium.freecodecamp.org/a-guide-to-responsive-images-with-ready-to-use-templates-c400bd65c433 --}}
<img
srcset="{{img_url feature_image size="s"}} 300w,
{{img_url feature_image size="m"}} 600w,
{{img_url feature_image size="l"}} 1000w,
{{img_url feature_image size="xl"}} 2000w"
sizes="(min-width: 1400px) 1400px, 92vw"
src="{{img_url feature_image size="xl"}}"
alt="{{title}}"
/>
</figure>
{{/if}}
</header>
<section class="gh-content gh-canvas">
{{content}}
</section>
{{!--
<section class="article-comments gh-canvas">
If you want to embed comments, this is a good place to paste your code!
</section>
--}}
</article>
{{!-- A signup call to action is displayed here, unless viewed as a logged-in member --}}
{{#unless @member}}
<section class="footer-cta">
<div class="inner">
<h2>Sign up for more like this.</h2>
<a class="footer-cta-button" href="#/portal">
<div>Enter your email</div>
<span>Subscribe</span>
</a>
{{!-- ^ This looks like a form element, but it's just a link to Portal,
making the form validation and submission much simpler. --}}
</div>
</section>
{{/unless}}
{{!-- Read more links, just above the footer --}}
<aside class="read-more-wrap">
<div class="read-more inner">
{{!-- The {#get} helper below fetches some of the latest posts here
so that people have something else to read when they finish this one.
This query gets the latest 3 posts on the site, but adds a filter to
exclude the post we're currently on from being included. --}}
{{#get "posts" filter="id:-{{id}}" include="authors" limit="3" as |more_posts|}}
{{#if more_posts}}
{{#foreach more_posts}}
{{> "post-card"}}
{{/foreach}}
{{/if}}
{{/get}}
</div>
</aside>
{{/post}}
{{!-- The #contentFor helper here will send everything inside it up to the matching #block helper found in default.hbs --}}
{{#contentFor "scripts"}}
<script>
$(document).ready(function () {
// FitVids - start
var $postContent = $(".post-full-content");
$postContent.fitVids();
// FitVids - end
// Replace nav with title on scroll - start
Casper.stickyNavTitle({
navSelector: '.site-nav-main',
titleSelector: '.post-full-title',
activeClass: 'nav-post-title-active'
});
// Replace nav with title on scroll - end
// Hover on avatar
var hoverTimeout;
$('.author-list-item').hover(function () {
var $this = $(this);
clearTimeout(hoverTimeout);
$('.author-card').removeClass('hovered');
$(this).children('.author-card').addClass('hovered');
}, function () {
var $this = $(this);
hoverTimeout = setTimeout(function () {
$this.children('.author-card').removeClass('hovered');
}, 800);
});
});
</script>
{{/contentFor}}
{{/post}}

View File

@ -1,8 +0,0 @@
{
"extends": [
"@tryghost:theme"
],
"node": {
"supportPolicy": ["lts_latest"]
}
}

65
tag.hbs
View File

@ -1,32 +1,57 @@
{{!< default}}
{{!-- The tag above means - insert everything in this file into the {body} of the default.hbs template --}}
{{#tag}}
<header class="site-archive-header">
{{> site-header}}
{{> header-background background=feature_image}} {{!--Special header-image.hbs partial to generate the background image--}}
<div class="inner site-header-content">
<h1 class="site-title">{{name}}</h1>
<h2 class="site-description">
{{#if description}}
{{description}}
{{else}}
A collection of {{plural ../pagination.total empty='posts' singular='% post' plural='% posts'}}
{{/if}}
</h2>
</div>
</div>
</header>
{{/tag}}
{{!-- The main content area --}}
<main id="site-main" class="site-main outer">
<section class="outer">
<div class="inner posts">
<div class="post-feed">
{{#tag}}
<header class="post-card post-card-large">
{{#if feature_image}}
<div class="post-card-image-link">
{{!-- This is a responsive image, it loads different sizes depending on device
https://medium.freecodecamp.org/a-guide-to-responsive-images-with-ready-to-use-templates-c400bd65c433 --}}
<img class="post-card-image"
srcset="{{img_url feature_image size="s"}} 300w,
{{img_url feature_image size="m"}} 600w,
{{img_url feature_image size="l"}} 1000w,
{{img_url feature_image size="xl"}} 2000w"
sizes="(max-width: 1000px) 400px, 800px"
src="{{img_url feature_image size="m"}}"
alt="{{title}}"
loading="lazy"
/>
</div>
{{/if}}
<div class="post-card-content">
<div class="post-card-content-link">
<header class="post-card-header">
<div class="post-card-primary-tag">Tagged</div>
<h2 class="post-card-title">{{name}}</h2>
</header>
<section class="post-card-excerpt">
<p>
{{#if description}}
{{description}}
{{else}}
A collection of {{plural ../pagination.total empty='zero posts' singular='% post' plural='% posts'}}
{{/if}}
</p>
</section>
</div>
</div>{{!--/.post-card-content--}}
</header>
{{/tag}}
{{#foreach posts}}
{{!-- The tag below includes the markup for each post - partials/post-card.hbs --}}
{{> "post-card"}}
{{/foreach}}
</div>
</div>
</main>
</section>

2359
yarn.lock

File diff suppressed because it is too large Load Diff