Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
axk2 committed Jan 30, 2021
0 parents commit 156912e
Show file tree
Hide file tree
Showing 7 changed files with 118 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.cache
node_modules
public
package-lock.json
Empty file added README.md
Empty file.
17 changes: 17 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "ruta",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"gatsby": "^2.31.1",
"react": "^17.0.1",
"react-dom": "^17.0.1"
}
}
13 changes: 13 additions & 0 deletions src/components/Portada.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react'

const Portada = ({children, parametro}) => {
return (
<div className={parametro}>
<div className="filtro">
{children}
</div>
</div>
)
}

export default Portada
20 changes: 20 additions & 0 deletions src/pages/contacto.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from 'react'
import Portada from '../components/Portada'
import { Link } from 'gatsby'
import '../styles/main.css'

const Contacto = () => {
return (
<Portada
parametro="portada2"
>
<Link to="/">
<h2>
Ir a Inicio
</h2>
</Link>
</Portada>
)
}

export default Contacto
22 changes: 22 additions & 0 deletions src/pages/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from 'react'
import Portada from '../components/Portada'
import { Link } from 'gatsby'
import '../styles/main.css'

const Home = () => {
return (
<div>
<Portada
parametro="portada"
>
<Link to="/contacto">
<h2>
Ir a Contacto
</h2>
</Link>
</Portada>
</div>
)
}

export default Home
42 changes: 42 additions & 0 deletions src/styles/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
body {
margin: 0;
padding: 0;
font-family: sans-serif;
}

* {
margin: 0;
padding: 0;
}

.portada {
background-image: url("https://source.unsplash.com/random/600x600");
height: 100vh;
background-position: center;
background-size: cover;
background-repeat: no-repeat;
}

.portada2 {
background-image: url("https://source.unsplash.com/random/600x601");
height: 100vh;
background-position: center;
background-size: cover;
background-repeat: no-repeat;
}


.filtro {
height: 100%;
background-color: rgba(0,0,0,0.8);
display: flex;
justify-content: center;
align-items: center;
font-size: 2rem;
color: white;
}

a {
color: white;
text-decoration: none;
}

1 comment on commit 156912e

@vercel
Copy link

@vercel vercel bot commented on 156912e Jan 30, 2021

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.