-
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
10 changed files
with
442 additions
and
310 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
import StackTechCard from "../components/StackTechCard.astro"; | ||
import { Icon } from "astro-icon/components"; | ||
import IconButton from "../components/IconButton.astro"; | ||
import AuthorAvatar from "../components/AuthorAvatar.astro"; | ||
import type { AuthorProfile } from "../scripts/types/post_types"; | ||
import EmailText from "./EmailText.astro"; | ||
import SocialList from "./SocialList.astro"; | ||
import StackList from "./StackList.astro"; | ||
interface Props { | ||
adm: AuthorProfile; | ||
} | ||
const { adm } = Astro.props; | ||
const githubUrl = adm.github; | ||
const linkedinUrl = adm.linkedin; | ||
const stack = adm.stack; | ||
--- | ||
|
||
<div | ||
class="flex sm:gap-2 md:max-2xl:gap-5 sm:flex-col md:max-2xl:flex-row mb-3" | ||
> | ||
<AuthorAvatar adm={adm} /> | ||
<div class="flex flex-col sm:gap-2"> | ||
<h1>{adm.name}</h1> | ||
<EmailText email={adm.email} /> | ||
<SocialList githubUrl={githubUrl} linkedinUrl={linkedinUrl} /> | ||
<StackList stack={stack} /> | ||
</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,13 @@ | ||
--- | ||
import { Icon } from "astro-icon/components"; | ||
interface Props { | ||
email: string; | ||
} | ||
const { email } = Astro.props; | ||
--- | ||
|
||
<div class="flex flex-row gap-2 items-center"> | ||
<Icon name="mail" size={20} /> | ||
<h3>{email}</h3> | ||
</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
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,45 @@ | ||
--- | ||
import IconButton from "./IconButton.astro"; | ||
interface Props { | ||
githubUrl?: string | undefined; | ||
linkedinUrl?: string | undefined; | ||
} | ||
const { githubUrl, linkedinUrl } = Astro.props; | ||
--- | ||
|
||
<div class="flex flex-row gap-3"> | ||
{ | ||
githubUrl && ( | ||
<social-button data-url={githubUrl}> | ||
<IconButton name="github" size={30} alt="Goto creator's GitHub" /> | ||
</social-button> | ||
) | ||
} | ||
{ | ||
linkedinUrl && ( | ||
<social-button data-url={linkedinUrl}> | ||
<IconButton name="linkedin" size={30} alt="Goto creator's Linkedin" /> | ||
</social-button> | ||
) | ||
} | ||
</div> | ||
|
||
<script> | ||
import { goto } from "../scripts/goto"; | ||
|
||
class SocialButton extends HTMLElement { | ||
constructor() { | ||
super(); | ||
|
||
const socialUrl = this.dataset.url; | ||
|
||
const button = this.querySelector("button"); | ||
if (typeof socialUrl === "string") | ||
button?.addEventListener("click", () => goto(socialUrl)); | ||
} | ||
} | ||
|
||
customElements.define("social-button", SocialButton); | ||
</script> |
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,5 +1,10 @@ | ||
--- | ||
--- | ||
|
||
<iframe src="https://github.com/sponsors/LuanRoger/button" title="Sponsor LuanRoger" | ||
height="32" width="114"/> | ||
<iframe | ||
src="https://github.com/sponsors/LuanRoger/button" | ||
title="Sponsor LuanRoger" | ||
height="32" | ||
width="114" | ||
loading="lazy"></iframe> |
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,27 @@ | ||
--- | ||
import type { AuthorProfileStack } from "../scripts/types/post_types"; | ||
import StackTechCard from "./StackTechCard.astro"; | ||
interface Props { | ||
stack: AuthorProfileStack[]; | ||
listClass?: string | undefined; | ||
} | ||
const { stack, listClass } = Astro.props; | ||
--- | ||
|
||
<div> | ||
<small>STACK</small> | ||
<ul class={listClass ?? "flex flex-wrap gap-3"}> | ||
{ | ||
stack.map((s) => ( | ||
<li> | ||
<StackTechCard | ||
name={s.name} | ||
iconName={s.iconName} | ||
iconColor={s.iconColor} | ||
/> | ||
</li> | ||
)) | ||
} | ||
</ul> | ||
</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 |
---|---|---|
@@ -1,84 +1,26 @@ | ||
--- | ||
import { getEntry } from "astro:content"; | ||
import AuthorAvatar from "../components/AuthorAvatar.astro"; | ||
import LayoutPage from "../layouts/LayoutPage.astro"; | ||
import type { AuthorProfile } from "../scripts/types/post_types"; | ||
import { Icon } from "astro-icon/components"; | ||
import IconButton from "../components/IconButton.astro"; | ||
import Prose from "../components/Prose.astro"; | ||
import StackTechCard from "../components/StackTechCard.astro"; | ||
import AuthorBasicInfo from "../components/AuthorBasicInfo.astro"; | ||
const title = "Sobre"; | ||
const admName = "rog"; | ||
const admAuthorProfile = await getEntry("authors", admName); | ||
const admDescription = await getEntry("authorsDescription", admName); | ||
const adm: AuthorProfile = admAuthorProfile.data; | ||
const { Content } = await admDescription.render(); | ||
const githubUrl = adm.github; | ||
const linkedinUrl = adm.linkedin; | ||
const { Content } = await admDescription.render(); | ||
--- | ||
|
||
<LayoutPage title={title}> | ||
<div | ||
class="flex sm:gap-2 md:max-2xl:gap-5 sm:flex-col md:max-2xl:flex-row mb-3" | ||
> | ||
<AuthorAvatar adm={adm} /> | ||
<div class="flex flex-col sm:gap-2"> | ||
<h1>{adm.name}</h1> | ||
<div class="flex flex-row gap-2 items-center"> | ||
<Icon name="mail" size={20} /> | ||
<h3>{adm.email}</h3> | ||
</div> | ||
<div class="flex flex-row gap-3"> | ||
<social-button data-url={githubUrl}> | ||
<IconButton name="github" size={30} alt="Goto creator's GitHub" /> | ||
</social-button> | ||
<social-button data-url={linkedinUrl}> | ||
<IconButton name="linkedin" size={30} alt="Goto creator's Linkedin" /> | ||
</social-button> | ||
</div> | ||
<div> | ||
<!-- TODO: Separate in component --> | ||
<small>STACK</small> | ||
<ul class="flex flex-wrap gap-3"> | ||
{ | ||
adm.stack.map((s) => ( | ||
<li> | ||
<StackTechCard | ||
name={s.name} | ||
iconName={s.iconName} | ||
iconColor={s.iconColor} | ||
/> | ||
</li> | ||
)) | ||
} | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
<AuthorBasicInfo adm={adm} /> | ||
<article> | ||
<Prose> | ||
<Content /> | ||
</Prose> | ||
</article> | ||
</LayoutPage> | ||
|
||
<script> | ||
import { goto } from "../scripts/goto"; | ||
|
||
class SocialButton extends HTMLElement { | ||
constructor() { | ||
super(); | ||
|
||
const socialUrl = this.dataset.url; | ||
|
||
const button = this.querySelector("button"); | ||
if (typeof socialUrl === "string") | ||
button?.addEventListener("click", () => goto(socialUrl)); | ||
} | ||
} | ||
|
||
customElements.define("social-button", SocialButton); | ||
</script> |