This commit is contained in:
parent
466dbc5af7
commit
5effd144cd
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@matthiesenxyz/astro-ghostcms-theme-default",
|
"name": "@matthiesenxyz/astro-ghostcms-theme-default",
|
||||||
"description": "Default Theme for astro-ghostcms",
|
"description": "Default Theme for astro-ghostcms",
|
||||||
"version": "0.0.5",
|
"version": "0.0.6",
|
||||||
"homepage": "https://astro-ghostcms.xyz/",
|
"homepage": "https://astro-ghostcms.xyz/",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
|
@ -9,7 +9,7 @@ const { settings } = Astro.props as Props;
|
||||||
|
|
||||||
<header
|
<header
|
||||||
id="gh-head"
|
id="gh-head"
|
||||||
class={`gh-head ${settings.cover_image ? "has-cover" : ""} js-header`}
|
class={`gh-head has-cover js-header`}
|
||||||
>
|
>
|
||||||
<nav class="gh-head-inner inner gh-container">
|
<nav class="gh-head-inner inner gh-container">
|
||||||
<div class="gh-head-brand">
|
<div class="gh-head-brand">
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
---
|
---
|
||||||
import { getGhostImgPath } from "../utils";
|
import { getGhostImgPath } from "../utils";
|
||||||
import type { Settings } from "@matthiesenxyz/astro-ghostcms/api";
|
import type { Settings } from "@matthiesenxyz/astro-ghostcms/api";
|
||||||
import featureImgLocal from "../assets/publication-cover.jpg";
|
import cover from "./cover.jpg";
|
||||||
|
|
||||||
export type Props = {
|
export type Props = {
|
||||||
featureImg?: string;
|
featureImg: string;
|
||||||
mainTitle?: string;
|
mainTitle?: string;
|
||||||
settings: Settings;
|
settings: Settings;
|
||||||
description?: string;
|
description?: string;
|
||||||
addClass?: string;
|
addClass?: string;
|
||||||
};
|
};
|
||||||
const {
|
const {
|
||||||
featureImg = featureImgLocal.src,
|
featureImg = cover.src,
|
||||||
mainTitle = "",
|
mainTitle = "",
|
||||||
settings,
|
settings,
|
||||||
description = "",
|
description = "",
|
||||||
|
@ -41,7 +41,28 @@ const {
|
||||||
sizes="100vw"
|
sizes="100vw"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
{!featureImg && (
|
||||||
|
<img
|
||||||
|
class="site-header-cover"
|
||||||
|
data-srcset={`
|
||||||
|
${cover.src} 300w,
|
||||||
|
${cover.src} 600w,
|
||||||
|
${cover.src} 1000w,
|
||||||
|
${cover.src} 2000w
|
||||||
|
`}
|
||||||
|
srcset={`
|
||||||
|
${cover.src} 300w,
|
||||||
|
${cover.src} 600w
|
||||||
|
${cover.src} 1000w
|
||||||
|
${cover.src} 2000w
|
||||||
|
`}
|
||||||
|
data-sizes="auto"
|
||||||
|
data-src={cover.src}
|
||||||
|
src={cover.src}
|
||||||
|
alt={mainTitle}
|
||||||
|
sizes="100vw"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
<slot name="title">
|
<slot name="title">
|
||||||
<h1 class="site-title">
|
<h1 class="site-title">
|
||||||
{settings.logo ? (
|
{settings.logo ? (
|
||||||
|
|
Before Width: | Height: | Size: 571 KiB After Width: | Height: | Size: 571 KiB |
|
@ -12,7 +12,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"astro": "^4.2.1",
|
"astro": "^4.2.1",
|
||||||
"@matthiesenxyz/astro-ghostcms-theme-default": "workspace:*",
|
"@matthiesenxyz/astro-ghostcms-theme-default": "*",
|
||||||
"@matthiesenxyz/astro-ghostcms": "workspace:*"
|
"@matthiesenxyz/astro-ghostcms": "workspace:*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|
|
@ -18,10 +18,10 @@ importers:
|
||||||
demo:
|
demo:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@matthiesenxyz/astro-ghostcms':
|
'@matthiesenxyz/astro-ghostcms':
|
||||||
specifier: 3.0.4
|
specifier: 3.0.6
|
||||||
version: link:../packages/astro-ghostcms
|
version: link:../packages/astro-ghostcms
|
||||||
'@matthiesenxyz/astro-ghostcms-theme-default':
|
'@matthiesenxyz/astro-ghostcms-theme-default':
|
||||||
specifier: 0.0.2
|
specifier: 0.0.5
|
||||||
version: link:../packages/astro-ghostcms-theme-default
|
version: link:../packages/astro-ghostcms-theme-default
|
||||||
astro:
|
astro:
|
||||||
specifier: ^4.2.1
|
specifier: ^4.2.1
|
||||||
|
@ -43,7 +43,7 @@ importers:
|
||||||
specifier: ^3.0.5
|
specifier: ^3.0.5
|
||||||
version: 3.0.5
|
version: 3.0.5
|
||||||
'@matthiesenxyz/astro-ghostcms-theme-default':
|
'@matthiesenxyz/astro-ghostcms-theme-default':
|
||||||
specifier: ^0.0.2
|
specifier: ^0.0.5
|
||||||
version: link:../astro-ghostcms-theme-default
|
version: link:../astro-ghostcms-theme-default
|
||||||
'@ts-ghost/core-api':
|
'@ts-ghost/core-api':
|
||||||
specifier: ^5.1.2
|
specifier: ^5.1.2
|
||||||
|
@ -122,7 +122,7 @@ importers:
|
||||||
packages/astro-ghostcms-theme-default:
|
packages/astro-ghostcms-theme-default:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@matthiesenxyz/astro-ghostcms':
|
'@matthiesenxyz/astro-ghostcms':
|
||||||
specifier: ^3.0.0
|
specifier: ^3.0.6
|
||||||
version: link:../astro-ghostcms
|
version: link:../astro-ghostcms
|
||||||
astro:
|
astro:
|
||||||
specifier: ^4.2.1
|
specifier: ^4.2.1
|
||||||
|
@ -149,7 +149,7 @@ importers:
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../packages/astro-ghostcms
|
version: link:../packages/astro-ghostcms
|
||||||
'@matthiesenxyz/astro-ghostcms-theme-default':
|
'@matthiesenxyz/astro-ghostcms-theme-default':
|
||||||
specifier: workspace:*
|
specifier: '*'
|
||||||
version: link:../packages/astro-ghostcms-theme-default
|
version: link:../packages/astro-ghostcms-theme-default
|
||||||
astro:
|
astro:
|
||||||
specifier: ^4.2.1
|
specifier: ^4.2.1
|
||||||
|
|
Loading…
Reference in New Issue