mirror of
https://github.com/Steffo99/unisteffo.git
synced 2025-02-16 15:53:58 +00:00
Aggiorna bluelib
This commit is contained in:
parent
027b66b846
commit
04859fe1f7
7 changed files with 447 additions and 308 deletions
691
package-lock.json
generated
691
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -21,7 +21,7 @@
|
|||
"@fortawesome/react-fontawesome": "^0.1.11",
|
||||
"@sentry/browser": "^5.19.0",
|
||||
"@sentry/integrations": "^5.19.0",
|
||||
"bluelib": "^0.13.14",
|
||||
"bluelib": "^0.14.2",
|
||||
"chart.js": "^2.9.3",
|
||||
"css-loader": "^3.6.0",
|
||||
"file-loader": "^5.1.0",
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
import { concatClass } from 'bluelib';
|
||||
import style from './BaseLink.less';
|
||||
import { useContext } from 'preact/hooks';
|
||||
import CurrentPage from '../contexts/CurrentPage';
|
||||
|
||||
export default function (props) {
|
||||
const currentPage = useContext(CurrentPage);
|
||||
|
||||
// Disabled
|
||||
if(props.disabled)
|
||||
{
|
||||
return (
|
||||
<span className={concatClass(style.link, style.disabled, props.class)}>{props.children}</span>
|
||||
);
|
||||
}
|
||||
|
||||
// Current page
|
||||
if(props.href === currentPage) {
|
||||
return (
|
||||
<span className={concatClass(style.link, style.current, props.class)}>{props.children}</span>
|
||||
);
|
||||
}
|
||||
|
||||
// Others
|
||||
return (
|
||||
<a className={concatClass(style.link, style.clickable, props.class)} href={props.href}>{props.children}</a>
|
||||
);
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
@import "../styles/constants.less";
|
||||
|
||||
.link {
|
||||
color: @link;
|
||||
|
||||
&.clickable {
|
||||
cursor: pointer;
|
||||
|
||||
&:hover {
|
||||
color: @linkhover;
|
||||
}
|
||||
|
||||
&:active {
|
||||
color: @linkactive;
|
||||
}
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
&.current {
|
||||
color: @accent;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
|
@ -10,8 +10,7 @@ import {
|
|||
} from '@fortawesome/free-brands-svg-icons';
|
||||
import {faExternalLinkAlt, faLockOpen, faMagnet, faMugHot, faQuestion} from '@fortawesome/free-solid-svg-icons';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
import BaseLink from './BaseLink';
|
||||
import {Fragment} from "preact";
|
||||
import {BaseLink} from 'bluelib';
|
||||
|
||||
const icons = Object.freeze({
|
||||
"github.com": faGithub,
|
||||
|
|
|
@ -45,7 +45,7 @@ import ApprendimentoSistemiArtificiali from "./routes/ApprendimentoSistemiArtifi
|
|||
import NetLogo from "./routes/NetLogo";
|
||||
import AlgoritmiEStruttureDati from "./routes/AlgoritmiEStruttureDati";
|
||||
import {useState} from "preact/hooks";
|
||||
import CurrentPage from './contexts/CurrentPage';
|
||||
import {CurrentPage} from 'bluelib';
|
||||
import Link from "./components/Link";
|
||||
|
||||
// noinspection JSUnusedGlobalSymbols
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import {Panel, Section, Todo} from "bluelib";
|
||||
import Link from "../components/Link";
|
||||
import BaseLink from "../components/BaseLink";
|
||||
import {BaseLink} from "bluelib";
|
||||
|
||||
|
||||
export default function(props) {
|
||||
|
|
Loading…
Add table
Reference in a new issue