Skip to content

Commit

Permalink
feat: add csunibo favicon and link preview (#87)
Browse files Browse the repository at this point in the history
- csunibo favicon
- meta information and image for link preview
- new theme "dracula"


Co-authored-by: VaiTon <[email protected]>
  • Loading branch information
ali-benny and VaiTon authored Oct 4, 2023
1 parent e694636 commit 6ba6a02
Show file tree
Hide file tree
Showing 17 changed files with 47 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
<html lang="en" data-theme="halloween">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<meta name="viewport" content="width=device-width" />
<meta name="url" property="og:url" content="https://risorse.students.cs.unibo.it" />
<meta name="type" property="og:type" content="website" />
%sveltekit.head%
</head>

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/lib/assets/risorse.students.cs.unibo.it.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/lib/assets/unibo128.ico
Binary file not shown.
Binary file added src/lib/assets/unibo128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/lib/assets/unibo180.ico
Binary file not shown.
Binary file added src/lib/assets/unibo180.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/lib/assets/unibo192.ico
Binary file not shown.
Binary file added src/lib/assets/unibo192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/lib/assets/unibo32.ico
Binary file not shown.
Binary file added src/lib/assets/unibo512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/lib/settings.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { persisted } from 'svelte-local-storage-store';

export const themes = ['halloween', 'retro'] as const;
export const themes = ['halloween', 'retro', 'dracula'] as const;
type Theme = (typeof themes)[number];

export interface Settings {
Expand Down
28 changes: 28 additions & 0 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,36 @@
document.firstElementChild!.setAttribute('data-theme', $settings.theme);
});
});
import unibo32ico from '$lib/assets/unibo32.ico';
import unibo128ico from '$lib/assets/unibo128.ico';
import unibo180ico from '$lib/assets/unibo180.ico';
import unibo192ico from '$lib/assets/unibo192.ico';
import unibo128png from '$lib/assets/unibo128.png';
import unibo180png from '$lib/assets/unibo180.png';
import unibo192png from '$lib/assets/unibo192.png';
import unibo512png from '$lib/assets/unibo512.png';
import ogImage from '$lib/assets/risorse.students.cs.unibo.it.png';
import ogImagerec from '$lib/assets/risorse.students.cs.unibo.it-rec.png';
</script>

<svelte:head>
<link rel="icon" href={unibo32ico} sizes="32x32" />
<link rel="icon" href={unibo128ico} sizes="128x128" />
<link rel="icon" href={unibo180ico} sizes="180x180" />
<link rel="icon" href={unibo192ico} sizes="192x192" />

<link rel="icon" href={unibo128png} sizes="128x128" />
<link rel="icon" href={unibo180png} sizes="180x180" />
<link rel="icon" href={unibo192png} sizes="192x192" />
<link rel="icon" href={unibo512png} sizes="512x512" />

<meta name="image" property="og:image" content={ogImage} />
<meta property="og:image:height" content="512" />
</svelte:head>

<slot />

<style>
Expand Down
8 changes: 6 additions & 2 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@
</script>

<svelte:head>
<title>Dynamik | Homepage</title>
<title>CSUnibo | Homepage</title>
<!-- OG meta graph -->
<meta name="title" property="og:title" content="Risorse CSUnibo" />
<meta name="type" property="og:type" content="website" />
<meta name="description" property="og:description" content="Risorse per gli studenti dei corsi di laurea del dipartimento di informatica (DISI) dell'Università di Bologna"/>
</svelte:head>

<div class="flex justify-center">
<div class="container max-w-5xl">
<h1 class="text-4xl m-10 font-semibold text-center">Benvenuto su Dynamik! 👋</h1>
<h1 class="text-4xl m-10 font-semibold text-center">Benvenuto su CSUnibo!</h1>

<ul class="menu p-2 text-lg">
{#each data.courses as course}
Expand Down
10 changes: 9 additions & 1 deletion src/routes/dash/[course]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,15 @@
</script>

<svelte:head>
<title>Dynamik | {data.course?.name}</title>
<title>Risorse CSUnibo | {data.course?.name}</title>
<!-- OG meta graph -->
<meta name="title" property="og:title" content="Risorse CSUnibo | {data.course?.name}" />
<meta
name="url"
property="og:url"
content="https://risorse.students.cs.unibo.it/{data.course?.name}"
/>
<meta name="description" property="og:description" content="Risorse di {data.course?.name}" />
</svelte:head>

{#if !data.course}
Expand Down
Binary file removed static/favicon.png
Binary file not shown.
2 changes: 1 addition & 1 deletion tailwind.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ module.exports = {
},
plugins: [require('@tailwindcss/typography'), require('daisyui'), addDynamicIconSelectors()],
daisyui: {
themes: ['halloween', 'retro']
themes: ['halloween', 'retro', 'dracula']
}
};

1 comment on commit 6ba6a02

@vercel
Copy link

@vercel vercel bot commented on 6ba6a02 Oct 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

dynamik – ./

dynamik-git-main-csunibo.vercel.app
dynamik-csunibo.vercel.app
dynamik.vercel.app

Please sign in to comment.