diff --git a/backend/server/adventures/serializers.py b/backend/server/adventures/serializers.py index 2c677f7..bf8beec 100644 --- a/backend/server/adventures/serializers.py +++ b/backend/server/adventures/serializers.py @@ -1,6 +1,6 @@ from django.utils import timezone import os -from .models import Adventure, AdventureImage, ChecklistItem, Collection, Note, Transportation, Checklist, Visit, Category +from .models import Adventure, AdventureImage, ChecklistItem, Collection, Note, Transportation, Checklist, Visit, Category, Attachment from rest_framework import serializers from main.utils import CustomModelSerializer @@ -21,6 +21,26 @@ class AdventureImageSerializer(CustomModelSerializer): representation['image'] = f"{public_url}/media/{instance.image.name}" return representation +class AttachmentSerializer(CustomModelSerializer): + extension = serializers.SerializerMethodField() + class Meta: + model = Attachment + fields = ['id', 'file', 'adventure', 'extension'] + read_only_fields = ['id'] + + def get_extension(self, obj): + return obj.file.name.split('.')[-1] + + def to_representation(self, instance): + representation = super().to_representation(instance) + if instance.file: + public_url = os.environ.get('PUBLIC_URL', 'http://127.0.0.1:8000').rstrip('/') + #print(public_url) + # remove any ' from the url + public_url = public_url.replace("'", "") + representation['file'] = f"{public_url}/media/{instance.file.name}" + return representation + class CategorySerializer(serializers.ModelSerializer): num_adventures = serializers.SerializerMethodField() class Meta: @@ -57,6 +77,7 @@ class VisitSerializer(serializers.ModelSerializer): class AdventureSerializer(CustomModelSerializer): images = AdventureImageSerializer(many=True, read_only=True) visits = VisitSerializer(many=True, read_only=False, required=False) + attachments = AttachmentSerializer(many=True, read_only=True) category = CategorySerializer(read_only=False, required=False) is_visited = serializers.SerializerMethodField() @@ -65,7 +86,7 @@ class AdventureSerializer(CustomModelSerializer): fields = [ 'id', 'user_id', 'name', 'description', 'rating', 'activity_types', 'location', 'is_public', 'collection', 'created_at', 'updated_at', 'images', 'link', 'longitude', - 'latitude', 'visits', 'is_visited', 'category' + 'latitude', 'visits', 'is_visited', 'category', 'attachments' ] read_only_fields = ['id', 'created_at', 'updated_at', 'user_id', 'is_visited'] diff --git a/backend/server/adventures/views.py b/backend/server/adventures/views.py deleted file mode 100644 index e69de29..0000000 diff --git a/frontend/package.json b/frontend/package.json index 442a9d6..f8abe55 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -41,9 +41,11 @@ "dependencies": { "@lukulent/svelte-umami": "^0.0.3", "emoji-picker-element": "^1.26.0", + "gsap": "^3.12.7", "marked": "^15.0.4", "qrcode": "^1.5.4", "svelte-i18n": "^4.0.1", - "svelte-maplibre": "^0.9.8" + "svelte-maplibre": "^0.9.8", + "tsparticles": "^3.7.1" } } diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index 1c141b3..3e72f67 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -14,6 +14,9 @@ importers: emoji-picker-element: specifier: ^1.26.0 version: 1.26.0 + gsap: + specifier: ^3.12.7 + version: 3.12.7 marked: specifier: ^15.0.4 version: 15.0.4 @@ -26,6 +29,9 @@ importers: svelte-maplibre: specifier: ^0.9.8 version: 0.9.8(svelte@4.2.19) + tsparticles: + specifier: ^3.7.1 + version: 3.7.1 devDependencies: '@event-calendar/core': specifier: ^3.7.1 @@ -674,6 +680,147 @@ packages: peerDependencies: tailwindcss: '>=3.0.0 || insiders' + '@tsparticles/basic@3.7.1': + resolution: {integrity: sha512-oJMJ3qzYUROYaOEsaFXkVynxT2OTWBXbQ9MNc1bJi/bVc1VOU44VN7X/KmiZjD+w1U+Qalk6BeVvDRwpFshblw==} + + '@tsparticles/engine@3.7.1': + resolution: {integrity: sha512-GYzBgq/oOE9YJdOL1++MoawWmYg4AvVct6CIrJGx84ZRb3U2owYmLsRGabYl0qX1CWWOvUG569043RJmyp/vQA==} + + '@tsparticles/interaction-external-attract@3.7.1': + resolution: {integrity: sha512-cpnMsFJ7ZJNKccpQvskKvSs1ofknByHE6FGqbEb17ij7HqvbECQOCOVKHPFnYipHe14cXor/Cd+nVisRcTASoQ==} + + '@tsparticles/interaction-external-bounce@3.7.1': + resolution: {integrity: sha512-npvU9Qt6WDonjezHqi+hWM44ga2Oh5yXdr8eSoJpvuHZrCP7rIdRSz5XseHouO1bMS9DbXk86sx4qwrhB5w58w==} + + '@tsparticles/interaction-external-bubble@3.7.1': + resolution: {integrity: sha512-WdbYL46lMfuf2g5kfVB1hhhxRBtEXDvnwz8PJwLKurSThL/27bqsqysyXsMzXtLByXUneGhtJTj4D5I5RYdgjA==} + + '@tsparticles/interaction-external-connect@3.7.1': + resolution: {integrity: sha512-hqx0ANIbjLIz/nxmk0LvqANBiNLLmVybbCA7N+xDHtEORvpKjNlKEvMz6Razocl6vRjoHZ/olSwcxIG84dh/cg==} + + '@tsparticles/interaction-external-grab@3.7.1': + resolution: {integrity: sha512-JMYpFW+7YvkpK5MYlt4Ec3Gwb5ZxS7RLVL8IRUSd5yJOw25husPTYg+FQywxrt5WhKe+tPsCAYo+uGIbTTHi9w==} + + '@tsparticles/interaction-external-pause@3.7.1': + resolution: {integrity: sha512-Kkp+7sCe24hawH0XvS1V6UCCuHfMvpLK7oseqSam9Gt4SyGrFvaqIXxkjXhRhn9MysJyKFPBV4/dtBM1HR9p6A==} + + '@tsparticles/interaction-external-push@3.7.1': + resolution: {integrity: sha512-4VoaR5jvXgQdB7irtq4uSZYr5c+D6TBTVEnLVpBfJhUs6jhw6mgN5g7yp5izIYkK0AlcO431MHn8dvJacvRLDw==} + + '@tsparticles/interaction-external-remove@3.7.1': + resolution: {integrity: sha512-FRBW7U7zD5MkO6/b7e8iSMk/UTtRLY2XiIVFZNsKri3Re3yPpvZzzd5tl2YlYGQlg1Xc+K8SJYMQQA3PtgQ/Tg==} + + '@tsparticles/interaction-external-repulse@3.7.1': + resolution: {integrity: sha512-mwM06dVmg2FEvHMQsPOfRBQWACbjf3qnelODkqI9DSVxQ0B8DESP4BYNXyraFGYv00YiPzRv5Xy/uejHdbsQUA==} + + '@tsparticles/interaction-external-slow@3.7.1': + resolution: {integrity: sha512-CfCAs3kUQC3pLOj0dbzn5AolQyBHgjxORLdfnYBhepvFV1BXB+4ytChRfXBzjykBPI6U+rCnw5Fk/vVjAroSFA==} + + '@tsparticles/interaction-external-trail@3.7.1': + resolution: {integrity: sha512-M7lNQUWP15m8YIDP/JZcZAXaVJLqdwpBs0Uv9F6dU6jsnNXwwHFVFZ+1icrnlbgl9k/Ehhodbdo5weE7GHhQhQ==} + + '@tsparticles/interaction-particles-attract@3.7.1': + resolution: {integrity: sha512-UABbBORKaiItAT8vR0t4ye2H3VE6/Ah4zcylBlnq0Jd5yDkyP4rnkwhicaY6y4Zlfwyx+0PWdAC4f/ziFAyObg==} + + '@tsparticles/interaction-particles-collisions@3.7.1': + resolution: {integrity: sha512-0GY9++Gn2KXViyeifXWkH7a2UO5+uRwyS1rDeTN8eleyiq2j9zQf4xztZEIft8T0hTetq2rkWxQ92j2kev6NVA==} + + '@tsparticles/interaction-particles-links@3.7.1': + resolution: {integrity: sha512-BxCXAAOBNmEvlyOQzwprryW8YdtMIop2v4kgSCff5MCtDwYWoQIfzaQlWbBAkD9ey6BoF8iMjhBUaY1MnDecTA==} + + '@tsparticles/move-base@3.7.1': + resolution: {integrity: sha512-LPtMHwJHhzwfRIcSAk814fY9NcRiICwaEbapaJSYyP1DwscSXqOWoyAEWwzV9hMgAcPdsED6nGeg8RCXGm58lw==} + + '@tsparticles/move-parallax@3.7.1': + resolution: {integrity: sha512-B40azo6EJyMdI+kmIxpqWDaObPwODTYLDCikzkZ73n5tS6OhFUlkz81Scfo+g1iGTdryKFygUKhVGcG1EFuA5g==} + + '@tsparticles/plugin-absorbers@3.7.1': + resolution: {integrity: sha512-3s+fILLV1tdKOq/bXwfoxFVbzkWwXpdWTC2C0QIP6BFwDSQqV5txluiLEf7SCf8C5etQ6dstEnOgVbdzK7+eWA==} + + '@tsparticles/plugin-easing-quad@3.7.1': + resolution: {integrity: sha512-nSwKCRe6C/noCi3dyZlm1GiQGask0aXdWDuS36b82iwzwQ01cBTXeXR25mLr4fsfMLFfYAZXyBxEMMpw3rkSiw==} + + '@tsparticles/plugin-emitters-shape-circle@3.7.1': + resolution: {integrity: sha512-eBwktnGROkiyCvtrSwdPpoRbIjQgV/Odq//0dw8D+qUdnox6dNzzhJjz8L2LAA2kQZBqtdBqV2kcx3w5ZdqoEQ==} + + '@tsparticles/plugin-emitters-shape-square@3.7.1': + resolution: {integrity: sha512-nvGBsRLrkiz6Q38TJRl8Y/eu9i1ChQ9oorQydLBok+iZ6MefuOj39iYsAOkD1w9yRVrFWKHG6CR1mmJUniz/HA==} + + '@tsparticles/plugin-emitters@3.7.1': + resolution: {integrity: sha512-WV5Uwxp/Ckqv5kZynTj6mj13jYbQCArNLFv8ks+zjdlteoyT5EhQl4rg+TalaySCb1zCd6Fu2Scp35l3JJgbnw==} + + '@tsparticles/plugin-hex-color@3.7.1': + resolution: {integrity: sha512-7xu3MV8EdNNejjYyEmrq5fCDdYAcqz/9VatLpnwtwR5Q5t2qI0tD4CrcGaFfC/rTAVJacfiJe02UV/hlj03KKA==} + + '@tsparticles/plugin-hsl-color@3.7.1': + resolution: {integrity: sha512-zzAI1CuoCMBJhgeYZ5Rq42nGbPg35ZzIs11eQegjsWG5Msm5QKSj60qPzERnoUcCc4HCKtIWP7rYMz6h3xpoEg==} + + '@tsparticles/plugin-rgb-color@3.7.1': + resolution: {integrity: sha512-taEraTpCYR6jpjflqBL95tN0zFU8JrAChXTt8mxVn7gddxoNMHI/LGymEPRCweLukwV6GQyAGOkeGEdWDPtYTA==} + + '@tsparticles/shape-circle@3.7.1': + resolution: {integrity: sha512-kmOWaUuFwuTtcCFYjuyJbdA5qDqWdGsharLalYnIczkLu2c1I8jJo/OmGePKhWn62ocu7mqKMomfElkIcw2AsA==} + + '@tsparticles/shape-emoji@3.7.1': + resolution: {integrity: sha512-mX18c/xhYVljS/r5Xbowzclw+1YwhtWoQFOOfkmjjZppA+RjgcwSKLvH6E20PaH1yVTjBOfSF+3POKpwsULzTg==} + + '@tsparticles/shape-image@3.7.1': + resolution: {integrity: sha512-eDzfkQhqLY6fb9QH2Vo9TGfdJBFFpYnojhxQxc7IdzIwOFMD3JK4B52RVl9oowR+rNE8dNp6P2L+eMAF4yld0g==} + + '@tsparticles/shape-line@3.7.1': + resolution: {integrity: sha512-lMPYApUpg7avxmYPfHHr4dQepZSNn/g0Q1/g2+lnTi8ZtUBiCZ2WMVy9R3GOzyozbnzigLQ6AJRnOpsUZV7H4g==} + + '@tsparticles/shape-polygon@3.7.1': + resolution: {integrity: sha512-5FrRfpYC3qnvV2nXBLE4Q0v+SMNWJO8xgzh6MBFwfptvqH4EOrqc/58eS5x0jlf+evwf9LjPgeGkOTcwaHHcYQ==} + + '@tsparticles/shape-square@3.7.1': + resolution: {integrity: sha512-7VCqbRwinjBZ+Ryme27rOtl+jKrET8qDthqZLrAoj3WONBqyt+R9q6SXAJ9WodqEX68IBvcluqbFY5qDZm8iAQ==} + + '@tsparticles/shape-star@3.7.1': + resolution: {integrity: sha512-3G4oipioyWKLEQYT11Sx3k6AObu3dbv/A5LRqGGTQm5IR6UACa+INwykZYI0a+MdJJMb83E0e4Fn3hlZbi0/8w==} + + '@tsparticles/shape-text@3.7.1': + resolution: {integrity: sha512-aU1V9O8uQQBlL0jGFh9Q0b5vQ1Ji6Oo5ptyyj5yJ5uP/ZU00L0Vhk4DNyLXpaU0+H6OBoPpCqnvEsZBB9/HmCQ==} + + '@tsparticles/slim@3.7.1': + resolution: {integrity: sha512-OtJEhud2KleX7OxiG2r/VYriHNIwTpFm3sPFy4EOJzAD0EW7KZoKXGpGn5gwGI1NWeB0jso92yNTrTC2ZTW0qw==} + + '@tsparticles/updater-color@3.7.1': + resolution: {integrity: sha512-QimV3yn17dcdJx7PpTwLtw9BhkQ0q8qFF035OdcZpnynBPAO/hg0zvSMpMGoeuDVFH02wWBy4h2/BYCv6wh6Sw==} + + '@tsparticles/updater-destroy@3.7.1': + resolution: {integrity: sha512-krXNoMDKyeyE/ZjQh3LVjrLYivFefQOQ9i+B7RpMe7x4h+iRgpB6npTCqidGQ82+hZ8G6xfQ9ToduebWwK4JGg==} + + '@tsparticles/updater-life@3.7.1': + resolution: {integrity: sha512-NY5gUrgO5AsARNC0usP9PKahXf7JCxbP/H1vzTfA0SJw4veANfWTldOvhIlcm2CHVP5P1b827p0hWsBHECwz7A==} + + '@tsparticles/updater-opacity@3.7.1': + resolution: {integrity: sha512-YcyviCooTv7SAKw7sxd84CfJqZ7dYPSdYZzCpedV6TKIObRiwLqXlyLXQGJ3YltghKQSCSolmVy8woWBCDm1qA==} + + '@tsparticles/updater-out-modes@3.7.1': + resolution: {integrity: sha512-Cb5sWquRtUYLSiFpmBjjYKRdpNV52diCo9+qMtK1oVlldDBhUwqO+1TQjdlaA2yl5DURlY9ZfOHXvY+IT7CHCw==} + + '@tsparticles/updater-roll@3.7.1': + resolution: {integrity: sha512-gHLRqpTGVGPJBEAIPUiYVembIn5bcaTXXxsUJEM/IN+GIOvj2uZZGZ4r2aFTA6WugqEbJsJdblDSvMfouyz7Ug==} + + '@tsparticles/updater-rotate@3.7.1': + resolution: {integrity: sha512-toVHwl+h6SvtA8dyxSA2kMH2QdDA71vehuAa+HoRqf1y06h5kxyYiMKZFHCqDJ6lFfRPs47MjrC9dD2bDz14MQ==} + + '@tsparticles/updater-size@3.7.1': + resolution: {integrity: sha512-+Y0H0PnDJVIsJ+zHTyubYu1jtRFmVnY1dAv3VCjScIDw6bcpL/ol+HrtHTGIX0WbMyUfjCyALfAoaXi/Wm8VcQ==} + + '@tsparticles/updater-stroke-color@3.7.1': + resolution: {integrity: sha512-VHhQkCNuxjx/Hy7A+g0Yijb24T0+wQ3jNsF/yfrR9dEdZWSBiimZLvV1bilPdAeEtieAJTAZo2VNhcD1snF0iQ==} + + '@tsparticles/updater-tilt@3.7.1': + resolution: {integrity: sha512-pSOXoXPre1VPKC5nC5GW0L9jw63w1dVdsDdggEau7MP9xO7trko9L/KyayBX12Y4Ief1ca12Incxxr67hw7GGA==} + + '@tsparticles/updater-twinkle@3.7.1': + resolution: {integrity: sha512-maRTqPbeZcxBK6s1ry+ih71qSVaitfP1KTrAKR38v26GMwyO6z+zYV2bu9WTRt21FRFAoxlMLWxNu21GtQoXDA==} + + '@tsparticles/updater-wobble@3.7.1': + resolution: {integrity: sha512-YIlNg4L0w4egQJhPLpgcvcfv9+X621+cQsrdN9sSmajxhhwtEQvQUvFUzGTcvpjVi+GcBNp0t4sCKEzoP8iaYw==} + '@types/cookie@0.6.0': resolution: {integrity: sha512-4Kh9a6B2bQciAhf7FSuMRRkUWecJgJu9nPnx3yzpsfXX/c50REIqpHY4C82bXP90qrLtXtkDxTZosYO3UpOwlA==} @@ -1165,6 +1312,9 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + gsap@3.12.7: + resolution: {integrity: sha512-V4GsyVamhmKefvcAKaoy0h6si0xX7ogwBoBSs2CTJwt7luW0oZzC0LhdkyuKV8PJAXr7Yaj8pMjCKD4GJ+eEMg==} + has-unicode@2.0.1: resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} @@ -1956,6 +2106,9 @@ packages: tslib@2.6.3: resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==} + tsparticles@3.7.1: + resolution: {integrity: sha512-NNkOYIo01eHpDuaJxDCGgcLEMZKEJTCN/XPVCLg7VxgEWN19rjXpDnDguISxadS8GSFPws7hpGgbeDDAm3MX+Q==} + type-detect@4.0.8: resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} @@ -2596,6 +2749,228 @@ snapshots: postcss-selector-parser: 6.0.10 tailwindcss: 3.4.4 + '@tsparticles/basic@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + '@tsparticles/move-base': 3.7.1 + '@tsparticles/plugin-hex-color': 3.7.1 + '@tsparticles/plugin-hsl-color': 3.7.1 + '@tsparticles/plugin-rgb-color': 3.7.1 + '@tsparticles/shape-circle': 3.7.1 + '@tsparticles/updater-color': 3.7.1 + '@tsparticles/updater-opacity': 3.7.1 + '@tsparticles/updater-out-modes': 3.7.1 + '@tsparticles/updater-size': 3.7.1 + + '@tsparticles/engine@3.7.1': {} + + '@tsparticles/interaction-external-attract@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/interaction-external-bounce@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/interaction-external-bubble@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/interaction-external-connect@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/interaction-external-grab@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/interaction-external-pause@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/interaction-external-push@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/interaction-external-remove@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/interaction-external-repulse@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/interaction-external-slow@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/interaction-external-trail@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/interaction-particles-attract@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/interaction-particles-collisions@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/interaction-particles-links@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/move-base@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/move-parallax@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/plugin-absorbers@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/plugin-easing-quad@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/plugin-emitters-shape-circle@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + '@tsparticles/plugin-emitters': 3.7.1 + + '@tsparticles/plugin-emitters-shape-square@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + '@tsparticles/plugin-emitters': 3.7.1 + + '@tsparticles/plugin-emitters@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/plugin-hex-color@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/plugin-hsl-color@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/plugin-rgb-color@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/shape-circle@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/shape-emoji@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/shape-image@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/shape-line@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/shape-polygon@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/shape-square@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/shape-star@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/shape-text@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/slim@3.7.1': + dependencies: + '@tsparticles/basic': 3.7.1 + '@tsparticles/engine': 3.7.1 + '@tsparticles/interaction-external-attract': 3.7.1 + '@tsparticles/interaction-external-bounce': 3.7.1 + '@tsparticles/interaction-external-bubble': 3.7.1 + '@tsparticles/interaction-external-connect': 3.7.1 + '@tsparticles/interaction-external-grab': 3.7.1 + '@tsparticles/interaction-external-pause': 3.7.1 + '@tsparticles/interaction-external-push': 3.7.1 + '@tsparticles/interaction-external-remove': 3.7.1 + '@tsparticles/interaction-external-repulse': 3.7.1 + '@tsparticles/interaction-external-slow': 3.7.1 + '@tsparticles/interaction-particles-attract': 3.7.1 + '@tsparticles/interaction-particles-collisions': 3.7.1 + '@tsparticles/interaction-particles-links': 3.7.1 + '@tsparticles/move-parallax': 3.7.1 + '@tsparticles/plugin-easing-quad': 3.7.1 + '@tsparticles/shape-emoji': 3.7.1 + '@tsparticles/shape-image': 3.7.1 + '@tsparticles/shape-line': 3.7.1 + '@tsparticles/shape-polygon': 3.7.1 + '@tsparticles/shape-square': 3.7.1 + '@tsparticles/shape-star': 3.7.1 + '@tsparticles/updater-life': 3.7.1 + '@tsparticles/updater-rotate': 3.7.1 + '@tsparticles/updater-stroke-color': 3.7.1 + + '@tsparticles/updater-color@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/updater-destroy@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/updater-life@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/updater-opacity@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/updater-out-modes@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/updater-roll@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/updater-rotate@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/updater-size@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/updater-stroke-color@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/updater-tilt@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/updater-twinkle@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + + '@tsparticles/updater-wobble@3.7.1': + dependencies: + '@tsparticles/engine': 3.7.1 + '@types/cookie@0.6.0': {} '@types/estree@1.0.6': {} @@ -3141,6 +3516,8 @@ snapshots: graceful-fs@4.2.11: {} + gsap@3.12.7: {} + has-unicode@2.0.1: {} hasown@2.0.2: @@ -3923,6 +4300,22 @@ snapshots: tslib@2.6.3: {} + tsparticles@3.7.1: + dependencies: + '@tsparticles/engine': 3.7.1 + '@tsparticles/interaction-external-trail': 3.7.1 + '@tsparticles/plugin-absorbers': 3.7.1 + '@tsparticles/plugin-emitters': 3.7.1 + '@tsparticles/plugin-emitters-shape-circle': 3.7.1 + '@tsparticles/plugin-emitters-shape-square': 3.7.1 + '@tsparticles/shape-text': 3.7.1 + '@tsparticles/slim': 3.7.1 + '@tsparticles/updater-destroy': 3.7.1 + '@tsparticles/updater-roll': 3.7.1 + '@tsparticles/updater-tilt': 3.7.1 + '@tsparticles/updater-twinkle': 3.7.1 + '@tsparticles/updater-wobble': 3.7.1 + type-detect@4.0.8: {} type@2.7.3: {} diff --git a/frontend/src/routes/dashboard/+page.svelte b/frontend/src/routes/dashboard/+page.svelte index b015fa8..fd3ee82 100644 --- a/frontend/src/routes/dashboard/+page.svelte +++ b/frontend/src/routes/dashboard/+page.svelte @@ -2,6 +2,57 @@ import AdventureCard from '$lib/components/AdventureCard.svelte'; import type { PageData } from './$types'; import { t } from 'svelte-i18n'; + import { onMount } from 'svelte'; + import { gsap } from 'gsap'; + + // Initial animation for page load + onMount(() => { + // Stat animations with quicker duration + gsap.from('.stat', { + opacity: 0, + y: 50, + duration: 0.6, // Quicker animation duration + stagger: 0.1, // Faster staggering between elements + ease: 'power2.out' // Slightly sharper easing for quicker feel + }); + + gsap.from('.stat-title', { + opacity: 0, + x: -50, // Smaller movement for quicker animation + duration: 0.6, // Quicker animation duration + stagger: 0.1, // Faster staggering + ease: 'power2.out' + }); + + // Stat values with faster reveal and snappier effect + gsap.from('.stat-value', { + opacity: 0, + scale: 0.8, // Slightly less scaling for a snappier effect + duration: 1, // Shorter duration + stagger: 0.2, // Faster staggering + ease: 'power2.out', // Snappier easing + delay: 0.3 // Faster delay for quicker sequencing + }); + + // Adventure card animations with quicker reveal + gsap.from('.adventure-card', { + opacity: 0, + y: 50, // Less movement for snappier feel + duration: 0.8, // Quicker duration + stagger: 0.1, // Faster staggering + ease: 'power2.out', + delay: 0.6 // Shorter delay for quicker appearance + }); + + // Inspiration section with faster bounce effect + gsap.from('.inspiration', { + opacity: 0, + scale: 0.7, // Less scale for snappier effect + duration: 1, // Slightly quicker duration + ease: 'elastic.out(0.75, 0.5)', // Snappier bounce + delay: 1 // Reduced delay for quicker animation + }); + }); export let data: PageData; @@ -19,9 +70,7 @@

- {$t('dashboard.welcome_back')}, {user?.first_name - ? `${user.first_name} ${user.last_name}` - : user?.username}! + {$t('dashboard.welcome_back')}, {user?.first_name ? `${user.first_name}` : user?.username}!

@@ -62,7 +111,9 @@

{$t('dashboard.recent_adventures')}

{#each recentAdventures as adventure} - +
+ +
{/each}
{/if} @@ -70,7 +121,7 @@ {#if recentAdventures.length === 0}

{$t('dashboard.no_recent_adventures')}

diff --git a/frontend/src/routes/login/+page.svelte b/frontend/src/routes/login/+page.svelte index 6fcc628..bfccb5f 100644 --- a/frontend/src/routes/login/+page.svelte +++ b/frontend/src/routes/login/+page.svelte @@ -15,6 +15,29 @@ import OpenIdConnect from '~icons/mdi/openid'; import { page } from '$app/stores'; + import { gsap } from 'gsap'; // Import GSAP + import { onMount } from 'svelte'; + + onMount(() => { + gsap.from('.card', { + opacity: 0, + y: 50, + duration: 1, + ease: 'power3.out' + }); + gsap.from('.text-center', { + opacity: 0, + x: -50, + duration: 1, + ease: 'power2.out' + }); + gsap.from('.input', { + opacity: 0, + y: 30, + duration: 1, + ease: 'power2.out' + }); + }); import ImageInfoModal from '$lib/components/ImageInfoModal.svelte'; import type { Background } from '$lib/types.js'; diff --git a/frontend/src/routes/signup/+page.svelte b/frontend/src/routes/signup/+page.svelte index 6643e06..ecbcced 100644 --- a/frontend/src/routes/signup/+page.svelte +++ b/frontend/src/routes/signup/+page.svelte @@ -4,6 +4,29 @@ export let data; console.log(data); + import { gsap } from 'gsap'; // Import GSAP + import { onMount } from 'svelte'; + + onMount(() => { + gsap.from('.card', { + opacity: 0, + y: 50, + duration: 1, + ease: 'power3.out' + }); + gsap.from('.text-center', { + opacity: 0, + x: -50, + duration: 1, + ease: 'power2.out' + }); + gsap.from('.input', { + opacity: 0, + y: 30, + duration: 1, + ease: 'power2.out' + }); + }); import FileImageBox from '~icons/mdi/file-image-box';