Skip to content

Commit

Permalink
Merge pull request #749 from basedosdados/fix-meta-index-google
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
AldemirLucas authored Jan 30, 2024
2 parents 2298e60 + cc272dc commit 8906726
Show file tree
Hide file tree
Showing 62 changed files with 4,841 additions and 3,619 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
NEXT_PORT: ${{ vars.NEXT_PORT }}
NEXT_PUBLIC_API_URL: ${{ vars.NEXT_PUBLIC_API_URL }}
NEXT_PUBLIC_SITE_NAME: ${{ vars.NEXT_PUBLIC_SITE_NAME }}
NEXT_PUBLIC_KEY_STRIPE: ${{ secrets.NEXT_PUBLIC_KEY_STRIPE }}
NODE_ENV: ${{ vars.NODE_ENV }}
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:development

Expand All @@ -43,3 +44,4 @@ jobs:
tags: ${{ env.IMAGE_NAME }}
build-args: |
NEXT_PUBLIC_API_URL=${{ env.NEXT_PUBLIC_API_URL }}
NEXT_PUBLIC_KEY_STRIPE=${{ env.NEXT_PUBLIC_KEY_STRIPE }}
8 changes: 5 additions & 3 deletions next/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Install dependencies only when needed
FROM node:16-alpine AS deps
FROM node:18.17.0-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
Expand All @@ -13,9 +13,11 @@ RUN \
fi

# Rebuild the source code only when needed
FROM node:16-alpine AS builder
FROM node:18.17.0-alpine AS builder
ARG NEXT_PUBLIC_API_URL
ARG NEXT_PUBLIC_KEY_STRIPE
ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL
ENV NEXT_PUBLIC_KEY_STRIPE=$NEXT_PUBLIC_KEY_STRIPE
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
Expand All @@ -28,7 +30,7 @@ COPY . .
RUN npm run build

# Production image, copy all the files and run next
FROM node:16-alpine AS runner
FROM node:18.17.0-alpine AS runner
WORKDIR /app

ENV NODE_ENV production
Expand Down
2 changes: 2 additions & 0 deletions next/components/atoms/ControlledInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default function ControlledInput({
inputStyle,
isBorderColor = true,
inputElementStyle,
autoComplete,
...props
}) {
async function checkForEnter(e) {
Expand All @@ -43,6 +44,7 @@ export default function ControlledInput({
value={value}
placeholder={placeholder}
onChange={(e) => onChange(e.target.value)}
autoComplete={autoComplete}
{...inputStyle}
/>
<InputRightElement
Expand Down
1 change: 1 addition & 0 deletions next/components/atoms/ReadMore.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export default function ReadMore({ children, textSize = 240, isMobileMod, ...pro
fontWeight="300"
lineHeight="24px"
letterSpacing="0.5px"
whiteSpace="pre-line"
color="#252A32"
>
{isReadMore ? text.slice(0, textSize)+"..." : text}
Expand Down
8 changes: 0 additions & 8 deletions next/components/atoms/SiteHead.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ export default function SiteHead({ children }) {
<meta name="theme-color" content="#34A15A" />
<meta name="description" content="Base dos Dados" />

<link
href="https://fonts.googleapis.com/css?family=Lato:300,400,500,700&display=swap"
rel="stylesheet"
/>
<link
href="https://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700&display=swap"
rel="stylesheet"
/>
{children}
</Head>
);
Expand Down
83 changes: 83 additions & 0 deletions next/components/molecules/Cookies.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import {
Box,
Text,
CloseButton,
HStack
} from "@chakra-ui/react";
import { useState, useEffect } from "react";
import cookies from "js-cookie";
import RoundedButton from "../atoms/RoundedButton";
import Link from "../atoms/Link";
import { useCheckMobile } from "../../hooks/useCheckMobile.hook";

export default function ConfirmCookies() {
const [isOpen, setIsOpen] = useState(false)

useEffect(() => {
const res = cookies.get("cookieAccepted")

if(res === undefined) setIsOpen(true)
}, [])

const handleClose = () => {
setIsOpen(false)
}

const handleConfirm = () => {
cookies.set("cookieAccepted", "true",{ expires: 366 })
window.location.reload()
}

if(!isOpen) return null

return (
<Box
bottom={0}
left={0}
position="fixed"
margin={useCheckMobile() ? "0 auto" :"0 0 40px 40px"}
zIndex={10000}
backgroundColor="#FFF"
maxWidth="400px"
boxShadow="0 1.6px 16px 0 rgba(100, 96, 103, 0.16)"
padding="16px"
borderRadius="30px"
>
<HStack spacing={0} marginBottom="16px" justifyContent="space-between">
<Text
width="fit-content"
fontFamily="Ubuntu"
fontSize="18px"
lineHeight="40px"
fontWeight="500"
color="#252A32"
>Nossos Cookies</Text>

<CloseButton
_hover={{backgroundColor: "transparent", color:"#42B0FF"}}
onClick={() => handleClose()}
/>
</HStack>

<Text
fontFamily="ubuntu"
marginBottom="8px"
color="#252A42"
>
Os cookies são essenciais para a funcionalidade completa de nossa plataforma. Ao continuar, você concorda com o uso desses cookies para garantir uma experiência de usuário eficaz. Veja mais sobre nossas <Link color="#42B0FF" href="/termos?section=cookies" target="_blank">Política de Cookies</Link>
</Text>

<Box width="100%" display="flex" >
<RoundedButton
borderRadius="30px"
width={useCheckMobile() ? "100%" : "fit-content"}
_hover={{transform: "none", opacity: 0.8}}
onClick={() => handleConfirm()}
marginLeft="auto"
>
Concordo
</RoundedButton>
</Box>
</Box>
)
}
6 changes: 6 additions & 0 deletions next/components/molecules/Footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,12 @@ export default function Footer({ pages, ocult = false }) {
<FooterLink href="/perguntas-frequentes">
Perguntas frequentes
</FooterLink>
<FooterLink target="_self" href="/termos?section=terms">
Termos de Serviço
</FooterLink>
<FooterLink target="_self" href="termos?section=privacy">
Política Privacidade
</FooterLink>
<Link fontWeight="700" color="white" href="/#support">
Apoie o projeto
</Link>
Expand Down
Loading

0 comments on commit 8906726

Please sign in to comment.