From d04939a51a9e6492e6da2332f06f557fcca78a70 Mon Sep 17 00:00:00 2001 From: Laura Beatris <48022589+LauraBeatris@users.noreply.github.com> Date: Tue, 3 Nov 2020 15:09:19 -0300 Subject: [PATCH 01/37] Install use-onclickoutside hook --- package.json | 3 ++- yarn.lock | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index e62bd5d..d865070 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,8 @@ "postcss-import": "^12.0.1", "react": "16.14.0", "react-dom": "16.14.0", - "tailwindcss": "^1.9.4" + "tailwindcss": "^1.9.4", + "use-onclickoutside": "^0.3.1" }, "devDependencies": { "@jungsoft/eslint-config": "4.0.1", diff --git a/yarn.lock b/yarn.lock index 48d0e71..e76ba1d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1609,6 +1609,11 @@ aproba@^1.0.3, aproba@^1.1.1: resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== +are-passive-events-supported@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/are-passive-events-supported/-/are-passive-events-supported-1.1.1.tgz#3db180a1753a2186a2de50a32cded3ac0979f5dc" + integrity sha512-5wnvlvB/dTbfrCvJ027Y4L4gW/6Mwoy1uFSavney0YO++GU+0e/flnjiBBwH+1kh7xNCgCOGvmJC3s32joYbww== + are-we-there-yet@~1.1.2: version "1.1.5" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" @@ -6869,6 +6874,26 @@ url@^0.11.0: punycode "1.3.2" querystring "0.2.0" +use-isomorphic-layout-effect@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.0.tgz#4db2111e0d53ca694187ea5fd5cb2ba610286fe0" + integrity sha512-kady5Z1O1qx5RitodCCKbpJSVEtECXYcnBnb5Q48Bz5V6gBmTu85ZcGdVwVFs8+DaOurNb/L5VdGHoQRMknghw== + +use-latest@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/use-latest/-/use-latest-1.2.0.tgz#a44f6572b8288e0972ec411bdd0840ada366f232" + integrity sha512-d2TEuG6nSLKQLAfW3By8mKr8HurOlTkul0sOpxbClIv4SQ4iOd7BYr7VIzdbktUCnv7dua/60xzd8igMU6jmyw== + dependencies: + use-isomorphic-layout-effect "^1.0.0" + +use-onclickoutside@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/use-onclickoutside/-/use-onclickoutside-0.3.1.tgz#fdd723a6a499046b6bc761e4a03af432eee5917b" + integrity sha512-aahvbW5+G0XJfzj31FJeLsvc6qdKbzeTsQ8EtkHHq5qTg6bm/qkJeKLcgrpnYeHDDbd7uyhImLGdkbM9BRzOHQ== + dependencies: + are-passive-events-supported "^1.1.0" + use-latest "^1.0.0" + use-subscription@1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/use-subscription/-/use-subscription-1.5.0.tgz#0df66fdf97b9a340147ad72f76fac1db6f56d240" From 5f08d200060c74e5ab9582f8727528450ed33640 Mon Sep 17 00:00:00 2001 From: Laura Beatris <48022589+LauraBeatris@users.noreply.github.com> Date: Tue, 3 Nov 2020 15:09:50 -0300 Subject: [PATCH 02/37] Add header assets --- public/icons/navbarButton.png | Bin 0 -> 243 bytes public/images/logo.png | Bin 0 -> 9099 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 public/icons/navbarButton.png create mode 100644 public/images/logo.png diff --git a/public/icons/navbarButton.png b/public/icons/navbarButton.png new file mode 100644 index 0000000000000000000000000000000000000000..50e73f724529f5a49184ed0146ab6a920684d843 GIT binary patch literal 243 zcmeAS@N?(olHy`uVBq!ia0vp^azJdv!3HF~ z9OUlAuMN3^cNLU$!-{L39b^2u{rY|*--y3{`W+tL;X;!l%Y)2b?Cc7FTK- l=fn>u5?_2&P+Ih?Hr=jFZO8kNV?Z}Cc)I$ztaD0e0sx;KRapQ4 literal 0 HcmV?d00001 diff --git a/public/images/logo.png b/public/images/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..80d1860d0f38967a260025e51e8b773b80cdc2e3 GIT binary patch literal 9099 zcmV;6BXrz}P)6M#t00009a7bBm000XU z000XU0RWnu7ytkO0drDELIAGL9O(c600d`2O+f$vv5yPQLRlQpK>eN2%>wC3oZJn;It<}~6 zsdXq;oWO}e5D)|zWge1{gv?~lIcE=dt+n?FIdB3em;m?Qg~xMp&K~}M{p(-Dx7Pn} zB_Scn!YL%hvgifq8o#UZS%F5sn6MN>KAZG^lYUU?SW~6rOck1?(C<1_6EIZJXBBid zoo~=*I+s4v2l`v1H~K8!oSLq>aH`1Sjxz&^g~TbB;X=@5&`U>LW-NO3?*(6~5AFmv zTrnPKFpCuU1E!>49Z3b9qpLbPnA^2IbUr z_mte#vTUhRRFb+l1##I)=vB}QNjYgq?3)71%gnQcfh@ful=SX4Ed*Q&`u7=$y7C${ zY-ykwpySr_`rzJ~xk&MuXe7pO+gp#-yPL6gcP%#VszGfV4W{O$%LH*MsE3$rPfSZb zIgElmtz|kBV>1W$L9erNkUTIQNF=7x)F+{aP7-IRqy|WJxDEP>^?_wy)1+z7l4&SG z#3jd~$*PAB0o-}{V5E9mNnMyo)><(>&x>;g`{?*IR5a&d)$SI2yt)LRZ)`@3Ld-UG znGt+hL(%BGo>e0~CdoWKxf^yz_)`GxWFPvD%|pMjgMf6pwdhVFV!TFr)>0g)CB_;S z^OmMOF`TcZTCAsu@g^~;-oU{fm8`W%H@o2VDsaP(R+UtX5lhD!G*B$H7J8A2xpHJI zt{gQK+YYwk&97?l-m)T8`c+}DCep2yfyUxGG?vt%s<;yH zo5COGl3*jL7$ng&aHe8=9}t_TB1j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aAS@}MN%1tzO zhFxxjHYms4<+~P#|_%WQkjBCe?$J9ajNO$w|MGUd}Hjm}`H%`ae8U`w^^0&+HR>+26;{b!5t_~MT-y`YfXy8?{ror5&XmNu1ix#7~K zDu|HDN8o>6?PCDL@5(Kxip)~zoPikP>8tmTiC7Ska zhKG{4rYrPlj+5iv^f;44fE;hJBf$tSk|)WUyLB7h*}Mh4V`4BaKObjh=U@a){p|EK z_~_VADOy}rQY=jK*A-K6z?(?B4=);my_LJ-JO&Q(WD$a7$xE(mp?3Ec zSZxiYhIB~;v$vy~Cl@7DPW3|%nZ$Wh4fp~&`X(m9N2;W_p#jaN+kP|!>EHpAuS3ev zvCup&_$j>~XlsMn+KgZ`p?+;GXs#+nQz->SbqDG1R!MfsQ*lm%y(3NwCNs5f!f4qp znT`6H&W_tUsT=#L4|WpP))1nJEv_qeO2Xh2&^So1y{Xly2To4ilO@B5ITI9gj}y1{ z<1{#kP~}l>e$DGtx9jbPho-wcqtA|DU?V5?0rE&s>+}Fw{{uUMK>h674=w-z002ov JPDHLkV1oA9elY+5 literal 0 HcmV?d00001 From 0031d524264eab464172d34eb110998b2e587034 Mon Sep 17 00:00:00 2001 From: Laura Beatris <48022589+LauraBeatris@users.noreply.github.com> Date: Tue, 3 Nov 2020 15:10:08 -0300 Subject: [PATCH 03/37] Remove app placeholder content --- pages/index.tsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pages/index.tsx b/pages/index.tsx index d46c745..b0e73d9 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -5,13 +5,7 @@ const App: React.FC = () => ( Floripa+ | Torne a ilha em um lugar melhor -
-

- Work in progress - {" "} - 👷‍♀️ -

-
+
); From eb7f6125f9431e36d3aab514320641d6aa349eb4 Mon Sep 17 00:00:00 2001 From: Laura Beatris <48022589+LauraBeatris@users.noreply.github.com> Date: Tue, 3 Nov 2020 15:10:33 -0300 Subject: [PATCH 04/37] Add base structure for Navbar --- components/Header/Navbar.tsx | 40 ++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 components/Header/Navbar.tsx diff --git a/components/Header/Navbar.tsx b/components/Header/Navbar.tsx new file mode 100644 index 0000000..ab86a92 --- /dev/null +++ b/components/Header/Navbar.tsx @@ -0,0 +1,40 @@ +import React, { useRef, useState } from "react"; +import Image from "next/image"; +import useOnClickOutside from "use-onclickoutside"; + +const Navbar: React.FC = () => { + const [isNavbarOpen, setIsNavbarOpen] = useState(false); + + const navElementRef = useRef(null); + + const toggleNavbar = (): void => { + setIsNavbarOpen(prev => !prev); + }; + + useOnClickOutside(navElementRef, toggleNavbar); + + return ( + <> + + + { + isNavbarOpen && ( +