Skip to content

Commit

Permalink
add global variables and fonts to tailwind + work in projects route
Browse files Browse the repository at this point in the history
  • Loading branch information
brauliorivas committed Aug 4, 2024
1 parent 0ec2b70 commit 72444db
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 1 deletion.
7 changes: 7 additions & 0 deletions src/app.postcss
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
@font-face {
font-family: "Fira Code";
src: local("fira-code"), url("/fonts/fira-code/FiraCode-VariableFont_wght.ttf");
}
}
16 changes: 16 additions & 0 deletions src/lib/components/ProjectCard.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<script>
import Tag from "./Tag.svelte";
export const term = '2024-1s';
export const name = 'Polipromedios';
export const category = 'web';
export const description = 'Descripción de un proyecto super genial, muy, muy, muy pero muy genial.';
export const authors = ['Person 1', 'Person 2'];
</script>

<div class="bg-card-color rounded-xl max-w-80 mx-4 p-4">
<span class="font-fira text-green font-medium">{term}</span>
<h2 class="text-white font-fira text-xl font-medium">{name}</h2>
<Tag category={category} />
<p class="text-[#dee5f2] font-content">{description}</p>
</div>
7 changes: 7 additions & 0 deletions src/lib/components/Tag.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<script>
export const category = 'web';
</script>

<span class="font-fira font-bold px-6 py bg-card-color border-green border rounded-full text-white">
{category}
</span>
34 changes: 34 additions & 0 deletions src/lib/data/projects.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"projects": [
{
"term": "2024-1s",
"name": "Polipromedios",
"category": "web",
"description": "Descripción de un proyecto super genial, muy, muy, muy pero muy genial.",
"authors": [
"Person 1",
"Person 2"
]
},
{
"term": "2024-1s",
"name": "Polipromedios",
"category": "web",
"description": "Descripción de un proyecto super genial, muy, muy, muy pero muy genial.",
"authors": [
"Person 1",
"Person 2"
]
},
{
"term": "2024-1s",
"name": "Polipromedios",
"category": "web",
"description": "Descripción de un proyecto super genial, muy, muy, muy pero muy genial.",
"authors": [
"Person 1",
"Person 2"
]
}
]
}
18 changes: 18 additions & 0 deletions src/routes/projects/+page.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<script>
import ProjectCard from "$lib/components/ProjectCard.svelte";
import { projects } from "$lib/data/projects.json";
</script>

<p class="font-content font-medium text-light-blue">Aquí ponemos los proyectos que nos enorgullecen... y lo que hay ¯\_(ツ)_/¯</p>
<div class="flex flex-row flex-wrap mt-8">
{#each projects as project}
<ProjectCard
term={project.term}
name={project.name}
category={project.category}
description={project.description}
authors={project.authors}
/>
{/each}
</div>
Binary file not shown.
13 changes: 12 additions & 1 deletion tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,18 @@ export default {
darkMode: ["class"],
content: ["./src/**/*.{html,js,svelte,ts}"],
theme: {
extend: {},
extend: {
colors: {
'light-blue': '#e0ebff',
'card-color': '#272626',
'green': '#6DD743',
},
fontFamily: {
'content': ["Inter", "sans-serif"],
'heading': ["Fira Code", "sans-serif"],
'fira': ["Fira Code"],
}
},
},
plugins: [forms({ strategy: "class" }), typography],
} satisfies Config;

0 comments on commit 72444db

Please sign in to comment.