2022-03-31 00:33:29 +02:00
|
|
|
<script setup lang="ts">
|
2022-12-17 01:30:02 +01:00
|
|
|
import { useToolStore } from '@/tools/tools.store';
|
2022-08-17 15:09:43 +02:00
|
|
|
import { Heart } from '@vicons/tabler';
|
2022-04-19 13:19:44 +02:00
|
|
|
import { useHead } from '@vueuse/head';
|
2022-08-17 15:09:43 +02:00
|
|
|
import ColoredCard from '../components/ColoredCard.vue';
|
2022-08-04 21:59:22 +02:00
|
|
|
import ToolCard from '../components/ToolCard.vue';
|
2022-04-19 13:19:44 +02:00
|
|
|
|
2022-12-17 01:30:02 +01:00
|
|
|
const toolStore = useToolStore();
|
|
|
|
|
2022-05-30 20:35:22 +02:00
|
|
|
useHead({ title: 'IT Tools - Handy online tools for developers' });
|
2022-03-31 00:33:29 +02:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2022-04-15 23:10:47 +02:00
|
|
|
<div class="home-page">
|
2022-04-22 23:31:40 +02:00
|
|
|
<n-grid x-gap="12" y-gap="12" cols="1 400:2 800:3 1200:4 2000:8">
|
2022-08-17 15:09:43 +02:00
|
|
|
<n-gi>
|
|
|
|
<colored-card title="You like it-tools?" :icon="Heart">
|
|
|
|
Give us a star on
|
|
|
|
<a
|
|
|
|
href="https://github.com/CorentinTh/it-tools"
|
|
|
|
rel="noopener"
|
|
|
|
target="_blank"
|
|
|
|
aria-label="IT-Tools' github repository"
|
|
|
|
>github</a
|
|
|
|
>
|
|
|
|
or follow us on
|
|
|
|
<a
|
|
|
|
href="https://twitter.com/ittoolsdottech"
|
|
|
|
rel="noopener"
|
|
|
|
target="_blank"
|
|
|
|
aria-label="IT-Tools' twitter account"
|
|
|
|
>twitter</a
|
|
|
|
>! Thank you
|
|
|
|
<n-icon :component="Heart" />
|
|
|
|
</colored-card>
|
|
|
|
</n-gi>
|
2022-12-17 01:30:02 +01:00
|
|
|
</n-grid>
|
|
|
|
|
|
|
|
<transition name="height">
|
|
|
|
<div v-if="toolStore.favoriteTools.length > 0">
|
|
|
|
<n-h3>Your favorite tools</n-h3>
|
|
|
|
<n-grid x-gap="12" y-gap="12" cols="1 400:2 800:3 1200:4 2000:8">
|
|
|
|
<n-gi v-for="tool in toolStore.favoriteTools" :key="tool.name">
|
|
|
|
<tool-card :tool="tool" />
|
|
|
|
</n-gi>
|
|
|
|
</n-grid>
|
|
|
|
</div>
|
|
|
|
</transition>
|
|
|
|
|
|
|
|
<div v-if="toolStore.newTools.length > 0">
|
|
|
|
<n-h3>Newest tools</n-h3>
|
|
|
|
<n-grid x-gap="12" y-gap="12" cols="1 400:2 800:3 1200:4 2000:8">
|
|
|
|
<n-gi v-for="tool in toolStore.newTools" :key="tool.name">
|
|
|
|
<tool-card :tool="tool" />
|
|
|
|
</n-gi>
|
|
|
|
</n-grid>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<n-h3>All the tools</n-h3>
|
|
|
|
<n-grid x-gap="12" y-gap="12" cols="1 400:2 800:3 1200:4 2000:8">
|
|
|
|
<n-gi v-for="tool in toolStore.tools" :key="tool.name">
|
|
|
|
<transition>
|
|
|
|
<tool-card :tool="tool" />
|
|
|
|
</transition>
|
2022-04-15 23:10:47 +02:00
|
|
|
</n-gi>
|
|
|
|
</n-grid>
|
|
|
|
</div>
|
2022-03-31 00:33:29 +02:00
|
|
|
</template>
|
|
|
|
|
2022-04-05 23:23:08 +02:00
|
|
|
<style scoped lang="less">
|
|
|
|
.home-page {
|
2022-04-22 23:31:40 +02:00
|
|
|
padding-top: 50px;
|
2022-04-05 23:23:08 +02:00
|
|
|
}
|
2022-12-17 01:30:02 +01:00
|
|
|
|
|
|
|
::v-deep(.n-grid) {
|
|
|
|
margin-bottom: 12px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.height-enter-active,
|
|
|
|
.height-leave-active {
|
|
|
|
transition: all 0.5s ease-in-out;
|
|
|
|
overflow: hidden;
|
|
|
|
max-height: 500px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.height-enter-from,
|
|
|
|
.height-leave-to {
|
|
|
|
max-height: 42px;
|
|
|
|
overflow: hidden;
|
|
|
|
opacity: 0;
|
|
|
|
margin-bottom: 0;
|
|
|
|
}
|
2022-04-22 23:31:40 +02:00
|
|
|
</style>
|