From b99d4cd8ce99ea1e52a97654ab153774a6bc598a Mon Sep 17 00:00:00 2001
From: Jacky Zhao <j.zhao2k19@gmail.com>
Date: Sun, 20 Aug 2023 21:05:37 +0000
Subject: [PATCH] recent notes css fixes

---
 quartz/components/RecentNotes.tsx         |    4 ++--
 quartz/components/styles/recentNotes.scss |    3 ++-
 quartz/components/TableOfContents.tsx     |    4 ++--
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/quartz/components/RecentNotes.tsx b/quartz/components/RecentNotes.tsx
index bb7ba19..5e992b4 100644
--- a/quartz/components/RecentNotes.tsx
+++ b/quartz/components/RecentNotes.tsx
@@ -24,11 +24,11 @@
 export default ((userOpts?: Partial<Options>) => {
   const opts = { ...defaultOptions, ...userOpts }
   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 remaining = Math.max(0, pages.length - opts.limit)
     return (
-      <div class="recent-notes">
+      <div class={`recent-notes ${displayClass}`}>
         <h3>{opts.title}</h3>
         <ul class="recent-ul">
           {pages.map((page) => {
diff --git a/quartz/components/TableOfContents.tsx b/quartz/components/TableOfContents.tsx
index 67f29d5..4604565 100644
--- a/quartz/components/TableOfContents.tsx
+++ b/quartz/components/TableOfContents.tsx
@@ -13,13 +13,13 @@
   layout: "modern",
 }
 
-function TableOfContents({ fileData }: QuartzComponentProps) {
+function TableOfContents({ fileData, displayClass }: QuartzComponentProps) {
   if (!fileData.toc) {
     return null
   }
 
   return (
-    <div class="desktop-only">
+    <div class={`toc ${displayClass}`}>
       <button type="button" id="toc">
         <h3>Table of Contents</h3>
         <svg
diff --git a/quartz/components/styles/recentNotes.scss b/quartz/components/styles/recentNotes.scss
index 05871f5..7267671 100644
--- a/quartz/components/styles/recentNotes.scss
+++ b/quartz/components/styles/recentNotes.scss
@@ -1,11 +1,12 @@
 .recent-notes {
   & > h3 {
+    margin: 0.5rem 0 0 0;
     font-size: 1rem;
   }
 
   & > ul.recent-ul {
     list-style: none;
-    margin-top: 1.5rem;
+    margin-top: 1rem;
     padding-left: 0;
 
     & > li {

--
Gitblit v1.10.0