contact page css + templating

This commit is contained in:
mrjvs 2018-11-17 17:32:52 +01:00
parent 221e2a6a3e
commit ec95f623c6
5 changed files with 104 additions and 26 deletions

View File

@ -14,6 +14,16 @@ body {
background: #eeeeef;
overflow-x: hidden;
}
body.flex {
display: flex;
flex-direction: column;
min-height: 100vh;
}
body.flex .contentWrapper {
flex: 1;
}
/* common header */
nav.navWrapper {
@ -87,7 +97,8 @@ nav.navWrapper ~ .contentWrapper:nth-child(2) {
height: 10rem;
z-index: 2;
}
.contentWrapper.bgLines::before, .contentWrapper.bgLines::after {
.contentWrapper.bgLines::before, .contentWrapper.bgLines::after,
.contentWrapper.bgLinesSmall::before, .contentWrapper.bgLinesSmall::after {
content: "";
position: absolute;
z-index: 3;
@ -99,13 +110,19 @@ nav.navWrapper ~ .contentWrapper:nth-child(2) {
left: 0;
bottom: 0;
}
.contentWrapper.bgLines::after {
.contentWrapper.bgLines::after, .contentWrapper.bgLinesSmall::after {
border-width: 0 0 100vh 200vw;
border-color: transparent transparent #9575CD transparent;
right: 0;
left: auto;
z-index: 2;
}
.contentWrapper.bgLinesSmall::after {
border-width: 0 0 18vh 150vw;
}
.contentWrapper.bgLinesSmall::before {
border-width: 20vh 0 0 150vw;
}
.contentWrapper > * {
z-index: 3;
position: relative;
@ -167,6 +184,9 @@ section.bigCardWrapper .bigCard.bigCardPartWrapper {
font-weight: bold;
color: #383838;
}
.txt-center {
text-align: center;
}
/* components - buttons */
button {
@ -176,6 +196,7 @@ button {
border-radius: 0;
font-family: 'Roboto';
font-size: 1em;
cursor: pointer;
}
button.btn {
background: #673db6;
@ -192,6 +213,43 @@ button.btn-alt {
box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
border-radius: 5px;
}
button.btn:hover, button.btn-alt:hover {
background: #553099;
}
/* components - inputs */
input::placeholder, textarea::placeholder {
color: #bebebe;
opacity: 1;
}
input[type="text"], textarea {
display: inline-block;
width: 100%;
padding: 1em 2em;
border-style: solid;
border-color: rgb(165, 165, 165);
border-width: 1px;
border-radius: 8px;
margin: 1em 0;
font-family: 'Roboto', Arial, Helvetica, sans-serif;
font-weight: 400;
font-size: 1rem;
box-shadow: 0 3px 10px 0px rgba(0, 0, 0, 0.07);
transition: border-color .1s;
box-sizing: border-box;
resize: none;
}
textarea {
height: 12rem;
}
input[type="text"]:focus, textarea:focus {
border-color: rgb(103, 61, 182);
box-shadow: 0 3px 10px 0px rgba(103, 61, 182, 0.07);
}
/* helper classes */
.cont-flex {

View File

@ -0,0 +1,10 @@
.input-container {
display: flex;
flex-direction: row;
}
.input-container > * {
flex: 1;
}
.input-container > *:first-child {
margin-right: 3em;
}

View File

@ -1,21 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
{{> head }}
<body>
{{> navbar }}
{{> head-common }}
<!-- page specific -->
<link rel="stylesheet" href="/assets/css/pretendo-contact.css">
</head>
<body class="flex">
{{> nav-default }}
<div class="contentWrapper bgLinesSmall">
<div class="bgExtrude"></div>
<section class="bigCardWrapper">
<div class="bigCard">
<p class="txt-highlight">Need friends?</p>
<h1 class="txt-title">Contact us!</h1>
<form action="/api/v1/sendmessage" method="POST">
<div class="input-container">
<input type="text" name="email" placeholder="Your email">
<input type="text" name="subject" placeholder="The message subject">
</div>
<textarea name="message" placeholder="Your message"></textarea>
<div class="txt-center">
<button class="btn">send message</button>
</div>
</form>
</div>
</section>
<h1>contact form</h1>
<form action="/api/v1/sendmessage" method="POST">
<p>content</p>
<textarea name="message" cols="30" rows="10"></textarea>
<p>subject</p>
<input type="text" name="subject">
<p>email</p>
<input type="text" name="email">
<button>send message</button>
</form>
{{> footer }}
{{> footer-default }}
</body>
</html>

View File

@ -7,11 +7,12 @@
</head>
<body>
{{> nav-default }}
<header>
<h1>Pretendo</h1>
<hr>
<h3>A work-in-progress Nintendo Service replacement for Wii U and 3DS. Fully open source.</h3>
</header>
<div class="contentWrapper">
<header>
<h1>Pretendo</h1>
<hr>
<h3>A work-in-progress Nintendo Service replacement for Wii U and 3DS. Fully open source.</h3>
</header>
</div>
<div class="contentWrapper bgLines">
<div class="bgExtrude"></div>

View File

@ -1,8 +1,8 @@
<nav class="navWrapper" id="nav">
<a class="navItem brand" href="/">PRETENDO</a>
<a class="navItem" href="#">News</a>
<a class="navItem" href="#">Progress</a>
<a class="navItem" href="#">Contact</a>
<a class="navItem" href="/progress">Progress</a>
<a class="navItem" href="/contact">Contact</a>
<div class="navSpread"></div>
{{#if user.isLoggedIn }}
<a class="navItem" href="#">profile</a>
@ -10,5 +10,4 @@
<a class="navItem" href="#">login</a>
{{/if}}
<a class="navItem hamburger" id="navToggle">ICON</a>
</nav>
<div class="contentWrapper">
</nav>