-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
š§ Refactor: Add Header. Implement middleware. Fix minor bugs
- Loading branch information
Showing
48 changed files
with
746 additions
and
103 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
{ | ||
"compilerOptions": { | ||
"paths": { | ||
"@/*": ["./src/*"] | ||
} | ||
"compilerOptions": { | ||
"paths": { | ||
"@semantyk/*": [ | ||
"./src/*" | ||
] | ||
} | ||
} | ||
} |
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,44 @@ | ||
/* | ||
* āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā | ||
* # `page.jsx` | ||
* client | Semantyk | ||
* | ||
* Created: Nov 30, 2023 | ||
* Modified: Dec 22, 2023 | ||
* | ||
* Author(s): Semantyk Team | ||
* Maintainer(s): Daniel Bakas <https://id.danielbakas.com> | ||
* | ||
* Copyright Ā© Semantyk 2023. All rights reserved. | ||
* āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā | ||
*/ | ||
|
||
//* Imports | ||
import React from "react"; | ||
//* Local Imports | ||
import "@semantyk/app/page.css"; | ||
import Page from "@semantyk/app/page"; | ||
import { getPage } from "@semantyk/frontend/logic/services/getPage"; | ||
import { | ||
getKnowledge | ||
} from "@semantyk/backend/api/knowledge/services/getKnowledge"; | ||
|
||
//* Metadata | ||
export async function generateMetadata({ params }) { | ||
const { slug } = params; | ||
try { | ||
const { title, subtitle } = await getPage(slug); | ||
// TODO: Remove when Template description is added to Next.js | ||
const { slogan } = await getKnowledge(fetch); | ||
const description = `${slogan} | ${subtitle}`; | ||
return { title, description }; | ||
} catch (e) { | ||
console.log(`Error: ${slug} does not exist`); | ||
} | ||
} | ||
|
||
//* Main | ||
export default function DynamicPage(props) { | ||
// Return | ||
return <Page {...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 @@ | ||
/* | ||
* āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā | ||
* # `layout.css` | ||
* client | Semantyk | ||
* | ||
* Created: Dec 23, 2023 | ||
* Modified: Dec 23, 2023 | ||
* | ||
* Author(s): Semantyk Team | ||
* Maintainer(s): Daniel Bakas <https://id.danielbakas.com> | ||
* | ||
* Copyright Ā© Semantyk 2023. All rights reserved. | ||
* āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā | ||
*/ | ||
|
||
/* Imports */ | ||
@import 'bootstrap/dist/css/bootstrap.min.css'; | ||
|
||
/* Main */ | ||
#App { | ||
padding-left: 1rem; | ||
padding-right: 1rem; | ||
} |
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,19 +1,14 @@ | ||
/* | ||
* āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā | ||
* # `page.css` | 'app' | ||
* # `page.css` | ||
* client | Semantyk | ||
* | ||
* Created: Nov 30, 2023 | ||
* Modified: Dec 10, 2023 | ||
* Modified: Dec 22, 2023 | ||
* | ||
* Author(s): Semantyk Team | ||
* Maintainer(s): Daniel Bakas <https://id.danielbakas.com> | ||
* | ||
* Copyright Ā© Semantyk 2023. All rights reserved. | ||
* āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā | ||
*/ | ||
|
||
#Page { | ||
/* px-3 */ | ||
padding: 1rem; | ||
} | ||
*/ |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā | ||
* # `getDataset.js` | ||
* client | Semantyk | ||
* | ||
* Created: Dec 23, 2023 | ||
* Modified: Dec 23, 2023 | ||
* | ||
* Author(s): Semantyk Team | ||
* Maintainer(s): | ||
* | ||
* Copyright Ā© Semantyk 2023. All rights reserved. | ||
* āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā | ||
*/ | ||
|
||
import { getSolidDataset } from "@inrupt/solid-client"; | ||
|
||
export const getDataset = async (fetch, uri, type = "solid") => { | ||
switch (type) { | ||
case "solid": | ||
return await getSolidDataset(uri, { fetch }); | ||
default: | ||
const document = await fetch(uri, { headers: { Accept: type } }); | ||
return await document.text(); | ||
} | ||
}; |
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.