recent notes css fixes
This commit is contained in:
parent
1bb00e72bb
commit
b99d4cd8ce
@ -24,11 +24,11 @@ const defaultOptions: Options = {
|
|||||||
export default ((userOpts?: Partial<Options>) => {
|
export default ((userOpts?: Partial<Options>) => {
|
||||||
const opts = { ...defaultOptions, ...userOpts }
|
const opts = { ...defaultOptions, ...userOpts }
|
||||||
function RecentNotes(props: QuartzComponentProps) {
|
function RecentNotes(props: QuartzComponentProps) {
|
||||||
const { allFiles, fileData } = props
|
const { allFiles, fileData, displayClass } = props
|
||||||
const pages = allFiles.filter(opts.filter).sort(opts.sort).slice(0, opts.limit)
|
const pages = allFiles.filter(opts.filter).sort(opts.sort).slice(0, opts.limit)
|
||||||
const remaining = Math.max(0, pages.length - opts.limit)
|
const remaining = Math.max(0, pages.length - opts.limit)
|
||||||
return (
|
return (
|
||||||
<div class="recent-notes">
|
<div class={`recent-notes ${displayClass}`}>
|
||||||
<h3>{opts.title}</h3>
|
<h3>{opts.title}</h3>
|
||||||
<ul class="recent-ul">
|
<ul class="recent-ul">
|
||||||
{pages.map((page) => {
|
{pages.map((page) => {
|
||||||
|
@ -13,13 +13,13 @@ const defaultOptions: Options = {
|
|||||||
layout: "modern",
|
layout: "modern",
|
||||||
}
|
}
|
||||||
|
|
||||||
function TableOfContents({ fileData }: QuartzComponentProps) {
|
function TableOfContents({ fileData, displayClass }: QuartzComponentProps) {
|
||||||
if (!fileData.toc) {
|
if (!fileData.toc) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class="desktop-only">
|
<div class={`toc ${displayClass}`}>
|
||||||
<button type="button" id="toc">
|
<button type="button" id="toc">
|
||||||
<h3>Table of Contents</h3>
|
<h3>Table of Contents</h3>
|
||||||
<svg
|
<svg
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
.recent-notes {
|
.recent-notes {
|
||||||
& > h3 {
|
& > h3 {
|
||||||
|
margin: 0.5rem 0 0 0;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
& > ul.recent-ul {
|
& > ul.recent-ul {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
margin-top: 1.5rem;
|
margin-top: 1rem;
|
||||||
padding-left: 0;
|
padding-left: 0;
|
||||||
|
|
||||||
& > li {
|
& > li {
|
||||||
|
Loading…
Reference in New Issue
Block a user