diff --git a/README.md b/README.md
index 21ea89f..0ce182c 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
-
+
diff --git a/animations/tap.js b/animations/tap.js
index 153215b..d129012 100644
--- a/animations/tap.js
+++ b/animations/tap.js
@@ -3,7 +3,7 @@ import { motion } from "framer-motion";
const Tap = ({ children }) => {
return (
-
+
{children}
);
diff --git a/components/card/index.js b/components/card/index.js
index 8d50cc8..d7375f5 100644
--- a/components/card/index.js
+++ b/components/card/index.js
@@ -1,32 +1,76 @@
import React from "react";
import Link from "next/link";
-import { Box, Text, Icon, Image, Center } from "@chakra-ui/react";
+import {
+ Box,
+ Text,
+ Image,
+ Center,
+ HStack,
+ IconButton,
+ useColorModeValue,
+} from "@chakra-ui/react";
+import { IoCloudDownloadOutline } from "react-icons/io5";
+import { FiExternalLink } from "react-icons/fi";
+import download from "downloadjs";
+import toast from "react-hot-toast";
import Tap from "animations/tap";
const Index = ({ title, url, href }) => {
+ const bgColor = useColorModeValue("#F2F2F2", "#1D1D1D");
+ const color = useColorModeValue("black", "white");
+
+ const downloadSvg = (url) => {
+ toast(`Downloading ${title}...`, {
+ icon: "🥳",
+ style: {
+ borderRadius: "10px",
+ background: bgColor,
+ color: color,
+ },
+ });
+ download(url);
+ };
+
return (
-
-
-
-
-
-
-
- {title}
-
-
-
-
+
+
+
+
+
+ {title}
+
+
+
+
+ }
+ onClick={() => downloadSvg(href)}
+ />
+
+
+
+ }
+ />
+
+
+
+
+
);
};
diff --git a/components/error/index.js b/components/error/index.js
index dfb97f5..09e5d2c 100644
--- a/components/error/index.js
+++ b/components/error/index.js
@@ -20,10 +20,9 @@ const Error = () => {
}
- colorScheme="twitter"
+ borderWidth="1px"
variant="outline"
- fontWeight="bold"
- border="0"
+ fontWeight="light"
mb="4"
>
Go home
diff --git a/components/header/dark.js b/components/header/dark.js
deleted file mode 100644
index 12ca019..0000000
--- a/components/header/dark.js
+++ /dev/null
@@ -1,37 +0,0 @@
-import React from "react";
-import { useColorMode, useColorModeValue, IconButton } from "@chakra-ui/react";
-import { AnimatePresence, motion } from "framer-motion";
-import { IoMoon, IoSunnyOutline } from "react-icons/io5";
-
-const Index = () => {
- const { colorMode, toggleColorMode } = useColorMode();
- const iconChange = useColorModeValue(, );
- const keyChange = useColorModeValue("light", "dark");
-
- function toggleTheme() {
- toggleColorMode();
- }
-
- return (
-
-
-
-
-
- );
-};
-
-export default Index;
diff --git a/components/header/index.js b/components/header/index.js
deleted file mode 100644
index f27ea0c..0000000
--- a/components/header/index.js
+++ /dev/null
@@ -1,151 +0,0 @@
-import React from "react";
-import {
- Box,
- Flex,
- HStack,
- Button,
- useDisclosure,
- VStack,
- IconButton,
- useColorModeValue,
- Icon,
-} from "@chakra-ui/react";
-import Dark from "components/header/dark";
-import {
- IoApps,
- IoBookOutline,
- IoCloseSharp,
- IoLogoGithub,
-} from "react-icons/io5";
-import { BiLinkExternal } from "react-icons/bi";
-import Link from "next/link";
-import HEADER_LINKS from "./links";
-import ModalSearch from "components/search/modal";
-import Logo from "./logo";
-
-const Header = () => {
- const mobileNav = useDisclosure();
- const bg = useColorModeValue("light.100", "lightDark.900");
- return (
- <>
-
-
-
-
- {HEADER_LINKS.map((link) => (
-
-
-
- ))}
-
-
-
-
-
- }
- />
-
-
-
-
- }
- onClick={mobileNav.onOpen}
- />
-
- }
- fontWeight="light"
- onClick={mobileNav.onClose}
- >
- Close
-
-
- }
- fontWeight="light"
- >
- Library
-
-
-
- }
- fontWeight="light"
- >
- Github
-
-
-
-
-
-
-
-
- >
- );
-};
-
-export default Header;
diff --git a/components/header/links.js b/components/header/links.js
deleted file mode 100644
index 5c4cf1d..0000000
--- a/components/header/links.js
+++ /dev/null
@@ -1,16 +0,0 @@
-const HEADER_LINKS = [
- {
- id: 1,
- href: "/",
- external: false,
- title: "Browse",
- },
- {
- id: 2,
- href: "https://github.com/pheralb/svgl/tree/main/public/library",
- external: true,
- title: "Library",
- }
-];
-
-export default HEADER_LINKS;
diff --git a/components/header/logo.js b/components/header/logo.js
deleted file mode 100644
index 4491c7e..0000000
--- a/components/header/logo.js
+++ /dev/null
@@ -1,37 +0,0 @@
-import React, { useEffect } from "react";
-import Link from "next/link";
-import { useRouter } from "next/router";
-import { IconButton } from "@chakra-ui/react";
-import Hover from "animations/tap";
-import { svgl } from "components/svg";
-import confetti from "canvas-confetti";
-
-const Logo = () => {
- const router = useRouter();
-
- useEffect(() => {
- logoHeader.addEventListener("contextmenu", (event) => {
- event.preventDefault();
- router.push("/design");
- });
- }, []);
-
- return (
-
-
-
-
-
- );
-};
-
-export default Logo;
diff --git a/components/search/index.js b/components/search/index.js
index 9b14a41..c9c54b2 100644
--- a/components/search/index.js
+++ b/components/search/index.js
@@ -13,33 +13,31 @@ import {
Icon,
} from "@chakra-ui/react";
import { IoSearch } from "react-icons/io5";
-import { BiLinkExternal } from "react-icons/bi";
+import { FiExternalLink } from "react-icons/fi";
import { Algolia } from "components/svg";
-import Tap from "animations/tap";
const AutocompleteItem = ({ id, title, href, url }) => {
return (
<>
-
-
-
-
-
-
- {title}
-
-
-
-
-
-
+
+
+
+
+
+ {title}
+
+
+
+
+
>
);
};
@@ -96,6 +94,7 @@ export default function Search(props) {
placeholder="Search icons..."
_focus={{ shadow: "md" }}
ref={inputRef}
+ autoFocus
{...inputProps}
/>
diff --git a/components/search/modal.js b/components/search/modal.js
index 613ba00..f58937b 100644
--- a/components/search/modal.js
+++ b/components/search/modal.js
@@ -13,21 +13,18 @@ import {
useColorModeValue,
} from "@chakra-ui/react";
import Search from "components/search";
-import { IoSearch } from "react-icons/io5";
+import { IoSearchOutline } from "react-icons/io5";
+import Item from "components/sidebar/item";
const ModalSearch = (props) => {
const { isOpen, onOpen, onClose } = useDisclosure();
const bg = useColorModeValue("light.100", "dark.800");
return (
<>
- }
- onClick={onOpen}
- {...props}
- />
-
+ -
+ Search
+
+
Search
diff --git a/components/footer/index.js b/components/sidebar/by.js
similarity index 65%
rename from components/footer/index.js
rename to components/sidebar/by.js
index 82665e3..8ab842e 100644
--- a/components/footer/index.js
+++ b/components/sidebar/by.js
@@ -1,11 +1,12 @@
import React from "react";
-import { Center, Text, VStack } from "@chakra-ui/react";
+import { Center, useColorModeValue, VStack } from "@chakra-ui/react";
import Link from "next/link";
const Index = () => {
+ const color = useColorModeValue("gray.400", "gray.600");
return (
<>
-
+
Built by Pablo Hdez
diff --git a/components/sidebar/dark.js b/components/sidebar/dark.js
new file mode 100644
index 0000000..6feedb5
--- /dev/null
+++ b/components/sidebar/dark.js
@@ -0,0 +1,22 @@
+import React from "react";
+import { useColorMode, useColorModeValue } from "@chakra-ui/react";
+import { IoMoonOutline, IoSunnyOutline } from "react-icons/io5";
+import Item from "./item";
+
+const Index = () => {
+ const { colorMode, toggleColorMode } = useColorMode();
+ const iconChange = useColorModeValue(IoSunnyOutline, IoMoonOutline);
+ const theme = useColorModeValue("Light", "Dark");
+
+ function toggleTheme() {
+ toggleColorMode();
+ }
+
+ return (
+ -
+ {theme}
+
+ );
+};
+
+export default Index;
diff --git a/components/sidebar/index.js b/components/sidebar/index.js
new file mode 100644
index 0000000..57b6c85
--- /dev/null
+++ b/components/sidebar/index.js
@@ -0,0 +1,108 @@
+import React from "react";
+import {
+ Box,
+ Drawer,
+ DrawerContent,
+ DrawerOverlay,
+ DrawerCloseButton,
+ DrawerHeader,
+ DrawerBody,
+ Flex,
+ IconButton,
+ useColorModeValue,
+ useDisclosure,
+} from "@chakra-ui/react";
+import NextLink from "next/link";
+import { IoApps } from "react-icons/io5";
+
+import Logo from "components/sidebar/logo";
+import Item from "components/sidebar/item";
+import SidebarLinks from "components/sidebar/links";
+import Dark from "components/sidebar/dark";
+import By from "components/sidebar/by";
+import ModalSearch from "components/search/modal";
+
+export default function Index({ children }) {
+ const sidebar = useDisclosure();
+ const border = useColorModeValue("dark.200", "dark.800");
+ const bg = useColorModeValue("gray.100", "lightDark.900");
+
+ const SidebarContent = (props) => (
+
+
+
+
+
+ {SidebarLinks.map((link) => (
+
+ -
+ {link.title}
+
+
+ ))}
+
+
+
+
+
+
+
+ );
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ size="md"
+ w="100%"
+ variant="ghost"
+ borderWidth="1px"
+ />
+
+
+ {children}
+
+
+
+ );
+}
diff --git a/components/sidebar/item.js b/components/sidebar/item.js
new file mode 100644
index 0000000..67c12ce
--- /dev/null
+++ b/components/sidebar/item.js
@@ -0,0 +1,35 @@
+import React from "react";
+import { useRouter } from 'next/router';
+import { Flex, Icon, useColorModeValue } from "@chakra-ui/react";
+import { FiExternalLink } from "react-icons/fi";
+import Tap from "animations/tap";
+
+const Item = (props) => {
+
+ const { icon, external, children, href, ...rest } = props;
+ const { pathname } = useRouter();
+ const isActive = pathname === href;
+ const borderColor = useColorModeValue("dark.800", "white");
+
+ return (
+
+
+ {icon && }
+ {children}
+ {external && }
+
+
+ );
+};
+
+export default Item;
diff --git a/components/sidebar/links.js b/components/sidebar/links.js
new file mode 100644
index 0000000..df2ec93
--- /dev/null
+++ b/components/sidebar/links.js
@@ -0,0 +1,28 @@
+import { IoHomeOutline, IoLogoGithub } from 'react-icons/io5';
+import { FiTwitter } from 'react-icons/fi';
+
+const SidebarLinks = [
+ {
+ id: 1,
+ href: "/",
+ external: false,
+ title: "Browse",
+ icon: IoHomeOutline,
+ },
+ {
+ id: 2,
+ href: "https://github.com/pheralb/svgl/",
+ external: true,
+ title: "Github",
+ icon: IoLogoGithub,
+ },
+ {
+ id: 3,
+ href: "https://twitter.com/pheralb_",
+ external: true,
+ title: "Twitter",
+ icon: FiTwitter,
+ }
+];
+
+export default SidebarLinks;
diff --git a/components/sidebar/logo.js b/components/sidebar/logo.js
new file mode 100644
index 0000000..7417c3d
--- /dev/null
+++ b/components/sidebar/logo.js
@@ -0,0 +1,30 @@
+import React from "react";
+import Link from "next/link";
+import { HStack, Icon, Text } from "@chakra-ui/react";
+import { svgl } from "components/svg";
+import Tap from "animations/tap";
+
+const Logo = () => {
+ return (
+
+
+
+
+
+ svgl
+
+
+
+
+ );
+};
+
+export default Logo;
diff --git a/data/icons.js b/data/icons.js
index 4141789..28ad773 100644
--- a/data/icons.js
+++ b/data/icons.js
@@ -300,6 +300,20 @@ const Icons = [
category: "Social",
url: "https://www.linkedin.com/",
},
+ {
+ id: 44,
+ href:"/library/telegram.svg",
+ title: "Telegram",
+ category: "Social",
+ url: "https://web.telegram.org/",
+ },
+ {
+ id: 45,
+ href: "/library/whatsapp.svg",
+ title: "WhatsApp",
+ category: "Social",
+ url: "https://web.whatsapp.com/",
+ }
];
export default Icons;
diff --git a/package-lock.json b/package-lock.json
index e900ec3..a9d2f14 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -19,6 +19,7 @@
"next": "12.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
+ "react-hot-toast": "^2.2.0",
"react-icons": "^4.3.1",
"swr": "^1.2.2"
},
@@ -3194,6 +3195,14 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/goober": {
+ "version": "2.1.8",
+ "resolved": "https://registry.npmjs.org/goober/-/goober-2.1.8.tgz",
+ "integrity": "sha512-S0C85gCzcfFCMSdjD/CxyQMt1rbf2qEg6hmDzxk2FfD7+7Ogk55m8ZFUMtqNaZM4VVX/qaU9AzSORG+Gf4ZpAQ==",
+ "peerDependencies": {
+ "csstype": "^3.0.10"
+ }
+ },
"node_modules/has": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
@@ -4194,6 +4203,21 @@
"react": "^16.8.0 || ^17.0.0"
}
},
+ "node_modules/react-hot-toast": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/react-hot-toast/-/react-hot-toast-2.2.0.tgz",
+ "integrity": "sha512-248rXw13uhf/6TNDVzagX+y7R8J183rp7MwUMNkcrBRyHj/jWOggfXTGlM8zAOuh701WyVW+eUaWG2LeSufX9g==",
+ "dependencies": {
+ "goober": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "react": ">=16",
+ "react-dom": ">=16"
+ }
+ },
"node_modules/react-icons": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.3.1.tgz",
@@ -7229,6 +7253,12 @@
"slash": "^3.0.0"
}
},
+ "goober": {
+ "version": "2.1.8",
+ "resolved": "https://registry.npmjs.org/goober/-/goober-2.1.8.tgz",
+ "integrity": "sha512-S0C85gCzcfFCMSdjD/CxyQMt1rbf2qEg6hmDzxk2FfD7+7Ogk55m8ZFUMtqNaZM4VVX/qaU9AzSORG+Gf4ZpAQ==",
+ "requires": {}
+ },
"has": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
@@ -7944,6 +7974,14 @@
"use-sidecar": "^1.0.5"
}
},
+ "react-hot-toast": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/react-hot-toast/-/react-hot-toast-2.2.0.tgz",
+ "integrity": "sha512-248rXw13uhf/6TNDVzagX+y7R8J183rp7MwUMNkcrBRyHj/jWOggfXTGlM8zAOuh701WyVW+eUaWG2LeSufX9g==",
+ "requires": {
+ "goober": "^2.1.1"
+ }
+ },
"react-icons": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/react-icons/-/react-icons-4.3.1.tgz",
diff --git a/package.json b/package.json
index 9e7cb7d..c4707cb 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "svgl",
- "version": "1.0.7",
+ "version": "1.2.0",
"description": "Beautiful SVG vector logos",
"author": "pheralb",
"license": "MIT",
@@ -21,6 +21,7 @@
"next": "12.1.0",
"react": "17.0.2",
"react-dom": "17.0.2",
+ "react-hot-toast": "^2.2.0",
"react-icons": "^4.3.1",
"swr": "^1.2.2"
},
diff --git a/pages/_app.js b/pages/_app.js
index 7d53375..253d44a 100644
--- a/pages/_app.js
+++ b/pages/_app.js
@@ -5,9 +5,9 @@ import Head from "next/head";
import { ChakraProvider, Container } from "@chakra-ui/react";
// 📦 Components ->
+import Sidebar from "components/sidebar";
import Layout from "components/layout";
-import Header from "components/header";
-import Footer from "components/footer";
+import Footer from "components/sidebar/by";
// 💙 Global CSS ->
import "styles/globals.css";
@@ -17,6 +17,7 @@ import theme from "styles/theme";
// 🐢 Animations ->
import Transitions from "animations/transitions";
+import { Toaster } from "react-hot-toast";
function MyApp({ Component, pageProps, router }) {
return (
@@ -26,31 +27,47 @@ function MyApp({ Component, pageProps, router }) {
SVGL - Beautiful SVG vector logos
-
+
-
-
+
+
-
+
-
-
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
>
);
}
diff --git a/pages/index.js b/pages/index.js
index a2248d8..a6b73d5 100644
--- a/pages/index.js
+++ b/pages/index.js
@@ -8,16 +8,6 @@ export default function Index() {
<>
-
- Beautiful SVG vector logos
-
diff --git a/pages/svg/[id].js b/pages/svg/[id].js
index 38dd94f..1525171 100644
--- a/pages/svg/[id].js
+++ b/pages/svg/[id].js
@@ -6,7 +6,6 @@ import {
SimpleGrid,
Button,
Image,
- Container,
Center,
} from "@chakra-ui/react";
import { useRouter } from "next/router";
@@ -56,73 +55,68 @@ export default function Icon() {
{data.title} - SVGL
-
-
-
-
-
-
-
-
+ }
+ fontWeight="light"
+ variant="ghost"
+ mb="4"
+ >
+ Continue discovering
+
+
+
+
+
+
+
+
+
+
-
+
+ }
+ variant="primary"
+ fontWeight="light"
+ mr="2"
+ onClick={() => downloadSvg(data.href)}
>
- {data.title}
-
-
+ Download .svg
+
+
}
- variant="primary"
fontWeight="light"
- mr="2"
- onClick={() => downloadSvg(data.href)}
+ borderWidth="1px"
+ rightIcon={}
>
- Download .svg
+ {data.title} website
-
- }
- >
- {data.title} website
-
-
-
+
-
-
- }
- variant="outline"
- fontWeight="light"
- w="100%"
- border="0"
- mt="4"
- mb="4"
- >
- Continue discovering
-
-
-
+
+
>
);
diff --git a/public/fonts/Inter-Medium.woff2 b/public/fonts/Inter-Medium.woff2
new file mode 100644
index 0000000..ea7839b
Binary files /dev/null and b/public/fonts/Inter-Medium.woff2 differ
diff --git a/public/fonts/Satoshi-Bold.woff2 b/public/fonts/Satoshi-Bold.woff2
new file mode 100644
index 0000000..0a8db7a
Binary files /dev/null and b/public/fonts/Satoshi-Bold.woff2 differ
diff --git a/public/fonts/Satoshi-Medium.woff2 b/public/fonts/Satoshi-Medium.woff2
new file mode 100644
index 0000000..ffd0ac9
Binary files /dev/null and b/public/fonts/Satoshi-Medium.woff2 differ
diff --git a/public/fonts/Satoshi-Regular.woff2 b/public/fonts/Satoshi-Regular.woff2
new file mode 100644
index 0000000..81c40ab
Binary files /dev/null and b/public/fonts/Satoshi-Regular.woff2 differ
diff --git a/public/fonts/coolvetica.woff2 b/public/fonts/coolvetica.woff2
new file mode 100644
index 0000000..77eeabf
Binary files /dev/null and b/public/fonts/coolvetica.woff2 differ
diff --git a/public/images/post.png b/public/images/post.png
new file mode 100644
index 0000000..8705275
Binary files /dev/null and b/public/images/post.png differ
diff --git a/public/library/remix.svg b/public/library/remix.svg
new file mode 100644
index 0000000..24b949f
--- /dev/null
+++ b/public/library/remix.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/public/library/telegram.svg b/public/library/telegram.svg
new file mode 100644
index 0000000..9950d60
--- /dev/null
+++ b/public/library/telegram.svg
@@ -0,0 +1,9 @@
+
+
diff --git a/public/library/whatsapp.svg b/public/library/whatsapp.svg
new file mode 100644
index 0000000..514b59f
--- /dev/null
+++ b/public/library/whatsapp.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/styles/globals.css b/styles/globals.css
index efed079..3512b1d 100644
--- a/styles/globals.css
+++ b/styles/globals.css
@@ -1,27 +1,8 @@
@font-face {
- font-family: "Poppins-Regular";
- src: url("/fonts/Poppins-Regular.woff2") format('woff2');
+ font-family: "Inter-Medium";
+ src: url("/fonts/Inter-Medium.woff2") format('woff2');
font-style: normal;
font-weight: 400;
font-display: swap;
}
-/* width */
-::-webkit-scrollbar {
- width: 10px;
-}
-
-/* Track */
-::-webkit-scrollbar-track {
- background: #696969;
-}
-
-/* Handle */
-::-webkit-scrollbar-thumb {
- background: rgb(0, 0, 0);
-}
-
-/* Handle on hover */
-::-webkit-scrollbar-thumb:hover {
- background: #333333;
-}
diff --git a/styles/theme.js b/styles/theme.js
index be173c0..0ccaec2 100644
--- a/styles/theme.js
+++ b/styles/theme.js
@@ -32,7 +32,7 @@ const theme = extendTheme(
},
},
fonts: {
- body: "Poppins-Regular, sans-serif",
+ body: "Inter-Medium, sans-serif",
heading: "Poppins-Regular, sans-serif",
},
styles: {
@@ -40,7 +40,7 @@ const theme = extendTheme(
"html, body": {
height: "100%",
maxHeight: "100vh",
- backgroundColor: mode("light.100", "lightDark.900")(props),
+ backgroundColor: mode("gray.100", "lightDark.900")(props),
},
}),
borderColor: "red",