diff --git a/.gitignore b/.gitignore index f535651..de24e6e 100644 --- a/.gitignore +++ b/.gitignore @@ -103,5 +103,16 @@ dist # TernJS port file .tern-port -# Build directory. +# Generated by Cargo +# will have compiled files and executables +/target/ + +# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries +# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html +Cargo.lock + +# These are backup files generated by rustfmt +**/*.rs.bk + +# Build directory public/ diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..9d1448b --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,25 @@ +# https://doc.rust-lang.org/cargo/reference/manifest.html + +[package] +name = "bauke-xyz" +description = "https://bauke.xyz" +version = "1.0.0" +edition = "2018" +repository = "https://git.holllo.cc/Bauke/bauke.xyz" +license = "AGPL-3.0-or-later" + +[[bin]] +name = "bauke-xyz" +path = "source/main.rs" + +[dependencies] +gloo-console = "0.1.0" +gloo-timers = "0.2.1" +log = "0.4.14" +rand = "0.8.4" +wasm-logger = "0.2.0" +yew = "0.18.0" + +[dependencies.getrandom] +version = "0.2.3" +features = ["js"] diff --git a/README.md b/README.md deleted file mode 100644 index 0522e77..0000000 --- a/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# bauke.xyz - -> My personal website. - -[![Netlify deploy status](https://api.netlify.com/api/v1/badges/37bb1f7c-2abb-419f-9a31-a4b72209c1c8/deploy-status)](https://app.netlify.com/sites/bauke/deploys) - -## Building - -To build the site [Node](https://nodejs.org) and [Yarn](https://yarnpkg.com) are required. - -Then, run `yarn build`. The site will be built to the `public/` directory. - -## License - -Code open-sourced with the [AGPL-3.0-or-later license](https://git.holllo.cc/Bauke/bauke.xyz/src/branch/main/LICENSE), content licensed under [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/). diff --git a/Trunk.toml b/Trunk.toml new file mode 100644 index 0000000..583715f --- /dev/null +++ b/Trunk.toml @@ -0,0 +1,9 @@ +[build] +dist = "public" + +[serve] +no_autoreload = false +port = 5500 + +[clean] +dist = "public" diff --git a/index.html b/index.html new file mode 100644 index 0000000..fde1bbb --- /dev/null +++ b/index.html @@ -0,0 +1,19 @@ + + + + + + + + bauke.xyz + + + + + + + + + diff --git a/package.json b/package.json index 0b00539..ba0a79c 100644 --- a/package.json +++ b/package.json @@ -1,57 +1,32 @@ { "name": "bauke.xyz", - "description": "My personal website.", - "version": "0.2.0", - "author": "Bauke ", - "homepage": "https://bauke.xyz", - "repository": "https://git.holllo.cc/Bauke/bauke.xyz", + "version": "0.0.0", "license": "AGPL-3.0-or-later", "scripts": { - "start": "nodemon --watch 'source/' --exec 'yarn build' --ext 'html scss'", - "build": "node 'source/index.js' && sass 'source/scss/':'public/css/'", - "test": "xo && stylelint 'source/scss/*.scss'", - "deploy": "rm -rf 'public/' && yarn build && yarn deploy:netlify", - "deploy:netlify": "netlify deploy --prod --dir 'public/' -s 37bb1f7c-2abb-419f-9a31-a4b72209c1c8" - }, - "dependencies": { - "modern-normalize": "^1.0.0", - "userscripts": "git+https://git.holllo.cc/Bauke/userscripts.git", - "userstyles": "git+https://git.holllo.cc/Bauke/userstyles.git" + "deploy": "trunk clean && trunk build --release && yarn deploy:netlify", + "deploy:netlify": "netlify deploy --prod --dir 'public/' -s bauke.xyz", + "test": "stylelint 'source/**/*.scss'" }, "devDependencies": { - "cpy": "^8.1.1", - "husky": "^4.3.0", - "netlify-cli": "^2.64.1", - "nodemon": "^2.0.4", - "nunjucks": "^3.2.2", - "sass": "^1.26.11", - "stylelint": "^13.7.2", - "stylelint-config-xo-scss": "^0.13.0", - "stylelint-config-xo-space": "^0.14.0", - "xo": "^0.33.1" + "netlify-cli": "^6.7.6", + "stylelint": "^13.13.1", + "stylelint-config-xo-scss": "^0.14.0", + "stylelint-config-xo-space": "^0.15.1" }, "stylelint": { "extends": [ "stylelint-config-xo-scss", "stylelint-config-xo-space" ], + "ignoreFiles": [ + "**/*.css" + ], "rules": { "at-rule-empty-line-before": null, "at-rule-no-unknown": null, - "no-descending-specificity": null - } - }, - "xo": { - "prettier": true, - "rules": { - "no-await-in-loop": "off" - }, - "space": true - }, - "husky": { - "hooks": { - "pre-commit": "yarn test", - "pre-push": "yarn test" + "no-descending-specificity": null, + "scss/at-import-partial-extension": null, + "scss/at-rule-no-unknown": null } } } diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..4c1eefa --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,2 @@ +max_width = 80 +tab_spaces = 2 diff --git a/source/components/mod.rs b/source/components/mod.rs new file mode 100644 index 0000000..17a8efa --- /dev/null +++ b/source/components/mod.rs @@ -0,0 +1,10 @@ +/// Contains the main page `