mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-22 22:02:38 +03:00
1 parent
d5f4dcb91c
commit
3b7ddb4b8f
3 files changed
+53
-50
No files matched your search
@@ -182,7 +182,6 @@ const themeVars = useThemeVars();
|
|||||||
:collapsed-icon-size="22"
|
:collapsed-icon-size="22"
|
||||||
:options="tools"
|
:options="tools"
|
||||||
:indent="8"
|
:indent="8"
|
||||||
:default-expand-all="true"
|
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import VueMarkdown from 'vue-markdown-render';
|
||||||
|
import { useTheme } from '../ui/c-link/c-link.theme';
|
||||||
|
|
||||||
|
const linkTheme = useTheme();
|
||||||
|
|
||||||
|
const homeCustomMarkdown = ref('');
|
||||||
|
const base = import.meta.env.BASE_URL ?? '/';
|
||||||
|
|
||||||
|
const res = await fetch(`${base}home.custom.md`);
|
||||||
|
if (res.ok) {
|
||||||
|
homeCustomMarkdown.value = await res.text();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div v-if="homeCustomMarkdown" class="home-custom-md">
|
||||||
|
<VueMarkdown :source="homeCustomMarkdown" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
::v-deep(.home-custom-md) a {
|
||||||
|
line-height: inherit;
|
||||||
|
font-family: inherit;
|
||||||
|
font-size: inherit;
|
||||||
|
border: none;
|
||||||
|
cursor: pointer;
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: 400;
|
||||||
|
color: v-bind('linkTheme.default.textColor');
|
||||||
|
border-radius: 4px;
|
||||||
|
transition: color cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
|
||||||
|
|
||||||
|
outline-offset: 1px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
color: v-bind('linkTheme.default.hover.textColor');
|
||||||
|
}
|
||||||
|
|
||||||
|
&:active {
|
||||||
|
color: v-bind('linkTheme.default.textColor');
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
color: v-bind('linkTheme.default.outline.color');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
+4
-49
@@ -3,16 +3,11 @@ import { IconDragDrop, IconHeart } from '@tabler/icons-vue';
|
|||||||
import { useHead } from '@vueuse/head';
|
import { useHead } from '@vueuse/head';
|
||||||
import { computed, nextTick, onMounted, onUnmounted, ref } from 'vue';
|
import { computed, nextTick, onMounted, onUnmounted, ref } from 'vue';
|
||||||
import Draggable from 'vuedraggable';
|
import Draggable from 'vuedraggable';
|
||||||
import VueMarkdown from 'vue-markdown-render';
|
|
||||||
import ColoredCard from '../components/ColoredCard.vue';
|
import ColoredCard from '../components/ColoredCard.vue';
|
||||||
import ToolCard from '../components/ToolCard.vue';
|
import ToolCard from '../components/ToolCard.vue';
|
||||||
|
import HomeCustom from './Home.custom.vue';
|
||||||
import { useToolStore } from '@/tools/tools.store';
|
import { useToolStore } from '@/tools/tools.store';
|
||||||
import { config } from '@/config';
|
import { config } from '@/config';
|
||||||
import { useTheme } from '../ui/c-link/c-link.theme';
|
|
||||||
|
|
||||||
const base = import.meta.env.BASE_URL ?? '/';
|
|
||||||
|
|
||||||
const homeCustomMarkdown = ref('');
|
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
@@ -55,9 +50,6 @@ useHead({
|
|||||||
});
|
});
|
||||||
|
|
||||||
const favoriteTools = computed(() => toolStore.favoriteTools);
|
const favoriteTools = computed(() => toolStore.favoriteTools);
|
||||||
|
|
||||||
const linkTheme = useTheme();
|
|
||||||
|
|
||||||
const isOrderingFavorites = ref(false);
|
const isOrderingFavorites = ref(false);
|
||||||
|
|
||||||
window.addEventListener('contextmenu', (e) => {
|
window.addEventListener('contextmenu', (e) => {
|
||||||
@@ -121,16 +113,6 @@ onMounted(() => {
|
|||||||
);
|
);
|
||||||
loadingObserver.observe(loadingIndicator);
|
loadingObserver.observe(loadingIndicator);
|
||||||
}
|
}
|
||||||
|
|
||||||
fetch(`${base}home.custom.md`).then((r) => {
|
|
||||||
if (r.ok) {
|
|
||||||
r.text().then((t) => {
|
|
||||||
if (t) {
|
|
||||||
homeCustomMarkdown.value = t;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -193,9 +175,9 @@ onUnmounted(() => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="homeCustomMarkdown" class="home-custom-md">
|
<Suspense>
|
||||||
<VueMarkdown :source="homeCustomMarkdown" />
|
<HomeCustom />
|
||||||
</div>
|
</Suspense>
|
||||||
|
|
||||||
<h3 class="mb-5px mt-25px font-500 text-neutral-400">
|
<h3 class="mb-5px mt-25px font-500 text-neutral-400">
|
||||||
{{ $t('home.categories.allTools') }}
|
{{ $t('home.categories.allTools') }}
|
||||||
@@ -249,31 +231,4 @@ onUnmounted(() => {
|
|||||||
transform: scale(1.0);
|
transform: scale(1.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep(.home-custom-md) a {
|
|
||||||
line-height: inherit;
|
|
||||||
font-family: inherit;
|
|
||||||
font-size: inherit;
|
|
||||||
border: none;
|
|
||||||
cursor: pointer;
|
|
||||||
text-decoration: none;
|
|
||||||
font-weight: 400;
|
|
||||||
color: v-bind('linkTheme.default.textColor');
|
|
||||||
border-radius: 4px;
|
|
||||||
transition: color cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
|
|
||||||
|
|
||||||
outline-offset: 1px;
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
color: v-bind('linkTheme.default.hover.textColor');
|
|
||||||
}
|
|
||||||
|
|
||||||
&:active {
|
|
||||||
color: v-bind('linkTheme.default.textColor');
|
|
||||||
}
|
|
||||||
|
|
||||||
&:focus {
|
|
||||||
color: v-bind('linkTheme.default.outline.color');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
Reference in new issue
Block a user