+
+
:
@@ -30,7 +42,7 @@ const PreviewTheme = ({ config }) => {
className="text-xl cursor-pointer mb-2 bg-white rounded border"
onChange={(e) => setImage(URL.createObjectURL(e.target.files[0]))}
/>
- Upload a screenshot of your app
+ click to upload a screenshot
}
diff --git a/src/components/Themes/StylishTheme.js b/src/components/Themes/StylishTheme.js
new file mode 100644
index 0000000..f61f5e2
--- /dev/null
+++ b/src/components/Themes/StylishTheme.js
@@ -0,0 +1,174 @@
+import React, { useState, useEffect, useContext } from 'react';
+import unsplash from "../../utils/unsplashConfig";
+import { ImgContext } from '../../utils/ImgContext';
+
+const StylishTheme = ({ config }) => {
+ const { title, author, font, icon, customIcon, platform,bgColor } = config;
+
+ // const [image, setImage] = useState({})
+
+ const [imageList, setImageList] = useState([]);
+ const [searchText, setSearchText] = useState('dev');
+
+ const { unsplashImage, setUnsplashImage } = useContext(ImgContext);
+
+ const searchImages = () => {
+
+ unsplash.search
+ .getPhotos({
+ query: searchText,
+ page: 1,
+ per_page: 30,
+ // orientation:'portrait'
+
+
+ })
+ .then(response => {
+ // console.log(response.response.results);
+ setImageList(response.response.results)
+ });
+ }
+
+ useEffect(() => {
+
+ unsplash.search
+ .getPhotos({
+ query: 'setup',
+ page: 1,
+ per_page: 25
+
+ })
+ .then(response => {
+ // console.log(response.response.results);
+ setImageList(response.response.results)
+ });
+ }, [])
+
+ const selectImage = (image) => {
+ setUnsplashImage({
+ url: image.urls.regular,
+ name: image.user.name,
+ avatar: image.user.profile_image.small,
+ profile: `${image.user.links.html}?utm_source=https://coverview.vercel.app&utm_medium=referral`,
+ downloadLink: image.links.download_location
+
+ })
+
+
+ }
+
+ const handleSearchSubmit = (e) => {
+ e.preventDefault();
+ searchImages(searchText);
+
+ }
+
+
+ return (
+
+
+
+
+
+
+
+
+
+
{title}
+
+ {
+ customIcon ?
+
+
+
+ :
+
+
+
+ }
+
{author}
+
+
+
+
+
+
+
+
+ {unsplashImage ?
+
+
+
+
+
+
+
+
+
setUnsplashImage('')}
+ className="absolute top-4 right-2 cursor-pointer">
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+ {
+ imageList.map(image => {
+ return
selectImage(image)
+ }
+ />
+ })
+ }
+
+
+
+ }
+
+
+
+
+
+
+
+
+ );
+}
+
+export default StylishTheme;
\ No newline at end of file
diff --git a/src/components/walloflove.js b/src/components/walloflove.js
new file mode 100644
index 0000000..0248df8
--- /dev/null
+++ b/src/components/walloflove.js
@@ -0,0 +1,40 @@
+import React, { useEffect } from 'react';
+
+const WallOfLove = () => {
+
+
+ useEffect(() => {
+ let script = document.createElement('script');
+ script.setAttribute('type', 'text/javascript');
+ script.setAttribute('src', 'https://widget.senja.io/js/iframeResizer.min.js');
+
+ // window.iFrameResize(
+ // { log: false, checkOrigin: false },
+ // '#senja-frame-902012ea');
+
+ let frame = document.getElementById('senja-frame-902012ea');
+ frame.setAttribute('src', "https://widget.senja.io/widget/902012ea-9b49-433a-96df-5cb43fd9a648");
+ document.body.appendChild(script);
+
+ })
+
+
+ return (
+
+
+
+
+ );
+}
+
+export default WallOfLove;
\ No newline at end of file
diff --git a/src/index.css b/src/index.css
index bd6213e..128c6b3 100644
--- a/src/index.css
+++ b/src/index.css
@@ -1,3 +1,38 @@
@tailwind base;
@tailwind components;
-@tailwind utilities;
\ No newline at end of file
+@tailwind utilities;
+
+@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap?crossorigin=anonymous');
+@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');
+
+@import url('https://fonts.googleapis.com/css2?family=Anek+Latin:wght@400;500;600;700&display=swap?crossorigin=anonymous');
+@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800&display=swap');
+
+
+.h-100{
+ height:36rem;
+}
+
+.h-99{
+ height:35rem;
+}
+
+::-webkit-scrollbar {
+ /* width: 8px; */
+ display: none;
+}
+
+Track
+::-webkit-scrollbar-track {
+ background: #f1f1f1;
+}
+
+/* Handle */
+::-webkit-scrollbar-thumb {
+ background: #ccccff;
+}
+
+/* Handle on hover */
+::-webkit-scrollbar-thumb:hover {
+ background: #b3b3ff;
+}
\ No newline at end of file
diff --git a/src/utils/ImgContext.js b/src/utils/ImgContext.js
new file mode 100644
index 0000000..0f8b865
--- /dev/null
+++ b/src/utils/ImgContext.js
@@ -0,0 +1,14 @@
+import React, { createContext, useState } from "react";
+const ImgContext = createContext();
+
+const ImgProvider = ({ children }) => {
+ const [unsplashImage, setUnsplashImage] = useState();
+
+ return (
+
+ {children}
+
+ );
+};
+
+export {ImgProvider, ImgContext}
\ No newline at end of file
diff --git a/src/utils/unsplashConfig.js b/src/utils/unsplashConfig.js
new file mode 100644
index 0000000..336e026
--- /dev/null
+++ b/src/utils/unsplashConfig.js
@@ -0,0 +1,8 @@
+import { createApi } from 'unsplash-js';
+
+const key= process.env.REACT_APP_API_ACCESS_KEY
+const unsplash = createApi({
+ accessKey: key
+});
+
+export default unsplash;
\ No newline at end of file
diff --git a/tailwind.config.js b/tailwind.config.js
index 1a2e5cc..636f5ea 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -1,9 +1,20 @@
module.exports = {
- content: [
+ content: [
"./src/**/*.{js,jsx,ts,tsx}",
],
theme: {
- extend: {},
+ extend: {
+ fontFamily: {
+ Inter: ['Inter', 'sans-serif'],
+ Poppins: ['Poppins', 'sans-serif'],
+ Anek: ['Anek Latin', 'sans-serif'],
+ Nunito: ['Nunito', 'sans-serif']
+
+
+
+ }
+ },
},
plugins: [],
+
}