JSFiddle - React, Tailwind, and code Playground
by Aurélien Scapa
HTML
<header>
<nav id="headerMenu">
<div id="siteLogo">
<a href="<?php bloginfo('siteurl'); ?>">
<img src="http://extatic.net/wp-content/themes/extatic/design/logoEXTATIC.png" alt="EXTATIC logo" />
<h1>EXTATIC</h1>
</a>
</div>
</nav>
<div id="searchEngine">
</div>
</header>
<div id="single.php">
<section id="content">
<div class="row">
<div class="postThumbnail">
<img id="postImg" src="http://extatic.net/wp-content/uploads/2016/02/test.png">
</div>
</div>
<div class="row">
<div class="col">
<div class="col-1-1">
<div id="post">
<div id="postMetadata">
<div id="postTitle">
<h2>
Title of the article
</h2>
</div>
<div id="postCategory">
<p>
Category of the article
</p>
</div>
<div id="postDate">
<p>
Date of the article
</p>
</div>
</div>
<div id="postContent" >
<p>
Content of the article <br/>
Content of the article <br/>
Content of the article <br/>
Content of the article <br/>
Content of the article <br/>
Content of the article <br/>
Content of the article <br/>
Content of the article
</p>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<footer>
<div class="row" id="twitter" >
<div class="col">
<div class="col-1-1">
<div class="twitterTimeline">
<a href="https://twitter.com/seeane" title="Twitter, Aurélien Scapa" id="twitterIcon" target="_blank">
<img...
CSS
/*
Author: Aurélien Scapa
*/
/* ----- ----- ----- ----- ----- */
/* reset */
html,
body,
header, menu, section, footer,
div, span,
object,
h1, h2, h3, h4, h5, h6, h7, p, a, abbr,
acronym, cite, code,
em,
center,
ol, ul, li,
fieldset, form, label, blockquote,
img, figure, figcaption {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font-weight: normal;
}
/* ----- ----- ----- ----- ----- */
/* html */
html {
width: 100%;
height: 100%;
}
/* ----- ----- ----- ----- ----- */
/* body */
body {
display: flex;
flex-direction: column;
width: 100%;
min-width: 640px;
height: 100%;
font-family: 'Open Sans', Arial;
font-size: 1em;
line-height: 1em;
min-height: 100vh;
}
h1 {
}
h2 {
}
h3 {
}
p {
}
a {
text-decoration: none;
}
img {
}
ul {
}
li {
list-style: none;
}
/* ----- ----- ----- ----- ----- */
/* header */
header {
position: fixed;
z-index: 999; /* do not remove = header always on top of content */
width: 100%;
height: 48px;
font-size: 1.2em;
color: rgb(255, 255, 255);
background: rgb(0, 0, 0);
transition: all 1s ease;
box-shadow: rgb(0, 0, 0) 0px 0px 8px;
}
header:hover {
transition: all 1s ease;
box-shadow: rgb(40, 40, 40) 0px 0px 12px;
}
#headerMenu {
position: relative;
display: block;
height: 100%;
line-height: 48px;
margin: 0 32px 0 32px;
}
#siteLogo {
position: absolute;
left: 0;
top: 0;
line-height: 48px;
}
#siteLogo a img {
display: inline-block;
vertical-align: middle;
width: 24px;
height: 24px;
}
#siteLogo a h1 {
display: inline-block;
vertical-align: middle;
letter-spacing: 0.3em;
color: rgb(255,255,255);
}
#searchEngine {
position: absolute;
top: 8px;
right: 0;
}
#searchForm input {
position: relative;
width: 164px;
height: 32px;
display: block;
...
JavaScript
function refreshDynamicContent(){
$('.postThumbnail').height($('#postImg').height());
$('.postThumbnail').css('max-height', $(window).height() - ($('header').height()));
$('#post').css('min-height', $('.postThumbnail').height());
}
refreshDynamicContent();
$(window).on("resize", refreshDynamicContent);