-
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.
Merge pull request #8 from J-onasJones/better-projects-page
new Projects layout
- Loading branch information
Showing
7 changed files
with
425 additions
and
318 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,125 @@ | ||
<script> | ||
export let project; | ||
import ProjectsLinks from "./ProjectsLinks.svelte"; | ||
import ProjectLanguageIndicator from "./ProjectLanguageIndicator.svelte"; | ||
import "../routes/+page.css"; | ||
</script> | ||
|
||
<div class="top"> | ||
<img class="image" src="/project-banners{project.backgroud}" alt=" " /> | ||
</div> | ||
<div class="project-languages"> | ||
<ProjectLanguageIndicator {project} /> | ||
</div> | ||
<div class="project-links"> | ||
<ProjectsLinks {project} /> | ||
</div> | ||
<div class="bottom"> | ||
<div class="content"> | ||
<div /> | ||
<div class="project-topline"> | ||
<div class="project-title">{project.title}</div> | ||
<div class="project-titleinfo"> | ||
<a | ||
class="project-status" | ||
style="color: {project.statuscolor};border-color:{project.statuscolor}" | ||
>{project.status}</a | ||
><a class="project-version">{project.version}</a> | ||
</div> | ||
</div> | ||
<div class="project-description">{project.description}</div> | ||
</div> | ||
</div> | ||
|
||
<style> | ||
.project-title { | ||
font-size: 24px; | ||
font-weight: bold; | ||
margin-bottom: 10px; | ||
text-align: left; | ||
} | ||
.project-status { | ||
font-size: 20px; | ||
font-weight: bold; | ||
margin-bottom: 10px; | ||
margin-left: 10px; | ||
margin-right: 10px; | ||
padding: 2px; | ||
padding-left: 5px; | ||
padding-right: 5px; | ||
border: 3px solid #dcdcdc; | ||
border-radius: 3px; | ||
} | ||
.project-version { | ||
font-size: 20px; | ||
font-weight: bold; | ||
color: var(--project-version-color); | ||
margin-bottom: 10px; | ||
margin-left: 10px; | ||
margin-right: 10px; | ||
margin-top: -4px; | ||
padding: 2px; | ||
border: 3px solid var(--project-version-color); | ||
border-radius: 100px; | ||
float: right; | ||
} | ||
.project-description { | ||
margin-top: 20px; | ||
margin-bottom: 10px; | ||
margin-right: 12px; | ||
text-align: left; | ||
} | ||
.project-links { | ||
display: flex; | ||
align-items: right; | ||
text-align: right; | ||
align-content: right; | ||
width: 100%; | ||
border-bottom: 1px solid var(--project-border-color); | ||
} | ||
.top { | ||
flex: 2; | ||
display: flex; | ||
align-items: center; | ||
} | ||
.bottom { | ||
flex: 1; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
.image { | ||
width: 100%; | ||
height: 150px; | ||
object-fit: cover; | ||
} | ||
.content { | ||
margin: 20px; | ||
} | ||
.project-topline { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
.project-languages { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
width: 100%; | ||
} | ||
.project-titleinfo { | ||
display: flex; | ||
align-items: center; | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<script> | ||
export let project; | ||
import { onMount } from "svelte"; | ||
import { language_colors } from "../scripts/langs"; | ||
let languageLength = Object.values(project.languages).reduce( | ||
(acc, curr) => acc + curr, | ||
0 | ||
); | ||
</script> | ||
|
||
<div class="indicator"> | ||
{#each Object.keys(project.languages) as language} | ||
<div | ||
class="language-color" | ||
style="background-color: {language_colors[ | ||
language | ||
]}; width: {(project.languages[language] / languageLength) * 100}%" | ||
> | ||
<p>{language}</p> | ||
</div> | ||
{/each} | ||
</div> | ||
|
||
<style> | ||
.indicator { | ||
display: flex; | ||
height: 20px; | ||
width: 100%; | ||
} | ||
.language-color { | ||
flex: 1; | ||
height: 100%; | ||
width: 100%; | ||
} | ||
.language-color p { | ||
color: white; | ||
font-size: 0.9rem; | ||
margin: 0; | ||
padding: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<script> | ||
export let project; | ||
import "../routes/+page.css"; | ||
</script> | ||
|
||
<div class="project-links"> | ||
{#each Object.entries(project.links) as [platform, link]} | ||
<a | ||
class="project-link" | ||
href={link} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
{#if platform === "GH"} | ||
<i class="fa fa-github" aria-hidden="true" /> | ||
{:else if platform === "WB"} | ||
<i class="fa fa-globe" aria-hidden="true" /> | ||
{:else if platform === "YT"} | ||
<i class="fa fa-youtube" aria-hidden="true" /> | ||
{:else if platform === "TW"} | ||
<i class="fa fa-twitter" aria-hidden="true" /> | ||
{:else if platform === "DC"} | ||
<i class="fa fa-discord" aria-hidden="true" /> | ||
{:else if platform === "PT"} | ||
<i class="fa fa-patreon" aria-hidden="true" /> | ||
{:else if platform === "SP"} | ||
<i class="fa fa-spotify" aria-hidden="true" /> | ||
{:else if platform === "IG"} | ||
<i class="fa fa-instagram" aria-hidden="true" /> | ||
{:else} | ||
{platform} | ||
{/if} | ||
</a> | ||
{/each} | ||
</div> | ||
|
||
<style> | ||
.project-links { | ||
display: flex; | ||
width: 100%; | ||
} | ||
.project-link { | ||
color: var(--project-link-color); | ||
background-color: var(--project-link-background-color); | ||
text-decoration: none; | ||
transition: color 0.3s; | ||
margin-top: 3px; | ||
font-size: 25px; | ||
width: 100%; | ||
align-items: center; | ||
text-align: center; | ||
} | ||
.project-link:hover { | ||
color: var(--project-link-color-hover); | ||
background-color: var(--project-link-background-color-hover); | ||
} | ||
</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
Oops, something went wrong.