Compare commits

...

23 Commits

Author SHA1 Message Date
10fd2f3a1c v5.5.2 2023-07-03 18:52:41 +08:00
b1a10873ff Fixed nested list spacing 2023-07-03 18:03:47 +08:00
0e76b5abef Removed unnecessary JS hack for nested list 2023-07-03 17:37:39 +08:00
d75ffc78ac Added nested list support 2023-06-28 18:25:13 +08:00
fa76f77006 Consistent syntax 2023-06-27 13:01:12 +08:00
dda827ded3 Head > Adding preload 2023-06-27 12:59:56 +08:00
bdf150658e v5.5.1 2023-06-22 21:19:57 +02:00
2fafe722d1 Added grid to full width cards with wide content
Refs https://github.com/TryGhost/Team/issues/3459
2023-06-22 21:17:03 +02:00
0721600075 v5.5.0 2023-06-22 17:17:43 +08:00
a18367200f Updated post content grid for additional widths 2023-06-22 16:37:59 +08:00
294b1e30e5 v5.4.12 2023-06-20 12:09:25 +08:00
aa8ca0794b Fixed main nav background color in dark mode
closes https://github.com/TryGhost/Casper/issues/942
2023-06-20 12:09:08 +08:00
ba0b3d08cc v5.4.11 2023-05-09 13:30:12 +08:00
50d5727f77 Fixed mobile menu background in dark mode
no issues

- when there's no publication cover and the color scheme is in dark mode, the mobile menu had white background
- this fixes the issue by adding explicit dark mode rules to the styles
2023-05-09 13:27:37 +08:00
23f7c30365 v5.4.10 2023-04-21 09:49:57 +01:00
8ff3c6fcf1 Fixed main nav to make it work with the announcement bar 2023-04-21 09:49:37 +01:00
5c7fb39df9 v5.4.9 2023-04-10 13:42:17 +08:00
4851606d9d Rebuilt assets 2023-04-10 13:41:59 +08:00
afca9cb27e Fix problem showing dropdown after window resize
When the browser window is resized, a new click event listener is added
to the window but the old one is not removed. The old one ends up
preventing the newly-made dropdown from opening.

Fix this by remembering the click event listener function added to the
window, and remove it before making the new dropdown after a window
resize.
2023-04-10 13:40:33 +08:00
b56bec2cb8 Fixed header action background color for smaller screens
closes #934

- the accent color is used for the header background, so we don't need to add explicit dark mode color to the action on mobile screens
2023-04-10 13:24:11 +08:00
0c4164c5bd v5.4.8 2023-03-28 16:01:50 +08:00
e6326eadf9 Added a class name to the powered by text
no issues

- our other themes have this class, and this makes it consistent across over all offcial themes
2023-03-28 16:01:24 +08:00
3ed94d68fa Update dependency gscan to v4.36.1 2023-03-07 09:25:32 +01:00
12 changed files with 594 additions and 335 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

@ -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{border:0;font:inherit;font-size:100%;margin:0;padding:0;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{display:block;height:auto;max-width:100%}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;box-sizing:border-box;font-family:sans-serif}*,: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{font-size:2em;margin:.67em 0}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;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}kbd{background:#f6f8fa;border:1px solid rgba(124,139,154,.25);border-radius:6px;box-shadow:inset 0 -1px 0 rgba(124,139,154,.25);font-family:var(--font-mono);font-size:1.5rem;padding:3px 5px}@media (max-width:600px){kbd{font-size:1.3rem}}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{border:none;overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding: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]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}legend{border:0;padding:0}textarea{overflow:auto}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}html{-webkit-tap-highlight-color:rgba(0,0,0,0);font-size:62.5%}body{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-font-feature-settings:"liga" on;background:#fff;color:var(--color-darkgrey);font-family:var(--font-sans);font-size:1.6rem;font-style:normal;font-weight:400;letter-spacing:0;line-height:1.6em}::-moz-selection{background:#daf2fd;text-shadow:none}::selection{background:#daf2fd;text-shadow:none}hr{border:0;border-top:1px solid #f0f0f0;display:block;height:1px;margin:2.5em 0 3.5em;padding:0;position:relative;width:100%}audio,canvas,iframe,img,svg,video{vertical-align:middle}fieldset{border:0;margin:0;padding: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{line-height:1.6em;padding-left:.3em}li+li{margin-top:.5em}dt{color:#daf2fd;float:left;font-weight:500;margin:0 20px 0 0;text-align:right;width:120px}dd{margin:0 0 5px;text-align:left}blockquote{border-left:#daf2fd;margin:1.5em 0;padding:0 1.6em}blockquote small{display:inline-block;font-size:.9em;margin:.8em 0 .8em 1.5em;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{text-rendering:optimizeLegibility;font-weight:600;letter-spacing:-.01em;line-height:1.15;margin-top:0}h1{font-size:4.8rem;font-weight:700;letter-spacing:-.015em;margin:0 0 .5em}@media (max-width:600px){h1{font-size:2.8rem}}h2{font-size:2.8rem;font-weight:700;margin:1.5em 0 .5em}@media (max-width:600px){h2{font-size:2.3rem}}h3{font-size:2.4rem;font-weight:600;margin:1.5em 0 .5em}@media (max-width:600px){h3{font-size:1.7rem}}h4{font-size:2rem;margin:1.5em 0 .5em}@media (max-width:600px){h4{font-size:1.7rem}}h5{font-size:2rem}h5,h6{margin:1.5em 0 .5em}h6{font-size:1.8rem} 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{border:0;font:inherit;font-size:100%;margin:0;padding:0;vertical-align:baseline}body{line-height:1}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}img{display:block;height:auto;max-width:100%}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;box-sizing:border-box;font-family:sans-serif}*,: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{font-size:2em;margin:.67em 0}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;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}kbd{background:#f6f8fa;border:1px solid rgba(124,139,154,.25);border-radius:6px;box-shadow:inset 0 -1px 0 rgba(124,139,154,.25);font-family:var(--font-mono);font-size:1.5rem;padding:3px 5px}@media (max-width:600px){kbd{font-size:1.3rem}}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{border:none;overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding: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]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}legend{border:0;padding:0}textarea{overflow:auto}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}html{-webkit-tap-highlight-color:rgba(0,0,0,0);font-size:62.5%}body{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-font-feature-settings:"liga" on;background:#fff;color:var(--color-darkgrey);font-family:var(--font-sans);font-size:1.6rem;font-style:normal;font-weight:400;letter-spacing:0;line-height:1.6em}::-moz-selection{background:#daf2fd;text-shadow:none}::selection{background:#daf2fd;text-shadow:none}hr{border:0;border-top:1px solid #f0f0f0;display:block;height:1px;margin:2.5em 0 3.5em;padding:0;position:relative;width:100%}audio,canvas,iframe,img,svg,video{vertical-align:middle}fieldset{border:0;margin:0;padding: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}ol,ul{max-width:100%}li{line-height:1.6em;padding-left:.3em}li+li{margin-top:.5em}dt{color:#daf2fd;float:left;font-weight:500;margin:0 20px 0 0;text-align:right;width:120px}dd{margin:0 0 5px;text-align:left}blockquote{border-left:#daf2fd;margin:1.5em 0;padding:0 1.6em}blockquote small{display:inline-block;font-size:.9em;margin:.8em 0 .8em 1.5em;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{text-rendering:optimizeLegibility;font-weight:600;letter-spacing:-.01em;line-height:1.15;margin-top:0}h1{font-size:4.8rem;font-weight:700;letter-spacing:-.015em;margin:0 0 .5em}@media (max-width:600px){h1{font-size:2.8rem}}h2{font-size:2.8rem;font-weight:700;margin:1.5em 0 .5em}@media (max-width:600px){h2{font-size:2.3rem}}h3{font-size:2.4rem;font-weight:600;margin:1.5em 0 .5em}@media (max-width:600px){h3{font-size:1.7rem}}h4{font-size:2rem;margin:1.5em 0 .5em}@media (max-width:600px){h4{font-size:1.7rem}}h5{font-size:2rem}h5,h6{margin:1.5em 0 .5em}h6{font-size:1.8rem}
/*# sourceMappingURL=global.css.map */ /*# 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

@ -88,10 +88,6 @@ video {
body { body {
line-height: 1; line-height: 1;
} }
ol,
ul {
list-style: none;
}
blockquote, blockquote,
q { q {
quotes: none; quotes: none;
@ -343,15 +339,7 @@ ol ol,
ul ul, ul ul,
ul ol, ul ol,
ol ul { ol ul {
margin: 0.5em 0 1em; margin: 0.5em 0;
}
ul {
list-style: disc;
}
ol {
list-style: decimal;
} }
ul, ul,

View File

@ -63,6 +63,7 @@ production stylesheet in assets/built/screen.css
/* ---------------------------------------------------------- */ /* ---------------------------------------------------------- */
.viewport { .viewport {
position: relative;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
min-height: 100vh; min-height: 100vh;
@ -1294,28 +1295,28 @@ html.no-infinite-scroll .pagination {
is laid out on top of. Canvas just defines the grid, we don't is laid out on top of. Canvas just defines the grid, we don't
use it for applying any other styles. */ use it for applying any other styles. */
.gh-canvas { .gh-canvas,
.kg-width-full.kg-content-wide {
--gap: max(4vmin, 20px);
--main: min(var(--content-width, 720px), 100% - var(--gap) * 2);
--wide: minmax(0, calc((var(--container-width, 1200px) - var(--content-width, 720px)) / 2));
--full: minmax(var(--gap), 1fr);
display: grid; display: grid;
grid-template-columns: grid-template-columns:
[full-start] [full-start] var(--full)
minmax(max(4vmin, 20px), auto) [wide-start] var(--wide)
[wide-start] [main-start] var(--main) [main-end]
minmax(auto, 240px) var(--wide) [wide-end]
[main-start] var(--full) [full-end];
min(720px, calc(100% - max(8vmin, 40px)))
[main-end]
minmax(auto, 240px)
[wide-end]
minmax(max(4vmin, 20px), auto)
[full-end]
;
} }
.gh-canvas > * { .gh-canvas > * {
grid-column: main-start / main-end; grid-column: main-start / main-end;
} }
.kg-width-wide { .kg-width-wide,
.kg-content-wide > div {
grid-column: wide-start / wide-end; grid-column: wide-start / wide-end;
} }
@ -1478,6 +1479,14 @@ is the very first element in the post content */
box-shadow: 0 2px 6px -2px rgba(0,0,0,.1), 0 0 1px rgba(0,0,0,.4); box-shadow: 0 2px 6px -2px rgba(0,0,0,.1), 0 0 1px rgba(0,0,0,.4);
} }
.gh-content ol ol li {
list-style-type: lower-alpha;
}
.gh-content ol ol ol li {
list-style-type: lower-roman;
}
@media (max-width: 650px) { @media (max-width: 650px) {
.gh-content > blockquote:not([class]), .gh-content > blockquote:not([class]),
.gh-content > ol, .gh-content > ol,
@ -2118,7 +2127,7 @@ html.dark-mode figcaption a {
color: #fff; color: #fff;
} }
html.dark-mode .gh-head { html.dark-mode body:not(.has-cover) .gh-head {
background: var(--color-darkmode); background: var(--color-darkmode);
color: #fff; color: #fff;
} }
@ -2286,8 +2295,9 @@ html.dark-mode .footer-cta-title {
} }
@media (max-width: 767px) { @media (max-width: 767px) {
html.dark-mode .gh-head-open #gh-head .gh-head-actions { html.dark-mode .gh-head-open:not(.has-cover) #gh-head,
background-color: var(--color-darkmode); html.dark-mode .gh-head-open:not(.has-cover) #gh-head .gh-head-actions {
background: var(--color-darkmode);
} }
} }
@ -2309,7 +2319,7 @@ html.dark-mode .footer-cta-title {
color: #fff; color: #fff;
} }
html.auto-color .gh-head { html.auto-color body:not(.has-cover) .gh-head {
background: var(--color-darkmode); background: var(--color-darkmode);
color: #fff; color: #fff;
} }
@ -2477,8 +2487,9 @@ html.dark-mode .footer-cta-title {
} }
@media (max-width: 767px) { @media (max-width: 767px) {
html.auto-color .gh-head-open #gh-head .gh-head-actions { html.auto-color .gh-head-open:not(.has-cover) #gh-head,
background-color: var(--color-darkmode); html.auto-color .gh-head-open:not(.has-cover) #gh-head .gh-head-actions {
background: var(--color-darkmode);
} }
} }
} }

View File

@ -16,6 +16,7 @@
}); });
} }
var windowClickListener;
const makeDropdown = function () { const makeDropdown = function () {
if (mediaQuery.matches) return; if (mediaQuery.matches) return;
const submenuItems = []; const submenuItems = [];
@ -62,11 +63,12 @@
document.body.classList.toggle('is-dropdown-open'); document.body.classList.toggle('is-dropdown-open');
}); });
window.addEventListener('click', function (e) { windowClickListener = function (e) {
if (!toggle.contains(e.target) && document.body.classList.contains('is-dropdown-open')) { if (!toggle.contains(e.target) && document.body.classList.contains('is-dropdown-open')) {
document.body.classList.remove('is-dropdown-open'); document.body.classList.remove('is-dropdown-open');
} }
}); };
window.addEventListener('click', windowClickListener);
} }
imagesLoaded(head, function () { imagesLoaded(head, function () {
@ -75,6 +77,7 @@
window.addEventListener('resize', function () { window.addEventListener('resize', function () {
setTimeout(function () { setTimeout(function () {
window.removeEventListener('click', windowClickListener);
nav.innerHTML = navHTML; nav.innerHTML = navHTML;
makeDropdown(); makeDropdown();
}, 1); }, 1);

View File

@ -8,6 +8,10 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="HandheldFriendly" content="True" /> <meta name="HandheldFriendly" content="True" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
{{!-- Preload scripts --}}
<link rel="preload" as="style" href="{{asset "built/screen.css"}}" />
<link rel="preload" as="script" href="{{asset "built/casper.js"}}" />
{{!-- Theme assets - use the {asset} helper to reference styles & scripts, {{!-- Theme assets - use the {asset} helper to reference styles & scripts,
this will take care of caching and cache-busting automatically --}} this will take care of caching and cache-busting automatically --}}
@ -80,7 +84,7 @@
<nav class="site-footer-nav"> <nav class="site-footer-nav">
{{navigation type="secondary"}} {{navigation type="secondary"}}
</nav> </nav>
<div><a href="https://ghost.org/" target="_blank" rel="noopener">Powered by Ghost</a></div> <div class="gh-powered-by"><a href="https://ghost.org/" target="_blank" rel="noopener">Powered by Ghost</a></div>
</div> </div>
</footer> </footer>

View File

@ -2,7 +2,7 @@
"name": "casper", "name": "casper",
"description": "A clean, minimal default theme for the Ghost publishing platform", "description": "A clean, minimal default theme for the Ghost publishing platform",
"demo": "https://demo.ghost.io", "demo": "https://demo.ghost.io",
"version": "5.4.7", "version": "5.5.2",
"engines": { "engines": {
"ghost": ">=5.0.0" "ghost": ">=5.0.0"
}, },
@ -49,7 +49,7 @@
"autoprefixer": "10.4.7", "autoprefixer": "10.4.7",
"beeper": "2.1.0", "beeper": "2.1.0",
"cssnano": "5.1.12", "cssnano": "5.1.12",
"gscan": "4.34.0", "gscan": "4.36.1",
"gulp": "4.0.2", "gulp": "4.0.2",
"gulp-concat": "2.6.1", "gulp-concat": "2.6.1",
"gulp-livereload": "4.0.2", "gulp-livereload": "4.0.2",

835
yarn.lock

File diff suppressed because it is too large Load Diff