Add tooltips with the names of the events

This commit is contained in:
Tom Hubrecht 2022-07-26 02:34:18 +02:00
parent b7aa57c149
commit 1561f8d350
4 changed files with 1704 additions and 1788 deletions

3471
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -14,6 +14,7 @@
"@rollup/plugin-commonjs": "^17.0.0", "@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-json": "^4.1.0", "@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^11.0.0", "@rollup/plugin-node-resolve": "^11.0.0",
"@rollup/plugin-replace": "^4.0.0",
"dav": "^1.8.0", "dav": "^1.8.0",
"postcss": "^8.3.11", "postcss": "^8.3.11",
"prettier": "^2.4.1", "prettier": "^2.4.1",
@ -36,6 +37,7 @@
"@fullcalendar/list": "^5.10.1", "@fullcalendar/list": "^5.10.1",
"@fullcalendar/resource-timeline": "^5.10.1", "@fullcalendar/resource-timeline": "^5.10.1",
"@fullcalendar/rrule": "^5.10.1", "@fullcalendar/rrule": "^5.10.1",
"@rollup/plugin-replace": "^4.0.0",
"@nextcloud/cdav-library": "^1.0.0", "@nextcloud/cdav-library": "^1.0.0",
"bootstrap": "^5.1.3", "bootstrap": "^5.1.3",
"bootstrap-icons": "^1.8.1", "bootstrap-icons": "^1.8.1",

View file

@ -7,7 +7,8 @@ import css from 'rollup-plugin-css-only'
import postcss from 'rollup-plugin-postcss' import postcss from 'rollup-plugin-postcss'
import dev from 'rollup-plugin-dev' import dev from 'rollup-plugin-dev'
import copy from 'rollup-plugin-copy' import copy from 'rollup-plugin-copy'
import json from '@rollup/plugin-json'; import json from '@rollup/plugin-json'
import replace from '@rollup/plugin-replace'
const production = !process.env.ROLLUP_WATCH const production = !process.env.ROLLUP_WATCH
@ -42,6 +43,9 @@ export default {
file: 'public/build/bundle.js' file: 'public/build/bundle.js'
}, },
plugins: [ plugins: [
replace({
'process.env.NODE_ENV': JSON.stringify(production ? 'production' : 'dev')
}),
svelte({ svelte({
compilerOptions: { compilerOptions: {
// enable run-time checks when not in production // enable run-time checks when not in production
@ -100,7 +104,6 @@ export default {
from: '/cal/frama-agenda', from: '/cal/frama-agenda',
to: 'https://framagenda.org/remote.php/dav/public-calendars/' to: 'https://framagenda.org/remote.php/dav/public-calendars/'
} }
], ],
port: 5000 port: 5000
}), }),

View file

@ -18,6 +18,9 @@
import 'bootstrap/dist/css/bootstrap.css'; import 'bootstrap/dist/css/bootstrap.css';
import 'bootstrap-icons/font/bootstrap-icons.css'; import 'bootstrap-icons/font/bootstrap-icons.css';
import bootstrap5Plugin from '@fullcalendar/bootstrap5'; import bootstrap5Plugin from '@fullcalendar/bootstrap5';
import { Tooltip } from 'bootstrap';
import { createPopper } from '@popperjs/core';
import ENSLocations from './static-ens-locations.json'; import ENSLocations from './static-ens-locations.json';
@ -92,7 +95,13 @@
themeSystem: 'bootstrap5', themeSystem: 'bootstrap5',
nextDayThreshold: '05:00:00', nextDayThreshold: '05:00:00',
progressiveEventRendering: true, progressiveEventRendering: true,
expandRows: true expandRows: true,
eventDidMount: info => {
new Tooltip(info.el, {
title: info.event.extendedProps.short_name,
placement: 'top'
});
}
}); });
const flatten = d => { const flatten = d => {
@ -164,7 +173,6 @@
margin-bottom: 0 !important; margin-bottom: 0 !important;
} }
:global(.fc-toolbar-chunk:not(:last-child)) { :global(.fc-toolbar-chunk:not(:last-child)) {
margin-bottom: 0.25em; margin-bottom: 0.25em;
} }