melpomene/melpomene.css

167 lines
3.1 KiB
CSS

/* Melpomene webcomic reader CSS */
/* Version 1.0.0_RC1 */
/* CC-BY-NC-SA : https://git.aribaud.net/caribaud/melpomene/ */
#melpomene-focus-container, #melpomene-nav-controls, #melpomene-progress-sections {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
#melpomene, #melpomene-focus-container, #melpomene-pages, #melpomene-nav-controls, #melpomene-focus-col {
display: flex;
flex-direction: row;
}
#melpomene-pages, #melpomene-focus-container * {
transition: all 1.5s ease;
}
#melpomene, #melpomene-focus-col {
flex-direction: column;
}
#melpomene {
height: 100%;
width: 100%;
border: 2px solid;
box-sizing: border-box;
background-color: black;
}
/* Reset images style to avoid external CSS interfering */
#melpomene img {
all: initial;
}
#melpomene-content-frame {
position: relative;
flex: 1;
overflow: hidden;
}
#melpomene-pages {
transform-origin: top left;
transform: scale(1) translate(0);
align-items: center;
width: fit-content;
height: fit-content;
}
#melpomene-pages > img {
display: inline-block;
opacity: 0;
transition: all 1s cubic-bezier(.9,.03,.69,.22); /* ease-in quartic */
}
#melpomene-focus-container * {
background-color: rgba(0, 0, 0, 0.85);
flex-grow: 1;
}
#melpomene-focus-col, #melpomene-focus {
background-color: initial;
flex-grow: 0;
}
#melpomene-focus {
box-shadow: inset 0px 0px 5px 5px rgba(0, 0, 0, 0.85);
}
#melpomene-nav-controls {
display: flex;
grid-template-areas:
"left top right"
"left center right"
"left bottom right";
grid-template-columns: 33% 0 1fr;
grid-template-rows: auto;
}
#melpomene-nav-controls > div {
flex-grow: 1;
cursor: pointer;
}
#melpomene-nav-controls > div:first-child {
width: 35%;
flex-grow: 0
}
#melpomene-help-menu {
position: absolute;
bottom: 0;
right: 0;
font-size: 120%;
color: white;
background-color: rgba(0,0,0,0.8);
padding: 0 1em 1em 1em;
z-index: 1;
opacity: 0;
transition: all 1.7s cubic-bezier(.76,.05,.86,.06);
border: white solid;
border-width: 1px 0 0 1px;
border-radius: 0.3em 0 0 0;
transform: translate(0, calc(100% - 2em));
}
#melpomene-help-menu:hover {
opacity: 1;
transition: all 0.3s linear;
transform: translate(0, 0);
}
#melpomene-help-menu * {
margin-top: 1em;
text-align: center;
}
#melpomene-help-menu .melpomene-credits {
margin-top: 0.5em;
font-size: 70%;
text-align: right;
}
#melpomene-help-menu .melpomene-credits a {
color: white;
}
.melpomene-key {
display: inline;
margin: 0 0.5em;
border: 1px white solid;
padding: 0 0.1em;
border-radius: 0.2em;
}
#melpomene-progress-container {
background-color: dimgray;
position: relative;
}
#melpomene-progress-bar{
height: 0.3em;
background-color: whitesmoke;
transition: all 0.5s ease-in-out;
width: 0%;
}
#melpomene-progress-sections {
display: flex;
}
#melpomene-progress-sections > * {
height: 100%;
box-sizing: border-box;
border-right: 0.3em black solid;
flex: 1;
}