From 04c3fefb048041a4face80cf3a460877e998cbc5 Mon Sep 17 00:00:00 2001 From: Guido Gloor Date: Tue, 3 Sep 2024 20:59:14 +0200 Subject: [PATCH 01/12] Link added to header for cards --- src/NewsPostCard.jsx | 6 +++++- src/index.css | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/NewsPostCard.jsx b/src/NewsPostCard.jsx index 3e02d97..fa64a7a 100644 --- a/src/NewsPostCard.jsx +++ b/src/NewsPostCard.jsx @@ -26,7 +26,11 @@ export default function NewsPostCard({newsPost}) { } - title={newsPost.title} + title={ + + {newsPost.title} + + } subheader={format(new Date(newsPost.publicationDate), 'yyyy-MM-dd')} /> diff --git a/src/index.css b/src/index.css index ec2585e..487b9b4 100644 --- a/src/index.css +++ b/src/index.css @@ -11,3 +11,8 @@ code { font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace; } + +.MuiCardHeader-content a { + color: inherit; + text-decoration: none; +} From e6226db7d8dd34001420d656a4fca6d5641c8e5e Mon Sep 17 00:00:00 2001 From: Guido Gloor Date: Tue, 24 Sep 2024 23:05:06 +0200 Subject: [PATCH 02/12] Refactored components locations --- src/{ => pages/music}/NewsPostCard.jsx | 0 src/{ => pages/music}/NewsPosts.jsx | 0 src/{ => pages/music}/SoundCloudIFrame.jsx | 0 src/{ => shared}/BottomBar.jsx | 0 src/{ => shared}/SearchAppBar.jsx | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename src/{ => pages/music}/NewsPostCard.jsx (100%) rename src/{ => pages/music}/NewsPosts.jsx (100%) rename src/{ => pages/music}/SoundCloudIFrame.jsx (100%) rename src/{ => shared}/BottomBar.jsx (100%) rename src/{ => shared}/SearchAppBar.jsx (100%) diff --git a/src/NewsPostCard.jsx b/src/pages/music/NewsPostCard.jsx similarity index 100% rename from src/NewsPostCard.jsx rename to src/pages/music/NewsPostCard.jsx diff --git a/src/NewsPosts.jsx b/src/pages/music/NewsPosts.jsx similarity index 100% rename from src/NewsPosts.jsx rename to src/pages/music/NewsPosts.jsx diff --git a/src/SoundCloudIFrame.jsx b/src/pages/music/SoundCloudIFrame.jsx similarity index 100% rename from src/SoundCloudIFrame.jsx rename to src/pages/music/SoundCloudIFrame.jsx diff --git a/src/BottomBar.jsx b/src/shared/BottomBar.jsx similarity index 100% rename from src/BottomBar.jsx rename to src/shared/BottomBar.jsx diff --git a/src/SearchAppBar.jsx b/src/shared/SearchAppBar.jsx similarity index 100% rename from src/SearchAppBar.jsx rename to src/shared/SearchAppBar.jsx From 1ab14b9a1342c924250f6b2265ae9d361b4464d1 Mon Sep 17 00:00:00 2001 From: Guido Gloor Date: Tue, 24 Sep 2024 23:05:21 +0200 Subject: [PATCH 03/12] Added router, updated dependencies --- package-lock.json | 208 ++++++++++++++++++++++++++++------------------ package.json | 1 + 2 files changed, 126 insertions(+), 83 deletions(-) diff --git a/package-lock.json b/package-lock.json index 966296f..8107b37 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ "date-fns": "^3.6.0", "react": "^18.3.1", "react-dom": "^18.3.1", + "react-router-dom": "^6.26.2", "react-waypoint": "^10.3.0", "vite": "^5.4.1" } @@ -1136,10 +1137,19 @@ "url": "https://opencollective.com/popperjs" } }, + "node_modules/@remix-run/router": { + "version": "1.19.2", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.19.2.tgz", + "integrity": "sha512-baiMx18+IMuD1yyvOGaHM9QrVUPGGG0jC+z+IPHnRJWUAUvaKuWKyE8gjDj2rzv3sz9zOGoRSPgeBVHRhZnBlA==", + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.21.0.tgz", - "integrity": "sha512-WTWD8PfoSAJ+qL87lE7votj3syLavxunWhzCnx3XFxFiI/BA/r3X7MUM8dVrH8rb2r4AiO8jJsr3ZjdaftmnfA==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.4.tgz", + "integrity": "sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w==", "cpu": [ "arm" ], @@ -1150,9 +1160,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.21.0.tgz", - "integrity": "sha512-a1sR2zSK1B4eYkiZu17ZUZhmUQcKjk2/j9Me2IDjk1GHW7LB5Z35LEzj9iJch6gtUfsnvZs1ZNyDW2oZSThrkA==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.4.tgz", + "integrity": "sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA==", "cpu": [ "arm64" ], @@ -1163,9 +1173,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.21.0.tgz", - "integrity": "sha512-zOnKWLgDld/svhKO5PD9ozmL6roy5OQ5T4ThvdYZLpiOhEGY+dp2NwUmxK0Ld91LrbjrvtNAE0ERBwjqhZTRAA==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.4.tgz", + "integrity": "sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q==", "cpu": [ "arm64" ], @@ -1176,9 +1186,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.21.0.tgz", - "integrity": "sha512-7doS8br0xAkg48SKE2QNtMSFPFUlRdw9+votl27MvT46vo44ATBmdZdGysOevNELmZlfd+NEa0UYOA8f01WSrg==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.4.tgz", + "integrity": "sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw==", "cpu": [ "x64" ], @@ -1189,9 +1199,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.21.0.tgz", - "integrity": "sha512-pWJsfQjNWNGsoCq53KjMtwdJDmh/6NubwQcz52aEwLEuvx08bzcy6tOUuawAOncPnxz/3siRtd8hiQ32G1y8VA==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.4.tgz", + "integrity": "sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==", "cpu": [ "arm" ], @@ -1202,9 +1212,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.21.0.tgz", - "integrity": "sha512-efRIANsz3UHZrnZXuEvxS9LoCOWMGD1rweciD6uJQIx2myN3a8Im1FafZBzh7zk1RJ6oKcR16dU3UPldaKd83w==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.4.tgz", + "integrity": "sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==", "cpu": [ "arm" ], @@ -1215,9 +1225,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.21.0.tgz", - "integrity": "sha512-ZrPhydkTVhyeGTW94WJ8pnl1uroqVHM3j3hjdquwAcWnmivjAwOYjTEAuEDeJvGX7xv3Z9GAvrBkEzCgHq9U1w==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.4.tgz", + "integrity": "sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==", "cpu": [ "arm64" ], @@ -1228,9 +1238,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.21.0.tgz", - "integrity": "sha512-cfaupqd+UEFeURmqNP2eEvXqgbSox/LHOyN9/d2pSdV8xTrjdg3NgOFJCtc1vQ/jEke1qD0IejbBfxleBPHnPw==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.4.tgz", + "integrity": "sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==", "cpu": [ "arm64" ], @@ -1241,9 +1251,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.21.0.tgz", - "integrity": "sha512-ZKPan1/RvAhrUylwBXC9t7B2hXdpb/ufeu22pG2psV7RN8roOfGurEghw1ySmX/CmDDHNTDDjY3lo9hRlgtaHg==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.4.tgz", + "integrity": "sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==", "cpu": [ "ppc64" ], @@ -1254,9 +1264,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.21.0.tgz", - "integrity": "sha512-H1eRaCwd5E8eS8leiS+o/NqMdljkcb1d6r2h4fKSsCXQilLKArq6WS7XBLDu80Yz+nMqHVFDquwcVrQmGr28rg==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.4.tgz", + "integrity": "sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==", "cpu": [ "riscv64" ], @@ -1267,9 +1277,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.21.0.tgz", - "integrity": "sha512-zJ4hA+3b5tu8u7L58CCSI0A9N1vkfwPhWd/puGXwtZlsB5bTkwDNW/+JCU84+3QYmKpLi+XvHdmrlwUwDA6kqw==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.4.tgz", + "integrity": "sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==", "cpu": [ "s390x" ], @@ -1280,9 +1290,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.21.0.tgz", - "integrity": "sha512-e2hrvElFIh6kW/UNBQK/kzqMNY5mO+67YtEh9OA65RM5IJXYTWiXjX6fjIiPaqOkBthYF1EqgiZ6OXKcQsM0hg==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.4.tgz", + "integrity": "sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==", "cpu": [ "x64" ], @@ -1293,9 +1303,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.21.0.tgz", - "integrity": "sha512-1vvmgDdUSebVGXWX2lIcgRebqfQSff0hMEkLJyakQ9JQUbLDkEaMsPTLOmyccyC6IJ/l3FZuJbmrBw/u0A0uCQ==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.4.tgz", + "integrity": "sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==", "cpu": [ "x64" ], @@ -1306,9 +1316,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.21.0.tgz", - "integrity": "sha512-s5oFkZ/hFcrlAyBTONFY1TWndfyre1wOMwU+6KCpm/iatybvrRgmZVM+vCFwxmC5ZhdlgfE0N4XorsDpi7/4XQ==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.4.tgz", + "integrity": "sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==", "cpu": [ "arm64" ], @@ -1319,9 +1329,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.21.0.tgz", - "integrity": "sha512-G9+TEqRnAA6nbpqyUqgTiopmnfgnMkR3kMukFBDsiyy23LZvUCpiUwjTRx6ezYCjJODXrh52rBR9oXvm+Fp5wg==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.4.tgz", + "integrity": "sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g==", "cpu": [ "ia32" ], @@ -1332,9 +1342,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.21.0.tgz", - "integrity": "sha512-2jsCDZwtQvRhejHLfZ1JY6w6kEuEtfF9nzYsZxzSlNVKDX+DpsDJ+Rbjkm74nvg2rdx0gwBS+IMdvwJuq3S9pQ==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.4.tgz", + "integrity": "sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q==", "cpu": [ "x64" ], @@ -1989,15 +1999,15 @@ } }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", "license": "ISC" }, "node_modules/postcss": { - "version": "8.4.41", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.41.tgz", - "integrity": "sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==", + "version": "8.4.47", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", "funding": [ { "type": "opencollective", @@ -2015,8 +2025,8 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.0.1", - "source-map-js": "^1.2.0" + "picocolors": "^1.1.0", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" @@ -2079,6 +2089,38 @@ "node": ">=0.10.0" } }, + "node_modules/react-router": { + "version": "6.26.2", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.26.2.tgz", + "integrity": "sha512-tvN1iuT03kHgOFnLPfLJ8V95eijteveqdOSk+srqfePtQvqCExB8eHOYnlilbOcyJyKnYkr1vJvf7YqotAJu1A==", + "license": "MIT", + "dependencies": { + "@remix-run/router": "1.19.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8" + } + }, + "node_modules/react-router-dom": { + "version": "6.26.2", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.26.2.tgz", + "integrity": "sha512-z7YkaEW0Dy35T3/QKPYB1LjMK2R1fxnHO8kWpUMTBdfVzZrWOiY9a7CtN8HqdWtDUWd5FY6Dl8HFsqVwH4uOtQ==", + "license": "MIT", + "dependencies": { + "@remix-run/router": "1.19.2", + "react-router": "6.26.2" + }, + "engines": { + "node": ">=14.0.0" + }, + "peerDependencies": { + "react": ">=16.8", + "react-dom": ">=16.8" + } + }, "node_modules/react-transition-group": { "version": "4.4.5", "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", @@ -2143,9 +2185,9 @@ } }, "node_modules/rollup": { - "version": "4.21.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.21.0.tgz", - "integrity": "sha512-vo+S/lfA2lMS7rZ2Qoubi6I5hwZwzXeUIctILZLbHI+laNtvhhOIon2S1JksA5UEDQ7l3vberd0fxK44lTYjbQ==", + "version": "4.22.4", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.22.4.tgz", + "integrity": "sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A==", "license": "MIT", "dependencies": { "@types/estree": "1.0.5" @@ -2158,22 +2200,22 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.21.0", - "@rollup/rollup-android-arm64": "4.21.0", - "@rollup/rollup-darwin-arm64": "4.21.0", - "@rollup/rollup-darwin-x64": "4.21.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.21.0", - "@rollup/rollup-linux-arm-musleabihf": "4.21.0", - "@rollup/rollup-linux-arm64-gnu": "4.21.0", - "@rollup/rollup-linux-arm64-musl": "4.21.0", - "@rollup/rollup-linux-powerpc64le-gnu": "4.21.0", - "@rollup/rollup-linux-riscv64-gnu": "4.21.0", - "@rollup/rollup-linux-s390x-gnu": "4.21.0", - "@rollup/rollup-linux-x64-gnu": "4.21.0", - "@rollup/rollup-linux-x64-musl": "4.21.0", - "@rollup/rollup-win32-arm64-msvc": "4.21.0", - "@rollup/rollup-win32-ia32-msvc": "4.21.0", - "@rollup/rollup-win32-x64-msvc": "4.21.0", + "@rollup/rollup-android-arm-eabi": "4.22.4", + "@rollup/rollup-android-arm64": "4.22.4", + "@rollup/rollup-darwin-arm64": "4.22.4", + "@rollup/rollup-darwin-x64": "4.22.4", + "@rollup/rollup-linux-arm-gnueabihf": "4.22.4", + "@rollup/rollup-linux-arm-musleabihf": "4.22.4", + "@rollup/rollup-linux-arm64-gnu": "4.22.4", + "@rollup/rollup-linux-arm64-musl": "4.22.4", + "@rollup/rollup-linux-powerpc64le-gnu": "4.22.4", + "@rollup/rollup-linux-riscv64-gnu": "4.22.4", + "@rollup/rollup-linux-s390x-gnu": "4.22.4", + "@rollup/rollup-linux-x64-gnu": "4.22.4", + "@rollup/rollup-linux-x64-musl": "4.22.4", + "@rollup/rollup-win32-arm64-msvc": "4.22.4", + "@rollup/rollup-win32-ia32-msvc": "4.22.4", + "@rollup/rollup-win32-x64-msvc": "4.22.4", "fsevents": "~2.3.2" } }, @@ -2205,9 +2247,9 @@ } }, "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" @@ -2283,14 +2325,14 @@ } }, "node_modules/vite": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.1.tgz", - "integrity": "sha512-1oE6yuNXssjrZdblI9AfBbHCC41nnyoVoEZxQnID6yvQZAFBzxxkqoFLtHUMkYunL8hwOLEjgTuxpkRxvba3kA==", + "version": "5.4.7", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.7.tgz", + "integrity": "sha512-5l2zxqMEPVENgvzTuBpHer2awaetimj2BGkhBPdnwKbPNOlHsODU+oiazEZzLK7KhAnOrO+XGYJYn4ZlUhDtDQ==", "license": "MIT", "dependencies": { "esbuild": "^0.21.3", - "postcss": "^8.4.41", - "rollup": "^4.13.0" + "postcss": "^8.4.43", + "rollup": "^4.20.0" }, "bin": { "vite": "bin/vite.js" diff --git a/package.json b/package.json index 7eb8916..1583f19 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "date-fns": "^3.6.0", "react": "^18.3.1", "react-dom": "^18.3.1", + "react-router-dom": "^6.26.2", "react-waypoint": "^10.3.0", "vite": "^5.4.1" }, From 772d277b6ef80b50559bb1953963862e0a2baa3c Mon Sep 17 00:00:00 2001 From: Guido Gloor Date: Tue, 24 Sep 2024 23:15:12 +0200 Subject: [PATCH 04/12] Menu buttons added --- src/App.jsx | 72 ++++++++++++++++++---------- src/pages/music/SoundCloudIFrame.jsx | 2 +- src/pages/plugins/Plugins.jsx | 17 +++++++ src/shared/SearchAppBar.jsx | 2 +- 4 files changed, 67 insertions(+), 26 deletions(-) create mode 100644 src/pages/plugins/Plugins.jsx diff --git a/src/App.jsx b/src/App.jsx index 2bd1e98..a7ed08e 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,26 +1,31 @@ import './App.css'; import {useState} from "react"; +import {BrowserRouter as Router, Route, Routes, Link} from 'react-router-dom'; import '@fontsource/roboto/300.css'; import '@fontsource/roboto/400.css'; import '@fontsource/roboto/500.css'; import '@fontsource/roboto/700.css'; -import {createTheme} from '@mui/material/styles'; +import {Button, Box, Container} from '@mui/material'; import {ThemeProvider} from "@mui/material"; +import {createTheme} from '@mui/material/styles'; + +import SearchAppBar from "./shared/SearchAppBar"; +import BottomBar from "./shared/BottomBar"; + +import NewsPosts from "./pages/music/NewsPosts"; +import SoundCloudIFrame from "./pages/music/SoundCloudIFrame"; +import Plugins from "./pages/plugins/Plugins"; -import SearchAppBar from "./SearchAppBar"; -import NewsPosts from "./NewsPosts"; -import SoundCloudIFrame from "./SoundCloudIFrame"; -import BottomBar from "./BottomBar"; import useFetchNewsPostsAndNewestContent from './useFetchNewsPostsAndNewestContent'; function App() { const [searchQuery, setSearchQuery] = useState(''); const [searchEventSent, setSearchEventSent] = useState(false); - const { newsPosts, newestContentId } = useFetchNewsPostsAndNewestContent(); + const {newsPosts, newestContentId} = useFetchNewsPostsAndNewestContent(); const theme = createTheme({ palette: { @@ -34,24 +39,43 @@ function App() { }); return ( -
- - - - - - -
+ +
+ + + + + + + + + + + + + + }/> + }/> + + + +
+
); } diff --git a/src/pages/music/SoundCloudIFrame.jsx b/src/pages/music/SoundCloudIFrame.jsx index 78e59e1..4321df2 100644 --- a/src/pages/music/SoundCloudIFrame.jsx +++ b/src/pages/music/SoundCloudIFrame.jsx @@ -10,7 +10,7 @@ function SoundCloudIFrame({newestContentId}) { '' return ( - +
); diff --git a/src/pages/plugins/Plugins.jsx b/src/pages/plugins/Plugins.jsx new file mode 100644 index 0000000..02ebc02 --- /dev/null +++ b/src/pages/plugins/Plugins.jsx @@ -0,0 +1,17 @@ +import React from 'react'; +import { Typography, Box } from '@mui/material'; + +function Plugins() { + return ( + + + Plugins + + + This is the plugins page. Add your plugin content here. + + + ); +} + +export default Plugins; diff --git a/src/shared/SearchAppBar.jsx b/src/shared/SearchAppBar.jsx index 9410a34..9792b10 100644 --- a/src/shared/SearchAppBar.jsx +++ b/src/shared/SearchAppBar.jsx @@ -67,7 +67,7 @@ export default function SearchAppBar({setSearchQuery, searchEventSent, setSearch component="div" sx={{flexGrow: 1, display: {xs: 'block', sm: 'block'}}} > - + haslo.ch - Homegrown Techno from Bern, Switzerland From f81bbf1abda88775760c48066ec5a349974c2735 Mon Sep 17 00:00:00 2001 From: Guido Gloor Date: Tue, 24 Sep 2024 23:20:49 +0200 Subject: [PATCH 05/12] Menu works, not nice yet --- src/App.jsx | 23 +++------- src/logo.svg | 1 - .../ApiAdapter.jsx} | 0 src/shared/NavButtons.jsx | 46 +++++++++++++++++++ 4 files changed, 52 insertions(+), 18 deletions(-) delete mode 100644 src/logo.svg rename src/{useFetchNewsPostsAndNewestContent.jsx => services/ApiAdapter.jsx} (100%) create mode 100644 src/shared/NavButtons.jsx diff --git a/src/App.jsx b/src/App.jsx index a7ed08e..58deedf 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,28 +1,26 @@ import './App.css'; - -import {useState} from "react"; -import {BrowserRouter as Router, Route, Routes, Link} from 'react-router-dom'; - import '@fontsource/roboto/300.css'; import '@fontsource/roboto/400.css'; import '@fontsource/roboto/500.css'; import '@fontsource/roboto/700.css'; -import {Button, Box, Container} from '@mui/material'; +import {useState} from "react"; +import {BrowserRouter as Router, Route, Routes} from 'react-router-dom'; + import {ThemeProvider} from "@mui/material"; import {createTheme} from '@mui/material/styles'; import SearchAppBar from "./shared/SearchAppBar"; import BottomBar from "./shared/BottomBar"; +import NavButtons from "./shared/NavButtons"; import NewsPosts from "./pages/music/NewsPosts"; import SoundCloudIFrame from "./pages/music/SoundCloudIFrame"; import Plugins from "./pages/plugins/Plugins"; -import useFetchNewsPostsAndNewestContent from './useFetchNewsPostsAndNewestContent'; +import useFetchNewsPostsAndNewestContent from './services/ApiAdapter'; function App() { - const [searchQuery, setSearchQuery] = useState(''); const [searchEventSent, setSearchEventSent] = useState(false); const {newsPosts, newestContentId} = useFetchNewsPostsAndNewestContent(); @@ -47,16 +45,7 @@ function App() { searchEventSent={searchEventSent} setSearchEventSent={setSearchEventSent} /> - - - - - - + diff --git a/src/logo.svg b/src/logo.svg deleted file mode 100644 index 9dfc1c0..0000000 --- a/src/logo.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/useFetchNewsPostsAndNewestContent.jsx b/src/services/ApiAdapter.jsx similarity index 100% rename from src/useFetchNewsPostsAndNewestContent.jsx rename to src/services/ApiAdapter.jsx diff --git a/src/shared/NavButtons.jsx b/src/shared/NavButtons.jsx new file mode 100644 index 0000000..a9ac26e --- /dev/null +++ b/src/shared/NavButtons.jsx @@ -0,0 +1,46 @@ +import {Link, useLocation} from "react-router-dom"; + +import {Box, Button, Container} from "@mui/material"; + +function NavButtons() { + const location = useLocation(); + + const buttonStyle = { + width: '50%', + height: '60px', + fontSize: '1rem', + backgroundColor: '#f50057', + color: 'white', + '&:hover': { + backgroundColor: '#c51162', + }, + }; + + const activeButtonStyle = { + ...buttonStyle, + backgroundColor: '#c51162', + }; + + return ( + + + + + + + ); +} + +export default NavButtons; From 6ad63b1ac5c9496fac9aad473379b7261684f3df Mon Sep 17 00:00:00 2001 From: Guido Gloor Date: Tue, 24 Sep 2024 23:32:27 +0200 Subject: [PATCH 06/12] Buttons and layout --- src/App.jsx | 6 +++++- src/pages/music/SoundCloudIFrame.jsx | 2 +- src/shared/NavButtons.jsx | 29 +++++++++++++++++++--------- 3 files changed, 26 insertions(+), 11 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index 58deedf..1a484a7 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -59,7 +59,11 @@ function App() { /> }/> - }/> + + + + }/> diff --git a/src/pages/music/SoundCloudIFrame.jsx b/src/pages/music/SoundCloudIFrame.jsx index 4321df2..32fe28f 100644 --- a/src/pages/music/SoundCloudIFrame.jsx +++ b/src/pages/music/SoundCloudIFrame.jsx @@ -10,7 +10,7 @@ function SoundCloudIFrame({newestContentId}) { '' return ( - +
); diff --git a/src/shared/NavButtons.jsx b/src/shared/NavButtons.jsx index a9ac26e..7eca6cf 100644 --- a/src/shared/NavButtons.jsx +++ b/src/shared/NavButtons.jsx @@ -1,29 +1,40 @@ -import {Link, useLocation} from "react-router-dom"; - -import {Box, Button, Container} from "@mui/material"; +import { Link, useLocation } from "react-router-dom"; +import { Box, Button, Container, useMediaQuery } from "@mui/material"; +import { useTheme } from "@mui/material/styles"; function NavButtons() { const location = useLocation(); + const theme = useTheme(); + const isTabletOrLower = useMediaQuery(theme.breakpoints.down('md')); const buttonStyle = { - width: '50%', + width: '100%', height: '60px', fontSize: '1rem', - backgroundColor: '#f50057', + backgroundColor: 'rgba(245,0,87,0.5)', color: 'white', '&:hover': { - backgroundColor: '#c51162', + backgroundColor: 'rgba(245,0,87,0.9)', }, }; const activeButtonStyle = { ...buttonStyle, - backgroundColor: '#c51162', + backgroundColor: 'rgba(245,0,87,0.9)', }; return ( - - + + *': { + flexGrow: isTabletOrLower ? 0 : 1, + }, + }}>