Get rid of less

This commit is contained in:
Michal Vanko 2021-12-15 16:04:50 +01:00
parent d14d190bc2
commit b04399b463
10 changed files with 96 additions and 41 deletions

61
package-lock.json generated
View File

@ -33,7 +33,6 @@
"eslint": "^8.4.1", "eslint": "^8.4.1",
"eslint-config-prettier": "^8.3.0", "eslint-config-prettier": "^8.3.0",
"eslint-plugin-svelte3": "^3.2.1", "eslint-plugin-svelte3": "^3.2.1",
"less": "^3.11.3",
"prettier": "~2.5.1", "prettier": "~2.5.1",
"prettier-plugin-svelte": "^2.5.1", "prettier-plugin-svelte": "^2.5.1",
"svelte": "^3.44.2", "svelte": "^3.44.2",
@ -1277,7 +1276,8 @@
"version": "2.0.3", "version": "2.0.3",
"resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.3.tgz", "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.3.tgz",
"integrity": "sha512-GK6QUtisv4fNS+XcI7shX0Gx9ORg7QqIznyfho79JTnX1XhLiyZHfftvGiziqzRiEi/Bjhgpi+D2o7HxJFPnDQ==", "integrity": "sha512-GK6QUtisv4fNS+XcI7shX0Gx9ORg7QqIznyfho79JTnX1XhLiyZHfftvGiziqzRiEi/Bjhgpi+D2o7HxJFPnDQ==",
"devOptional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"is-what": "^3.12.0" "is-what": "^3.12.0"
} }
@ -1495,6 +1495,7 @@
"resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz",
"integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==",
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"prr": "~1.0.1" "prr": "~1.0.1"
}, },
@ -2492,6 +2493,7 @@
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz",
"integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=",
"optional": true, "optional": true,
"peer": true,
"bin": { "bin": {
"image-size": "bin/image-size.js" "image-size": "bin/image-size.js"
}, },
@ -2615,7 +2617,8 @@
"version": "3.14.1", "version": "3.14.1",
"resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz", "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz",
"integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==", "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==",
"devOptional": true "optional": true,
"peer": true
}, },
"node_modules/isexe": { "node_modules/isexe": {
"version": "2.0.0", "version": "2.0.0",
@ -2704,7 +2707,8 @@
"version": "3.13.1", "version": "3.13.1",
"resolved": "https://registry.npmjs.org/less/-/less-3.13.1.tgz", "resolved": "https://registry.npmjs.org/less/-/less-3.13.1.tgz",
"integrity": "sha512-SwA1aQXGUvp+P5XdZslUOhhLnClSLIjWvJhmd+Vgib5BFIr9lMNlQwmwUNOjXThF/A0x+MCYYPeWEfeWiLRnTw==", "integrity": "sha512-SwA1aQXGUvp+P5XdZslUOhhLnClSLIjWvJhmd+Vgib5BFIr9lMNlQwmwUNOjXThF/A0x+MCYYPeWEfeWiLRnTw==",
"devOptional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"copy-anything": "^2.0.1", "copy-anything": "^2.0.1",
"tslib": "^1.10.0" "tslib": "^1.10.0"
@ -2730,6 +2734,7 @@
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"optional": true, "optional": true,
"peer": true,
"engines": { "engines": {
"node": ">=0.10.0" "node": ">=0.10.0"
} }
@ -2738,7 +2743,8 @@
"version": "1.14.1", "version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
"devOptional": true "optional": true,
"peer": true
}, },
"node_modules/levn": { "node_modules/levn": {
"version": "0.4.1", "version": "0.4.1",
@ -2812,6 +2818,7 @@
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
"integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
"optional": true, "optional": true,
"peer": true,
"dependencies": { "dependencies": {
"pify": "^4.0.1", "pify": "^4.0.1",
"semver": "^5.6.0" "semver": "^5.6.0"
@ -2858,6 +2865,7 @@
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
"optional": true, "optional": true,
"peer": true,
"bin": { "bin": {
"mime": "cli.js" "mime": "cli.js"
}, },
@ -2945,7 +2953,8 @@
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/native-request/-/native-request-1.1.0.tgz", "resolved": "https://registry.npmjs.org/native-request/-/native-request-1.1.0.tgz",
"integrity": "sha512-uZ5rQaeRn15XmpgE0xoPL8YWqcX90VtCFglYwAgkvKM5e8fog+vePLAhHxuuv/gRkrQxIeh5U3q9sMNUrENqWw==", "integrity": "sha512-uZ5rQaeRn15XmpgE0xoPL8YWqcX90VtCFglYwAgkvKM5e8fog+vePLAhHxuuv/gRkrQxIeh5U3q9sMNUrENqWw==",
"optional": true "optional": true,
"peer": true
}, },
"node_modules/natural-compare": { "node_modules/natural-compare": {
"version": "1.4.0", "version": "1.4.0",
@ -3112,6 +3121,7 @@
"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
"optional": true, "optional": true,
"peer": true,
"engines": { "engines": {
"node": ">=6" "node": ">=6"
} }
@ -3218,7 +3228,8 @@
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
"integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=",
"optional": true "optional": true,
"peer": true
}, },
"node_modules/punycode": { "node_modules/punycode": {
"version": "2.1.1", "version": "2.1.1",
@ -3422,6 +3433,7 @@
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"optional": true, "optional": true,
"peer": true,
"bin": { "bin": {
"semver": "bin/semver" "semver": "bin/semver"
} }
@ -4855,7 +4867,8 @@
"version": "2.0.3", "version": "2.0.3",
"resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.3.tgz", "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.3.tgz",
"integrity": "sha512-GK6QUtisv4fNS+XcI7shX0Gx9ORg7QqIznyfho79JTnX1XhLiyZHfftvGiziqzRiEi/Bjhgpi+D2o7HxJFPnDQ==", "integrity": "sha512-GK6QUtisv4fNS+XcI7shX0Gx9ORg7QqIznyfho79JTnX1XhLiyZHfftvGiziqzRiEi/Bjhgpi+D2o7HxJFPnDQ==",
"devOptional": true, "optional": true,
"peer": true,
"requires": { "requires": {
"is-what": "^3.12.0" "is-what": "^3.12.0"
} }
@ -5007,6 +5020,7 @@
"resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz",
"integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==",
"optional": true, "optional": true,
"peer": true,
"requires": { "requires": {
"prr": "~1.0.1" "prr": "~1.0.1"
} }
@ -5692,7 +5706,8 @@
"version": "0.5.5", "version": "0.5.5",
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz",
"integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=",
"optional": true "optional": true,
"peer": true
}, },
"import-cwd": { "import-cwd": {
"version": "3.0.0", "version": "3.0.0",
@ -5782,7 +5797,8 @@
"version": "3.14.1", "version": "3.14.1",
"resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz", "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz",
"integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==", "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==",
"devOptional": true "optional": true,
"peer": true
}, },
"isexe": { "isexe": {
"version": "2.0.0", "version": "2.0.0",
@ -5853,7 +5869,8 @@
"version": "3.13.1", "version": "3.13.1",
"resolved": "https://registry.npmjs.org/less/-/less-3.13.1.tgz", "resolved": "https://registry.npmjs.org/less/-/less-3.13.1.tgz",
"integrity": "sha512-SwA1aQXGUvp+P5XdZslUOhhLnClSLIjWvJhmd+Vgib5BFIr9lMNlQwmwUNOjXThF/A0x+MCYYPeWEfeWiLRnTw==", "integrity": "sha512-SwA1aQXGUvp+P5XdZslUOhhLnClSLIjWvJhmd+Vgib5BFIr9lMNlQwmwUNOjXThF/A0x+MCYYPeWEfeWiLRnTw==",
"devOptional": true, "optional": true,
"peer": true,
"requires": { "requires": {
"copy-anything": "^2.0.1", "copy-anything": "^2.0.1",
"errno": "^0.1.1", "errno": "^0.1.1",
@ -5870,13 +5887,15 @@
"version": "0.6.1", "version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"optional": true "optional": true,
"peer": true
}, },
"tslib": { "tslib": {
"version": "1.14.1", "version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
"devOptional": true "optional": true,
"peer": true
} }
} }
}, },
@ -5937,6 +5956,7 @@
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
"integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
"optional": true, "optional": true,
"peer": true,
"requires": { "requires": {
"pify": "^4.0.1", "pify": "^4.0.1",
"semver": "^5.6.0" "semver": "^5.6.0"
@ -5967,7 +5987,8 @@
"version": "1.6.0", "version": "1.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
"optional": true "optional": true,
"peer": true
}, },
"min-indent": { "min-indent": {
"version": "1.0.1", "version": "1.0.1",
@ -6025,7 +6046,8 @@
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/native-request/-/native-request-1.1.0.tgz", "resolved": "https://registry.npmjs.org/native-request/-/native-request-1.1.0.tgz",
"integrity": "sha512-uZ5rQaeRn15XmpgE0xoPL8YWqcX90VtCFglYwAgkvKM5e8fog+vePLAhHxuuv/gRkrQxIeh5U3q9sMNUrENqWw==", "integrity": "sha512-uZ5rQaeRn15XmpgE0xoPL8YWqcX90VtCFglYwAgkvKM5e8fog+vePLAhHxuuv/gRkrQxIeh5U3q9sMNUrENqWw==",
"optional": true "optional": true,
"peer": true
}, },
"natural-compare": { "natural-compare": {
"version": "1.4.0", "version": "1.4.0",
@ -6155,7 +6177,8 @@
"version": "4.0.1", "version": "4.0.1",
"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
"optional": true "optional": true,
"peer": true
}, },
"polished": { "polished": {
"version": "4.1.3", "version": "4.1.3",
@ -6219,7 +6242,8 @@
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
"integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=",
"optional": true "optional": true,
"peer": true
}, },
"punycode": { "punycode": {
"version": "2.1.1", "version": "2.1.1",
@ -6356,7 +6380,8 @@
"version": "5.7.1", "version": "5.7.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"optional": true "optional": true,
"peer": true
}, },
"slash": { "slash": {
"version": "3.0.0", "version": "3.0.0",

View File

@ -40,7 +40,6 @@
"eslint": "^8.4.1", "eslint": "^8.4.1",
"eslint-config-prettier": "^8.3.0", "eslint-config-prettier": "^8.3.0",
"eslint-plugin-svelte3": "^3.2.1", "eslint-plugin-svelte3": "^3.2.1",
"less": "^3.11.3",
"prettier": "~2.5.1", "prettier": "~2.5.1",
"prettier-plugin-svelte": "^2.5.1", "prettier-plugin-svelte": "^2.5.1",
"svelte": "^3.44.2", "svelte": "^3.44.2",

View File

@ -78,3 +78,7 @@ export const portfolioPageNavigationLinksClass = sprinkles({
marginX: 'auto', marginX: 'auto',
marginY: 'none', marginY: 'none',
}) })
export const portfolioPageNavigationLinkClass = sprinkles({
padding: '1x',
})

View File

@ -8,6 +8,7 @@
navigationContentClass, navigationContentClass,
navigationLinksClass, navigationLinksClass,
portfolioPageNavigation, portfolioPageNavigation,
portfolioPageNavigationLinkClass,
portfolioPageNavigationLinksClass, portfolioPageNavigationLinksClass,
selectedClass, selectedClass,
} from './Nav.css' } from './Nav.css'
@ -63,11 +64,22 @@
{#if segment === '/portfolio'} {#if segment === '/portfolio'}
<section class="page-navigation {portfolioPageNavigation}"> <section class="page-navigation {portfolioPageNavigation}">
<div class={portfolioPageNavigationLinksClass}> <div class={portfolioPageNavigationLinksClass}>
<a href="/portfolio#personal-information">About</a> <a
<a href="/portfolio#skills">Skills</a> class={portfolioPageNavigationLinkClass}
<a href="/portfolio#work-history">Work History</a> href="/portfolio#personal-information">About</a
<a href="/portfolio#projects">Projects</a> >
<a href="/portfolio#education">Education</a> <a class={portfolioPageNavigationLinkClass} href="/portfolio#skills"
>Skills</a
>
<a class={portfolioPageNavigationLinkClass} href="/portfolio#work-history"
>Work History</a
>
<a class={portfolioPageNavigationLinkClass} href="/portfolio#projects"
>Projects</a
>
<a class={portfolioPageNavigationLinkClass} href="/portfolio#education"
>Education</a
>
</div> </div>
</section> </section>
{/if} {/if}

View File

@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
import svgSprite from '/build/icons-sprite.svg' import svgSprite from '/static/build/icons-sprite.svg'
export let className: string export let className: string
export let name: string export let name: string
</script> </script>

View File

@ -0,0 +1,10 @@
import { globalStyle, style } from '@vanilla-extract/css'
export const projectScopeClass = style({})
globalStyle(`${projectScopeClass} img`, {
float: 'right',
width: '25%',
})
// We need to get rid off the global selectors LOL

View File

@ -1,10 +1,11 @@
<script lang="ts"> <script lang="ts">
import type { ProjectAttributes } from '../../routes/portfolio/index.json' import type { ProjectAttributes } from '../../routes/portfolio/index.json'
import { projectScopeClass } from './project.css'
export let project: ProjectAttributes export let project: ProjectAttributes
</script> </script>
<article class="project"> <article class="project {projectScopeClass}">
<h3>{project.name}</h3> <h3>{project.name}</h3>
<section class="description"> <section class="description">
{#if project.image} {#if project.image}
@ -18,10 +19,3 @@
</section> </section>
<aside /> <aside />
</article> </article>
<style>
.project-image {
float: right;
width: 25%;
}
</style>

View File

@ -1,5 +1,5 @@
import Prism from 'prismjs' import Prism from 'prismjs'
import loadLanguages from 'prismjs/components/index' import loadLanguages from 'prismjs/components/index.js'
loadLanguages(['bash', 'markdown', 'json', 'yaml', 'typescript']) loadLanguages(['bash', 'markdown', 'json', 'yaml', 'typescript'])

View File

@ -2,12 +2,11 @@
/** /**
* @type {import('@sveltejs/kit').Load} * @type {import('@sveltejs/kit').Load}
*/ */
export function load({ fetch, page: { params, query } }) { export function load({ fetch }) {
const blogQuery = query ? '?' + query.toString() : '' return fetch(`blog.json`)
return fetch(`blog.json${blogQuery}`)
.then((r) => r.json()) .then((r) => r.json())
.then((posts) => { .then((posts) => {
return { props: { posts, query } } return { props: { posts } }
}) })
} }
</script> </script>
@ -18,10 +17,18 @@
import type { PostContent } from './_content' import type { PostContent } from './_content'
export let posts: PostContent[] export let posts: PostContent[]
export let query export let displayedPosts: PostContent[]
export let tagQuery export let tagQuery: string
$: tagQuery = query.get('tag') $: {
if (typeof window !== 'undefined') {
let params = new URLSearchParams(window.location.search)
tagQuery = params.get('tag')
displayedPosts = posts.filter((post) => post.tags.includes(tagQuery))
} else {
displayedPosts = posts
}
}
</script> </script>
<svelte:head> <svelte:head>

View File

@ -18,6 +18,10 @@ export const mainContentClass = sprinkles({
}) })
// Layout global styles // Layout global styles
// atomic design needs to get rid off these global selectors LOL
// There should be written markdown renderer for each type of output
// where every component gets the layout atomic class
// TODO Create atomic classes for maxWidhts and use them everywhere in the content
globalStyle( globalStyle(
`${mainContentClass} h1, ${mainContentClass} h2, ${mainContentClass} h3, ${mainContentClass} h4, ${mainContentClass} h5, ${mainContentClass} h6, ${mainContentClass} p, ${mainContentClass} ul, ${mainContentClass} ol, ${mainContentClass} figure, ${mainContentClass} img, ${mainContentClass} blockquote, ${mainContentClass} iframe, ${mainContentClass} footer`, `${mainContentClass} h1, ${mainContentClass} h2, ${mainContentClass} h3, ${mainContentClass} h4, ${mainContentClass} h5, ${mainContentClass} h6, ${mainContentClass} p, ${mainContentClass} ul, ${mainContentClass} ol, ${mainContentClass} figure, ${mainContentClass} img, ${mainContentClass} blockquote, ${mainContentClass} iframe, ${mainContentClass} footer`,