forked from torrust/torrust-website-v1
-
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.
Merge torrust/torrust-website#111: Add contributors routes, add publi…
…sh date to card, and add GitHub stars dc22dcf Add contributors routes, add publish date to card, add GitHub stars (grmbyrn) Pull request description: ## Changes Made: This pull request introduces several enhancements to our project, focusing on improving the user experience, maintaining code consistency, and providing additional functionality. 1. Linking to Contributor Pages: * Added a link on the `How to Contribute` section of the home page, directing users to a contributor's route. * Each contributor's image and name now serve as links, redirecting to individual contributor pages with detailed information. 2. Enhancing Blog Post Links: * Implemented links to each blog post's author, directing users to the respective contributor page. * Avoided code repetition and styling inconsistencies by importing the `ContributorCard` component from molecules in components. * Added contributor and contributorSlug to the `BlogPost` type in TypeScript to prevent errors as well as to the Front Matter of appropriate Markdown files. 3. Publication Date in Blog Post Cards: * Displayed the publication date beneath each post title in both the `Recent Posts` and `Related Posts` sections. * Adopted the "DD/MM/YYYY" format for date representation. * Improved user experience by providing context about the blog post's publication date, assuring users that the blog is active. 4. GitHub Stars in AboutTorrust: * Dynamically fetched the number of stars for each Torrust Tracker and Torrust Index repository using the GitHub API. * Integrated star counts into the AboutTorrust SvelteKit component to inform users about repository popularity. * Added a visually enhancing star icon from the `icons` folder to represent the star count. 5. RepoURL and RepoName in AboutTorrust: * Split repo into repoURL and repoName for better access to the GitHub API and improved user navigation. * Ensured that links direct users appropriately to the respective repository. These changes collectively enhance the project's functionality, user experience, and maintainability. Please review and merge accordingly. Thank you! ACKs for top commit: josecelano: ACK dc22dcf Tree-SHA512: 2d376f11ac3a991a3de8e46ee5db4691a654048edaab11e8c346058b11a0ea748492789e434a29899adffedd884c35b125c1f23626cf60513f6310c80cbc1feb
- Loading branch information
Showing
28 changed files
with
534 additions
and
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
<script lang="ts"> | ||
import Email from '$lib/icons/socials/email.svelte'; | ||
import Github from '$lib/icons/socials/github.svelte'; | ||
import Linkedin from '$lib/icons/socials/linkedin.svelte'; | ||
export let name: string; | ||
export let position: string | undefined = undefined; | ||
export let img: string; | ||
export let contributeDate: string; | ||
export let paras: { para: string }[]; | ||
export let links: { email: string; github: string; linkedIn: string }[]; | ||
</script> | ||
|
||
<div class="contributor-biography"> | ||
{#if img} | ||
<img src={img} class="cover-image" alt="Contributor" /> | ||
{:else} | ||
<img src="/images/contributors/unknown-person-icon.png" class="cover-image" alt="Contributor" /> | ||
{/if} | ||
<h1 class="contributor-title">{name}</h1> | ||
<h2 class="contributor-position">{position}</h2> | ||
<h5 class="contributor-contribute-date">Contributor since: <span>{contributeDate}</span></h5> | ||
<div class="socials links"> | ||
{#each links as link} | ||
{#if link.email} | ||
<a href={link.email}><Email /></a> | ||
{/if} | ||
{/each} | ||
{#each links as link} | ||
{#if link.github} | ||
<a href={link.github}><Github /></a> | ||
{/if} | ||
{/each} | ||
{#each links as link} | ||
{#if link.linkedIn} | ||
<a href={link.linkedIn}><Linkedin /></a> | ||
{/if} | ||
{/each} | ||
</div> | ||
<div> | ||
{#each paras as para} | ||
<p>{@html para.para}</p> | ||
{/each} | ||
</div> | ||
<a href="/contributors">Return to Contributors</a> | ||
</div> | ||
|
||
<style lang="scss"> | ||
.contributor-biography { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
text-align: center; | ||
max-width: 600px; | ||
margin: 0 auto; | ||
margin-top: 2rem; | ||
line-height: 1.5; | ||
padding: 2rem; | ||
} | ||
.cover-image { | ||
width: min(var(--main-column-width), 100%); | ||
margin: 0 auto; | ||
max-height: 400px; | ||
box-shadow: var(--image-shadow); | ||
border-radius: 6px; | ||
box-shadow: | ||
0 4px 8px 0 rgba(0, 0, 0, 0.2), | ||
0 6px 20px 0 rgba(0, 0, 0, 0.19); | ||
} | ||
.contributor-title { | ||
font-size: 2.5rem; | ||
margin: 0.5rem 0; | ||
} | ||
.contributor-position { | ||
font-size: 1.5rem; | ||
font-weight: 500; | ||
} | ||
.contributor-contribute-date { | ||
background-color: #fff; | ||
padding: 0.7rem 1.2rem; | ||
border-radius: 0.8rem; | ||
color: #000; | ||
margin-top: 0.5rem; | ||
box-shadow: | ||
0 2px 6px 0 rgba(0, 0, 0, 0.2), | ||
0 4px 12px 0 rgba(0, 0, 0, 0.19); | ||
margin-top: 1rem; | ||
} | ||
.socials { | ||
display: flex; | ||
gap: 1rem; | ||
margin-top: 1.5rem; | ||
align-items: center; | ||
justify-content: flex-end; | ||
gap: 30px; | ||
a { | ||
text-decoration: none; | ||
width: 2rem; | ||
&:hover { | ||
color: var(--color--primary); | ||
filter: drop-shadow(0px 0px 3px var(--color--primary)); | ||
} | ||
} | ||
} | ||
p { | ||
font-size: 1rem; | ||
text-align: justify; | ||
margin: 1rem 0; | ||
} | ||
</style> |
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 |
---|---|---|
|
@@ -17,7 +17,7 @@ | |
{/if} | ||
{#if description} | ||
<p> | ||
{description} | ||
{@html description} | ||
</p> | ||
{/if} | ||
</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
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.