memex/docs/asset/style.css
2018-09-16 00:25:32 +12:00

637 lines
14 KiB
CSS

:root {
--color-bg: var(--background);
--color-menu: var(--f_high);
--color-menubg: var(--b_low);
--color-menuascent: var(--f_med);
--color-item: var(--f_high);
--color-itembg: var(--b_low);
--color-itemascent: var(--f_med);
--color-image: #fff; /*Text overlaying an image item*/
--color-imagedarken: #000; /*Overlay on image as text background */
--alpha-darken: 0.2;
--alpha-idle: 0.4;
--alpha-enabled: 0.8;
--alpha-ascent: 1.0;
--size-menu: 150px;
--size-menu-item-sepv: 14px; /*vertical space between menu items*/
--size-menu-item-seph: 10px; /*horizontal space between menu item count and icon*/
--size-menu-itemgroup-sepv: 30px; /*vertical space between menu types (types to terms, terms to tags)*/
--size-menu-tag-sepv: 10px; /*space between tag items*/
--size-grid-gutter: 20px;
--size-grid-column: 350px;
--size-item-corner: 3px;
--size-item-elem-padding: 1em; /*vertical space between grid item internal elements (tags, notes, quotes etc)*/
--size-item-elem-sep: 0.75em; /*horizontal space between item element icon and element text (tag icon and tags)*/
--size-font-title: 1em;
--size-font-body: 0.8em;
--size-font-menutypes: 1em;
--size-font-menutags: 0.8em;
--size-font-bodytypes: 1em; /*font size of type icon/count*/
/*TODO: refactor variables below; */
--color-overlay-bg-i: #000; /*idle*/
--color-overlay-bg-e: #111; /*enabled*/
--color-overlay-item-i: #222; /*idle*/
--color-overlay-item-e: #333; /*enabled*/
--color-overlay-item-a: #666; /*ascent*/
}
* {
box-sizing: border-box;
}
html {
font-family: 'Monaco', 'Andale Mono', 'Deja Vu Sans Mono', 'Consolas', monospace;
background: var(--background);
padding: 0em;
margin: 0;
overflow-y: scroll;
}
body {
padding: 0em;
margin: 0;
}
.menu {
padding-top: var(--size-grid-gutter);
background: var(--color-bg);
opacity: var(--alpha-idle);
width: var(--size-menu);
position: fixed;
height: 100%;
z-index: 100;
left: 0px;
top: 0px;
/*overflow-y: scroll;*/ /*allow menu to scroll on small screens*/
}
.menu:hover {
opacity: var(--alpha-ascent);
}
.menu::-webkit-scrollbar {
display: none;
}
.menu-itemgroup {
padding-bottom: var(--size-menu-itemgroup-sepv);
width: 100%;
float: left;
}
.menu-item {
padding-bottom: calc(var(--size-menu-item-sepv) / 2);
padding-top: calc(var(--size-menu-item-sepv) / 2);
font-size: var(--size-font-menutypes);
opacity: var(--alpha-idle);
color: var(--color-menu);
text-align: center;
margin: 0px auto;
width: 100%;
float: left;
}
.menu-item:hover {
color: var(--color-menuascent);
opacity: var(--alpha-ascent);
}
.menu-itemcount {
padding-right: calc(var(--size-menu-item-seph) / 2);
display: inline-block;
text-align: right;
float: left;
width: 50%;
}
.menu-itemicon {
margin-left: calc(var(--size-menu-item-seph) / 2);
margin-top: calc(var(--size-font-bodytypes) / 10);
width: calc(var(--size-font-bodytypes) * 1.25);
display: inline-block;
text-align: center;
float: left;
}
.menu-tagcontainer {
margin: 0 auto;
display: table;
}
.menu-tagicon {
padding-bottom: calc(var(--size-menu-item-sepv) / 2);
padding-top: calc(var(--size-menu-item-sepv) / 2);
font-size: var(--size-font-menutags);
opacity: var(--alpha-idle);
color: var(--color-menu);
display: table-row;
text-align: center;
width: 100%;
float: left;
}
.menu-tag {
padding-bottom: calc(var(--size-menu-tag-sepv) / 2);
padding-top: calc(var(--size-menu-tag-sepv) / 2);
font-size: var(--size-font-body);
opacity: var(--alpha-idle);
color: var(--color-menu);
width: 100%;
float: left;
clear: left;
}
.menu-tagcount {
padding-right: var(--size-menu-tag-sepv);
text-align: right;
float: left;
}
.menu-taglabel {
text-align: left;
float: left;
}
.menu-tag:hover {
opacity: var(--alpha-ascent);
}
.menu-tag:hover .menu-taglabel {
background-color: var(--color-itemascent);
color: var(--color-menubg);
}
.menu-tag:hover .menu-tagcount {
color: var(--color-itemascent);
}
.container {
background: var(--background);
margin-left: calc(var(--size-menu) + var(--size-grid-gutter));
margin-right: var(--size-grid-gutter);
}
.grid {
margin: var(--size-grid-gutter) auto;
-webkit-transition: opacity 1000ms linear;
transition: opacity 1000ms linear;
}
.grid:after {
/* clearfix (reset) */
display: block;
content: '';
clear: both;
}
.grid-item, .grid-itemwide {
padding-bottom: var(--size-grid-gutter);
border-radius: var(--size-item-corner);
margin-bottom: var(--size-grid-gutter);
background: var(--color-itembg);
width: var(--size-grid-column);
text-decoration: none;
position: relative;
float: left;
}
.grid-item:hover, .grid-itemwide:hover {
opacity: var(--alpha-ascent);
}
@media screen and (min-width: 886px) {
.grid-itemwide {
width: calc(var(--size-grid-column) * 2 + var(--size-grid-gutter));
}
}
.grid-item:hover {
background: var(--color-itembg);
opacity: 1;
}
.grid-itemupper {
padding: var(--size-grid-gutter) var(--size-grid-gutter) 0 var(--size-grid-gutter);
display: inline-block;
z-index: 100;
width: 100%;
}
.grid-itemlower {
padding: 0 var(--size-grid-gutter) 0 var(--size-grid-gutter);
z-index: 100;
}
.grid-itemlower:empty {
display: none;
}
.grid-itemimage {
background: transparent;
padding-bottom: 0;
overflow: hidden;
}
.grid-itemimage .grid-itemupper {
position: absolute;
height: 100%;
width: 100%;
left: 0;
z-index: 300;
top: 0;
}
.grid-itemimage .grid-itemlower {
padding-bottom: var(--size-grid-gutter);
position: absolute;
width: 100%;
bottom: 0;
z-index: 300;
left: 0;
}
/*.grid-itemimageimg {*/
/*border-radius: var(--size-item-corner);*/
/*vertical-align: middle; vertical-align css hack removes bottom padding */
/*max-height: 1000px;*/
/*margin-bottom: 0px;*/
/*object-fit: cover;*/
/*width: 100%;*/
/*z-index: 0;*/
/*z-index: -10;*/
/*}*/
.grid-item .image {
border-radius: var(--size-item-corner);
vertical-align: middle; /* vertical-align css hack removes bottom padding */
object-fit: cover;
margin-bottom: 0px;
width: 100%;
max-height: 1000px;
position: relative;
z-index: 100;
top: 0;
left: 0;
}
.grid-item img {
/*border-radius: var(--size-item-corner);*/
vertical-align: middle; /* vertical-align css hack removes bottom padding */
object-fit: cover;
height: 100%;
width: 100%;
z-index: 0;
}
.image-overlay {
background-color: var(--color-imagedarken);
position: absolute;
height: 100%;
width: 100%;
z-index: 150;
opacity: 0;
/*display: none;*/
/*opacity: 0.6;*/
}
.grid-itemimage:hover .image-overlay {
opacity: var(--alpha-darken);
}
/*TODO: refactor below; */
/* LINK */
.grid-itemlink {
width: calc(100% - var(--size-font-bodytypes)*2);
float: left;
clear: both;
text-decoration: none;
display: inline-block;
}
.grid-itemimage .grid-itemlink {
display: none;
}
.grid-itemimage:hover .grid-itemlink {
display: initial;
text-shadow: 0 0 3em #000;
}
.grid-item .title {
opacity: var(--alpha-enabled);
color: var(--color-item);
font-size: var(--size-font-title);
text-decoration: none;
float: left;
clear: both;
}
.grid-item:hover .title {
opacity: var(--alpha-ascent);
}
.grid-itemimage .title {
display: none;
}
.grid-itemimage:hover .title {
display: initial;
text-shadow: 0 0 3em #000;
color: white;
}
.grid-itemlink .link-line {
margin-top: var(--size-item-elem-padding);
float: left;
clear: both;
}
.grid-itemlinkicon {
margin-right: var(--size-item-elem-sep);
opacity: var(--alpha-idle);
color: var(--color-item);
float: left;
}
.grid-itemlink .link-title {
color: var(--color-item);
font-size: var(--size-font-body);
float: left;
}
.grid-itemlink:hover .link-title {
background-color: var(--color-itemascent);
color: var(--color-itembg);
}
/* TYPE */
.grid-item .type {
opacity: var(--alpha-idle);
width: calc(var(--size-font-bodytypes)*2 + var(--size-grid-gutter));
color: var(--color-item);
padding-bottom: var(--size-grid-gutter);
font-size: var(--size-font-bodytypes);
padding-top: var(--size-grid-gutter);
vertical-align: top;
text-align: center;
position: absolute;
right: 0px;
top: 0px;
}
.grid-itemimage .grid-itemupper a .type i {
display: none;
}
.grid-itemimage:hover .grid-itemupper a .type i {
display: initial;
color: var(--color-image);
opacity: var(--alpha-enabled);
}
.grid-itemimage:hover .grid-itemupper a:hover .type i {
display: initial;
color: var(--color-image);
}
.grid-item:hover .type {
opacity: var(--alpha-enabled);
color: var(--color-item);
}
.grid-item:hover .type:hover {
opacity: var(--alpha-ascent);
color: var(--color-itemascent);
}
.grid-item .link-title {
opacity: var(--alpha-idle);
}
.grid-item .fas {
opacity: var(--alpha-idle);
}
.grid-item:hover .link-title {
opacity: var(--alpha-enabled);
}
.grid-item:hover a:hover .link-title {
opacity: var(--alpha-ascent);
}
/*.grid-item:hover a:hover .fas {
opacity: var(--alpha-ascent);
}*/
.grid-item:hover .fas {
opacity: var(--alpha-enabled);
}
/* NOTE, QUOTE, TERM, TAGS, AUTH, PROG */
.note, .quote, .term, .tags, .auth, .prog {
opacity: var(--alpha-idle);
padding-top: var(--size-item-elem-padding);
color: var(--color-item);
font-size: var(--size-font-body);
float: left;
clear: both;
}
.grid-item:hover .note,
.grid-item:hover .quote,
.grid-item:hover .term,
.grid-item:hover .tags,
.grid-item:hover .auth,
.grid-item:hover .prog {
opacity: var(--alpha-enabled);
color: var(--color-item);
}
/*.grid-item:hover .tags:hover {
opacity: var(--alpha-ascent);
}*/
.grid-itemimage .grid-itemlower .link,
.grid-itemimage .grid-itemlower .note,
.grid-itemimage .grid-itemlower .quote,
.grid-itemimage .grid-itemlower .term,
.grid-itemimage .grid-itemlower .tags,
.grid-itemimage .grid-itemlower .auth,
.grid-itemimage .grid-itemlower .prog {
color: var(--color-image);
}
.grid-itemimage .grid-itemlower {
display: none;
}
.grid-itemimage:hover .grid-itemlower {
display: initial;
}
.tags a {
color: var(--color-item);
text-decoration:none;
}
.grid-item:hover .tags a {
color: var(--color-item);
}
.grid-item:hover .tags a:hover {
background-color: var(--color-itemascent);
color: var(--color-itembg);
}
.grid-itemimage:hover .tags a {
color: #fff;
}
.grid-itemimage:hover .tags a:hover {
color: #fff;
}
/* SMALL ICONS */
.textIcon {
margin-right: var(--size-item-elem-sep);
}
.grid-item:hover .textIcon {
color: var(--color-item);
}
/* PAGE */
.page-overlay {
/* visual */
background-color: var(--color-overlay-bg-i);
opacity: 0;
/*-webkit-transition: opacity var(--animation-time) linear;
transition: opacity var(--animation-time) linear;*/
width: 100%;
height: 100%;
/* position */
position: absolute;
z-index: -100;
left: 0;
top: 0;
/* content */
display: flex;
align-items: center;
justify-content: center;
user-select: none;
}
.page-overlay .content-menu {
width: 100px;
float: left;
text-align: center;
height: 100%;
padding-top: auto;
padding-bottom: auto;
margin-right: 50px;
border-radius: var(--size-item-corner);
}
.page-overlay .content-menu:hover {
background-color: var(--color-overlay-item-i);
}
.page-overlay .content-menu:hover a {
color: var(--color-overlay-item-a);
}
.page-overlay .content-menu a {
color: var(--color-overlay-item-e);
text-decoration: none;
}
.page-overlay .content-menu .content-menu-option {
height: 100px;
width: 100px;
display: flex;
align-items: center;
justify-content: center;
}
.page-overlay .content form {
float: left;
}
.page-overlay .content .row .key {
width: 100px;
color: var(--color-overlay-item-a);
visibility: hidden;
float: left;
padding: 9px 7px 10px 0;
text-align: right;
margin-right: 0px;
}
.page-overlay .content .row input {
padding: 10px;
width: 400px;
margin-bottom: 10px;
/*background-color: transparent;*/
background-color: var(--color-overlay-bg-e);
color: #fff;
border-width: 0px;
/*border-width: 1px;
border-style: solid;
border-color: var(--color-menu);*/
border-radius: var(--size-item-corner);
}
.page-overlay .content .row input::placeholder {
opacity: 1;
color: var(--color-menu);
}
.page-overlay .content .row input:hover {
/*background-color: var(--color-itemascent);*/
background-color: var(--color-overlay-item-i);
}
.page-overlay .content .row input:focus {
/*background-color: var(--color-itemascent);*/
background-color: var(--color-overlay-item-e);
}
.page-overlay .content .display {
float: left;
height: 100%;
width: 400px;
padding: 10px;
margin-left: 50px;
color: var(--color-overlay-item-e);
}
.page-overlay .content-enter {
margin-top: 50px;
float: left;
width: 100%;
height: 100px;
clear: both;
text-align: center;
padding-top: auto;
padding-bottom: auto;
vertical-align: center;
border-radius: var(--size-item-corner);
}
.page-overlay .content-enter .content-menu-option {
height: 100%;
vertical-align: center;
padding-top: auto;
padding-bottom: auto;
display: flex;
align-items: center;
justify-content: center;
}
.page-overlay .content-enter:hover {
background-color: var(--color-overlay-item-i);
}
.page-overlay .content-enter:hover a {
color: var(--color-overlay-item-a);
}
.page-overlay .content-enter a {
color: var(--color-overlay-item-e);
text-decoration: none;
}
/*noselect stops an unwanted selection visual on button click*/
.noselect {
-webkit-touch-callout: none; /* iOS Safari */
-webkit-user-select: none; /* Safari */
-khtml-user-select: none; /* Konqueror HTML */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* Internet Explorer/Edge */
user-select: none; /* Non-prefixed version, currently
supported by Chrome and Opera */
}