@myst-theme/frontmatter 0.1.36 → 0.1.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -104,8 +104,8 @@ function FrontmatterBlock({ frontmatter, kind = myst_common_1.SourceFileKind.Art
|
|
|
104
104
|
const hasExports = exports && exports.length > 0;
|
|
105
105
|
const hasHeaders = subject || github || venue || biblio || open_access || license || hasExports || isJupyter;
|
|
106
106
|
const hasDateOrDoi = doi || date;
|
|
107
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [hasHeaders && ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex mt-3 mb-5 text-sm font-light" }, { children: [subject && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: (0, classnames_1.default)('flex-none pr-2 smallcaps', {
|
|
107
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [hasHeaders && ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex mt-3 mb-5 text-sm font-light items-center h-6" }, { children: [subject && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: (0, classnames_1.default)('flex-none pr-2 smallcaps', {
|
|
108
108
|
'border-r mr-2': venue,
|
|
109
|
-
}) }, { children: subject }))), (0, jsx_runtime_1.jsx)(Journal, { venue: venue, biblio: biblio }), (0, jsx_runtime_1.jsx)("div", { className: "flex-grow" }), (0, jsx_runtime_1.jsx)(licenses_1.LicenseBadges, { license: license }), (0, jsx_runtime_1.jsx)(OpenAccessBadge, { open_access: open_access }), (0, jsx_runtime_1.jsx)(GitHubLink, { github: github }), isJupyter && ((0, jsx_runtime_1.jsx)("
|
|
109
|
+
}) }, { children: subject }))), (0, jsx_runtime_1.jsx)(Journal, { venue: venue, biblio: biblio }), (0, jsx_runtime_1.jsx)("div", { className: "flex-grow" }), (0, jsx_runtime_1.jsx)(licenses_1.LicenseBadges, { license: license }), (0, jsx_runtime_1.jsx)(OpenAccessBadge, { open_access: open_access }), (0, jsx_runtime_1.jsx)(GitHubLink, { github: github }), isJupyter && ((0, jsx_runtime_1.jsx)("div", Object.assign({ className: "inline-block mr-1" }, { children: (0, jsx_runtime_1.jsx)(solid_1.JupyterIcon, { className: "h-5 w-5 inline-block" }) }))), (0, jsx_runtime_1.jsx)(downloads_1.DownloadsDropdown, { exports: exports })] }))), frontmatter.title && ((0, jsx_runtime_1.jsx)("h1", Object.assign({ className: (0, classnames_1.default)({ 'mb-2': frontmatter.subtitle }) }, { children: frontmatter.title }))), frontmatter.subtitle && ((0, jsx_runtime_1.jsx)("p", Object.assign({ className: "lead mt-0 text-zinc-600 dark:text-zinc-400" }, { children: frontmatter.subtitle }))), authorStyle === 'list' && (0, jsx_runtime_1.jsx)(AuthorsList, { authors: frontmatter.authors }), authorStyle === 'block' && (0, jsx_runtime_1.jsx)(AuthorAndAffiliations, { authors: frontmatter.authors }), hasDateOrDoi && ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex my-2 text-sm font-light" }, { children: [(0, jsx_runtime_1.jsx)(DateString, { date: date, spacer: !!doi }), (0, jsx_runtime_1.jsx)(DoiBadge, { doi: doi })] })))] }));
|
|
110
110
|
}
|
|
111
111
|
exports.FrontmatterBlock = FrontmatterBlock;
|
package/dist/cjs/downloads.js
CHANGED
|
@@ -75,6 +75,6 @@ exports.Download = Download;
|
|
|
75
75
|
function DownloadsDropdown({ exports }) {
|
|
76
76
|
if (!exports || exports.length === 0)
|
|
77
77
|
return null;
|
|
78
|
-
return ((0, jsx_runtime_1.jsxs)(react_1.Menu, Object.assign({ as: "div", className: "relative grow-0 inline-block mx-1" }, { children: [(0, jsx_runtime_1.jsxs)(react_1.Menu.Button, Object.assign({ className: "relative" }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ className: "sr-only" }, { children: "Downloads" })), (0, jsx_runtime_1.jsx)(ArrowDownTrayIcon_1.default, { className: "w-5 h-5 ml-2 -mr-1", "aria-hidden": "true" })] })), (0, jsx_runtime_1.jsx)(react_1.Menu.Items, Object.assign({ className: "absolute -right-1 bg-white dark:bg-slate-800 rounded-sm overflow-hidden shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none" }, { children: exports.map(({ format, filename, url }) => ((0, jsx_runtime_1.jsx)(react_1.Menu.Item, { children: (0, jsx_runtime_1.jsx)(Download, { className: "block hover:bg-stone-700 dark:hover:bg-stone-200 hover:text-white dark:hover:text-black p-3 no-underline", url: url, filename: filename, format: format }) }, url))) }))] })));
|
|
78
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Menu, Object.assign({ as: "div", className: "flex relative grow-0 inline-block mx-1" }, { children: [(0, jsx_runtime_1.jsxs)(react_1.Menu.Button, Object.assign({ className: "relative" }, { children: [(0, jsx_runtime_1.jsx)("span", Object.assign({ className: "sr-only" }, { children: "Downloads" })), (0, jsx_runtime_1.jsx)(ArrowDownTrayIcon_1.default, { className: "w-5 h-5 ml-2 -mr-1", "aria-hidden": "true" })] })), (0, jsx_runtime_1.jsx)(react_1.Menu.Items, Object.assign({ className: "absolute -right-1 bg-white dark:bg-slate-800 rounded-sm overflow-hidden shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none" }, { children: exports.map(({ format, filename, url }) => ((0, jsx_runtime_1.jsx)(react_1.Menu.Item, { children: (0, jsx_runtime_1.jsx)(Download, { className: "block hover:bg-stone-700 dark:hover:bg-stone-200 hover:text-white dark:hover:text-black p-3 no-underline", url: url, filename: filename, format: format }) }, url))) }))] })));
|
|
79
79
|
}
|
|
80
80
|
exports.DownloadsDropdown = DownloadsDropdown;
|
|
@@ -89,7 +89,7 @@ export function FrontmatterBlock({ frontmatter, kind = SourceFileKind.Article, a
|
|
|
89
89
|
const hasExports = exports && exports.length > 0;
|
|
90
90
|
const hasHeaders = subject || github || venue || biblio || open_access || license || hasExports || isJupyter;
|
|
91
91
|
const hasDateOrDoi = doi || date;
|
|
92
|
-
return (_jsxs(_Fragment, { children: [hasHeaders && (_jsxs("div", Object.assign({ className: "flex mt-3 mb-5 text-sm font-light" }, { children: [subject && (_jsx("div", Object.assign({ className: classNames('flex-none pr-2 smallcaps', {
|
|
92
|
+
return (_jsxs(_Fragment, { children: [hasHeaders && (_jsxs("div", Object.assign({ className: "flex mt-3 mb-5 text-sm font-light items-center h-6" }, { children: [subject && (_jsx("div", Object.assign({ className: classNames('flex-none pr-2 smallcaps', {
|
|
93
93
|
'border-r mr-2': venue,
|
|
94
|
-
}) }, { children: subject }))), _jsx(Journal, { venue: venue, biblio: biblio }), _jsx("div", { className: "flex-grow" }), _jsx(LicenseBadges, { license: license }), _jsx(OpenAccessBadge, { open_access: open_access }), _jsx(GitHubLink, { github: github }), isJupyter && (_jsx("
|
|
94
|
+
}) }, { children: subject }))), _jsx(Journal, { venue: venue, biblio: biblio }), _jsx("div", { className: "flex-grow" }), _jsx(LicenseBadges, { license: license }), _jsx(OpenAccessBadge, { open_access: open_access }), _jsx(GitHubLink, { github: github }), isJupyter && (_jsx("div", Object.assign({ className: "inline-block mr-1" }, { children: _jsx(JupyterIcon, { className: "h-5 w-5 inline-block" }) }))), _jsx(DownloadsDropdown, { exports: exports })] }))), frontmatter.title && (_jsx("h1", Object.assign({ className: classNames({ 'mb-2': frontmatter.subtitle }) }, { children: frontmatter.title }))), frontmatter.subtitle && (_jsx("p", Object.assign({ className: "lead mt-0 text-zinc-600 dark:text-zinc-400" }, { children: frontmatter.subtitle }))), authorStyle === 'list' && _jsx(AuthorsList, { authors: frontmatter.authors }), authorStyle === 'block' && _jsx(AuthorAndAffiliations, { authors: frontmatter.authors }), hasDateOrDoi && (_jsxs("div", Object.assign({ className: "flex my-2 text-sm font-light" }, { children: [_jsx(DateString, { date: date, spacer: !!doi }), _jsx(DoiBadge, { doi: doi })] })))] }));
|
|
95
95
|
}
|
package/dist/esm/downloads.js
CHANGED
|
@@ -66,5 +66,5 @@ export function Download({ url, filename, format, className, }) {
|
|
|
66
66
|
export function DownloadsDropdown({ exports }) {
|
|
67
67
|
if (!exports || exports.length === 0)
|
|
68
68
|
return null;
|
|
69
|
-
return (_jsxs(Menu, Object.assign({ as: "div", className: "relative grow-0 inline-block mx-1" }, { children: [_jsxs(Menu.Button, Object.assign({ className: "relative" }, { children: [_jsx("span", Object.assign({ className: "sr-only" }, { children: "Downloads" })), _jsx(ArrowDownTrayIcon, { className: "w-5 h-5 ml-2 -mr-1", "aria-hidden": "true" })] })), _jsx(Menu.Items, Object.assign({ className: "absolute -right-1 bg-white dark:bg-slate-800 rounded-sm overflow-hidden shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none" }, { children: exports.map(({ format, filename, url }) => (_jsx(Menu.Item, { children: _jsx(Download, { className: "block hover:bg-stone-700 dark:hover:bg-stone-200 hover:text-white dark:hover:text-black p-3 no-underline", url: url, filename: filename, format: format }) }, url))) }))] })));
|
|
69
|
+
return (_jsxs(Menu, Object.assign({ as: "div", className: "flex relative grow-0 inline-block mx-1" }, { children: [_jsxs(Menu.Button, Object.assign({ className: "relative" }, { children: [_jsx("span", Object.assign({ className: "sr-only" }, { children: "Downloads" })), _jsx(ArrowDownTrayIcon, { className: "w-5 h-5 ml-2 -mr-1", "aria-hidden": "true" })] })), _jsx(Menu.Items, Object.assign({ className: "absolute -right-1 bg-white dark:bg-slate-800 rounded-sm overflow-hidden shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none" }, { children: exports.map(({ format, filename, url }) => (_jsx(Menu.Item, { children: _jsx(Download, { className: "block hover:bg-stone-700 dark:hover:bg-stone-200 hover:text-white dark:hover:text-black p-3 no-underline", url: url, filename: filename, format: format }) }, url))) }))] })));
|
|
70
70
|
}
|