Skip to content

Commit 1c5619f

Browse files
committed
Adds new feature blocks.
Additional: 1. Fixes paddings in GithubStart component 2. Fixes Hero block buttons size 3. Refactors likes
1 parent 87dbf09 commit 1c5619f

File tree

17 files changed

+129
-43
lines changed

17 files changed

+129
-43
lines changed

spa/assets/css/main.css

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ a.text-link {
2323
}
2424

2525
.read-more-link {
26-
@apply border font-bold px-5 py-2 rounded-full;
26+
@apply border font-bold px-5 py-2 rounded-full text-sm;
2727

2828
&.gray {
2929
@apply bg-gray-100 hover:bg-gray-200 text-gray-800;
@@ -41,8 +41,12 @@ a.text-link {
4141
@apply bg-blue-100 hover:bg-blue-200 text-blue-800;
4242
}
4343

44+
&.teal {
45+
@apply bg-blue-100 hover:bg-teal-200 text-teal-800;
46+
}
47+
4448
&.small {
45-
@apply text-sm px-3 py-1;
49+
@apply text-xs px-3 py-1;
4650
}
4751
}
4852

@@ -59,5 +63,5 @@ a.text-link {
5963
}
6064

6165
.feature-text {
62-
@apply text-gray-400 font-semibold;
66+
@apply text-gray-400 font-semibold pb-2;
6367
}

spa/components/Common/Likeable.vue

Lines changed: 41 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script setup lang="ts">
22
import type { WsEvent } from "~/config/types";
3+
import JSConfetti from "js-confetti";
34
45
type Props = {
56
name: string;
@@ -8,27 +9,48 @@ const props = defineProps<Props>();
89
910
const icon = () => {
1011
const list = [
11-
'love1.svg',
12-
'love2.svg',
13-
'pampers.svg',
14-
'poop1.svg',
15-
'poop2.svg',
16-
'toilet.svg',
12+
'', '', '❤️', '',
13+
'😊', '🔥', '☀️', '💀️',
14+
'', '', '🎈', '',
15+
'🎉', '🎁', '🎊', '🎃',
16+
'🚀', '🍕', '🍔', '🍟',
17+
'🍦', '🏆', '🏈', '🏊',
18+
'🏄', '🏂', '🏇', '🚴',
1719
]
1820
1921
return list[Math.floor(Math.random() * list.length)];
2022
};
2123
24+
const position = () => {
25+
const min = 10;
26+
const max = 80;
27+
28+
return Math.floor(Math.random() * (max - min + 1)) + min;
29+
}
30+
2231
const likes = ref([]);
2332
2433
const app = useNuxtApp();
2534
const like = () => {
2635
app.$api.data.like(props.name);
2736
};
2837
38+
const firework = (total: number = 40): void => {
39+
const jsConfetti = new JSConfetti();
40+
jsConfetti.addConfetti({
41+
emojis: ['🦄', '', '🎉', '💖', '🚀', '😍'],
42+
emojiSize: 50,
43+
confettiNumber: total,
44+
});
45+
}
46+
2947
app.$ws.channel('events').listen((data: WsEvent): void => {
3048
if (data.event === 'liked' && data.data.key === props.name) {
31-
likes.value.push(icon());
49+
likes.value.push({ icon: icon(), position: position() });
50+
51+
if (likes.value.length > 10) {
52+
firework(10);
53+
}
3254
3355
setTimeout(() => {
3456
likes.value.shift();
@@ -39,8 +61,11 @@ app.$ws.channel('events').listen((data: WsEvent): void => {
3961

4062
<template>
4163
<div class="cursor-pointer relative" @click="like">
42-
<span v-for="icon in likes" class="heart">
43-
<img class="w-16" :src="`/like/${icon}`" :alt="icon"/>
64+
<span v-for="{icon, position} in likes"
65+
class="icon"
66+
:style="{left: `${position}px`}"
67+
>
68+
{{ icon }}
4469
</span>
4570
<slot></slot>
4671
</div>
@@ -57,33 +82,32 @@ app.$ws.channel('events').listen((data: WsEvent): void => {
5782
}
5883
24% {
5984
transform: rotateZ(20deg) scale(0.7);
60-
left: 3px;
85+
margin-left: 10px;
6186
opacity: 0.7
6287
}
6388
40% {
6489
transform: rotateZ(-11deg) scale(0.6);
65-
left: -3px;
90+
margin-right: 10px;
6691
}
6792
70% {
6893
transform: rotateZ(10deg) scale(0.4);
69-
left: 3px;
94+
margin-left: 10px;
7095
opacity: .5;
7196
}
7297
90% {
7398
transform: scale(0.2);
74-
left: -3px;
99+
margin-right: 10px;
75100
}
76101
100% {
77102
opacity: 0;
78-
top: -200px;
103+
top: -300px;
79104
transform: rotateZ(-5deg) scale(0.1);
80105
}
81106
}
82107
83-
.heart {
84-
position: absolute;
108+
.icon {
109+
@apply absolute text-5xl;
85110
top: -60px;
86-
left: 0;
87111
animation: float 1.5s linear forwards;
88112
}
89113
</style>

spa/components/v1/Features.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import SSO from "~/components/v1/Features/SSO.vue";
55
import ExternalDatabases from "~/components/v1/Features/ExternalDatabases.vue";
66
import KubernetesReady from "~/components/v1/Features/KubernetesReady.vue";
77
import SourceCode from "~/components/v1/Features/SourceCode.vue";
8+
import Webhooks from "~/components/v1/Features/Webhooks.vue";
9+
import Metrics from "~/components/v1/Features/Metrics.vue";
810
</script>
911

1012
<template>
@@ -19,6 +21,10 @@ import SourceCode from "~/components/v1/Features/SourceCode.vue";
1921
<SSO class="md:w-1/2 bg-white"/>
2022
<ExternalDatabases class="md:w-1/2 bg-white"/>
2123
</div>
24+
<div class="flex flex-col md:flex-row gap-6">
25+
<Webhooks class="md:w-1/2 bg-white"/>
26+
<Metrics class="md:w-1/2 bg-white"/>
27+
</div>
2228
<KubernetesReady/>
2329
<SourceCode/>
2430
</div>

spa/components/v1/Features/ExternalDatabases.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ import Feature from "~/components/v1/Features/Feature.vue";
1313
<div>
1414
<h3 class="feature-title">External database support</h3>
1515
<p class="feature-text mb-6">
16-
Configure Buggregator to use external databases like MongoDB or
16+
Configure Buggregator to use external databases like MySQL or
1717
PostgreSQL for event storage. This flexibility allows you to scale storage according to your
1818
project needs.
1919
</p>
2020

2121
<a href="https://docs.buggregator.dev/config/external-db.html"
2222
target="_blank"
23-
class="read-more-link green"
23+
class="read-more-link"
2424
>
2525
Read more
2626
</a>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<script setup lang="ts">
2+
import Feature from "~/components/v1/Features/Feature.vue";
3+
</script>
4+
5+
<template>
6+
<Feature>
7+
<div class="feature-grid">
8+
<svg role="img" xmlns="http://www.w3.org/2000/svg" class="w-8 text-red-400" viewBox="0 0 52 52" xml:space="preserve"><path fill="currentColor" d="M44.9 2H7.1C4.3 2 2 4.3 2 7.1v37.7C2 47.7 4.3 50 7.1 50h37.7c2.8 0 5.1-2.3 5.1-5.1V7.1c.1-2.8-2.2-5.1-5-5.1zM15.7 39.7c0 .9-.8 1.7-1.7 1.7h-1.7c-.9 0-1.7-.8-1.7-1.7v-9.4c0-.9.8-1.7 1.7-1.7H14c.9 0 1.7.8 1.7 1.7v9.4zm8.6 0c0 .9-.8 1.7-1.7 1.7h-1.7c-.9 0-1.7-.8-1.7-1.7V17.4c0-.9.8-1.7 1.7-1.7h1.7c.9 0 1.7.8 1.7 1.7v22.3zm8.6 0c0 .9-.8 1.7-1.7 1.7h-1.7c-.9 0-1.7-.8-1.7-1.7V12.3c0-.9.8-1.7 1.7-1.7h1.7c.9 0 1.7.8 1.7 1.7v27.4zm8.5 0c0 .9-.8 1.7-1.7 1.7H38c-.9 0-1.7-.8-1.7-1.7V23.4c0-.9.8-1.7 1.7-1.7h1.7c.9 0 1.7.8 1.7 1.7v16.3z"/></svg>
9+
<div>
10+
<h3 class="feature-title">Metrics</h3>
11+
<p class="feature-text">Monitor application errors in real-time with Buggregator's metrics. It provides
12+
prometheus metrics, that can be used to monitor errors and exceptions in your application using Grafana.
13+
</p>
14+
</div>
15+
</div>
16+
<div>
17+
<a href="https://docs.buggregator.dev/config/metrics.html" target="_blank" class="read-more-link">
18+
Read more
19+
</a>
20+
</div>
21+
</Feature>
22+
</template>
23+
24+
<style scoped lang="scss">
25+
26+
</style>

spa/components/v1/Features/SSO.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ import Feature from "~/components/v1/Features/Feature.vue";
1313
<div>
1414
<h3 class="feature-title">Single Sign On</h3>
1515
<p class="feature-text">Securely manage user access and authentication through Single
16-
Sign-On (SSO) with providers like <a href="https://auth0.com/" class="text-link">Auth0</a>.
16+
Sign-On (SSO) with providers like <a href="https://auth0.com" class="text-link">Auth0</a> or <a
17+
href="https://kinde.com" class="text-link">Kinde</a>.
1718
</p>
1819
</div>
1920
</div>
2021
<div>
21-
<a href="https://docs.buggregator.dev/config/sso.html" target="_blank" class="read-more-link purple">
22+
<a href="https://docs.buggregator.dev/config/sso.html" target="_blank" class="read-more-link">
2223
Read more
2324
</a>
2425
</div>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<script setup lang="ts">
2+
import Feature from "~/components/v1/Features/Feature.vue";
3+
</script>
4+
5+
<template>
6+
<Feature>
7+
<div class="feature-grid">
8+
<svg role="img" viewBox="-10 -5 1034 1034" class="w-8 text-teal-400" xmlns="http://www.w3.org/2000/svg">
9+
<path fill="currentColor"
10+
d="M482 226h-1l-10 2q-33 4-64.5 18.5T351 285q-41 37-57 91-9 30-8 63t12 63q17 45 52 78l13 12-83 135q-26-1-45 7-30 13-45 40-7 15-9 31t2 32q8 30 33 48 15 10 33 14.5t36 2 34.5-12.5 27.5-25q12-17 14.5-39t-5.5-41q-1-5-7-14l-3-6 118-192q6-9 8-14l-10-3q-9-2-13-4-23-10-41.5-27.5T379 484q-17-36-9-75 4-23 17-43t31-34q37-27 82-27 27-1 52.5 9.5T597 345q17 16 26.5 38.5T634 429q0 17-6 42l70 19 8 1q14-43 7-86-4-33-19.5-63.5T654 288q-42-42-103-56-6-2-18-4l-14-2h-37zm18 124q-17 0-34 7t-30.5 20.5T416 409q-8 20-4 44 3 18 14 34t28 25q24 15 56 13 3 4 5 8l112 191q3 6 6 9 27-26 58.5-35.5t65-3.5 58.5 26q32 25 43.5 61.5t.5 73.5q-8 28-28.5 50T782 938q-31 13-66.5 8.5T652 922q-4-3-13-10l-5-6q-4 3-11 10l-47 46q23 23 52 38.5t61 21.5l22 4h39l28-5q64-13 110-60 22-22 36.5-50.5T944 851q5-36-2-71.5T917 715t-44-51-57-35q-34-14-70.5-16t-71.5 7l-17 5-81-137q13-19 16-37 5-32-13-60-16-25-44-35-17-6-35-6zM218 614q-58 13-100 53-47 44-61 105l-4 24v37l2 11q2 13 4 20 7 31 24.5 59t42.5 49q50 41 115 49 38 4 76-4.5t70-28.5q53-34 78-91 7-17 14-45 6-1 18 0l125 2q14 0 20 1 11 20 25 31t31.5 16 35.5 4q28-3 50-20 27-21 32-54 2-17-1.5-33T801 769q-16-22-41-32-17-7-35.5-6.5T689 738q-28 12-43 37l-3 6q-14 0-42-1l-113-1q-15-1-43-1l-50-1 3 17q8 43-13 81-14 27-40 45t-57 22q-35 6-70-7.5T161 892q-28-35-27-79 1-37 23-69 13-19 32-32t41-19l9-3z"/>
11+
</svg>
12+
<div>
13+
<h3 class="feature-title">Webhooks</h3>
14+
<p class="feature-text">Use webhooks for integration with third-party services like
15+
<a href="https://n8n.io" class="text-link">n8n</a>. For example, you can use webhooks to send notification
16+
when an error in your application is occurred.
17+
</p>
18+
</div>
19+
</div>
20+
<div>
21+
<a href="https://docs.buggregator.dev/config/webhooks.html" target="_blank" class="read-more-link">
22+
Read more
23+
</a>
24+
</div>
25+
</Feature>
26+
</template>
27+
28+
<style scoped lang="scss">
29+
30+
</style>

spa/components/v1/GithubStars.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ const currentProgress = computed(() => {
3333
<span v-else class="no-stars">Star it now!</span>
3434
</a>
3535

36-
<!-- <div v-if="progress" class="progress-bar">-->
37-
<!-- <div class="progress" :style="{ width: `${currentProgress}%` }"></div>-->
38-
<!-- <div class="required">of {{ props.required }} stars</div>-->
39-
<!-- </div>-->
36+
<div v-if="progress" class="progress-bar">
37+
<div class="progress" :style="{ width: `${currentProgress}%` }"></div>
38+
<div class="required">of {{ props.required }} stars</div>
39+
</div>
4040
</template>
4141

4242
<style scoped lang="scss">
@@ -55,7 +55,7 @@ const currentProgress = computed(() => {
5555
@apply bg-gray-800 text-white rounded-full flex items-center border bg-gray-800 hover:bg-blue-600 transition cursor-pointer;
5656
5757
&.lg {
58-
@apply gap-6 p-4 text-xl;
58+
@apply gap-6 p-4 text-xl pr-5;
5959
6060
.logo {
6161
@apply w-8 h-8;
@@ -67,7 +67,7 @@ const currentProgress = computed(() => {
6767
}
6868
6969
&.md {
70-
@apply gap-6 p-2;
70+
@apply gap-6 py-2 pl-2 pr-3;
7171
7272
.logo {
7373
@apply w-6 h-6;

spa/components/v1/Hero.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ const openVideo = async () => {
5858
@apply flex flex-col sm:flex-row items-center justify-center gap-6 lg:justify-start mb-8;
5959
6060
.demo {
61-
@apply px-3 py-2 md:px-6 md:py-4;
61+
@apply px-3 py-2 md:px-6 md:py-3;
6262
@apply bg-blue-800 hover:bg-blue-700;
6363
@apply rounded-md shadow-sm;
6464
@apply focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white;
65-
@apply font-semibold text-white;
65+
@apply text-white text-sm md:text-base;
6666
}
6767
6868
.video {
@@ -75,10 +75,11 @@ const openVideo = async () => {
7575
}
7676
7777
.install {
78-
@apply font-semibold leading-6 text-blue-800 hover:text-blue-700 hover:bg-blue-100 border;
79-
@apply px-3 py-2 md:px-6 md:py-4;
78+
@apply leading-6 text-blue-800 hover:text-blue-700 hover:bg-blue-100 border;
79+
@apply px-3 py-2 md:px-6 md:py-3;
8080
@apply rounded-md;
8181
@apply transition-colors;
82+
@apply text-sm md:text-base;
8283
@apply focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-white;
8384
}
8485
}

spa/components/v1/IntroVideo.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ import { YoutubeVue3 as Youtube } from 'youtube-vue3'
66
<div class="video-container">
77
<Youtube videoid="yKWbuw8xN_c"
88
class="w-full h-full"
9-
controls="0"
9+
controls="1"
1010
:autoplay="true"
1111
:loop="false"/>
1212
</div>
1313
</template>
1414

1515
<style scoped lang="scss">
1616
.video-container {
17-
@apply aspect-video w-3/4 rounded-xl overflow-hidden drop-shadow-2xl;
17+
@apply aspect-video w-full md:w-3/4 md:rounded-xl overflow-hidden drop-shadow-2xl;
1818
1919
}
2020
</style>

0 commit comments

Comments
 (0)