From 95ce5de577bea6774e27e69d80dcd61bc9edbef6 Mon Sep 17 00:00:00 2001 From: rutik wankhade Date: Thu, 26 Jan 2023 15:49:22 +0530 Subject: [PATCH] feat: add option to choose background theme --- src/assets/images/theme7.webp | Bin 0 -> 1916 bytes src/components/Editor.js | 8 +++++++- src/components/Themes/BackgroundTheme.js | 22 +++++++++++----------- src/components/Themes/StylishTheme.js | 5 ++--- 4 files changed, 20 insertions(+), 15 deletions(-) create mode 100644 src/assets/images/theme7.webp diff --git a/src/assets/images/theme7.webp b/src/assets/images/theme7.webp new file mode 100644 index 0000000000000000000000000000000000000000..906dfa84b3f29a3b52f48ace0e470b8440046f4c GIT binary patch literal 1916 zcmbtUX;2eq7+xS$rFcMVWw2#}*NPA}2?R(;Lc=vcK#<#t!e(~~G0AR7HYBJxS^+N{ z#3|Jlm|7H2%hf{ZAdbPaQLL?vh>A6Bkw&E>h@h;WC&lxiO7kSb2AB;nXyB5cbA7f5u2O!ikB-*yNZ+H9|!q@u(M=@p@cd^LbUF9F% z%Z2v#4Ua$Ba6H$K?Y2>SrEg~WDY*TrB4qx|t$h;Zpse${GNdM{3=<=F*LUxjo`~Vh~=A!dY{KW+{{^G|3S-klV2j=U^wJe-rP;A&19)+cMqTL zz$`tR@5~K6*17axyY#n<_mZQ|h{A8KSY=$87nX%yhSJ|CHGlhcsmrDxBRZc~g4Ivc zTAMas^e=XC^%zLGMEhB{!HE}XcrlVzQ>^T&Noq97+RBHH%>8Qh_yeERw=-%7`;={m zedhf>a=N8$P1=c)Km3%pw)9X2XT92h7~oL4Izc0ZFZ}RAjy9T%UNXiv{>*$cuKB-p@(*aqT=> ze|Sk=m22(t0rSv-&byJ{8w;QP`76G+F}7w#vz$A6!4#X)aN9#d+ahC%jQxe0mf0)L z1Hi2E*R>T2TuQl(vR9~{}Y-nrK(_>@VkG$_ijx9KvdvfdCF`VD+HLXsQ(2x^1Y@8G8 z+TgRKIOkCQmuo(l=i(pdK6Kr$-1yT+9>s<2VqZc=JP)`tR)5o@jDXK)pHC6ZKSyM| zTfAuxw|_&mbl$!!O|?oF{!Ue|F2McP{!`~>f4(&=&s<{Jnb1FHhs61I5}}M}qjlD9 zks1lNkDvACg@~GmjS&7O>#ZB3Gr#a0Nn-kzOCBBUdAP~^A~~Tcxk>7^ohCZV{?v1k zqVn=iQ-2583joL zzygv~@gPX2(*^2+0tvMgVsW`#h{=Z7YzBp3Xo_(X)-!O;LW;qSZsUl?G>BTJB4q?l zw{pS~LQ4uj(2YJxEh0&^OyXe2HG#0rqqT+vB7_oxQ4PcjWLndr)A@EhPlRf$ru~vM ztk7oIErrZ>lL}UAu=HXTCIC}04WU&dn2o_2G)WSr#$Xadg={7}h{0qr*dcuAwIk~t zF9TxqWIQT_gTq3(?0ham5*&swf?4@t3<(;X&tSnQizVT**+HC82a!GGRhn1{#lm58 z*dZJ)E0`6^<%BUE0k*?e@#%yXDX^9zWIJFleKsr~vUXP?vp2+XL{#hx9t)zp4Nj#q#(9PbE*Q;&z5dL@9r030OS5&!@I literal 0 HcmV?d00001 diff --git a/src/components/Editor.js b/src/components/Editor.js index 16fc92a..333d92d 100644 --- a/src/components/Editor.js +++ b/src/components/Editor.js @@ -13,6 +13,8 @@ import theme3 from '../assets/images/theme3.webp' import theme4 from '../assets/images/theme4.webp' import theme5 from '../assets/images/theme5.webp' import theme6 from '../assets/images/theme6.webp' +import theme7 from '../assets/images/theme7.webp' + @@ -236,6 +238,10 @@ class Editor extends React.Component {
+ basic theme this.setState({ theme: "background" })} + className=" cursor-pointer border border-gray-100 hover:border-gray-200 hover:scale-105 duration-300 m-2" + /> basic theme this.setState({ theme: "basic" })} className=" cursor-pointer border-gray-100 hover:scale-105 duration-300 hover:border-gray-200 border m-2 " @@ -248,7 +254,7 @@ class Editor extends React.Component { onClick={(e) => this.setState({ theme: "stylish" })} className=" cursor-pointer border border-gray-100 hover:border-gray-200 hover:scale-105 duration-300 m-2" /> - + basic theme this.setState({ theme: "outline" })} className=" cursor-pointer border border-gray-100 hover:border-gray-200 hover:scale-105 duration-300 m-2" diff --git a/src/components/Themes/BackgroundTheme.js b/src/components/Themes/BackgroundTheme.js index e14670c..22b76ec 100644 --- a/src/components/Themes/BackgroundTheme.js +++ b/src/components/Themes/BackgroundTheme.js @@ -18,7 +18,7 @@ const BackgroundTheme = ({ config }) => { .getPhotos({ query: searchText, page: 1, - per_page: 25, + per_page: 30, // orientation:'portrait' @@ -33,9 +33,9 @@ const BackgroundTheme = ({ config }) => { unsplash.search .getPhotos({ - query: 'dev', + query: 'setup', page: 1, - per_page: 25 + per_page: 30 }) .then(response => { @@ -82,14 +82,10 @@ const BackgroundTheme = ({ config }) => {
- - preview
- -
+
+
{ diff --git a/src/components/Themes/StylishTheme.js b/src/components/Themes/StylishTheme.js index a67b620..f61f5e2 100644 --- a/src/components/Themes/StylishTheme.js +++ b/src/components/Themes/StylishTheme.js @@ -18,7 +18,7 @@ const StylishTheme = ({ config }) => { .getPhotos({ query: searchText, page: 1, - per_page: 25, + per_page: 30, // orientation:'portrait' @@ -33,7 +33,7 @@ const StylishTheme = ({ config }) => { unsplash.search .getPhotos({ - query: 'dev', + query: 'setup', page: 1, per_page: 25 @@ -54,7 +54,6 @@ const StylishTheme = ({ config }) => { }) - // unsplash.photos.trackDownload({ downloadLocation: image.links.download_location, }); }