memex/docs/asset/style.css
2018-08-14 03:29:24 +12:00

542 lines
13 KiB
CSS

/* VARIABLES */
:root {
/* COLOR */
--color-main-bg-i: #ddd; /*idle*/
--color-main-bg-e: #ddd; /*enabled*/
--color-menu-bg-i: #000; /*idle*/
--color-menu-bg-e: #000; /*enabled*/
--color-menu-item-i: #333; /*idle*/
--color-menu-item-e: #999; /*enabled*/
--color-menu-item-a: #ddd; /*ascent*/
--color-content-bg-i: #ccc; /*idle*/
--color-content-bg-e: #bbb; /*enabled*/
--color-content-item-s: #bbb; /*sub*/
--color-content-item-i: #999; /*idle*/
--color-content-item-e: #666; /*enabled*/
--color-content-item-t: #000; /*title*/
--color-content-item-a: #000; /*ascent*/
--color-content-image-s: rgba(255, 255, 255, .1); /*sub*/
--color-content-image-i: rgba(255, 255, 255, .3); /*idle*/
--color-content-image-e: rgba(255, 255, 255, .5); /*enabled*/
--color-content-image-t: #fff; /*title*/
--color-content-image-a: #fff; /*ascent*/
--color-overlay-bg-i: #000; /*idle*/
--color-overlay-bg-e: #111; /*enabled*/
--color-overlay-item-s: #111; /*sub*/
--color-overlay-item-i: #222; /*idle*/
--color-overlay-item-e: #333; /*enabled*/
--color-overlay-item-a: #666; /*ascent*/
/* SIZE */
--menu-width: 150px;
--menu-item-vert-sep: 20px; /*vertical space between menu items*/
--menu-item-elem-sep: 10px; /*horizontal space between menu item count and icon*/
--menu-item-spacer: 30px; /*vertical space between menu types (types to terms, terms to tags)*/
--menu-tag-sep: 10px; /*space between tag items*/
--size-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;
--type-icon-size: 24px; /*font size of type icon/count*/
--animation-time: 200ms;
}
* {
box-sizing: border-box;
}
html {
font-family: 'Monaco', 'Andale Mono', 'Deja Vu Sans Mono', 'Consolas', monospace;
background: var(--color-main-bg-i);
padding: 0em;
margin: 0;
overflow-y: scroll;
}
body {
padding: 0em;
margin: 0;
}
/* MENU */
.menu {
background: var(--color-menu-bg-i);
padding-top: var(--size-gutter);
width: var(--menu-width);
position: fixed;
height: 100%;
z-index: 100;
left: 0px;
top: 0px;
overflow-y: scroll;
}
.menu::-webkit-scrollbar {
display: none;
}
.menu:hover {
background: var(--color-menu-bg-e);
}
.menu a {
color: var(--color-menu-item-i);
}
.menu:hover a {
color: var(--color-menu-item-e);
}
.menu:hover a:hover {
color: var(--color-menu-item-a);
}
.menu-spacer {
height: var(--menu-item-spacer);
width: 100%;
float: left;
}
/* MENU ITEMS */
.menu-item {
padding-bottom: calc(var(--menu-item-vert-sep) / 2);
padding-top: calc(var(--menu-item-vert-sep) / 2);
font-size: var(--type-icon-size);
margin: 0px auto;
width: 100%;
float: left;
text-align: center;
}
.menu-item .count {
padding-right: calc(var(--menu-item-elem-sep) / 2);
display: inline-block;
text-align: right;
float: left;
width: 50%;
}
.menu-item i {
margin-left: calc(var(--menu-item-elem-sep) / 2);
margin-top: calc(var(--type-icon-size) / 10);
width: calc(var(--type-icon-size) * 1.25);
display: inline-block;
text-align: center;
float: left;
}
/* MENU TAGS */
.menu-tag-container {
margin: 0 auto;
display: table;
}
.menu-tag-container i {
padding-bottom: calc(var(--menu-item-vert-sep) / 2);
padding-top: calc(var(--menu-item-vert-sep) / 2);
font-size: var(--type-icon-size);
color: var(--color-menu-item-i);
display: table-row;
text-align: center;
width: 100%;
float: left;
}
.menu:hover .menu-tag-container i {
color: var(--color-menu-item-e);
}
.menu-tag {
padding-bottom: calc(var(--menu-tag-sep) / 2);
padding-top: calc(var(--menu-tag-sep) / 2);
font-size: var(--size-font-body);
display: table-row;
width: 100%;
float: left;
clear: left;
}
.menu-tag-count {
padding-right: var(--menu-tag-sep);
text-align: right;
float: left;
}
.menu-tag-label {
text-align: left;
float: left;
}
.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 */
}
/* 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-item-i);*/
border-radius: var(--size-item-corner);
}
.page-overlay .content .row input::placeholder {
opacity: 1;
color: var(--color-menu-item-i);
}
.page-overlay .content .row input:hover {
/*background-color: var(--color-content-item-a);*/
background-color: var(--color-overlay-item-i);
}
.page-overlay .content .row input:focus {
/*background-color: var(--color-content-item-a);*/
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;
}
/* CONTENT */
.container {
background: var(--color-main-bg-i);
margin-left: calc(var(--menu-width) + var(--size-gutter));
margin-right: var(--size-gutter);
}
.container:hover {
background: var(--color-main-bg-e);
}
.grid {
margin: var(--size-gutter) auto;
opacity: 1;
-webkit-transition: opacity 1000ms linear;
transition: opacity 1000ms linear;
}
.grid:after {
/* clearfix */
display: block;
content: '';
clear: both;
}
/* GRID ITEM */
.grid-item, .grid-item--width2 {
border-radius: var(--size-item-corner);
background: var(--color-content-bg-i);
margin-bottom: var(--size-gutter);
width: var(--size-grid-column);
text-decoration: none;
float: left;
padding-bottom: var(--size-gutter);
position: relative;
}
@media screen and (min-width: 886px) {
.grid-item--width2 {
width: calc(var(--size-grid-column) * 2 + var(--size-gutter));
}
}
.grid-item-upper-content {
padding: var(--size-gutter) var(--size-gutter) 0 var(--size-gutter);
display: inline-block;
z-index: 100;
width: 100%;
}
.grid-item-image .grid-item-upper-content {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
}
.grid-item-lower-content {
padding: 0 var(--size-gutter) 0 var(--size-gutter);
z-index: 100;
}
.grid-item-image .grid-item-lower-content {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
padding-bottom: var(--size-gutter);
}
.grid-item-lower-content:empty {
display: none;
}
.grid-item-image {
padding-bottom: 0;
overflow: hidden;
background: transparent;
}
.grid-item img {
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;
z-index: 0;
}
.grid-item:hover {
box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, .1);
background: var(--color-content-bg-e);
}
.image-overlay {
width: 100%;
height: 100%;
position: absolute;
z-index: 10;
background-color: #000;
opacity: 0;
}
.grid-item-image:hover .image-overlay {
opacity: 0.2;
}
/* LINK */
.grid-item .link {
width: calc(100% - var(--type-icon-size)*2);
float: left;
clear: both;
}
.grid-item .link {
text-decoration: none;
display: inline-block;
}
.grid-item-image .link {
display: none;
}
.grid-item-image:hover .link {
display: initial;
text-shadow: 0 0 3em #000;
}
.grid-item .link .title {
color: var(--color-content-item-t);
font-size: var(--size-font-title);
text-decoration: none;
float: left;
clear: both;
}
.grid-item-image .title {
display: none;
}
.grid-item-image:hover .title {
display: initial;
text-shadow: 0 0 3em #000;
color: white;
}
.grid-item .link .link-line {
margin-top: var(--size-item-elem-padding);
float: left;
clear: both;
}
.grid-item .link i {
float: left;
}
.grid-item .link .link-title {
color: var(--color-content-item-i);
font-size: var(--size-font-body);
float: left;
}
.grid-item:hover .link .link-title {
color: var(--color-content-item-e);
}
.grid-item .link:hover .link-title {
background-color: var(--color-content-item-a);
color: var(--color-content-bg-e);
}
/* TYPE */
.grid-item .type {
width: calc(var(--type-icon-size)*2 + var(--size-gutter));
color: var(--color-content-item-s);
padding-bottom: var(--size-gutter);
font-size: var(--type-icon-size);
padding-top: var(--size-gutter);
vertical-align: top;
text-align: center;
position: absolute;
right: 0px;
top: 0px;
}
.grid-item-image .grid-item-upper-content a .type i {
display: none;
}
.grid-item-image:hover .grid-item-upper-content a .type i {
display: initial;
color: var(--color-content-image-i);
}
.grid-item-image:hover .grid-item-upper-content a:hover .type i {
display: initial;
color: var(--color-content-image-a);
}
.grid-item:hover .type {
color: var(--color-content-item-i);
}
.grid-item:hover .type:hover {
color: var(--color-content-item-a);
}
/* LINK, NOTE, QUOTE, TERM, TAGS */
.note, .quote, .term, .tags, .auth, .prog {
padding-top: var(--size-item-elem-padding);
color: var(--color-content-item-i);
font-size: var(--size-font-body);
float: left;
clear: both;
}
.grid-item:hover .link,
.grid-item:hover .note,
.grid-item:hover .quote,
.grid-item:hover .term,
.grid-item:hover .tags,
.grid-item:hover .auth,
.grid-item:hover .prog {
color: var(--color-content-item-e);
}
.grid-item-image .grid-item-lower-content .link,
.grid-item-image .grid-item-lower-content .note,
.grid-item-image .grid-item-lower-content .quote,
.grid-item-image .grid-item-lower-content .term,
.grid-item-image .grid-item-lower-content .tags,
.grid-item-image .grid-item-lower-content .auth,
.grid-item-image .grid-item-lower-content .prog {
color: var(--color-content-image-t);
}
.grid-item-image .grid-item-lower-content {
display: none;
}
.grid-item-image:hover .grid-item-lower-content {
display: initial;
}
.tags a {
color: var(--color-content-item-i);
text-decoration:none;
}
.grid-item:hover .tags a {
color: var(--color-content-item-e);
}
.grid-item:hover .tags a:hover {
background-color: var(--color-content-item-a);
color: var(--color-content-bg-e);
}
.grid-item-image:hover .tags a {
color: #fff;
}
.grid-item-image:hover .tags a:hover {
color: #fff;
}
/* SMALL ICONS */
.textIcon {
margin-right: var(--size-item-elem-sep);
color: var(--color-content-item-s);
}
.grid-item:hover .textIcon {
color: var(--color-content-item-i);
}