mirror of
https://github.com/pheralb/svgl.git
synced 2025-12-29 08:01:36 +08:00
Fix download button & improvements
This commit is contained in:
+23
-21
@@ -1,30 +1,32 @@
|
||||
import React from "react";
|
||||
import Link from "next/link";
|
||||
import { Box, Text, Icon, Image, Center } from "@chakra-ui/react";
|
||||
import Hover from "animations/hover";
|
||||
import Tap from "animations/tap";
|
||||
|
||||
const Index = ({ title, url, href }) => {
|
||||
return (
|
||||
<Link href={url} passHref>
|
||||
<Box
|
||||
_hover={{
|
||||
shadow: "md",
|
||||
transform: "translateY(-4px)",
|
||||
transition: "all .3s",
|
||||
}}
|
||||
p={4}
|
||||
cursor="pointer"
|
||||
borderRadius="10px"
|
||||
mb="3"
|
||||
>
|
||||
<Center>
|
||||
<Image src={href} alt={title} boxSize="60px" />
|
||||
</Center>
|
||||
<Text mt="2" fontWeight="light" textAlign={"center"}>
|
||||
{title}
|
||||
</Text>
|
||||
</Box>
|
||||
</Link>
|
||||
<Tap>
|
||||
<Link href={url} passHref>
|
||||
<Box
|
||||
_hover={{
|
||||
shadow: "md",
|
||||
transform: "translateY(-4px)",
|
||||
transition: "all .3s",
|
||||
}}
|
||||
p={4}
|
||||
cursor="pointer"
|
||||
borderRadius="10px"
|
||||
mb="3"
|
||||
>
|
||||
<Center>
|
||||
<Image src={href} alt={title} boxSize="60px" />
|
||||
</Center>
|
||||
<Text mt="2" fontWeight="light" textAlign={"center"}>
|
||||
{title}
|
||||
</Text>
|
||||
</Box>
|
||||
</Link>
|
||||
</Tap>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
import React from 'react'
|
||||
|
||||
const Index = () => {
|
||||
return (
|
||||
<div>Index</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default Index
|
||||
@@ -20,7 +20,7 @@ import {
|
||||
} from "react-icons/io5";
|
||||
import { BiLinkExternal } from "react-icons/bi";
|
||||
import Link from "next/link";
|
||||
import Hover from "animations/hover";
|
||||
import Hover from "animations/tap";
|
||||
import Show from "animations/show";
|
||||
import { svgl } from "components/svg";
|
||||
import HEADER_LINKS from "./links";
|
||||
|
||||
+23
-20
@@ -6,37 +6,40 @@ import {
|
||||
Input,
|
||||
InputLeftElement,
|
||||
InputGroup,
|
||||
Button,
|
||||
Flex,
|
||||
HStack,
|
||||
Text,
|
||||
Image,
|
||||
Icon,
|
||||
} from "@chakra-ui/react";
|
||||
import { IoCloudDownloadOutline, IoLink, IoSearch } from "react-icons/io5";
|
||||
import { IoSearch } from "react-icons/io5";
|
||||
import { BiLinkExternal } from "react-icons/bi";
|
||||
import { Algolia } from "components/svg";
|
||||
import Tap from "animations/tap";
|
||||
|
||||
const AutocompleteItem = ({ id, title, href, url }) => {
|
||||
return (
|
||||
<>
|
||||
<Link href={`/svg/${id}`} passHref>
|
||||
<Box
|
||||
id={id}
|
||||
w="100%"
|
||||
borderWidth="1px"
|
||||
borderRadius="6px"
|
||||
mt="3"
|
||||
cursor="pointer"
|
||||
>
|
||||
<HStack py={6} px={6} spacing={2}>
|
||||
<Image src={href} alt={title} boxSize="20px" mr="2" />
|
||||
<Text fontSize="18px" fontWeight="light">
|
||||
{title}
|
||||
</Text>
|
||||
<Icon as={IoLink} />
|
||||
</HStack>
|
||||
</Box>
|
||||
</Link>
|
||||
<Tap>
|
||||
<Link href={`/svg/${id}`} passHref>
|
||||
<Box
|
||||
id={id}
|
||||
w="100%"
|
||||
borderWidth="1px"
|
||||
borderRadius="6px"
|
||||
mt="3"
|
||||
cursor="pointer"
|
||||
>
|
||||
<HStack py={6} px={6} spacing={2}>
|
||||
<Image src={href} alt={title} boxSize="20px" mr="2" />
|
||||
<Text fontSize="18px" fontWeight="light">
|
||||
{title}
|
||||
</Text>
|
||||
<Icon as={BiLinkExternal} />
|
||||
</HStack>
|
||||
</Box>
|
||||
</Link>
|
||||
</Tap>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user