Skip to content

Commit

Permalink
Add: banner on the main
Browse files Browse the repository at this point in the history
  • Loading branch information
altfoxie committed Jun 1, 2024
1 parent 7dba152 commit 3422556
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 2 deletions.
44 changes: 44 additions & 0 deletions .vitepress/theme/Banner.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<script setup lang="ts">
import { useData } from "vitepress";
import { VPBadge } from "vitepress/theme";
import { computed } from "vue";
const data = useData();
const text = computed(() => {
return data.lang.value == "en"
? "Help test <b>secure SOCKS5 proxy</b> ->"
: "Помогите протестировать <b>безопасный SOCKS5 прокси</b> ->";
});
</script>

<template>
<a href="/use#socks5">
<VPBadge class="banner-text" v-html="text" />
</a>
</template>

<style>
.banner-text {
margin-top: 1rem;
padding: 7px 10px 7px 10px;
font-size: 14px;
align-content: center;
animation: pulse 5s infinite;
}
@keyframes pulse {
0% {
transform: scale(1);
box-shadow: 0 0 5px;
}
50% {
transform: scale(1.02);
box-shadow: 0 0 15px;
}
100% {
transform: scale(1);
box-shadow: 0 0 5px;
}
}
</style>
3 changes: 3 additions & 0 deletions .vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
import { h } from "vue";
import type { Theme } from "vitepress";
import DefaultTheme from "vitepress/theme";
import "./Banner.vue";
import "./style.css";
import Banner from "./Banner.vue";

export default {
extends: DefaultTheme,
Layout: () => {
return h(DefaultTheme.Layout, null, {
// https://vitepress.dev/guide/extending-default-theme#layout-slots
"home-hero-info-after": () => h(Banner),
});
},
enhanceApp({ app, router, siteData }) {
Expand Down
2 changes: 1 addition & 1 deletion src/en/use.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> [!WARNING] huecker.io is in the development stage and does not guarantee 100% availability and security.
## 1. New Secure Method (SOCKS5) {#socks5}
## 1. New Secure Method (SOCKS5) {#socks5} <Badge type="warning" text="experiment" />

**This method eliminates the possibility of traffic interception and image tampering.**

Expand Down
2 changes: 1 addition & 1 deletion src/use.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

> [!WARNING] huecker.io находится в стадии разработки и не гарантирует 100% доступности и безопасности.
## 1. Новый безопасный способ (SOCKS5) {#socks5}
## 1. Новый безопасный способ (SOCKS5) <Badge type="warning" text="эксперимент" /> {#socks5}

**Этот способ исключает возможность перехвата трафика и подмены образов.**

Expand Down

0 comments on commit 3422556

Please sign in to comment.