-
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Overview is a page showing all notes with their content, making it easy to find content. See bottom-left for new a icon to open Overview in a new tab.
- Loading branch information
Showing
11 changed files
with
159 additions
and
46 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
export const getFocusOverride = (): boolean => new URL(window.location.href).searchParams.get("focus") === ""; | ||
export const getActiveFromUrl = (): string => new URL(window.location.href).searchParams.get("note") || ""; // Bookmark | ||
const getParam = (name: string) => new URL(window.location.href).searchParams.get(name); | ||
|
||
export const getFocusOverride = (): boolean => getParam("focus") === ""; | ||
export const getActiveFromUrl = (): string => getParam("note") || ""; | ||
export const isOverview = (): boolean => getParam("overview") === ""; |
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,25 @@ | ||
import { h } from "preact"; | ||
import { SidebarNote } from "notes/adapters"; | ||
|
||
interface OverviewProps { | ||
notes: SidebarNote[] | ||
} | ||
|
||
const Overview = ({ notes }: OverviewProps): h.JSX.Element => ( | ||
<div id="notes-overview"> | ||
{notes.map((note) => ( | ||
<div className="note-tile"> | ||
<div className="note-tile-title"> | ||
<a href={`notes.html?note=${note.name}`}>{note.name}</a> | ||
</div> | ||
<div | ||
className="note-tile-content" | ||
// eslint-disable-next-line react/no-danger | ||
dangerouslySetInnerHTML={{ __html: note.content }} | ||
/> | ||
</div> | ||
))} | ||
</div> | ||
); | ||
|
||
export default Overview; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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