memex/docs/asset/style.css

616 lines
13 KiB
CSS
Raw Normal View History

2018-07-17 18:17:43 +00:00
:root {
2018-09-14 18:55:32 +00:00
--color-bg: var(--background);
2018-07-18 15:28:10 +00:00
2018-09-14 18:55:32 +00:00
--color-menu: var(--f_high); /*previously --b_med*/
--color-menubg: var(--b_low);
--color-menuascent: var(--b_inv);
--color-item: var(--f_high);
--color-itembg: var(--b_low);
--color-itemascent: var(--b_inv);
2018-07-17 18:17:43 +00:00
2018-09-14 18:55:32 +00:00
--color-image: #fff; /*Text overlaying an image item*/
--color-imagedarken: #000; /*Overlay on image as text background */
2018-07-17 18:17:43 +00:00
2018-09-14 18:55:32 +00:00
--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;
2018-07-17 18:17:43 +00:00
--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;
2018-09-14 18:55:32 +00:00
--size-font-menutypes: 1em;
--size-font-menutags: 0.8em;
--size-font-bodytypes: 1em; /*font size of type icon/count*/
2018-07-23 13:20:03 +00:00
2018-09-14 18:55:32 +00:00
/*TODO: refactor these; */
--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*/
2018-07-17 18:17:43 +00:00
}
2018-07-22 19:45:04 +00:00
* {
box-sizing: border-box;
}
2018-07-17 18:17:43 +00:00
html {
font-family: 'Monaco', 'Andale Mono', 'Deja Vu Sans Mono', 'Consolas', monospace;
2018-09-14 18:55:32 +00:00
background: var(--background);
padding: 0em;
2018-07-17 18:17:43 +00:00
margin: 0;
2018-07-23 13:20:03 +00:00
overflow-y: scroll;
2018-07-13 15:56:09 +00:00
}
2018-07-17 18:17:43 +00:00
body {
padding: 0em;
margin: 0;
}
2018-07-14 10:07:08 +00:00
2018-07-16 12:38:07 +00:00
/* MENU */
.menu {
2018-09-14 18:55:32 +00:00
background: var(--color-menubg);
padding-top: var(--size-grid-gutter);
width: var(--size-menu);
2018-07-17 18:17:43 +00:00
position: fixed;
2018-07-16 04:30:40 +00:00
height: 100%;
2018-07-17 18:17:43 +00:00
z-index: 100;
2018-07-16 04:30:40 +00:00
left: 0px;
top: 0px;
overflow-y: scroll;
2018-09-14 18:55:32 +00:00
opacity: var(--alpha-idle);
2018-07-16 12:38:07 +00:00
}
2018-07-18 10:12:02 +00:00
.menu:hover {
2018-09-14 18:55:32 +00:00
opacity: var(--alpha-enabled);
2018-07-16 12:38:07 +00:00
}
2018-09-14 18:55:32 +00:00
.menu::-webkit-scrollbar {
display: none;
2018-07-16 12:38:07 +00:00
}
2018-09-14 18:55:32 +00:00
.menu-itemgroup {
padding-bottom: var(--size-menu-itemgroup-sepv);
2018-07-17 18:17:43 +00:00
width: 100%;
2018-09-14 18:55:32 +00:00
float: left;
2018-07-17 14:09:23 +00:00
}
2018-07-16 12:38:07 +00:00
.menu-item {
2018-09-14 18:55:32 +00:00
color: var(--color-menu);
opacity: var(--alpha-idle);
padding-bottom: calc(var(--size-menu-item-sepv) / 2);
padding-top: calc(var(--size-menu-item-sepv) / 2);
font-size: var(--size-font-menutypes);
2018-07-16 15:07:13 +00:00
margin: 0px auto;
2018-07-17 18:17:43 +00:00
width: 100%;
float: left;
2018-07-23 13:20:03 +00:00
text-align: center;
2018-07-16 12:38:07 +00:00
}
2018-09-14 18:55:32 +00:00
.menu-item:hover {
color: var(--color-menuascent);
opacity: var(--alpha-ascent);
}
.menu-itemcount {
padding-right: calc(var(--size-menu-item-seph) / 2);
2018-07-17 18:17:43 +00:00
display: inline-block;
2018-07-16 15:07:13 +00:00
text-align: right;
2018-07-17 18:17:43 +00:00
float: left;
2018-07-16 15:07:13 +00:00
width: 50%;
2018-07-16 12:38:07 +00:00
}
2018-09-14 18:55:32 +00:00
.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);
2018-07-17 18:17:43 +00:00
display: inline-block;
2018-07-16 12:38:07 +00:00
text-align: center;
2018-07-17 18:17:43 +00:00
float: left;
2018-07-16 12:38:07 +00:00
}
2018-09-14 18:55:32 +00:00
.menu-tagcontainer {
2018-07-17 18:17:43 +00:00
margin: 0 auto;
2018-07-16 15:07:13 +00:00
display: table;
}
2018-09-14 18:55:32 +00:00
.menu-tagicon {
opacity: var(--alpha-idle);
padding-bottom: calc(var(--size-menu-item-sepv) / 2);
padding-top: calc(var(--size-menu-item-sepv) / 2);
font-size: var(--size-font-menutags);
color: var(--color-menu);
2018-07-16 15:07:13 +00:00
display: table-row;
2018-07-16 12:38:07 +00:00
text-align: center;
2018-07-17 18:17:43 +00:00
width: 100%;
float: left;
2018-07-16 15:07:13 +00:00
}
.menu-tag {
2018-09-14 18:55:32 +00:00
opacity: var(--alpha-idle);
color: var(--color-menu);
padding-bottom: calc(var(--size-menu-tag-sepv) / 2);
padding-top: calc(var(--size-menu-tag-sepv) / 2);
font-size: var(--size-font-body);
width: 100%;
float: left;
clear: left;
2018-07-16 04:30:40 +00:00
}
2018-09-14 18:55:32 +00:00
.menu-tagcount {
padding-right: var(--size-menu-tag-sepv);
2018-07-16 15:07:13 +00:00
text-align: right;
2018-07-17 18:17:43 +00:00
float: left;
2018-07-16 15:07:13 +00:00
}
2018-09-14 18:55:32 +00:00
.menu-taglabel {
2018-07-16 15:07:13 +00:00
text-align: left;
2018-07-17 18:17:43 +00:00
float: left;
2018-07-16 15:07:13 +00:00
}
2018-09-14 18:55:32 +00:00
.menu-tag:hover {
opacity: var(--alpha-ascent);
2018-07-24 11:50:04 +00:00
}
2018-09-14 18:55:32 +00:00
.menu-tag:hover .menu-taglabel {
color: var(--color-menubg);
background-color: var(--color-itemascent);
2018-07-24 11:50:04 +00:00
}
2018-09-14 18:55:32 +00:00
.menu-tag:hover .menu-tagcount {
color: var(--color-itemascent);
2018-07-24 11:50:04 +00:00
}
2018-07-16 04:30:40 +00:00
.container {
2018-09-14 18:55:32 +00:00
background: var(--background);
margin-left: calc(var(--size-menu) + var(--size-grid-gutter));
margin-right: var(--size-grid-gutter);
2018-07-18 10:12:02 +00:00
}
.grid {
2018-09-14 18:55:32 +00:00
margin: var(--size-grid-gutter) auto;
2018-07-23 13:20:03 +00:00
-webkit-transition: opacity 1000ms linear;
transition: opacity 1000ms linear;
2018-07-14 10:07:08 +00:00
}
.grid:after {
2018-09-14 18:55:32 +00:00
/* clearfix (reset) */
display: block;
2018-07-17 18:17:43 +00:00
content: '';
clear: both;
2018-07-14 10:07:08 +00:00
}
2018-09-14 18:55:32 +00:00
.grid-item, .grid-itemwide {
2018-07-17 18:17:43 +00:00
border-radius: var(--size-item-corner);
2018-09-14 18:55:32 +00:00
background: var(--color-itembg);
margin-bottom: var(--size-grid-gutter);
2018-07-17 18:17:43 +00:00
width: var(--size-grid-column);
text-decoration: none;
2018-07-17 18:17:43 +00:00
float: left;
2018-09-14 18:55:32 +00:00
padding-bottom: var(--size-grid-gutter);
2018-07-21 17:46:18 +00:00
position: relative;
2018-09-14 02:57:15 +00:00
}
2018-09-14 18:55:32 +00:00
.grid-item:hover, .grid-itemwide:hover {
opacity: var(--alpha-ascent);
2018-07-14 15:55:10 +00:00
}
2018-07-17 14:36:13 +00:00
@media screen and (min-width: 886px) {
2018-09-14 18:55:32 +00:00
.grid-itemwide {
width: calc(var(--size-grid-column) * 2 + var(--size-grid-gutter));
2018-07-17 14:36:13 +00:00
}
}
2018-09-14 18:55:32 +00:00
2018-07-18 11:17:51 +00:00
.grid-item-upper-content {
2018-09-14 18:55:32 +00:00
padding: var(--size-grid-gutter) var(--size-grid-gutter) 0 var(--size-grid-gutter);
2018-07-18 11:17:51 +00:00
display: inline-block;
2018-07-21 17:46:18 +00:00
z-index: 100;
2018-07-18 11:17:51 +00:00
width: 100%;
}
.grid-item-image .grid-item-upper-content {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
}
.grid-item-lower-content {
2018-09-14 18:55:32 +00:00
padding: 0 var(--size-grid-gutter) 0 var(--size-grid-gutter);
z-index: 100;
}
.grid-item-image .grid-item-lower-content {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
2018-09-14 18:55:32 +00:00
padding-bottom: var(--size-grid-gutter);
2018-07-18 11:17:51 +00:00
}
.grid-item-lower-content:empty {
display: none;
}
.grid-item-image {
2018-07-18 11:35:56 +00:00
padding-bottom: 0;
2018-07-18 15:28:10 +00:00
overflow: hidden;
2018-07-18 11:17:51 +00:00
background: transparent;
}
.grid-item img {
2018-07-18 11:17:51 +00:00
border-radius: var(--size-item-corner);
2018-07-18 15:28:10 +00:00
vertical-align: middle; /* vertical-align css hack removes bottom padding */
object-fit: cover;
2018-07-18 12:55:19 +00:00
margin-bottom: 0px;
2018-07-18 11:17:51 +00:00
width: 100%;
2018-07-18 15:28:10 +00:00
max-height: 1000px;
2018-07-21 17:46:18 +00:00
z-index: 0;
}
2018-07-18 15:28:10 +00:00
2018-07-14 15:55:10 +00:00
.grid-item:hover {
2018-09-14 18:55:32 +00:00
/*box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, .1);*/
/*mix-blend-mode: multiply;*/
background: var(--color-itembg);
opacity: 1;
2018-07-14 10:07:08 +00:00
}
2018-07-18 15:28:10 +00:00
.image-overlay {
width: 100%;
height: 100%;
position: absolute;
z-index: 10;
2018-09-14 18:55:32 +00:00
background-color: var(--color-imagedarken);
2018-07-18 15:28:10 +00:00
opacity: 0;
}
.grid-item-image:hover .image-overlay {
2018-09-14 18:55:32 +00:00
opacity: var(--alpha-darken);
2018-07-18 11:17:51 +00:00
}
2018-07-14 10:07:08 +00:00
2018-07-13 15:56:09 +00:00
/* LINK */
.grid-item .link {
2018-09-14 18:55:32 +00:00
width: calc(100% - var(--size-font-bodytypes)*2);
float: left;
clear: both;
}
.grid-item .link {
text-decoration: none;
display: inline-block;
}
2018-07-18 15:28:10 +00:00
.grid-item-image .link {
display: none;
}
.grid-item-image:hover .link {
display: initial;
text-shadow: 0 0 3em #000;
}
2018-09-14 02:57:15 +00:00
.grid-item .title {
2018-09-14 18:55:32 +00:00
opacity: var(--alpha-enabled);
color: var(--color-item);
font-size: var(--size-font-title);
text-decoration: none;
float: left;
clear: both;
2018-07-13 15:56:09 +00:00
}
2018-09-14 02:57:15 +00:00
.grid-item:hover .title {
2018-09-14 18:55:32 +00:00
opacity: var(--alpha-ascent);
2018-09-14 02:57:15 +00:00
}
2018-07-18 11:17:51 +00:00
.grid-item-image .title {
display: none;
}
.grid-item-image:hover .title {
display: initial;
2018-07-18 15:28:10 +00:00
text-shadow: 0 0 3em #000;
color: white;
2018-07-18 11:17:51 +00:00
}
.grid-item .link .link-line {
margin-top: var(--size-item-elem-padding);
float: left;
clear: both;
2018-07-13 15:56:09 +00:00
}
.grid-item .link i {
float: left;
2018-07-14 15:02:57 +00:00
}
.grid-item .link .link-title {
2018-09-14 18:55:32 +00:00
color: var(--color-item);
font-size: var(--size-font-body);
float: left;
}
.grid-item:hover .link .link-title {
2018-09-14 18:55:32 +00:00
color: var(--color-item);
}
.grid-item .link:hover .link-title {
2018-09-14 18:55:32 +00:00
background-color: var(--color-itemascent);
color: var(--color-itembg);
2018-07-13 15:56:09 +00:00
}
/* TYPE */
2018-07-18 15:28:10 +00:00
.grid-item .type {
2018-09-14 18:55:32 +00:00
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;
}
2018-07-18 15:28:10 +00:00
.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;
2018-09-14 18:55:32 +00:00
color: var(--color-image);
opacity: var(--alpha-enabled);
2018-07-18 15:28:10 +00:00
}
.grid-item-image:hover .grid-item-upper-content a:hover .type i {
display: initial;
2018-09-14 18:55:32 +00:00
color: var(--color-image);
2018-07-18 15:28:10 +00:00
}
.grid-item:hover .type {
2018-09-14 18:55:32 +00:00
opacity: var(--alpha-enabled);
color: var(--color-item);
}
2018-07-18 15:28:10 +00:00
.grid-item:hover .type:hover {
2018-09-14 18:55:32 +00:00
opacity: var(--alpha-ascent);
color: var(--color-itemascent);
}
2018-09-14 02:57:15 +00:00
.grid-item .link-title {
2018-09-14 18:55:32 +00:00
opacity: var(--alpha-idle);
2018-09-14 02:57:15 +00:00
}
.grid-item .fas {
2018-09-14 18:55:32 +00:00
opacity: var(--alpha-idle);
2018-09-14 02:57:15 +00:00
}
.grid-item:hover .link-title {
2018-09-14 18:55:32 +00:00
opacity: var(--alpha-enabled);
2018-09-14 02:57:15 +00:00
}
.grid-item:hover a:hover .link-title {
2018-09-14 18:55:32 +00:00
opacity: var(--alpha-ascent);
2018-09-14 02:57:15 +00:00
}
2018-09-14 18:55:32 +00:00
/*.grid-item:hover a:hover .fas {
opacity: var(--alpha-ascent);
}*/
2018-09-14 02:57:15 +00:00
.grid-item:hover .fas {
2018-09-14 18:55:32 +00:00
opacity: var(--alpha-enabled);
2018-09-14 02:57:15 +00:00
}
2018-09-14 18:55:32 +00:00
/* NOTE, QUOTE, TERM, TAGS, AUTH, PROG */
2018-08-13 15:29:24 +00:00
.note, .quote, .term, .tags, .auth, .prog {
2018-09-14 18:55:32 +00:00
opacity: var(--alpha-idle);
2018-07-18 11:35:56 +00:00
padding-top: var(--size-item-elem-padding);
2018-09-14 18:55:32 +00:00
color: var(--color-item);
2018-07-17 18:17:43 +00:00
font-size: var(--size-font-body);
float: left;
clear: both;
2018-07-14 15:55:10 +00:00
}
.grid-item:hover .note,
.grid-item:hover .quote,
.grid-item:hover .term,
.grid-item:hover .tags,
2018-08-13 15:29:24 +00:00
.grid-item:hover .auth,
.grid-item:hover .prog {
2018-09-14 18:55:32 +00:00
opacity: var(--alpha-enabled);
color: var(--color-item);
2018-09-14 02:57:15 +00:00
}
2018-09-14 18:55:32 +00:00
/*.grid-item:hover .tags:hover {
opacity: var(--alpha-ascent);
}*/
2018-07-21 11:23:06 +00:00
.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,
2018-08-13 15:29:24 +00:00
.grid-item-image .grid-item-lower-content .auth,
2018-07-21 11:23:06 +00:00
.grid-item-image .grid-item-lower-content .prog {
2018-09-14 18:55:32 +00:00
color: var(--color-image);
}
2018-07-18 11:17:51 +00:00
.grid-item-image .grid-item-lower-content {
display: none;
}
.grid-item-image:hover .grid-item-lower-content {
2018-07-18 15:28:10 +00:00
display: initial;
}
2018-07-14 15:02:57 +00:00
.tags a {
2018-09-14 18:55:32 +00:00
color: var(--color-item);
2018-07-14 15:02:57 +00:00
text-decoration:none;
}
2018-07-14 15:55:10 +00:00
.grid-item:hover .tags a {
2018-09-14 18:55:32 +00:00
color: var(--color-item);
2018-07-14 15:55:10 +00:00
}
.grid-item:hover .tags a:hover {
2018-09-14 18:55:32 +00:00
background-color: var(--color-itemascent);
color: var(--color-itembg);
2018-07-14 15:02:57 +00:00
}
.grid-item-image:hover .tags a {
color: #fff;
}
.grid-item-image:hover .tags a:hover {
color: #fff;
}
2018-07-14 15:55:10 +00:00
/* SMALL ICONS */
2018-07-14 15:24:09 +00:00
.textIcon {
2018-07-18 10:12:02 +00:00
margin-right: var(--size-item-elem-sep);
2018-09-14 18:55:32 +00:00
color: var(--color-item);
2018-07-14 15:24:09 +00:00
}
2018-07-14 15:55:10 +00:00
.grid-item:hover .textIcon {
2018-09-14 18:55:32 +00:00
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 */
2018-07-13 15:56:09 +00:00
}