Skip to content

Commit

Permalink
squash!
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Aug 15, 2023
1 parent 878b1cc commit 05cd354
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
14 changes: 6 additions & 8 deletions Source/Layout/Base.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,19 @@ import Header from "@Component/Header.astro";
import "@Style/Base.css";
const {
Fonts = [],
Font = [],
Title = "Playform",
Description = "Cloud Computing Simplified",
} = Astro.props;
const links = (hrefs = []) =>
hrefs
.map(
(href) => `<link
const Link = (Link = []) =>
Link.map(
(href) => `<link
rel="stylesheet"
type="text/css"
href="${href}"
/>`
)
.join("\n");
).join("\n");
---

<!DOCTYPE html>
Expand Down Expand Up @@ -63,7 +61,7 @@ const links = (hrefs = []) =>

<slot name="styles" />

<Fragment set:html={links(Fonts.map((font: any) => font.href))} />
<Fragment set:html={Link(Font.map((font: any) => font.href))} />

<script>
import "@Script/Swup";
Expand Down
2 changes: 1 addition & 1 deletion Source/pages/[Slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ if (typeof File[0] !== "undefined") {
---

<Base
Fonts={[
Font={[
{ href: "/Font/AlbertSans500.css" },
{ href: "/Font/AlbertSans600.css" },
{ href: "/Font/AlbertSans700.css" },
Expand Down
2 changes: 1 addition & 1 deletion Source/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "@Style/Page/Index.css";
---

<Base
Fonts={[
Font={[
{ href: "/Font/AlbertSans100.css" },
{ href: "/Font/AlbertSans300.css" },
{ href: "/Font/AlbertSans500.css" },
Expand Down

0 comments on commit 05cd354

Please sign in to comment.