Skip to content

Commit

Permalink
feat dividers
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonio Rosales Martínez authored and Antonio Rosales Martínez committed Mar 14, 2023
1 parent afd0e4c commit 53a1a4e
Show file tree
Hide file tree
Showing 39 changed files with 133 additions and 11 deletions.
Binary file added .DS_Store
Binary file not shown.
25 changes: 25 additions & 0 deletions components/Divider.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import styled from "styled-components";

const list = ["/images/lightsaberblue.webp", "/images/lightsaberred.webp"];

const StyledDiv = styled.div`
width: 100%;
img {
width: 50%;
height: auto;
}
`;

const Divider = () => {
return (
<StyledDiv>
<img
src={list[Math.floor(list.length * Math.random())]}
alt="Star Wars Divider"
/>
</StyledDiv>
);
};

export default Divider;
3 changes: 0 additions & 3 deletions components/Gallery.css

This file was deleted.

4 changes: 4 additions & 0 deletions pages/about.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Divider from "../components/Divider.jsx";

# About

<Divider />

## What is this?

The Star Wars Databank API is a REST API based on the galatic saga Star Wars. You will have access to hundreds of characters, droids, species, locations, organizations, vehicles and more. The Star Wars Databank API is filled with the official information from the Databank.
Expand Down
4 changes: 4 additions & 0 deletions pages/character.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import Divider from "../components/Divider.jsx";

# Character

<Divider />

There is a total of 952 characters sorted by name.
4 changes: 4 additions & 0 deletions pages/character/getall.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Divider from "../../components/Divider.jsx";

# Get all characters

<Divider />

You can access the list of characters by using the /characters endpoint.

```text /GET/
Expand Down
4 changes: 4 additions & 0 deletions pages/character/schema.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Divider from "../../components/Divider.jsx";

# Character Schema

<Divider />

| Key | Type | Description |
| :---------- | :----: | -------------------------------: |
| \_id | string | The unique id of the character |
Expand Down
3 changes: 3 additions & 0 deletions pages/character/single.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import Divider from "../../components/Divider.jsx";

# Get a single character

<Divider />
## Get by a id

You can get a single character by adding the id as a parameter: /characters/id
Expand Down
6 changes: 5 additions & 1 deletion pages/creature.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Creatures
import Divider from "../components/Divider.jsx";

# Creature

<Divider />

There is a total of 75 creatures sorted by name.
3 changes: 3 additions & 0 deletions pages/creature/getall.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import Divider from "../../components/Divider.jsx";

# Get all creatures

<Divider />
You can access the list of creatures by using the /creatures endpoint.

```text /GET/
Expand Down
4 changes: 4 additions & 0 deletions pages/creature/schema.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Divider from "../../components/Divider.jsx";

# Creature Schema

<Divider />

| Key | Type | Description |
| :---------- | :----: | ------------------------------: |
| \_id | string | The unique id of the creature |
Expand Down
3 changes: 3 additions & 0 deletions pages/creature/single.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import Divider from "../../components/Divider.jsx";

# Get a single creature

<Divider />
## Get by a id

You can get a single creature by adding the id as a parameter: /creatures/id
Expand Down
4 changes: 4 additions & 0 deletions pages/droid.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import Divider from "../components/Divider.jsx";

# Droid

<Divider />

There is a total of 60 droids sorted by name.
4 changes: 4 additions & 0 deletions pages/droid/getall.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Divider from "../../components/Divider.jsx";

# Get all droids

<Divider />

You can access the list of droids by using the /droids endpoint.

```text /GET/
Expand Down
4 changes: 4 additions & 0 deletions pages/droid/schema.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Divider from "../../components/Divider.jsx";

# Droid Schema

<Divider />

| Key | Type | Description |
| :---------- | :----: | ---------------------------: |
| \_id | string | The unique id of the droid |
Expand Down
3 changes: 3 additions & 0 deletions pages/droid/single.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import Divider from "../../components/Divider.jsx";

# Get a single droid

<Divider />
## Get by a id

You can get a single droid by adding the id as a parameter: /droids/id
Expand Down
10 changes: 3 additions & 7 deletions pages/index.mdx
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
import Gallery from "../components/Gallery.jsx";
import Divider from "../components/Divider.jsx";

# Introduction

<Divider />
![Star Wars Celebration Banner](/images/banner.jpg "Star Wars Celebration Banner")

This documentation will help you get familiar with the resources of the Star Wars Databank API and show you how to make different queries.

## Demo

```
fetch(
"https://starwars-databank-server.vercel.app/api/v1/characters?page=39&limit=6"
);
```

<Gallery />

## Main endpoint
Expand All @@ -22,7 +18,7 @@ fetch(

## Data

| Type | Quantity | Main Endpoint |
| Type | Quantity | Endpoint |
| :------------ | :------: | ---------------------------------------------------------------: |
| Characters | 952 | https://starwars-databank-server.vercel.app/api/v1/characters |
| Creatures | 75 | https://starwars-databank-server.vercel.app/api/v1/creatures/ |
Expand Down
4 changes: 4 additions & 0 deletions pages/info.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Divider from "../components/Divider.jsx";

# Info and Pagination

<Divider />

## Information

The API will automatically paginate the responses. You will receive up to 10 documents per page.
Expand Down
3 changes: 3 additions & 0 deletions pages/location.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import Divider from "../components/Divider.jsx";

# Location

<Divider />
There is a total of 312 locations sorted by name.
3 changes: 3 additions & 0 deletions pages/location/getall.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import Divider from "../../components/Divider.jsx";

# Get all locations

<Divider />
You can access the list of locations by using the /locations endpoint.

```text /GET/
Expand Down
4 changes: 4 additions & 0 deletions pages/location/schema.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Divider from "../../components/Divider.jsx";

# Location Schema

<Divider />

| Key | Type | Description |
| :---------- | :----: | ------------------------------: |
| \_id | string | The unique id of the location |
Expand Down
3 changes: 3 additions & 0 deletions pages/location/single.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import Divider from "../../components/Divider.jsx";

# Get a single location

<Divider />
## Get by a id

You can get a single location by adding the id as a parameter: /locations/id
Expand Down
3 changes: 3 additions & 0 deletions pages/organization.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import Divider from "../components/Divider.jsx";

# Organization

<Divider />
There is a total of 135 organizations sorted by name.
3 changes: 3 additions & 0 deletions pages/organization/getall.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import Divider from "../../components/Divider.jsx";

# Get all organizations

<Divider />
You can access the list of organizations by using the /organizations endpoint.

```text /GET/
Expand Down
4 changes: 4 additions & 0 deletions pages/organization/schema.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Divider from "../../components/Divider.jsx";

# Organization Schema

<Divider />

| Key | Type | Description |
| :---------- | :----: | ----------------------------------: |
| \_id | string | The unique id of the organization |
Expand Down
3 changes: 3 additions & 0 deletions pages/organization/single.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import Divider from "../../components/Divider.jsx";

# Get a single organization

<Divider />
## Get by a id

You can get a single organization by adding the id as a parameter: /organizations/id
Expand Down
3 changes: 3 additions & 0 deletions pages/specie.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import Divider from "../components/Divider.jsx";

# Specie

<Divider />
There is a total of 82 species sorted by name.
3 changes: 3 additions & 0 deletions pages/specie/getall.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import Divider from "../../components/Divider.jsx";

# Get all species

<Divider />
You can access the list of species by using the /species endpoint.

```text /GET/
Expand Down
4 changes: 4 additions & 0 deletions pages/specie/schema.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Divider from "../../components/Divider.jsx";

# Specie Schema

<Divider />

| Key | Type | Description |
| :---------- | :----: | ----------------------------: |
| \_id | string | The unique id of the specie |
Expand Down
3 changes: 3 additions & 0 deletions pages/specie/single.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import Divider from "../../components/Divider.jsx";

# Get a single specie

<Divider />
## Get by a id

You can get a single specie by adding the id as a parameter: /species/id
Expand Down
3 changes: 3 additions & 0 deletions pages/vehicle.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import Divider from "../components/Divider.jsx";

# Vehicle

<Divider />
There is a total of 266 vehicles sorted by name.
3 changes: 3 additions & 0 deletions pages/vehicle/getall.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import Divider from "../../components/Divider.jsx";

# Get all vehicles

<Divider />
You can access the list of vehicles by using the /vehicles endpoint.

```text /GET/
Expand Down
4 changes: 4 additions & 0 deletions pages/vehicle/schema.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import Divider from "../../components/Divider.jsx";

# Vehicle Schema

<Divider />

| Key | Type | Description |
| :---------- | :----: | -----------------------------: |
| \_id | string | The unique id of the vehicle |
Expand Down
3 changes: 3 additions & 0 deletions pages/vehicle/single.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import Divider from "../../components/Divider.jsx";

# Get a single vehicle

<Divider />
## Get by a id

You can get a single vehicle by adding the id as a parameter: /vehicles/id
Expand Down
Binary file added public/.DS_Store
Binary file not shown.
Binary file added public/images/divider.png
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 public/images/dividerEmpire.png
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 public/images/lightsaberblue.webp
Binary file not shown.
Binary file added public/images/lightsaberred.webp
Binary file not shown.

1 comment on commit 53a1a4e

@vercel
Copy link

@vercel vercel bot commented on 53a1a4e Mar 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.