Skip to content

Instantly share code, notes, and snippets.

@earth3300
Last active September 21, 2018 20:47
Show Gist options
  • Select an option

  • Save earth3300/fb900729aeba2f1cde4e4ef2e1902f0a to your computer and use it in GitHub Desktop.

Select an option

Save earth3300/fb900729aeba2f1cde4e4ef2e1902f0a to your computer and use it in GitHub Desktop.
Style for index.php (media list).
/*
Theme Name: EC01 Commons Style
Theme URI: http://ec01.earth3300.info/
Author: Clarence Bos
Author URI: http://ec01.earth3300.info/
Description: Part of a sustainable community design.
Version: 1.0.0
License: GPL-3.0+
License URI: https://www.gnu.org/licenses/gpl-3.0.en.html
Text Domain: ec01-commons
Tags: lightweight, simple
*/
/***** COMMONS START *****/
.commons-updated { background: #180921; }
/* Adapted from HTML5 / Created: 2017-12-15. */
/* SECTIONS:
GENERIC
HEADER, NAV:MENU, NAV:PREV-NEXT,
BODY, FOOTER, FULL-SCREEN, RESPONSIVE
CUSTOM
*/
/********** GENERIC STYLING BEGIN **********/
html { padding: 1em; }
/*** COLOR START ***/
html, body { background-color: #e6e6e6; }
html, body { color: #222; }
a { color: #073763; } /* Blue Dark 3 */
a:link { color: #073763; /* Blue Dark 3 */ }
a:hover { color: #3d85c6; /* Blue Dark 1 */ }
/* a:visited { color: #073763; } */
/* Blue Dark 3 */
nav li:hover { background-color: #f5f5f5; }
nav .has-parent li:hover { background-color: #f5f5f5; }
.title-wrap { background-color: #5a92b5; } /* main visible color */
.site-title a { color: #515151; }
.site-description { color: #757575; }
nav.prev { color: #333; }
nav.next { color: #333; }
span.entity-large { color: #777; }
.full-screen footer { color: #e0e0e0; }
/* background-color */
nav .has-parent { background-color: #fff; }
nav .has-parent li {background-color: #fff; }
.icon-bar { background-color: #555; }
nav .next-title {
float: right;
text-align: right;
font-size: 100%;
}
nav.prev a {
background-color: #c8c8c8;
border: 1px solid #e0e0e0;
}
nav.next a {
background-color: #c8c8c8;
border: 1px solid #e0e0e0;
}
article .border {
background-color: #efefef;
border: 1px solid #c8c8c8;
}
.unit .border {
border: 1px solid #ccc;
box-shadow: 1px 1px 2px rgba(100, 100, 100, 0.5);
}
blockquote { }
.full-screen section .wrap { background-color: #fff; }
.border { border: 1px solid #debc65; }
.box-shadow { box-shadow: 0 2px 2px rgba(100, 100, 100, 0.5); }
body {
border: 1px solid #5a92b5;
box-shadow: 0 2px 2px rgba(100, 100, 100, 0.5);
}
footer {
clear: both;
border-top: #555 dashed 1px;
}
/*** COLOR END ***/
html {
position: relative;
}
body {
max-width: 850px;
font: 1em/1.6 sans-serif;
display: block;
margin: 0 auto;
padding: 0;
border-radius: 5px;
}
html.fixed-width body {
min-width: 740px;
}
/**** HEADER START *****/
header {
padding: 0;
text-align: left;
}
.site-logo {
display: inline-block;
float: left;
/* set for 75px square */
}
.site-logo .inner {
height: 75px;
padding: 8px;
}
.title-wrap {
width: 100%;
}
.site-title {
font-size: 225%;
font-weight: 700;
margin-bottom: 0;
}
.site-title a {
display: inline-block;
text-decoration: none;
}
.site-description {
font-weight: normal;
font-size: 1em;
}
/***** HEADER END *****/
/*** NAV:GENERIC START ***/
nav,
.menu {
text-align: center;
}
nav ul { display: inline-block; }
ul.has-parent { border-top: none; }
nav li:first-child { border-left: 1px dashed #e7e7e7; }
nav li {
list-style-type: none;
display: inline-block;
position: relative;
height: 3em;
line-height: 3em;
padding: 0;
min-width: 120px;
text-align: center;
border-right: 1px dashed #e7e7e7;
box-sizing: border-box;
}
ul.has-parent {
box-sizing: border-box;
border: 1px dashed #e7e7e7;
border-top: none;
}
ul.has-parent li { border-bottom: 1px dashed #e7e7e7; }
ul.has-parent li:last-child { border-bottom: 1px dashed #e7e7e7; }
nav li a {
display: inline-block;
color: inherit;
text-decoration: none;
height: 3em;
line-height: 3em;
padding: 0;
}
/*** NAV:GENERIC END ****/
/*** NAV:HEADER START ***/
header nav {
text-align: center;
border-top: 1px solid #ededed;
border-bottom: 1px solid #ededed;
}
header nav ul {
margin-left: 0;
padding: 0;
}
nav .more {
display: none;
}
/* turn off what we don't need initially */
nav li.more {
display: none;
}
/* turn these off first, then turn on one by one as needed */
.vertical-menu li {
display: none;
}
nav .has-children:hover > ul.has-parent {
display: block;
}
nav .has-parent {
display: none;
position: absolute;
width: 200px;
}
nav .vertical-menu ul.has-parent {
position: relative;
text-indent: .5em;
overflow: hidden;
}
nav .has-parent li {
width: 200px;
text-align: left;
padding-left: 20px;
}
nav li a {
min-width: 120px;
height: 3em;
}
nav .has-parent li a {
width: 200px;
height: 3em;
padding-right: 1em;
}
nav .more-menu.has-parent {
right: 0;
z-index: 100;
}
.menu-bar {
display: none;
line-height: 6px;
width: 75px;
height: 3em;
padding-top: 0.6em;
padding-bottom: 0.1em;
}
.icon-bar {
text-align: center;
display: inline-block;
width: 2.5em;
height: 4px;
border-radius: 1px;
}
.caret {
display: inline-block;
width: 0;
height: 0;
margin-left: 2px;
vertical-align: middle;
border-top: 4px dashed;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
}
/***** NAV:HEADER END *****/
/***** BODY START *****/
main { clear: both; }
h1, h2, h3, h4 {
line-height: 1.3;
}
h1, h2 {
font-family: serif;
}
h1 {
font-size: 150%;
}
h2 {
font-size: 125%;
}
h3 {
font-size: 110%;
}
h4 {
font-size: 100%;
}
article {
display: block;
margin: 0 auto;
padding: 1em 2em;
position: relative;
overflow: hidden;
}
article section {
float: none;
width: 100%;
}
aside {
margin-top: .5em;
padding: .5em;
text-align: center;
font-style: italic;
}
section {
padding: 0;
}
a { text-decoration: none; }
ul {
margin-left: 1em;
padding-left: .5em;
}
ul li {
text-align: left;
}
nav ul li {
text-align: center;
}
ol ol {
margin-top: 1em;
}
ul,
ol {
padding-left: 1.5em;
}
li {
padding-left: .5em;
}
article footer {
clear: both;
text-align: left;
margin-top: 1em;
font-size: 80%;
}
article footer .date {
clear: both;
opacity: 0.6;
}
article footer nav {
border-top: none;
font-size: 100%;
margin-bottom: 1em;
overflow: hidden;
border-bottom: none;
}
.center-x {
text-align: center;
}
/***** BODY END *****/
/***** NAV:PREV-NEXT START *****/
/*** GENERIC ***/
nav a {
text-decoration: none;
}
nav.prev {
float: left;
text-align: left;
}
nav.next {
float: right;
text-align: right;
}
nav.prev a {
margin-right: .5em;
display: inline-block;
width: 1em;
line-height: 1em;
font-size: 3em;
padding: 0 .5em;
text-align: center;
float: left;
opacity: .5;
}
nav .next-title {
float: right;
text-align: right;
font-size: 100%;
}
nav.next a {
clear: right;
margin-left: .5em;
display: inline-block;
width: 1em;
line-height: 1em;
font-size: 3em;
padding: 0 .5em;
text-align: center;
float: right;
opacity: .5;
}
nav.prev a:hover {
opacity: .7;
}
nav.next a:hover {
opacity: .7;
}
/***** NAV:PREV NEXT END *****/
/***** FOOTER START *****/
footer {
padding: .5em 0;
text-align: center;
}
footer .menu li {
list-style-type: none;
display: inline-block;
position: relative;
height: 2em;
line-height: 2em;
padding: 0;
}
footer .menu li a {
color: inherit;
text-decoration: none;
height: 2em;
line-height: 2em;
padding: 0 .3em;
}
footer ul.menu {
text-align: center;
margin: 0;
padding: 0;
display: inline-block;
width: 80%;
}
footer {
opacity: 0.5;
}
.subdued {
opacity: 0.5;
font-size: 80%;
margin-bottom: 15px;
}
.text-center {
text-align: center;
}
ul.horizontal-menu {
padding-left: 0;
}
/***** FOOTER END *****/
/***** RESPONSIVE DIVS START *****/
.size1of1 {
width: 100%;
}
.size1of2 {
width: 50%;
}
.size1of3 {
width: 33.333%;
}
.size1of4 {
width: 25%;
}
.size1of5 {
width: 20%;
}
.size2of3 {
width: 66%;
}
.size3of4 {
width: 75%;
}
.size2of5 {
width: 40%;
}
.size3of5 {
width: 60%;
}
.size4of5 {
width: 80%;
}
.unit:last-child { margin-right: 0; }
.line {
clear: both;
overflow: hidden;
}
.unit { float: left; }
.boxes { overflow: hidden; }
.unit .border {
margin-right: 10px;
margin-bottom: 10px;
box-sizing: border-box;
border-radius: 3px;
}
.line .size1of1 .border {
margin-left: 0;
margin-right: 0;
}
.line .size1of2:nth-child(even) .border { margin-right: 0; }
.line .size1of3:nth-child(3n) .border { margin-right: 0; }
.line .size1of4:nth-child(4n) .border { margin-right: 0; }
.boxes .unit > .inner {
height: 7em;
line-height: 7em;
}
/***** RESPONSIVE DIVS END *****/
/*** AUDIO START ***/
audio {
display: block;
margin: 0 auto;
width: 100%;
margin-top: 1em;
}
/*** AUDIO END ***/
/*** MEDIA START ***/
html.video,
html.audio
{
background-color: #222;
}
html.video,
html.audio {
background: #222;
box-shadow: none;
}
html.video body,
html.audio body {
border: 1px solid #444;
background: #222;
color: #999;
box-shadow: none;
}
html.video > .wrap > .inner,
html.audio > .wrap > .inner {
background-color: #121212;
opacity: 1;
border-radius: 6px;
padding: 24px;
}
html.video .title-wrap,
html.audio .title-wrap {
background-color: transparent;
}
html.video .site-title a,
html.audio .site-title a,
html.video .site-description,
html.audio .site-description {
color: inherit;
}
html.video article,
html.audio article {
padding: 1em;
}
html.video h1 { display: none; }
html.audio h1 { display: none; }
html.video p,
html.audio p {
font-size: small;
max-width: 850px;
color: #777;
}
html.video nav.prev a,
html.audio nav.prev a,
html.video nav.next a,
html.audio nav.next a {
background: #313131;
border: 1px solid #424242;
}
/*** MEDIA END ***/
/***** OTHER GENERIC START *****/
img,
video {
max-width: 100%;
height: auto;
display: block;
margin: 0 auto;
}
article .border {
border: 1px solid #c8c8c8;
border-radius: 7px;
padding: 7px;
box-sizing: border-box;
}
.align-center {
display: block;
margin: 0 auto;
}
.float-left,
.align-left,
.alignleft {
float: left;
margin-right: 1em;
}
.float-right,
.align-right,
.alignright {
float: right;
margin-left: 1em;
}
span.entity-large {
float: left;
font-size: 5em;
line-height: 1.5em;
text-align: center;
margin-right: .2em;
display: inline-block;
width: 1.5em;
border-radius: 3px;
}
.hide {
display: none;
}
/***** OTHER GENERIC END *****/
/***** FULL SCREEN START *****/
@media screen and (max-width: 1376px) {
.full-screen article {
overflow: hidden;
}
}
@media screen and (min-width: 1200px) {
.full-screen {
background: url(/media/image/background-1280x853.jpg) no-repeat center center fixed #a4d7db;
position: absolute;
top: .5em;
bottom: .5em;
left: .5em;
right: .5em;
background-size: cover;
box-sizing: border-box;
max-width: 1600px;
}
.full-screen .title-wrap {
line-height: .4;
}
.full-screen .title-wrap .inner {
padding-left: 2.25em;
background-size: 2em;
}
.full-screen .site-title {
font-size: 1.25em;
}
.full-screen .site-description {
display: none;
}
.full-screen article {
position: absolute;
padding: 0;
left: 0;
top: 50px;
right: 0;
bottom: 1.5em;
max-width: 100%;
}
.full-screen blockquote {
margin-top: 1em;
margin-bottom: 2em;
font-style: italic;
}
.full-screen section .wrap {
}
/*
.full-screen article section:first-child {
position: absolute;
top: 1em;
width: 49%;
bottom: 1em;
overflow: hidden;
}
*/
.full-screen article section:nth-child(1n+1) {
position: absolute;
top: 1em;
width: 49%;
bottom: 1em;
}
.full-screen article section.left {
left: 1em;
}
.full-screen article section.right {
right: 1em;
}
.full-screen article section.text {
overflow-y: scroll;
}
.full-screen section:first-child img {
position: absolute;
top: 50%;
left: 50%;
}
.full-screen section img {
border-radius: .5em;
opacity: .9;
}
.full-screen img.square-480 {
margin-top: -240px;
margin-left: -240px;
}
.full-screen img.square-540 {
margin-top: -270px;
margin-left: -270px;
}
.full-screen img.square-550 {
margin-top: -275px;
margin-left: -275px;
}
.full-screen .text .inner {
padding: 0 1em;
}
.full-screen section .wrap {
opacity: .9;
padding: 1em;
border-radius: .3em;
}
.full-screen section h1 {
margin-top: 0;
margin-bottom: 1em;
padding-left: 1em;
}
.full-screen section p {
margin-top: 0;
margin-bottom: 1em;
padding-left: 1em;
padding-right: 1em;
}
.full-screen article footer {
display: none;
}
.full-screen footer {
position: absolute;
line-height: 1.75em;
bottom: 0;
left: 0;
right: 0;
opacity: 1;
padding: 0;
margin: 0;
}
.full-screen footer .tagline {
text-align: center;
}
/*** NAV:FULL SCREEN ***/
.full-screen nav.prev a {
position: absolute;
left: 0;
top: 50%;
margin-top: -.2em;
margin-left: -.5em;
padding: 0;
border-radius: 50%;
width: 1em;
height: 1em;
line-height: .9em;
z-index: 100;
text-align: center;
font-size: 4em;
}
.full-screen nav.next a {
position: absolute;
right: 0;
top: 50%;
margin-top: -.2em;
margin-right: -.5em;
padding: 0;
border-radius: 50%;
width: 1em;
height: 1em;
line-height: .9em;
z-index: 100;
text-align: center;
font-size: 4em;
}
.full-screen nav.prev a:active {
box-shadow: inset 0 2px 2px rgba(100, 100, 100, 0.5);
}
.full-screen nav.next a:active {
box-shadow: inset 0 2px 2px rgba(100, 100, 100, 0.5);
}
}
@media screen and (min-width: 1599px) {
.full-screen img.square-480 {
width: 600px;
height: 600px;
margin-top: -300px;
margin-left: -300px;
}
.full-screen img.square-550 {
width: 750px;
height: 750px;
margin-top: -375px;
margin-left: -375px;
}
.full-screen .text .inner {
padding: 0 5%;
font-size: 1.125em;
}
}
/***** FULL SCREEN END ******/
/*********** RESPONSIVE START *************/
@media screen and (max-width: 800px) {
html.fixed-width { padding: 1px; }
.fixed-width body, .dynamic body { border-radius: 0; }
.fixed-width .site-logo .inner,
.dynamic .site-logo .inner {
padding: 3px;
}
.fixed-width article, .dynamic article {
padding-left: 1em;
padding-right: 1em;
}
html.dynamic { padding: 1px; }
.dynamic article p { font-size: 1em; }
}
@media screen and (max-width: 720px) {
.dynamic article { padding: 1em 3%; }
.dynamic .site-title {
text-align: center;
font-size: 1.5em;
}
.dynamic .site-description {
text-align: center;
font-size: 1em;
}
.dynamic .size1of3 {
float: none;
width: 100%;
}
.dynamic .size1of4 {
float: none;
width: 50%;
}
}
@media screen and (max-width: 600px) {
.dynamic article { padding: 1em; }
.dynamic .size1of2,
.dynamic .size1of4 {
float: none;
width: 100%;
}
.dynamic .align-left {
float: none;
display: block;
margin-left: auto;
margin-right: auto;
}
.dynamic .align-right {
float: none;
display: block;
margin-left: auto;
margin-right: auto;
}
}
@media screen and (max-width: 480px) {
.dynamic .site-title { font-size: 1.25em; }
.dynamic .site-description { font-size: .9em; }
}
@media screen and (max-width: 360px) {
.dynamic .site-title { font-size: 1em; }
.dynamic .site-description { font-size: .8em; }
}
/******* MENU ONLY RESPONSIVE START *********/
/* The folding CSS only menu structure below requires that the
folds match up with the number of menu items in the menu. */
@media screen and (max-width: 960px) {
.dynamic .horizontal-menu li:nth-child(8) {
display: none;
}
.dynamic .vertical-menu li:nth-child(8) {
display: block;
}
}
@media screen and (max-width: 840px) {
.dynamic .horizontal-menu li:nth-child(7) {
display: none;
}
.dynamic .vertical-menu li:nth-child(7) {
display: block;
}
}
/* adjust upwards for more menu items, downwards for less */
@media screen and (max-width: 875px) {
.dynamic .horizontal-menu li:nth-child(5) {
display: none;
}
.dynamic .vertical-menu li:nth-child(5) {
display: block;
}
}
@media screen and (max-width: 750px) {
html.dynamic {
padding: 0;
}
.dynamic article {
padding: 1em;
}
}
@media screen and (max-width: 750px) {
.dynamic .horizontal-menu li.more {
display: inline-block;
}
.dynamic nav .more-menu.has-parent {
right: 0;
margin-top: -5px;
}
.dynamic .horizontal-menu li:nth-child(5) {
display: none;
}
.dynamic .vertical-menu li:nth-child(5) {
display: block;
}
}
@media screen and (max-width: 625px) {
.dynamic .horizontal-menu li:nth-child(4) {
display: none;
}
.dynamic .vertical-menu li:nth-child(4) {
display: block;
}
}
@media screen and (max-width: 500px) {
.dynamic .site-description {
display: none;
}
.dynamic .horizontal-menu li:nth-child(3) {
display: none;
}
.dynamic .vertical-menu li:nth-child(3) {
display: block;
}
}
@media screen and (max-width: 400px) {
.dynamic nav li.more {
border-left: 1px dashed #e7e7e7;
}
.dynamic .horizontal-menu li:nth-child(2) {
display: none;
}
.dynamic .vertical-menu li:nth-child(2) {
display: block;
}
}
@media screen and (max-width: 400px) {
.dynamic .horizontal-menu li:nth-child(1) {
display: none;
}
.dynamic .vertical-menu li:nth-child(1) {
display: block;
}
}
@media screen and (max-width: 400px) {
.dynamic .horizontal-menu {
text-align: right;
}
.dynamic .more-text {
display: none;
}
.dynamic .menu-bar {
display: inline-block;
}
.dynamic nav .more-menu.has-parent {
margin-right: -40px;
}
}
/******* MENU ONLY RESPONSIVE END *********/
/************ RESPONSIVE END **************/
/********** GENERIC STYLING END **********/
/********** CUSTOM STYLING BEGIN **********/
.title-wrap { line-height: 1; }
.title-wrap .inner { padding: 1.25em; }
.title-wrap .inner { text-align: center; }
nav { border-top: none; }
nav ul { margin: 0; }
blockquote {
opacity: .9;
padding: 1em;
border-radius: .3em;
}
section .wrap {
clear: both;
overflow: hidden;
}
footer .address { text-align: center; }
/********** CUSTOM STYLING END **********/
/*** COMMONS END ***/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment