From b67dcc0be9eb8b494cfd2449d10069cac99039ff Mon Sep 17 00:00:00 2001 From: pheralb Date: Fri, 4 Mar 2022 13:34:58 +0000 Subject: [PATCH] Fix download button & improvements --- README.md | 14 ++++++++--- animations/hover.js | 12 --------- animations/tap.js | 12 +++++++++ components/card/index.js | 44 +++++++++++++++++---------------- components/categories/index.js | 9 +++++++ components/header/index.js | 2 +- components/search/index.js | 43 +++++++++++++++++--------------- pages/svg/[id].js | 3 +-- public/images/banner.png | Bin 178225 -> 178225 bytes 9 files changed, 80 insertions(+), 59 deletions(-) delete mode 100644 animations/hover.js create mode 100644 animations/tap.js create mode 100644 components/categories/index.js diff --git a/README.md b/README.md index bda2517..21ea89f 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,16 @@ +

+ + svgl logo + +

+ ## 🚀 Getting started: +[SVGL](https://svgl.vercel.app/) is a beautiful collection of SVG logos. Free and open source. + You need: -- [Node.js 16+ (recommend: 16.13.2 LTS)](https://nodejs.org/en/) +- [Node.js 16+ (recommend: 16.14.0 LTS)](https://nodejs.org/en/) - [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) and run: @@ -14,6 +22,6 @@ npm run dev Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. -## 📦 Deployed on Vercel: +## 🔑 License: -[https://svgl.vercel.app/](https://svgl.vercel.app/) +MIT diff --git a/animations/hover.js b/animations/hover.js deleted file mode 100644 index 991f90a..0000000 --- a/animations/hover.js +++ /dev/null @@ -1,12 +0,0 @@ -import React from "react"; -import { motion } from "framer-motion"; - -const Hover = ({ children }) => { - return ( - - {children} - - ); -}; - -export default Hover; diff --git a/animations/tap.js b/animations/tap.js new file mode 100644 index 0000000..f7e0410 --- /dev/null +++ b/animations/tap.js @@ -0,0 +1,12 @@ +import React from "react"; +import { motion } from "framer-motion"; + +const Tap = ({ children }) => { + return ( + + {children} + + ); +}; + +export default Tap; diff --git a/components/card/index.js b/components/card/index.js index 05a0c88..8d50cc8 100644 --- a/components/card/index.js +++ b/components/card/index.js @@ -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 ( - - -
- {title} -
- - {title} - -
- + + + +
+ {title} +
+ + {title} + +
+ +
); }; diff --git a/components/categories/index.js b/components/categories/index.js new file mode 100644 index 0000000..de9a14e --- /dev/null +++ b/components/categories/index.js @@ -0,0 +1,9 @@ +import React from 'react' + +const Index = () => { + return ( +
Index
+ ) +} + +export default Index \ No newline at end of file diff --git a/components/header/index.js b/components/header/index.js index 83654c1..038ccad 100644 --- a/components/header/index.js +++ b/components/header/index.js @@ -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"; diff --git a/components/search/index.js b/components/search/index.js index e6708ec..9b14a41 100644 --- a/components/search/index.js +++ b/components/search/index.js @@ -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 ( <> - - - - {title} - - {title} - - - - - + + + + + {title} + + {title} + + + + + + ); }; diff --git a/pages/svg/[id].js b/pages/svg/[id].js index 916ae02..6518b75 100644 --- a/pages/svg/[id].js +++ b/pages/svg/[id].js @@ -41,7 +41,7 @@ export default function Icon() { const downloadSvg = (name, url) => { confetti(); - download(url, `${name}.svg`, "image/svg+xml"); + download(url); }; return ( @@ -100,7 +100,6 @@ export default function Icon() { -