Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add csunibo favicon and link preview #87

Merged
merged 14 commits into from
Oct 4, 2023
1 change: 0 additions & 1 deletion src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<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" />
%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/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';
</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 name="url" property="og:url" content="https://risorse.students.cs.unibo.it" />
<meta name="type" property="og:type" content="website" />
ali-benny marked this conversation as resolved.
Show resolved Hide resolved
</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 @@ -8,12 +8,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
15 changes: 13 additions & 2 deletions src/routes/dash/[course]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,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 Expand Up @@ -75,7 +83,10 @@
{/if}
</a>
{#if teaching.telegram}
<a href="https://t.me/{teaching.telegram}" class="text-center text-lg join-item border-l-2">👥</a>
<a
href="https://t.me/{teaching.telegram}"
class="text-center text-lg join-item border-l-2">👥</a
>
{/if}
</li>
{/each}
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']
}
};
Loading