regular styling

pull/73/head
Derrek Gass 5 years ago
parent b83319247d
commit 3d26a4bcdb

@ -4,6 +4,85 @@
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>30 Days Of React Challenge</title> <title>30 Days Of React Challenge</title>
<style>
/* == General style === */
* {
box-sizing: border-box;
padding: 0;
margin: 0;
}
html,
body {
height: 100%;
line-height: 1.5;
font-family: 'Montserrat';
font-weight: 300;
color: black;
}
.root {
min-height: 100%;
position: relative;
}
.header-wrapper,
.main-wrapper,
.footer-wrapper {
width: 85%;
margin: auto;
}
.header-wrapper,
.main-wrapper {
padding: 10px;
margin: 2px auto;
}
h1 {
font-size: 70px;
font-weight: 300;
}
h2,
h3 {
font-weight: 300;
}
header {
background-color: #61dbfb;
padding: 10px;
}
main {
padding: 10px;
padding-bottom: 60px;
/* Height of the footer */
}
ul {
margin-left: 15px;
}
ul li {
list-style: none;
}
footer {
position: absolute;
bottom: 0;
width: 100%;
height: 60px;
/* Height of the footer */
background: #6cf;
}
.footer-wrapper {
font-weight: 400;
text-align: center;
line-height: 60px;
}
</style>
</head> </head>
<body> <body>
@ -22,15 +101,10 @@
// JSX element // JSX element
const headerStyles = {
backgroundColor: '#61DBFB',
fontFamily: 'Helvetica Neue',
padding: 25,
lineHeight: 1.5,
}
const header = ( const header = (
<header style={headerStyles}> <header>
<div className = 'header-wrapper'> <div className = 'header-wrapper'>
<h1>Welcome to 30 Days Of React</h1> <h1>Welcome to 30 Days Of React</h1>
<h2>Getting Started React</h2> <h2>Getting Started React</h2>
@ -40,51 +114,40 @@
</div> </div>
</header> </header>
) )
const mainStyles = {
backgroundColor: '#F3F0F5',
}
const main = ( const main = (
<main style = {mainStyles}> <main>
<p>Prerequisite to get started react.js:</p> <div className='main-wrapper'>
<ul> <p>Prerequisite to get started react.js:</p>
<li>HTML</li> <ul>
<li>CSS</li> <li>HTML</li>
<li>JavaScript</li> <li>CSS</li>
</ul> <li>JavaScript</li>
</ul>
</div>
</main> </main>
) )
const footerStyles = { // JSX element, footer
backgroundColor: '#61DBFB', const footer = (
} <footer>
<div className='footer-wrapper'>
const footer = (
<footer style={footerStyles}>
<p>Copyright 2020</p> <p>Copyright 2020</p>
</div>
</footer> </footer>
) )
const app = (
<div>
{header}
{main}
{footer}
</div>
)
const title = <h1 className='title'>Getting Started React</h1> // JSX element, app
const inputField = ( const app = (
<div> <div className='app'>
<label htmlFor='firstname'>First Name</label> {header}
<input type='text' id='firstname' placeholder='First Name' /> {main}
{footer}
</div> </div>
) )
// we render the JSX element using the ReactDOM package
// ReactDOM has the render method and the render method takes two arguments
ReactDOM.render(app, rootElement)
// we render the JSX element using the ReactDOM package
ReactDOM.render(app, rootElement)
</script> </script>
</body> </body>
</html> </html>
Loading…
Cancel
Save