This commit is contained in:
Nilstrieb 2021-02-13 18:14:25 +01:00
parent ea8fe969a4
commit 4e2d32cf04
6 changed files with 6 additions and 7 deletions

View file

@ -1,15 +1,13 @@
import React, {Component} from "react"; import React, {Component} from "react";
import ModelImage from "./Plane"; import ModelImage from "./Plane";
import f22 from './img/raptor-1040097_1920.png' import f22 from './img/f22.png'
class Home extends Component { class Home extends Component {
render() { render() {
return ( return (
<div> <div>
<h1>Hugos Favoriten</h1> <h1>Hugos Favoriten</h1>
<ul> <ModelImage img={f22} name="F-22 Raptor"/>
<li><ModelImage img={f22} name="F-22 Raptor"/></li>
</ul>
</div> </div>
) )
} }

View file

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import ModelImage from './Plane' import ModelImage from './Plane'
import f22 from './img/raptor-1040097_1920.png' import f22 from './img/f22.png'
import harrier from './img/av-8b-harrier-1986422_1920.jpg' import harrier from './img/harrier.jpg'
class Modern extends React.Component { class Modern extends React.Component {
render() { render() {

View file

@ -16,6 +16,7 @@ class ModelImage extends Component {
} }
render() { render() {
//const style = {backgroundImage: `url('/img/${this.state.img}')`};
return ( return (
<a href="" className="model"> <a href="" className="model">
<img src={this.state.img} alt={this.state.name}/> <img src={this.state.img} alt={this.state.name}/>

View file

@ -70,7 +70,7 @@ nav ul li {
position: relative; position: relative;
display: inline-block; display: inline-block;
font-size: 1.5em; font-size: 1.8em;
background-color: var(--nav-color); background-color: var(--nav-color);
cursor: pointer; cursor: pointer;
margin: auto; margin: auto;

View file

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 492 KiB

After

Width:  |  Height:  |  Size: 492 KiB

Before After
Before After