Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c44562f
chore: add Next.js
lucianakyoko Feb 14, 2023
4e3d437
chore: install Styled-Component
lucianakyoko Feb 14, 2023
6b41614
chore: initial settings
lucianakyoko Feb 14, 2023
b0e3ecc
chore: install Phosphor icons library
lucianakyoko Feb 14, 2023
508450e
feat(components): create SocialLinks component
lucianakyoko Feb 14, 2023
bce3b6d
feat(components): create Header component
lucianakyoko Feb 14, 2023
2875196
docs(public): add image
lucianakyoko Feb 14, 2023
079b275
styles(pages/_app): change font family
lucianakyoko Feb 14, 2023
f2a8141
styles(styles): create imageBrackground mixin
lucianakyoko Feb 14, 2023
747339e
feat(component): create PostCard component
lucianakyoko Feb 14, 2023
03714e9
feat(screens/HomeScreen): create HomeScreen component
lucianakyoko Feb 14, 2023
4ce8919
feat(components): create Author component
lucianakyoko Feb 15, 2023
da8b18c
feat(components): create ShareButtons component
lucianakyoko Feb 15, 2023
f62d018
feat(components): create PageLayout component
lucianakyoko Feb 15, 2023
a4ed3fd
feat(screens/PostScreen): create NextPreviousButton component
lucianakyoko Feb 15, 2023
26dab56
feat(screens): create PostScreen component
lucianakyoko Feb 15, 2023
11f1225
feat(screens/PostScreen): create PostHeader component
lucianakyoko Feb 15, 2023
8f5b0e2
docs(.github): add post screen screenshot
lucianakyoko Feb 16, 2023
7da0879
refactor(components, screens): refactoring components
lucianakyoko Feb 16, 2023
63b19a9
chore: install axios and date-fns library
lucianakyoko Feb 16, 2023
bb43e83
feat(utils): create formatDate, getPostImage and getReadingTime files
lucianakyoko Feb 16, 2023
1d88885
feat(screens/HomeScreen): fetch posts data from Apiki Blog API
lucianakyoko Feb 16, 2023
7a4cf39
fetch data
lucianakyoko Feb 17, 2023
bb05111
refactor (screens): remove files
lucianakyoko Feb 18, 2023
d821de0
feat(components): create Footer component
lucianakyoko Feb 18, 2023
ef09a93
feat(components): create ScrollToTopButton component
lucianakyoko Feb 18, 2023
0e54b82
feat(screens/PostScreen): create PostFooter component
lucianakyoko Feb 18, 2023
5429a41
refactor: refactoring
lucianakyoko Feb 18, 2023
a0403d1
.
lucianakyoko Feb 18, 2023
164a485
docs: add screenshot
lucianakyoko Feb 18, 2023
5ca4888
style(screens/PostScreen): add overflow
lucianakyoko Feb 20, 2023
c031b67
add images
lucianakyoko Jun 25, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/Thumb.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/home.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions .github/image1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions .github/image2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions .github/image3.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions .github/image4.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/post-screen.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 31 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Dependency directories
node_modules/
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Next.js build output
.next
# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# next.js
/.next/
/out/

# production
/build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env*.local

# vercel
.vercel
55 changes: 23 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,38 @@
# Desafio - Front-end Developer
Este desafio tem como objetivo te avaliar como desenvolvedor Front-end: JavaScript, HTML, CSS e lógica de programação.
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).

## O Desafio
Queremos montar uma versão do blog da Apiki apenas para Devs, e queremos que essa seja uma solução headless, esta nova versão terá as seguintes páginas:
## Getting Started

- Página inicial: Listará as últimas postagens do blog com a categoria **Desenvolvimento**;
- Interna: Exibirá o conteúdo da postagem;
First, run the development server:

```bash
npm run dev
# or
yarn dev
# or
pnpm dev
```

## Requesitos
- Utilizar os dados da API do nosso blog: https://blog.apiki.com/wp-json/wp/v2/;
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.

## Diferencial
- Utilizar alguma metodologia para a organização de seu CSS (BEMCSS, OOCSS, SMACSS... o que preferir :D);
- Escolha uma lib para criação de interfaces de usuário (React ou Angular);
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.

### Página inicial
Para montar esta página você precisará consumir do seguinte endpoint: `https://blog.apiki.com/wp-json/wp/v2/posts?_embed&categories=518`, ele já te retornará as últimas 10 postagens cadastradas, cada item do array deve representar uma card contendo:
[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.

- Imagem destacada: Você encontrará um atributo chamado `_embedded`, dentro deste atributo você encontrará o `wp:featuredmedia`;
- Título;
- Link para a postagem: O link deverá conter o atributo `slug`;
The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

Ao final da listagem deve haver um botão nomeado **Carregar mais...**, Quando o usuário clicar neste botão você deverá fazer uma nova requisição para o mesmo endpoint informando o parâmetro `page`, este parâmetro deve receber o número da próxima página, exemplo: `https://blog.apiki.com/wp-json/wp/v2/posts?_embed&categories=518&page=2`. Você deve estar se perguntando, "como sei se haverá uma próxima página?", isso é simples, no **Header** de resposta desta requisição virá 2 atributos necessários para essa façanha `X-WP-Total` que diz a quantidade total de postagens que essa categoria possui, e o parâmetro `X-WP-TotalPages` que te informará qual o total de páginas de postagens que essa categoria possui.
This project uses [`next/font`](https://nextjs.org/docs/basic-features/font-optimization) to automatically optimize and load Inter, a custom Google Font.

### Interna
Para montar esta página você precisará consumir do seguinte endpoint: `https://blog.apiki.com/wp-json/wp/v2/posts?_embed&slug=wordpress-escolha-site-pequenas-empresas`, lembre-se de substituir o `slug` dado como exemplo pelo slug definido no **Link para a postagem** da **Página inicial**, o layout deve conter os seguintes elementos:
## Learn More

- Imagem destacada;
- Título;
- Conteúdo;
To learn more about Next.js, take a look at the following resources:

Seja criativo, construa um layout pensando no usuário final, e sinta-se a vontade para incrementar o layout com outros atributos disponíveis no JSON retornado.
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.

## Critérios de avaliação
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

- Organização do código;
- Responsividade;
- Reaproveitamento de código;
- SEO;
## Deploy on Vercel

## Como submeter seu projeto
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.

1. Efetue o fork deste repositório e crie um branch com o seu nome e sobrenome. (exemplo: fulano-dasilva);
1. Após finalizar o desafio, crie um Pull Request;
1. Aguarde algum contribuidor realizar o code review;
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
8 changes: 8 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"]
}
}
}
8 changes: 8 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const nextConfig = {
reactStrictMode: true,
compiler: {
styledComponents: true,
}
}

module.exports = nextConfig;
Loading