Frontend: Fixed some CSS. Backend: Added project_type field.
This commit is contained in:
parent
8aabdf7cde
commit
4ca4655b37
4 changed files with 40 additions and 6 deletions
|
@ -12,6 +12,7 @@ CREATE TABLE public.project (
|
||||||
github_link text NULL,
|
github_link text NULL,
|
||||||
id_skills serial4 NOT NULL,
|
id_skills serial4 NOT NULL,
|
||||||
picture_name text NULL,
|
picture_name text NULL,
|
||||||
|
type_project text NULL,
|
||||||
CONSTRAINT project_pkey PRIMARY KEY (id),
|
CONSTRAINT project_pkey PRIMARY KEY (id),
|
||||||
CONSTRAINT project_fk FOREIGN KEY (id_skills) REFERENCES public.skills(id)
|
CONSTRAINT project_fk FOREIGN KEY (id_skills) REFERENCES public.skills(id)
|
||||||
);
|
);
|
|
@ -44,7 +44,8 @@ pub struct Project {
|
||||||
pub description: Option<String>,
|
pub description: Option<String>,
|
||||||
pub github_link: Option<String>,
|
pub github_link: Option<String>,
|
||||||
pub id_skills: i64,
|
pub id_skills: i64,
|
||||||
pub picture_name: Option<String>
|
pub picture_name: Option<String>,
|
||||||
|
pub type_project: Option<String>
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Deserialize, Serialize)]
|
#[derive(Deserialize, Serialize)]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { onMount } from "svelte";
|
import { onMount } from "svelte";
|
||||||
import SvgIcon from "@jamescoyle/svelte-icon";
|
import SvgIcon from "@jamescoyle/svelte-icon";
|
||||||
import { mdiCalendarRange, mdiPlus } from "@mdi/js";
|
import { mdiCalendarRange, mdiPlus, mdiAccount, mdiSchool } from "@mdi/js";
|
||||||
import "$lib/css/slide.css";
|
import "$lib/css/slide.css";
|
||||||
import { formatMonth } from "$lib/js/date.js";
|
import { formatMonth } from "$lib/js/date.js";
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@
|
||||||
const title = data.title;
|
const title = data.title;
|
||||||
const description = data.description;
|
const description = data.description;
|
||||||
const issued_date = formatMonth(data.date_done).charAt(0).toUpperCase()+formatMonth(data.date_done).slice(1);
|
const issued_date = formatMonth(data.date_done).charAt(0).toUpperCase()+formatMonth(data.date_done).slice(1);
|
||||||
|
const project_type = data.type_project;
|
||||||
let picture;
|
let picture;
|
||||||
onMount(async () => {
|
onMount(async () => {
|
||||||
picture = (await import(`/src/lib/img/${data.picture_name}`)).default;
|
picture = (await import(`/src/lib/img/${data.picture_name}`)).default;
|
||||||
|
@ -31,7 +32,13 @@
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="slide-subtitle-container">
|
<div class="slide-subtitle-container">
|
||||||
<p class="slide-subtitle slide-text">
|
<SvgIcon size="35" path={project_type == "School" ? mdiSchool : mdiAccount} type="mdi" />
|
||||||
|
<p class="slide-subtitle slide-aftericon">
|
||||||
|
{project_type}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="slide-subtitle-container">
|
||||||
|
<p class="slide-subtitle slide-text slide-overflow slide-o2 slide-justify">
|
||||||
{description}
|
{description}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
font-family: 'Gabarito', sans-serif;
|
font-family: 'Gabarito', sans-serif;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
font-size: 2rem;
|
font-size: 2rem;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.slide-subtitle-container {
|
.slide-subtitle-container {
|
||||||
|
@ -68,20 +69,44 @@
|
||||||
margin-top: 0.75rem;
|
margin-top: 0.75rem;
|
||||||
margin-bottom: 0.75rem;
|
margin-bottom: 0.75rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: justify;
|
|
||||||
text-justify: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.slide-justify {
|
||||||
|
text-align: justify;
|
||||||
|
text-justify:auto;
|
||||||
|
}
|
||||||
/* Add it to any text that may overflow. (long texts)*/
|
/* Add it to any text that may overflow. (long texts)*/
|
||||||
.slide-text {
|
.slide-text {
|
||||||
font-size: 1.25rem !important;
|
font-size: 1.25rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-overflow {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
-webkit-line-clamp: 4;
|
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.slide-o1 {
|
||||||
|
-webkit-line-clamp: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-o2 {
|
||||||
|
-webkit-line-clamp: 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-o3 {
|
||||||
|
-webkit-line-clamp: 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-o4 {
|
||||||
|
-webkit-line-clamp: 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slide-o5 {
|
||||||
|
-webkit-line-clamp: 5;
|
||||||
|
}
|
||||||
|
|
||||||
/* For button at the end of the container*/
|
/* For button at the end of the container*/
|
||||||
.slide-button-container {
|
.slide-button-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
Loading…
Add table
Reference in a new issue