1
Fork 0
mirror of https://github.com/Steffo99/steffoweb.git synced 2024-11-22 08:04:31 +00:00
This commit is contained in:
Steffo 2020-09-01 19:50:36 +02:00
parent afd5715bd3
commit c2093b8d03
42 changed files with 146 additions and 59 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
node_modules node_modules
/*.log /*.log
.idea/ .idea/
.sentryclirc

View file

@ -0,0 +1,12 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Build, publish and submit everything" type="js.build_tools.npm">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="all" />
</scripts>
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
</component>

View file

@ -0,0 +1,12 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Start development server" type="js.build_tools.npm">
<package-json value="$PROJECT_DIR$/package.json" />
<command value="run" />
<scripts>
<script value="start" />
</scripts>
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
</component>

View file

@ -1,3 +0,0 @@
[defaults]
org=stefano-pigozzi
project=steffoeu

View file

@ -1,3 +1,28 @@
# [`steffo.eu`](https://steffo.eu) # ![Steffoweb](src/assets/opengraph.png)
My personal website in [Preact](https://preactjs.com/). My personal website in [Preact](https://preactjs.com/).
![maintenance: actively-developed](https://img.shields.io/badge/maintenance-actively--developed-brightgreen)
## Developing
### Running a local copy
If you want to run a local copy of the website, ensure [the latest `nodejs`](https://nodejs.org/it/) and `npm` are installed on your machine then run:
```bash
git clone https://github.com/Steffo99/uni.steffo.eu.git
cd "uni.steffo.eu"
npm install --dev
npm run start
```
### Updating the website
To update the published website, bump up the version number in the package.json and run in the previously cloned folder:
```bash
npm run all
```
[GitHub Pages](https://pages.github.com/) will do the rest.

View file

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

View file

@ -1,6 +1,6 @@
{ {
"name": "Steffo's website", "name": "Steffo's website",
"short_name": "Steffo", "short_name": "Steffoweb",
"start_url": "/", "start_url": "/",
"display": "browser", "display": "browser",
"orientation": "portrait", "orientation": "portrait",
@ -9,8 +9,7 @@
"icons": [ "icons": [
{ {
"src": "/favicon.ico", "src": "/favicon.ico",
"type": "image/x-icon", "type": "image/x-icon"
"sizes": "800x800"
} }
] ]
} }

BIN
docs/assets/opengraph.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

File diff suppressed because one or more lines are too long

View file

@ -1 +0,0 @@
/*! For license information please see bundle.28714.esm.js.LICENSE.txt */

File diff suppressed because one or more lines are too long

3
docs/bundle.ead42.esm.js vendored Normal file

File diff suppressed because one or more lines are too long

1
docs/bundle.ead42.esm.js.LICENSE.txt vendored Normal file
View file

@ -0,0 +1 @@
/*! For license information please see bundle.ead42.esm.js.LICENSE.txt */

View file

@ -1 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","file":"bundle.28714.esm.js","sourceRoot":""} {"version":3,"sources":[],"names":[],"mappings":"","file":"bundle.ead42.esm.js","sourceRoot":""}

3
docs/bundle.fbd11.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

2
docs/index.html vendored
View file

@ -1 +1 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><title>Steffo's website</title><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="/favicon.ico" type="image/x-icon"><link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"><style>body{background-color:#0d193b}</style><link rel="manifest" href="/manifest.json"><link href="/bundle.d9419.css" rel="preload" as="style"><noscript><link rel="stylesheet" href="/bundle.d9419.css"></noscript><script>function $loadcss(u,m,l){(l=document.createElement('link')).rel='stylesheet';l.href=u;document.head.appendChild(l)}$loadcss("/bundle.d9419.css")</script></head><body><script type="__PREACT_CLI_DATA__">{"preRenderData":{"url":"/"}}</script><script nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" src="/bundle.28714.esm.js" type="module"></script><script nomodule="" src="/polyfills.51c23.js"></script><script nomodule="" defer="defer" src="/bundle.82d0f.js"></script></body></html> <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><title>steffoweb</title><meta name="viewport" content="width=device-width,initial-scale=1"><meta property="og:image" content="/assets/opengraph.png"><link href="/src/assets/favicon.ico" rel="icon" type="image/x-icon"><link href="/src/assets/favicon.ico" rel="shortcut icon" type="image/x-icon"><style>body{background-color:#0d193b}</style><link rel="manifest" href="/manifest.json"><link rel="shortcut icon" href="/favicon.ico"><link href="/bundle.d9419.css" rel="preload" as="style"><noscript><link rel="stylesheet" href="/bundle.d9419.css"></noscript><script>function $loadcss(u,m,l){(l=document.createElement('link')).rel='stylesheet';l.href=u;document.head.appendChild(l)}$loadcss("/bundle.d9419.css")</script></head><body><script type="__PREACT_CLI_DATA__">{"preRenderData":{"url":"/"}}</script><script nomodule="">!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()},!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script><script crossorigin="anonymous" src="/bundle.ead42.esm.js" type="module"></script><script nomodule="" src="/polyfills.f79b3.js"></script><script nomodule="" defer="defer" src="/bundle.fbd11.js"></script></body></html>

25
docs/manifest.json vendored
View file

@ -1,14 +1,15 @@
{ {
"name": "preact-cli app", "name": "Steffo's website",
"start_url": "/", "short_name": "Steffoweb",
"display": "standalone", "start_url": "/",
"background_color": "#fff", "display": "browser",
"theme_color": "#673ab8", "orientation": "portrait",
"icons": [ "background_color": "#0d193b",
{ "theme_color": "#1c2b4f",
"src": "/assets/icon.png", "icons": [
"type": "image/png", {
"sizes": "512x512" "src": "/favicon.ico",
} "type": "image/x-icon"
] }
]
} }

BIN
docs/opengraph.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
{"version":3,"sources":[],"names":[],"mappings":"","file":"polyfills.f5562.esm.js","sourceRoot":""} {"version":3,"sources":[],"names":[],"mappings":"","file":"polyfills.24554.esm.js","sourceRoot":""}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
{"/":{"bundle.d9419.css":{"type":"style","weight":1},"bundle.28714.esm.js":{"type":"script","weight":1}},"/Home":{"bundle.d9419.css":{"type":"style","weight":1},"bundle.28714.esm.js":{"type":"script","weight":1},"route-Home.chunk.57d0a.esm.js":{"type":"script","weight":0.9},"route-Home.chunk.fec23.css":{"type":"style","weight":0.9}}} {"/":{"bundle.d9419.css":{"type":"style","weight":1},"bundle.ead42.esm.js":{"type":"script","weight":1}},"/Home":{"bundle.d9419.css":{"type":"style","weight":1},"bundle.ead42.esm.js":{"type":"script","weight":1},"route-Home.chunk.57d0a.esm.js":{"type":"script","weight":0.9},"route-Home.chunk.fec23.css":{"type":"style","weight":0.9}}}

2
docs/sw-esm.js vendored

File diff suppressed because one or more lines are too long

2
docs/sw-esm.js.map vendored

File diff suppressed because one or more lines are too long

2
docs/sw.js vendored

File diff suppressed because one or more lines are too long

2
docs/sw.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -1,37 +1,56 @@
{ {
"private": true,
"name": "steffoweb", "name": "steffoweb",
"version": "0.2.0", "version": "1.0.0",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"private": false,
"repository": "https://github.com/Steffo99/steffoweb",
"files": [
"src/**/*"
],
"source": "src/index.js",
"directories": {
"lib": "src"
},
"scripts": { "scripts": {
"start": "preact watch --template src/template.html", "start": "preact watch --template src/template.html",
"build": "preact build --template src/template.html --no-prerender --dest docs && git add docs", "build": "echo \"Building the package...\" && preact build --template src/template.html --no-prerender --dest docs && git add docs",
"ghpages": "npm run -s build && git add . && cross-env-shell git commit -m \"$npm_package_version\" && git push && cross-env-shell hub release create -m \"$npm_package_version\" \"$npm_package_version\" && cross-env-shell sentry-cli releases set-commits \"$npm_package_version\" --auto && cross-env-shell sentry-cli releases deploys \"$npm_package_version\" new --env production -n \"gh-pages\"" "github": "echo \"Publishing to GitHub...\" && git add . && cross-env-shell git commit -m \"$npm_package_version\" && git push && cross-env-shell hub release create -m \"$npm_package_version\" \"$npm_package_version\"",
"sentry": "echo \"Sending data to Sentry...\" && cross-env-shell sentry-cli releases set-commits \"$npm_package_version\" --auto && cross-env-shell sentry-cli releases deploys \"$npm_package_version\" new --env production -n \"gh-pages\"",
"all": "npm run -s build && npm run -s github && npm publish && npm run -s sentry"
}, },
"devDependencies": { "devDependencies": {
"@sentry/webpack-plugin": "^1.12.1", "@sentry/webpack-plugin": "^1.11.1",
"cross-env": "^7.0.2", "cross-env": "^7.0.2",
"preact-cli": "3.0.0-rc.14" "preact-cli": "^3.0.0-rc.14"
}, },
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-svg-core": "^1.2.29", "@fortawesome/fontawesome-svg-core": "^1.2.29",
"@fortawesome/free-brands-svg-icons": "^5.13.1", "@fortawesome/free-brands-svg-icons": "^5.13.1",
"@fortawesome/free-regular-svg-icons": "^5.13.1", "@fortawesome/free-regular-svg-icons": "^5.13.1",
"@fortawesome/free-solid-svg-icons": "^5.13.1", "@fortawesome/free-solid-svg-icons": "^5.13.1",
"@fortawesome/react-fontawesome": "^0.1.11", "@fortawesome/react-fontawesome": "^0.1.11",
"@sentry/browser": "^5.22.3", "@sentry/browser": "^5.19.0",
"@sentry/integrations": "^5.22.3", "@sentry/integrations": "^5.19.0",
"bluelib": "^0.15.2", "bluelib": "0.15.2",
"chart.js": "^2.9.3",
"css-loader": "^3.6.0", "css-loader": "^3.6.0",
"file-loader": "^5.1.0", "file-loader": "^5.1.0",
"history": "^4.10.1", "history": "^4.10.1",
"less": "^3.11.3", "less": "^3.11.3",
"less-loader": "^5.0.0", "less-loader": "^5.0.0",
"path-browserify": "^1.0.1", "path-browserify": "^1.0.1",
"preact": "^10.4.8", "preact": "^10.4.5",
"preact-render-to-string": "^5.1.9", "preact-render-to-string": "^5.1.9",
"preact-router": "^3.2.1", "preact-router": "^3.2.1",
"process": "^0.11.10", "process": "^0.11.10",
"react-chartjs-2": "^2.9.0",
"react-markdown": "^4.3.1",
"react-simplemde-editor": "^4.1.0",
"style-loader": "^1.1.4" "style-loader": "^1.1.4"
} }
} }

View file

@ -1,4 +1,5 @@
import SentryCliPlugin from "@sentry/webpack-plugin"; import SentryCliPlugin from "@sentry/webpack-plugin";
const DefinePlugin = require("webpack/lib/DefinePlugin"); const DefinePlugin = require("webpack/lib/DefinePlugin");
const ProvidePlugin = require("webpack/lib/ProvidePlugin"); const ProvidePlugin = require("webpack/lib/ProvidePlugin");
@ -39,6 +40,13 @@ export default function (config, env, helpers) {
} }
); );
config.plugins[16].patterns.shift();
config.plugins[16].patterns.shift();
config.plugins[16].patterns.push({
from: "assets",
to: ""
});
config.plugins.push( config.plugins.push(
new DefinePlugin({"process.env.RELEASE": `"${process.env.npm_package_version}"`}) new DefinePlugin({"process.env.RELEASE": `"${process.env.npm_package_version}"`})
); );
@ -47,7 +55,7 @@ export default function (config, env, helpers) {
new ProvidePlugin({"process": "process/browser"}) new ProvidePlugin({"process": "process/browser"})
); );
if(env.production) { if (env.production) {
config.plugins.push( config.plugins.push(
new SentryCliPlugin({ new SentryCliPlugin({
include: './docs', include: './docs',

View file

@ -1 +1 @@
[{"timestamp":1598833793392,"files":[{"filename":"sw-esm.js","previous":741,"size":8482,"diff":7741},{"filename":"sw.js","previous":738,"size":8478,"diff":7740},{"filename":"bundle.fd797.css","previous":1854,"size":0,"diff":-1854},{"filename":"route-Home.chunk.654b0.esm.js","previous":332,"size":0,"diff":-332},{"filename":"route-Home.chunk.654b0.js","previous":330,"size":0,"diff":-330},{"filename":"bundle.28643.esm.js","previous":365850,"size":0,"diff":-365850},{"filename":"polyfills.260b8.esm.js","previous":2090,"size":0,"diff":-2090},{"filename":"bundle.eed59.js","previous":365997,"size":0,"diff":-365997},{"filename":"polyfills.ce45e.js","previous":2090,"size":0,"diff":-2090},{"filename":"bundle.d9419.css","previous":0,"size":2416,"diff":2416},{"filename":"bundle.*****.esm.js","previous":0,"size":385175,"diff":385175},{"filename":"polyfills.*****.esm.js","previous":0,"size":2090,"diff":2090},{"filename":"route-Home.chunk.fec23.css","previous":0,"size":172,"diff":172},{"filename":"route-Home.chunk.*****.esm.js","previous":0,"size":1244,"diff":1244},{"filename":"bundle.82d0f.js","previous":0,"size":385723,"diff":385723},{"filename":"polyfills.51c23.js","previous":0,"size":2090,"diff":2090},{"filename":"route-Home.chunk.57d0a.js","previous":0,"size":1241,"diff":1241}]},{"timestamp":1593537360450,"files":[{"filename":"sw-esm.js","previous":741,"size":741,"diff":0},{"filename":"sw.js","previous":738,"size":738,"diff":0},{"filename":"bundle.fd797.css","previous":1854,"size":1854,"diff":0},{"filename":"bundle.9206d.esm.js","previous":365849,"size":0,"diff":-365849},{"filename":"polyfills.e99f0.esm.js","previous":2090,"size":0,"diff":-2090},{"filename":"route-Home.chunk.654b0.esm.js","previous":332,"size":332,"diff":0},{"filename":"bundle.23994.js","previous":365998,"size":0,"diff":-365998},{"filename":"polyfills.5a9ad.js","previous":2091,"size":0,"diff":-2091},{"filename":"route-Home.chunk.654b0.js","previous":330,"size":330,"diff":0},{"filename":"bundle.28643.esm.js","previous":0,"size":365850,"diff":365850},{"filename":"polyfills.260b8.esm.js","previous":0,"size":2090,"diff":2090},{"filename":"bundle.eed59.js","previous":0,"size":365997,"diff":365997},{"filename":"polyfills.ce45e.js","previous":0,"size":2090,"diff":2090}]},{"timestamp":1593537127919,"files":[{"filename":"sw-esm.js","previous":0,"size":741,"diff":741},{"filename":"sw.js","previous":0,"size":738,"diff":738},{"filename":"bundle.fd797.css","previous":0,"size":1854,"diff":1854},{"filename":"bundle.9206d.esm.js","previous":0,"size":365849,"diff":365849},{"filename":"polyfills.e99f0.esm.js","previous":0,"size":2090,"diff":2090},{"filename":"route-Home.chunk.654b0.esm.js","previous":0,"size":332,"diff":332},{"filename":"bundle.23994.js","previous":0,"size":365998,"diff":365998},{"filename":"polyfills.5a9ad.js","previous":0,"size":2091,"diff":2091},{"filename":"route-Home.chunk.654b0.js","previous":0,"size":330,"diff":330}]}] [{"timestamp":1598981154329,"files":[{"filename":"sw-esm.js","previous":8482,"size":8482,"diff":0},{"filename":"sw.js","previous":8478,"size":8478,"diff":0},{"filename":"bundle.d9419.css","previous":2416,"size":2416,"diff":0},{"filename":"bundle.*****.esm.js","previous":385175,"size":385120,"diff":-55},{"filename":"polyfills.*****.esm.js","previous":2090,"size":2090,"diff":0},{"filename":"route-Home.chunk.fec23.css","previous":172,"size":172,"diff":0},{"filename":"route-Home.chunk.*****.esm.js","previous":1244,"size":1244,"diff":0},{"filename":"bundle.82d0f.js","previous":385723,"size":0,"diff":-385723},{"filename":"polyfills.51c23.js","previous":2090,"size":0,"diff":-2090},{"filename":"route-Home.chunk.57d0a.js","previous":1241,"size":1241,"diff":0},{"filename":"bundle.fbd11.js","previous":0,"size":385639,"diff":385639},{"filename":"polyfills.f79b3.js","previous":0,"size":2091,"diff":2091}]},{"timestamp":1598833793392,"files":[{"filename":"sw-esm.js","previous":741,"size":8482,"diff":7741},{"filename":"sw.js","previous":738,"size":8478,"diff":7740},{"filename":"bundle.fd797.css","previous":1854,"size":0,"diff":-1854},{"filename":"route-Home.chunk.654b0.esm.js","previous":332,"size":0,"diff":-332},{"filename":"route-Home.chunk.654b0.js","previous":330,"size":0,"diff":-330},{"filename":"bundle.28643.esm.js","previous":365850,"size":0,"diff":-365850},{"filename":"polyfills.260b8.esm.js","previous":2090,"size":0,"diff":-2090},{"filename":"bundle.eed59.js","previous":365997,"size":0,"diff":-365997},{"filename":"polyfills.ce45e.js","previous":2090,"size":0,"diff":-2090},{"filename":"bundle.d9419.css","previous":0,"size":2416,"diff":2416},{"filename":"bundle.*****.esm.js","previous":0,"size":385175,"diff":385175},{"filename":"polyfills.*****.esm.js","previous":0,"size":2090,"diff":2090},{"filename":"route-Home.chunk.fec23.css","previous":0,"size":172,"diff":172},{"filename":"route-Home.chunk.*****.esm.js","previous":0,"size":1244,"diff":1244},{"filename":"bundle.82d0f.js","previous":0,"size":385723,"diff":385723},{"filename":"polyfills.51c23.js","previous":0,"size":2090,"diff":2090},{"filename":"route-Home.chunk.57d0a.js","previous":0,"size":1241,"diff":1241}]},{"timestamp":1593537360450,"files":[{"filename":"sw-esm.js","previous":741,"size":741,"diff":0},{"filename":"sw.js","previous":738,"size":738,"diff":0},{"filename":"bundle.fd797.css","previous":1854,"size":1854,"diff":0},{"filename":"bundle.9206d.esm.js","previous":365849,"size":0,"diff":-365849},{"filename":"polyfills.e99f0.esm.js","previous":2090,"size":0,"diff":-2090},{"filename":"route-Home.chunk.654b0.esm.js","previous":332,"size":332,"diff":0},{"filename":"bundle.23994.js","previous":365998,"size":0,"diff":-365998},{"filename":"polyfills.5a9ad.js","previous":2091,"size":0,"diff":-2091},{"filename":"route-Home.chunk.654b0.js","previous":330,"size":330,"diff":0},{"filename":"bundle.28643.esm.js","previous":0,"size":365850,"diff":365850},{"filename":"polyfills.260b8.esm.js","previous":0,"size":2090,"diff":2090},{"filename":"bundle.eed59.js","previous":0,"size":365997,"diff":365997},{"filename":"polyfills.ce45e.js","previous":0,"size":2090,"diff":2090}]},{"timestamp":1593537127919,"files":[{"filename":"sw-esm.js","previous":0,"size":741,"diff":741},{"filename":"sw.js","previous":0,"size":738,"diff":738},{"filename":"bundle.fd797.css","previous":0,"size":1854,"diff":1854},{"filename":"bundle.9206d.esm.js","previous":0,"size":365849,"diff":365849},{"filename":"polyfills.e99f0.esm.js","previous":0,"size":2090,"diff":2090},{"filename":"route-Home.chunk.654b0.esm.js","previous":0,"size":332,"diff":332},{"filename":"bundle.23994.js","previous":0,"size":365998,"diff":365998},{"filename":"polyfills.5a9ad.js","previous":0,"size":2091,"diff":2091},{"filename":"route-Home.chunk.654b0.js","previous":0,"size":330,"diff":330}]}]

0
src/assets/.nojekyll Normal file
View file

1
src/assets/CNAME Normal file
View file

@ -0,0 +1 @@
steffo.eu

BIN
src/assets/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

15
src/assets/manifest.json Normal file
View file

@ -0,0 +1,15 @@
{
"name": "Steffo's website",
"short_name": "Steffoweb",
"start_url": "/",
"display": "browser",
"orientation": "portrait",
"background_color": "#0d193b",
"theme_color": "#1c2b4f",
"icons": [
{
"src": "/favicon.ico",
"type": "image/x-icon"
}
]
}

BIN
src/assets/opengraph.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 KiB

View file

@ -29,10 +29,6 @@ import Home from "./routes/Home";
// noinspection ES6UnusedImports // noinspection ES6UnusedImports
import "bluelib/dist/index.css"; import "bluelib/dist/index.css";
import './meta/manifest.json';
import './meta/CNAME';
import './meta/.nojekyll';
import './meta/favicon.ico';
import {BasicContainer, CurrentPage, Bluelib, BaseLink} from 'bluelib'; import {BasicContainer, CurrentPage, Bluelib, BaseLink} from 'bluelib';
import Footer from "./components/Footer"; import Footer from "./components/Footer";

View file

@ -2,10 +2,11 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Steffo's website</title> <title><% preact.title %></title>
<meta name="viewport" content="width=device-width,initial-scale=1"> <meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="icon" href="/favicon.ico" type="image/x-icon"/> <meta property="og:image" content="/assets/opengraph.png" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon"/> <link href="/src/assets/favicon.ico" rel="icon" type="image/x-icon"/>
<link href="/src/assets/favicon.ico" rel="shortcut icon" type="image/x-icon"/>
<style> <style>
body { body {
background-color: #0d193b; background-color: #0d193b;