forked from otoyo/astro-notion-blog
-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add flowbite library and update references in prep for rendering rela…
…ted and on this page content
- Loading branch information
1 parent
00a9018
commit ac88bbe
Showing
36 changed files
with
326 additions
and
146 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
import { getReferencesInPage } from '@/lib/blog-helpers'; | ||
import type { Post } from '@/lib/interfaces'; | ||
interface Props { | ||
post: Post; | ||
} | ||
const { post } = Astro.props; | ||
const allReferencesInPage = getReferencesInPage(post.PageId); | ||
const filteredReferences = allReferencesInPage.filter(ref => ref.external_hrefs.length > 0 || ref.direct_nonmedia_link); | ||
--- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
interface Props { | ||
post: Post; | ||
} | ||
const { post } = Astro.props; | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
interface Props { | ||
post: Post; | ||
} | ||
const { post } = Astro.props; | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
import type { Block } from '@/lib/interfaces'; | ||
import NotionBlocks from '../NotionBlocks.astro'; | ||
interface Props { | ||
block: Block; | ||
linkedTo: string; | ||
popoverSpanText: string; | ||
popoverTitle?: string | ||
} | ||
const { block, linkedTo, popoverSpanText, popoverTitle="" } = Astro.props; | ||
--- | ||
<span class="flex items-center text-sm">{popoverSpanText}<button data-popover-target="popover-description" data-popover-placement="bottom-end" type="button"><svg class="w-4 h-4 ms-2 text-gray-400 hover:text-gray-500" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-3a1 1 0 00-.867.5 1 1 0 11-1.731-1A3 3 0 0113 8a3.001 3.001 0 01-2 2.83V11a1 1 0 11-2 0v-1a1 1 0 011-1 1 1 0 100-2zm0 8a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg><span class="sr-only">Show information</span></button></span> | ||
<div data-popover id="popover-description" role="tooltip" class="absolute z-10 invisible inline-block text-sm text-gray-500 transition-opacity duration-300 bg-white border border-gray-200 rounded-lg shadow-sm opacity-0 w-72 dark:bg-gray-800 dark:border-gray-600 dark:text-gray-400"> | ||
<div class="p-3 space-y-2"> | ||
{popoverTitle && <h3 class="font-semibold text-gray-900 dark:text-white">{popoverTitle}</h3>} | ||
<NotionBlocks blocks={[block]}/> | ||
<a href={linkedTo} class="flex items-center font-medium text-blue-600 dark:text-blue-500 dark:hover:text-blue-600 hover:text-blue-700 hover:underline">Read more <svg class="w-2 h-2 ms-1.5 rtl:rotate-180" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 6 10"> | ||
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 9 4-4-4-4"/> | ||
</svg></a> | ||
</div> | ||
<div data-popper-arrow></div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
import { REFERENCES } from "@/constants"; | ||
import InternalLinksInThisPage from "./SiteLinksInThisPage.astro"; | ||
import LinksToThisPage from "./LinksToThisPage.astro"; | ||
import ExternalLinksInThisPage from "./ExternalLinksInThisPage.astro"; | ||
import MediaLinksInThisPage from "./MediaLinksInThisPage.astro"; | ||
import type { Post } from "@/lib/interfaces"; | ||
interface Props { | ||
post: Post; | ||
} | ||
const { post } = Astro.props; | ||
--- | ||
{REFERENCES && REFERENCES["LINKS_TO_THIS_PAGE"] && <LinksToThisPage post={post}/>} | ||
{REFERENCES && REFERENCES["SITE_LINKS_IN_PAGE"] && <InternalLinksInThisPage post={post}/>} | ||
{REFERENCES && REFERENCES["EXTERNAL_LINKS_IN_PAGE"] && <ExternalLinksInThisPage post={post}/>} | ||
{REFERENCES && REFERENCES["MEDIA_AND_FILE_LINKS_IN_THIS_PAGE"] && <MediaLinksInThisPage post={post}/>} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
import { getReferencesInPage } from '@/lib/blog-helpers'; | ||
import type { Post } from '@/lib/interfaces'; | ||
interface Props { | ||
post: Post; | ||
} | ||
const { post } = Astro.props; | ||
const allReferencesInPage = getReferencesInPage(post.PageId); | ||
const filteredReferences = allReferencesInPage.filter(ref => ref.other_pages.length > 0 || ref.link_to_pageid ); | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.