-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
49 additions
and
16 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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
import Icon, { type Props as IconProps } from "./Icon.astro"; | ||
type Props = Pick<IconProps, "iconClasses">; | ||
const { iconClasses } = Astro.props; | ||
--- | ||
|
||
<!-- We cannot use the 'logos' pack because of the icon colors --> | ||
<Icon pack="mdi" name="gitlab" iconClasses={iconClasses} title="Github" /> |
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,20 @@ | ||
--- | ||
import type { CollectionEntry } from "astro:content"; | ||
import Github from "../Icons/Github.astro"; | ||
import Gitlab from "../Icons/Gitlab.astro"; | ||
export interface Props { | ||
upstreamLink: CollectionEntry<"project">["data"]["upstreamLink"]; | ||
} | ||
const { upstreamLink } = Astro.props; | ||
--- | ||
|
||
{ | ||
upstreamLink.indexOf("github") != -1 ? ( | ||
<Github /> | ||
) : upstreamLink.indexOf("gitlab") != -1 ? ( | ||
<Gitlab /> | ||
) : null | ||
} |
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,12 +1,2 @@ | ||
/// <reference path="../.astro/types.d.ts" /> | ||
/// <reference types="astro/client" /> | ||
|
||
/** | ||
* Returns the keys of an object, correctly typed. | ||
* | ||
* @param obj the object whose keys we want to get | ||
* @returns the keys of the object | ||
*/ | ||
function typedKeys<K>(obj: K): (keyof K)[] { | ||
return Object.keys(obj) as (keyof typeof obj)[]; | ||
} | ||
/// <reference types="astro/client" /> |
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