Backend: Updated Project with 'short_description'. Frontend: Updated the UI to show the short description then in the popup the full, tweaked markdown css.

This commit is contained in:
Yohan Boujon 2024-02-02 23:46:08 +01:00
parent fd1269c51c
commit 06acd72045
5 changed files with 33 additions and 11 deletions

View file

@ -16,6 +16,7 @@ CREATE TABLE public.project (
report_link text NULL,
archive_link text NULL,
app_link text NULL,
short_description varchar(100) NULL,
CONSTRAINT project_pkey PRIMARY KEY (id),
CONSTRAINT project_fk FOREIGN KEY (info_id) REFERENCES public.info(id)
);

View file

@ -48,7 +48,8 @@ pub struct Project {
pub type_project: Option<String>,
pub report_link: Option<String>,
pub archive_link: Option<String>,
pub app_link: Option<String>
pub app_link: Option<String>,
pub short_description: Option<String>
}
#[derive(Deserialize, Serialize)]

View file

@ -94,7 +94,7 @@ async fn skills(
)> {
let project = sqlx::query_as!(
Project,
"SELECT id, date_done, title, description, github_link, picture_name, type_project, report_link, archive_link, app_link FROM public.project WHERE project.info_id = $1 ORDER BY date_done DESC",
"SELECT id, date_done, title, description, github_link, picture_name, type_project, report_link, archive_link, app_link, short_description FROM public.project WHERE project.info_id = $1 ORDER BY date_done DESC",
id
)
.fetch_all(&pool)

View file

@ -10,7 +10,7 @@
export let data;
const title = data.title;
const description = data.description;
const short_description = data.short_description;
const issued_date =
formatMonth(data.date_done).charAt(0).toUpperCase() +
formatMonth(data.date_done).slice(1);
@ -52,7 +52,7 @@
</div>
<div class="slide-subtitle-container">
<p class="slide-subtitle slide-text slide-overflow slide-justify">
{description}
{short_description}
</p>
</div>
<div class="slide-button-container">

View file

@ -1,25 +1,30 @@
.markdown h1,
h2,
h3,
h4,
h5,
h6 {
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
font-family: 'Gabarito', sans-serif;
font-weight: 700;
color: var(--color-text);
}
.markdown h4,
h5,
h6 {
.markdown h5,
.markdown h6 {
font-weight: 400 !important;
}
.markdown h1 {
font-size: 2rem;
}
.markdown p,
li {
font-family: 'Urbanist', sans-serif;
font-weight: 500;
color: var(--color-subtext);
text-align: justify;
}
.markdown a {
@ -57,9 +62,21 @@ li {
box-shadow: #352b4027 0px 4px 6px -1px, #352b4016 0px 2px 4px -1px;
}
.markdown code {
background-color: var(--color-code);
color: var(--color-special);
padding: 0.2rem;
border-radius: 0.2rem;
box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
}
.markdown pre>code {
font-family: 'Sometype Mono', monospace;
font-weight: 500;
padding: 0 !important;
border-radius: 0 !important;
color: var(--color-subtext) !important;
box-shadow: none !important;
}
.markdown blockquote {
@ -92,6 +109,9 @@ li {
padding: 8px;
line-height: 1.42857143;
vertical-align: top;
font-family: 'Urbanist', sans-serif;
font-weight: 500;
font-size: 0.8rem;
}
.markdown tr>td:last-child {