fixed build error, updated packages and astro, minor code updates
This commit is contained in:
Generated
+12527
-11121
File diff suppressed because it is too large
Load Diff
+4
-4
@@ -11,8 +11,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/check": "^0.9.4",
|
"@astrojs/check": "^0.9.4",
|
||||||
"@astrojs/node": "9.0.0",
|
"@astrojs/node": "^9.4.3",
|
||||||
"@astrojs/preact": "4.0.0",
|
"@astrojs/preact": "^4.1.1",
|
||||||
"@fontsource-variable/material-symbols-outlined": "^5.1.1",
|
"@fontsource-variable/material-symbols-outlined": "^5.1.1",
|
||||||
"@fontsource/iosevka": "^5.0.11",
|
"@fontsource/iosevka": "^5.0.11",
|
||||||
"@fontsource/mononoki": "^5.0.11",
|
"@fontsource/mononoki": "^5.0.11",
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
"@phosphor-icons/react": "^2.1.7",
|
"@phosphor-icons/react": "^2.1.7",
|
||||||
"@preact/signals": "^1.3.0",
|
"@preact/signals": "^1.3.0",
|
||||||
"@types/jsdom": "^21.1.7",
|
"@types/jsdom": "^21.1.7",
|
||||||
"astro": "5.1.0",
|
"astro": "^5.13.7",
|
||||||
"fuse.js": "^7.0.0",
|
"fuse.js": "^7.0.0",
|
||||||
"katex": "^0.16.9",
|
"katex": "^0.16.9",
|
||||||
"lucide-static": "^0.468.0",
|
"lucide-static": "^0.468.0",
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
"typescript": "^5.3.3"
|
"typescript": "^5.3.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@astrojs/mdx": "4.0.2",
|
"@astrojs/mdx": "^4.3.5",
|
||||||
"@rollup/plugin-yaml": "^4.1.2",
|
"@rollup/plugin-yaml": "^4.1.2",
|
||||||
"@types/katex": "^0.16.7",
|
"@types/katex": "^0.16.7",
|
||||||
"jsdom": "^24.1.1",
|
"jsdom": "^24.1.1",
|
||||||
|
|||||||
@@ -41,7 +41,13 @@ export const ComboBox = ({
|
|||||||
<PhosphorIcon name="caret-down" />
|
<PhosphorIcon name="caret-down" />
|
||||||
</div>
|
</div>
|
||||||
{open && (
|
{open && (
|
||||||
<div class={clsx('dropdown', cloak && 'invisible')} ref={el => el && setItemWidth(el.offsetWidth)}>
|
<div
|
||||||
|
class={clsx('dropdown', cloak && 'invisible')}
|
||||||
|
ref={el => {
|
||||||
|
if (!el) return
|
||||||
|
setItemWidth(el.offsetWidth)
|
||||||
|
}}
|
||||||
|
>
|
||||||
{Object.keys(children).map(key => (
|
{Object.keys(children).map(key => (
|
||||||
<div
|
<div
|
||||||
class="option"
|
class="option"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useEffect, useState } from 'preact/hooks'
|
import { useEffect, useState } from 'preact/hooks'
|
||||||
import { Funnel } from '@phosphor-icons/react'
|
import { FunnelIcon } from '@phosphor-icons/react'
|
||||||
import { marked } from 'marked'
|
import { marked } from 'marked'
|
||||||
|
|
||||||
import extendedLatex from '@/client/lib/marked-latex'
|
import extendedLatex from '@/client/lib/marked-latex'
|
||||||
@@ -70,7 +70,7 @@ export const DomandeEsamiCourse = ({ course }: Props) => {
|
|||||||
{courseTags.length > 1 && (
|
{courseTags.length > 1 && (
|
||||||
<div class="card filter">
|
<div class="card filter">
|
||||||
<div class="grid-h">
|
<div class="grid-h">
|
||||||
<Funnel />
|
<FunnelIcon />
|
||||||
<strong>Filtra Tag</strong>
|
<strong>Filtra Tag</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex-row-wrap">
|
<div class="flex-row-wrap">
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { useState, useEffect } from 'preact/hooks'
|
import { useState, useEffect } from 'preact/hooks'
|
||||||
import { render } from 'preact'
|
|
||||||
|
|
||||||
// Tipi per la gestione dei dati
|
// Tipi per la gestione dei dati
|
||||||
type TipoStudente = 'triennale' | 'magistrale'
|
type TipoStudente = 'triennale' | 'magistrale'
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const extBlock = options => ({
|
|||||||
start(src) {
|
start(src) {
|
||||||
return src.match(/\$\$[^\$]/)?.index ?? -1
|
return src.match(/\$\$[^\$]/)?.index ?? -1
|
||||||
},
|
},
|
||||||
tokenizer(src, tokens) {
|
tokenizer(src, _tokens) {
|
||||||
const match = /^\$\$([^\$]+)\$\$/.exec(src)
|
const match = /^\$\$([^\$]+)\$\$/.exec(src)
|
||||||
return match ? { type: 'latex-block', raw: match[0], formula: match[1] } : undefined
|
return match ? { type: 'latex-block', raw: match[0], formula: match[1] } : undefined
|
||||||
},
|
},
|
||||||
@@ -25,7 +25,7 @@ const extInline = options => ({
|
|||||||
start(src) {
|
start(src) {
|
||||||
return src.match(/\$[^\$]/)?.index ?? -1
|
return src.match(/\$[^\$]/)?.index ?? -1
|
||||||
},
|
},
|
||||||
tokenizer(src, tokens) {
|
tokenizer(src, _tokens) {
|
||||||
const match = /^\$([^\$]+)\$/.exec(src)
|
const match = /^\$([^\$]+)\$/.exec(src)
|
||||||
return match ? { type: 'latex', raw: match[0], formula: match[1] } : undefined
|
return match ? { type: 'latex', raw: match[0], formula: match[1] } : undefined
|
||||||
},
|
},
|
||||||
|
|||||||
+12
-12
@@ -32,17 +32,17 @@ const guidesCollection = defineCollection({
|
|||||||
})
|
})
|
||||||
|
|
||||||
// Per ora sono su un sito a parte ma prima o poi verranno migrati qui
|
// Per ora sono su un sito a parte ma prima o poi verranno migrati qui
|
||||||
const seminariettiCollection = defineCollection({
|
// const seminariettiCollection = defineCollection({
|
||||||
type: 'content',
|
// type: 'content',
|
||||||
schema: z.object({
|
// schema: z.object({
|
||||||
title: z.string(),
|
// title: z.string(),
|
||||||
description: z.string(),
|
// description: z.string(),
|
||||||
author: z.string(),
|
// author: z.string(),
|
||||||
publishDate: z.date(),
|
// publishDate: z.date(),
|
||||||
eventDate: z.date(),
|
// eventDate: z.date(),
|
||||||
tags: z.array(z.string()),
|
// tags: z.array(z.string()),
|
||||||
}),
|
// }),
|
||||||
})
|
// })
|
||||||
|
|
||||||
const metaCollection = defineCollection({
|
const metaCollection = defineCollection({
|
||||||
type: 'content',
|
type: 'content',
|
||||||
@@ -53,6 +53,6 @@ const metaCollection = defineCollection({
|
|||||||
export const collections = {
|
export const collections = {
|
||||||
news: newsCollection,
|
news: newsCollection,
|
||||||
guides: guidesCollection,
|
guides: guidesCollection,
|
||||||
seminarietti: seminariettiCollection,
|
// seminarietti: seminariettiCollection,
|
||||||
meta: metaCollection,
|
meta: metaCollection,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,16 +11,16 @@ Visti gli imminenti lavori che occuperanno l'aula studenti, ad inizio Settembre
|
|||||||
|
|
||||||
<div class="grid-h-split">
|
<div class="grid-h-split">
|
||||||
<video controls>
|
<video controls>
|
||||||
<source src="https://static.phc.dm.unipi.it/timelapse-sud.mp4" type="video/mp4">
|
<source src="https://static.phc.dm.unipi.it/timelapse-nord.mp4" type="video/mp4">
|
||||||
Your browser does not support the video tag.
|
Your browser does not support the video tag.
|
||||||
</video>
|
</video>
|
||||||
<video controls>
|
<video controls>
|
||||||
<source src="https://static.phc.dm.unipi.it/timelapse-nord.mp4" type="video/mp4">
|
<source src="https://static.phc.dm.unipi.it/timelapse-sud.mp4" type="video/mp4">
|
||||||
Your browser does not support the video tag.
|
Your browser does not support the video tag.
|
||||||
</video>
|
</video>
|
||||||
<video controls>
|
<video controls>
|
||||||
<source src="https://static.phc.dm.unipi.it/timelapse-termosifone.mp4" type="video/mp4">
|
<source src="https://static.phc.dm.unipi.it/timelapse-termosifone.mp4" type="video/mp4">
|
||||||
Your browser does not support the video tag.
|
Your browser does not support the video tag.
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
+11
-5
@@ -11,7 +11,11 @@ import Card from '@/components/Card.astro'
|
|||||||
|
|
||||||
const news = await getCollection('news')
|
const news = await getCollection('news')
|
||||||
|
|
||||||
const galleryCollage = await Astro.glob('@/assets/gallery/*.jpg')
|
// const galleryCollage = await Astro.glob('@/assets/gallery/*.jpg')
|
||||||
|
|
||||||
|
const galleryCollage: { default: ImageMetadata }[] = Object.values(
|
||||||
|
import.meta.glob('@/assets/gallery/*.jpg', { eager: true }),
|
||||||
|
)
|
||||||
---
|
---
|
||||||
|
|
||||||
<PageLayout title="PHC" pageTags="homepage">
|
<PageLayout title="PHC" pageTags="homepage">
|
||||||
@@ -200,14 +204,16 @@ const galleryCollage = await Astro.glob('@/assets/gallery/*.jpg')
|
|||||||
{
|
{
|
||||||
galleryCollage.map((module, i) => {
|
galleryCollage.map((module, i) => {
|
||||||
const src = module.default.src
|
const src = module.default.src
|
||||||
const filename = src.split('/').at(-1).split('?').at(0).split('.').at(0)
|
const filename = src.split('/').at(-1)?.split('?').at(0)?.split('.').at(0)
|
||||||
|
|
||||||
|
if (!filename) return null
|
||||||
|
|
||||||
const [rows, cols] = filename.includes('@')
|
const [rows, cols] = filename.includes('@')
|
||||||
? filename
|
? (filename
|
||||||
.split('@')
|
.split('@')
|
||||||
.at(-1)
|
.at(-1)
|
||||||
.split('x')
|
?.split('x')
|
||||||
.map((s: string) => parseInt(s))
|
.map((s: string) => parseInt(s)) ?? [1, 1])
|
||||||
: [1, 1]
|
: [1, 1]
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user