989 lines
21 KiB
Plaintext
Raw Normal View History

2016-07-06 15:14:41 +02:00
@import "./variables.less";
@import "./mixins.less";
@import "./alertify.less";
@import "./bar.less";
@import "./loading.less";
@import "./dropdown.less";
2017-01-16 18:28:37 +01:00
@import "./topbar.less";
2016-07-04 15:18:11 +02:00
html.cp, .cp body {
font-size: .875em;
background-color: @base;
color: @fore;
font-family: Georgia,Cambria,serif;
2017-01-16 18:28:37 +01:00
height: 100%;
2016-07-04 15:18:11 +02:00
}
.cp:not(.poll) {
2017-01-17 18:19:45 +01:00
/*#language-selector {
position: absolute;
2017-01-17 18:19:45 +01:00
top: @topbar-height;
right: 0px;
display: inline-block;
2017-01-17 11:52:44 +01:00
z-index: 2;
2017-01-17 18:19:45 +01:00
}*/
}
.cp {
2016-07-04 17:08:54 +02:00
body {
font-size: 1rem;
font-weight: 400;
line-height: 2rem;
2017-01-16 18:28:37 +01:00
margin: 0;
}
a.github-corner > svg {
fill: @cp-blue;
2017-01-18 13:51:11 +01:00
color: @old-base;
}
2016-07-04 15:18:11 +02:00
.lato {
2016-07-04 16:34:29 +02:00
font-family: lato, Helvetica, sans-serif;
2016-07-04 15:18:11 +02:00
font-size: 1.02em;
}
h1,h2,h3,h4,h5,h6 {
color: @fore;
font-family: "Source Sans Pro","Helvetica Neue",Helvetica,Arial,sans-serif;
-webkit-font-feature-settings: 'dlig' 1,'liga' 1,'lnum' 1,'kern' 1;
-moz-font-feature-settings: 'dlig' 1,'liga' 1,'lnum' 1,'kern' 1;
font-feature-settings: 'dlig' 1,'liga' 1,'lnum' 1,'kern' 1;
font-style: normal;
font-weight: 600;
margin-top: 0;
}
h1 {
line-height: 3rem;
font-size: 2.05714rem;
margin-bottom: .21999rem;
padding-top: .78001rem;
}
h2 {
font-size: 1.95312rem;
margin-bottom: .18358rem;
padding-top: .81642rem;
}
h2,h3 {
line-height: 3rem;
}
h3 {
font-size: 1.64571rem;
margin-bottom: .07599rem;
padding-top: .92401rem;
}
h4 {
font-size: 1.5625rem;
margin-bottom: .54686rem;
padding-top: .45314rem;
}
h5 {
font-size: 1.25rem;
margin-bottom: -.56251rem;
padding-top: .56251rem;
}
h6 {
font-size: 1rem;
margin-bottom: -.65001rem;
padding-top: .65001rem;
}
a {
cursor: pointer;
2017-01-16 18:28:37 +01:00
color: @cp-darkblue;
2016-07-04 15:18:11 +02:00
text-decoration: none;
2016-07-04 16:34:29 +02:00
&:hover {
2017-01-16 18:28:37 +01:00
color: @cp-accent2;
2016-07-04 16:34:29 +02:00
}
2016-07-04 15:18:11 +02:00
}
img {
height: auto;
max-width: 100%;
}
p {
padding-top: .66001rem;
margin-top: 0;
}
p,pre {
margin-bottom: 1.33999rem;
}
p, pre, td, a, table, tr {
.lato;
}
2017-01-16 18:28:37 +01:00
body.html {
}
2017-01-18 18:02:32 +01:00
2017-01-19 10:48:46 +01:00
// Main page
.page {
width: 100%;
margin-left: auto;
margin-right: auto;
background: #fff; //@base;
padding: 10px 0;//@main-border-width;
2017-01-19 10:48:46 +01:00
position: relative;
.info-container {
width: 900px;
max-width: 100%;
margin: 0 auto;
&>div{
padding: 10px;
width: 400px;
max-width: 100%;
position: relative;
display: inline-block;
vertical-align: middle;
&:not(.image) {
@media screen and (max-width: @media-not-big) {
width: 100%;
left: 0;
}
}
&.image {
width:300px;
text-align: center;
@media screen and (max-width: @media-not-big) {
display: none;
}
}
}
}
2017-01-19 10:48:46 +01:00
&.first {
//margin-top: ~"min(calc(100vh - 150px), 650px)";
2017-01-19 10:48:46 +01:00
@media screen and (max-width: @media-not-big) {
//margin-top: 0;
2017-01-18 18:02:32 +01:00
}
2017-01-19 10:48:46 +01:00
}
&.even {
//background: darken(@base, 1%);
2017-01-19 10:48:46 +01:00
}
&.category {
background: darken(@base, 3%);
2017-01-19 10:48:46 +01:00
}
2017-01-18 18:02:32 +01:00
.app {
display: inline-block;
width: 300px;
vertical-align: middle;
margin: 0px 25px;
white-space: normal;
max-width: ~"calc(50% - 50px)";
@media screen and (max-width: 500px) {
display: block;
max-width: 100%;
margin: 0 auto;
}
2017-01-19 10:48:46 +01:00
}
.app-container {
width: 1400px;
max-width: 100%;
margin: 0 auto;
2017-01-19 10:48:46 +01:00
}
.app-row {
2017-01-19 10:48:46 +01:00
display: inline-block;
white-space: nowrap;
width: 700px;
max-width: 100%;
margin: 0 auto;
@media screen and (max-width: 1399px) {
display: block;
}
img {
2017-01-19 10:48:46 +01:00
@media screen and (max-width: @media-not-big) {
display: none;
2017-01-19 10:48:46 +01:00
}
2017-01-16 18:28:37 +01:00
}
2017-01-19 10:48:46 +01:00
}
2017-01-16 18:28:37 +01:00
.left {
//left: 10%; //@main-border-width;
}
.right {
left: 100px; //@main-border-width;
}
h1, h2, h3, h4, h5, h6 {
padding: 0;
}
@media screen and (max-width: @media-not-big) {
padding: 10px 5vh;
2017-01-16 18:28:37 +01:00
}
2017-01-19 10:48:46 +01:00
p {
font-size: 18px;
text-align: justify;
}
}
2017-01-17 18:19:45 +01:00
.btn-default {
&:hover {
background-color: #d8d8d8;
}
}
.mainOverlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #000;
opacity: 0.3;
}
#mainBlock {
&.hidden {
display: none;
}
}
#noscriptContainer {
color: black;
position: absolute;
top: @topbar-height;
left: 0;
bottom: 0;
right: 0;
#noscript {
width: 1000px;
display: inline-block;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%);
noscript {
font-size: 25px;
width: 1000px;
text-align: center;
position: absolute;
top: 50%;
left: 0;
color: @main-color;
transform: translateY(-50%);
}
}
background: @main-bg;
background-size: cover;
}
2016-07-04 15:18:11 +02:00
#main {
background: @main-bg;
2017-01-16 18:28:37 +01:00
background-size: cover;
}
2017-01-18 13:51:11 +01:00
#main_other {
padding: 0 @main-border-width;
}
2017-01-16 18:28:37 +01:00
#main, #main_other {
position: relative;
2017-01-16 18:28:37 +01:00
left: 0;
right: 0;
2017-01-18 13:51:11 +01:00
//padding: 0;
height: ~"calc(100vh - 150px)";
min-height: 450px;
2016-07-04 15:18:11 +02:00
margin: auto;
2017-01-16 18:28:37 +01:00
//margin-top: 100px;
2016-07-04 15:18:11 +02:00
font-size: medium;
2017-01-16 18:28:37 +01:00
2017-01-18 13:51:11 +01:00
#main-container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%);
margin-left: auto;
margin-right: auto;
display: inline-block;
width: 1000px;
max-width: 90%;
}
2017-01-16 18:28:37 +01:00
#data {
p {
margin: 0;
padding: 0;
2017-01-18 13:51:11 +01:00
font-size: 20px;
line-height: 1.5em;
}
h2 {
font-weight: normal;
font-size: 48px;
line-height: 1.2em;
color: @main-color;
2017-01-16 18:28:37 +01:00
}
h5 {
2017-01-18 13:51:11 +01:00
font-size: 1em;
2017-01-17 18:19:45 +01:00
color: @main-color;
2017-01-16 18:28:37 +01:00
}
2017-01-18 13:51:11 +01:00
width: 600px;
max-width: 60%;
2017-01-17 18:19:45 +01:00
color: @main-color;
2017-01-16 18:28:37 +01:00
padding: 15px;
box-sizing: border-box;
position: absolute;
2017-01-18 13:51:11 +01:00
display: inline-block;
2017-01-16 18:28:37 +01:00
top: 50%;
2017-01-18 13:51:11 +01:00
left: 0;
2017-01-16 18:28:37 +01:00
transform: translateY(-50%);
2017-01-19 10:48:46 +01:00
//width: ~"calc(100% - 450px - 30vw)";
//background-color: @main-block-bg;
2017-01-17 18:19:45 +01:00
#tryit {
margin-top: 20px;
2017-01-18 13:51:11 +01:00
margin-bottom: 5px;
2017-01-17 18:19:45 +01:00
}
2017-01-16 18:28:37 +01:00
}
#userForm {
position: absolute;
2017-01-18 13:51:11 +01:00
right: 0;
2017-01-16 18:28:37 +01:00
top: 50%;
transform: translateY(-50%);
margin-left: 50px;
display: inline-block;
2017-01-18 13:51:11 +01:00
width: 350px;
max-width: 35%;
2017-01-19 10:48:46 +01:00
//background-color: @main-block-bg;
2017-01-16 18:28:37 +01:00
padding: 10px;
box-sizing: border-box;
font-family: lato, Helvetica, sans-serif;
2017-01-17 18:19:45 +01:00
color: @main-color;
2017-01-16 18:28:37 +01:00
h1 {
2017-01-17 18:19:45 +01:00
color: @main-color;
padding: 0;
2017-01-16 18:28:37 +01:00
}
[type="text"], [type="password"] {
2017-01-17 18:19:45 +01:00
width: 100%;
2017-01-16 18:28:37 +01:00
}
label {
margin-bottom: 0;
//margin-top: 0.5em;
}
/*.remember {
2017-01-18 13:51:11 +01:00
vertical-align: middle;
line-height: 28px;
height: 28px;
display: inline-block;
margin: 10px 0 20px 0;
}
2017-01-16 18:28:37 +01:00
[type="checkbox"] {
2017-01-18 13:51:11 +01:00
vertical-align: text-top;
2017-01-16 18:28:37 +01:00
margin: 0;
2017-01-18 13:51:11 +01:00
//margin-top: 10px;
2017-01-16 18:28:37 +01:00
margin-right: 5px;
}
*/
[type="checkbox"] {
margin-right: 5px;
2017-01-17 18:19:45 +01:00
}
2017-01-16 18:28:37 +01:00
button {
2017-01-18 13:51:11 +01:00
font-weight: bold;
2017-01-16 18:28:37 +01:00
width: 100%;
margin: 2px 0px;
cursor: pointer;
&.half {
2017-01-17 18:19:45 +01:00
width: ~"calc(50% - 4px)";
&:not(.first) {
float: right;
2017-01-16 18:28:37 +01:00
}
}
}
}
2017-01-19 10:48:46 +01:00
#main-container {
@media screen and (max-width: @media-not-big) {
transform: initial;
position: relative;
display: block;
width: 90%;
left: 0;
}
}
#userForm, #data {
@media screen and (max-width: @media-not-big) {
transform: initial;
position: relative;
display: block;
width: 100%;
max-width: 100%;
margin: 10px 0;
box-sizing: border-box;
}
}
#userForm {
@media screen and (max-width: @media-not-big) {
border: 1px solid #888;
}
}
@media screen and (max-width: @media-not-big) {
position: relative;
height: auto;
//background: #aaa;
2017-01-19 10:48:46 +01:00
top: -10px;
}
2017-01-16 18:28:37 +01:00
.buttons {
2017-01-18 18:02:32 +01:00
margin-top: 15px;
}
}
p.buttons, div.buttons {
text-align: center;
button {
font-weight: bold;
cursor: pointer;
margin-top: 10px;
2017-01-16 18:28:37 +01:00
}
2016-07-04 15:18:11 +02:00
}
2016-12-19 17:53:03 +01:00
#fileManagerIframe {
width: 100%;
height: 500px;
margin-top: 15px;
}
2016-07-04 15:18:11 +02:00
/* buttons */
.create, .action {
display: inline-block;
2016-07-04 16:34:29 +02:00
@thick: 2px;
2017-01-16 18:28:37 +01:00
//border: @thick solid @cp-darkblue;
border: 0;
background-color: @cp-darkblue;
color: @topbar-button-color;
2016-07-04 15:18:11 +02:00
font-weight: bold;
font-size: large;
margin-right: 5px;
margin-left: 5px;
2016-07-04 16:34:29 +02:00
&:hover {
2017-01-16 18:28:37 +01:00
color: darken(@topbar-button-color, 20%);
//border: @thick solid @cp-accent2;
//color: @cp-darkblue;
2016-07-04 16:34:29 +02:00
}
2016-07-04 15:18:11 +02:00
}
.button {
@hpad: 2 * 6px;
@vpad: 2 * 2px;
padding: @vpad @hpad @vpad @hpad;
2017-01-16 18:28:37 +01:00
//margin-top: 2 * 6px;
//margin-bottom: 2 * 6px;
margin: 2px 0;
display: inline-block;
line-height: 1.5em;
2016-07-04 15:18:11 +02:00
}
2016-12-30 15:30:35 +01:00
// currently only used in /user/
.panel {
2017-01-18 18:02:32 +01:00
background-color: @dark-base;
2016-12-30 15:30:35 +01:00
}
/* Tables
* Currently only used by /poll/
*/
2016-07-04 15:18:11 +02:00
table {
border-collapse: collapse;
border-spacing: 0;
margin: 20px;
}
tbody {
2017-01-18 18:02:32 +01:00
border: 1px solid @poll-border-color;
2016-07-04 15:18:11 +02:00
tr {
text-align: center;
&:first-of-type th{
font-size: 20px;
2016-07-04 15:18:11 +02:00
border-top: 0px;
font-weight: bold;
padding: 10px;
text-decoration: underline;
&.table-refresh {
color: @cp-green;
text-decoration: none;
2016-08-03 11:37:58 +02:00
cursor: pointer;
}
2016-07-04 15:18:11 +02:00
}
&:nth-child(odd) {
2016-07-04 16:34:29 +02:00
background-color: @light-base;
2016-07-04 15:18:11 +02:00
}
th:first-of-type {
border-left: 0px;
}
th {
box-sizing: border-box;
2017-01-18 18:02:32 +01:00
border: 1px solid @poll-border-color;
2016-07-04 15:18:11 +02:00
}
th, td {
color: @fore;
2016-08-18 15:46:29 +02:00
&.remove {
cursor: pointer;
}
2016-07-04 15:18:11 +02:00
}
th:last-child {
border-right: 0px;
}
}
2016-07-04 15:18:11 +02:00
td {
2017-01-18 18:02:32 +01:00
border-right: 1px solid @poll-border-color;
2016-07-04 15:18:11 +02:00
padding: 12px;
padding-top: 0px;
padding-bottom: 0px;
&:last-child {
border-right: none;
}
}
}
// form things
2016-07-19 16:25:14 +02:00
.bottom-left {
.bottom-left;
}
.top-left {
.top-left;
}
.remove {
color: @cp-red;
cursor: pointer !important;
}
2016-08-18 16:18:17 +02:00
2016-12-06 18:55:10 +01:00
form.realtime, div.realtime {
> input {
&[type="text"] {
}
}
> textarea {
width: 50%;
height: 15vh;
}
padding: 0px;
margin: 0px;
table {
border-collapse: collapse;
2016-12-06 18:55:10 +01:00
width: ~"calc(100% - 1px)";
tr {
td:first-child {
position:absolute;
left: 29px;
top: auto;
2016-12-06 18:55:10 +01:00
width: ~"calc(30% - 50px)";
}
td {
2016-07-28 17:04:01 +02:00
padding: 0px;
margin: 0px;
div.text-cell {
padding: 0px;
margin: 0px;
2016-12-06 18:55:10 +01:00
height: 100%;
2016-11-25 12:04:22 +01:00
2016-07-28 17:04:01 +02:00
input {
width: 80%;
2016-11-25 12:04:22 +01:00
width: 90%;
2016-07-28 17:04:01 +02:00
height: 100%;
border: 0px;
&[disabled] {
background-color: transparent;
2017-01-18 18:02:32 +01:00
color: @poll-fg;
font-weight: bold;
}
2016-07-28 17:04:01 +02:00
}
}
&.checkbox-cell {
margin: 0px;
padding: 0px;
2016-11-25 12:04:22 +01:00
height: 100%;
min-width: 150px;
2016-07-28 17:04:01 +02:00
div.checkbox-contain {
2016-11-25 12:04:22 +01:00
display: inline-block;
2016-07-28 17:04:01 +02:00
height: 100%;
width: 100%;
position: relative;
label {
background-color: transparent;
display: block;
position: absolute;
top: 0px;
left: 0px;
height: 100%;
width: 100%;
}
2016-07-28 17:04:01 +02:00
input {
&[type="checkbox"] {
&:not(.editable) {
display: none;
~ .cover {
display: block;
font-weight: bold;
background-color: @cp-red;
2017-01-18 18:02:32 +01:00
color: @poll-cover-color;
2016-11-25 12:04:22 +01:00
&:after {
height: 100%;
}
&:after { content: "✖"; }
display: block;
&.yes {
background-color: @cp-green;
&:after { content: "✔"; }
}
&.uncommitted {
background: #ddd;
}
&.mine {
display: none;
}
2016-07-28 17:04:01 +02:00
}
}
}
}
}
}
}
}
input {
2016-07-28 17:04:01 +02:00
&[type="text"] {
2017-01-05 14:45:31 +01:00
height: auto;
2016-12-06 18:55:10 +01:00
border: 1px solid @base;
width: 80%;
}
}
thead {
td {
padding: 0px 5px;
2017-01-18 18:02:32 +01:00
background: @poll-th-bg;
2016-12-06 18:55:10 +01:00
border-radius: 20px 20px 0 0;
text-align: center;
2016-12-06 18:55:10 +01:00
input {
&[type="text"] {
width: 100%;
box-sizing: border-box;
&[disabled] {
2017-01-18 18:02:32 +01:00
color: @poll-fg;
2016-12-06 18:55:10 +01:00
padding: 1px 5px;
2016-12-07 12:22:21 +01:00
border: none;
2016-12-06 18:55:10 +01:00
}
}
}
}
}
tbody {
.text-cell {
2017-01-18 18:02:32 +01:00
background: @poll-td-bg;
2016-12-06 18:55:10 +01:00
//border-radius: 20px 0 0 20px;
input[type="text"] {
width: ~"calc(100% - 50px)";
}
.edit {
float:right;
margin: 0 10px 0 0;
}
.remove {
float: left;
margin: 0 0 0 10px;
}
2016-07-28 17:04:01 +02:00
}
2017-01-18 18:02:32 +01:00
td {
label {
border: .5px solid @poll-border-color;
}
}
}
.edit {
color: @cp-green;
cursor: pointer;
2016-12-06 18:55:10 +01:00
float: left;
margin-left: 10px;
/*&:after { content: '✐'; }*/
/*&.editable { display: none; }*/
}
.remove {
float: right;
margin-right: 10px
}
thead {
tr {
2016-07-22 15:42:41 +02:00
th {
2016-08-18 12:35:39 +02:00
input[type="text"][disabled] {
background-color: transparent;
color: @fore;
font-weight: bold;
}
2016-07-22 15:42:41 +02:00
.remove {
cursor: pointer;
font-size: 20px;
}
}
}
}
tbody {
tr {
td {
}
}
}
tfoot {
tr {
border: none;
td {
border: none;
text-align: center;
.save {
padding: 15px;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
}
}
}
}
#adduser,
#addoption {
color: @cp-green;
border: 1px solid @cp-green;
padding: 15px;
2016-08-18 15:24:56 +02:00
cursor: pointer;
}
#adduser { .top-left; }
2016-07-19 16:25:14 +02:00
#addoption { .bottom-left; }
}
// used for slides
.viewportRatio (@x, @y, @p: 100) {
width: @p * 100vw;
height: @y * (@p * 100vw) / @x;
max-width: @x / @y * (@p * 100vh);
max-height: (@p * 100vh);
}
&.slide {
#modal {
.button {
position: absolute;
cursor: pointer;
font-size: 30px;
opacity: 0.6;
display: none;
}
.button:hover {
opacity: 1;
display: block !important;
}
#button_exit {
left: 20px;
top: 20px;
}
#button_left {
left: 6vw;
bottom: 10vh;
}
#button_right {
right: 6vw;
bottom: 10vh;
}
}
#modal #content {
p, ul, ol { font-size: 26px; }
img {
position: relative;
min-width: 1%;
max-width: 90%;
max-height: 90%;
margin: auto;
border: 5px solid red;
}
}
}
div.modal, div#modal {
display: none;
#content {
box-sizing: border-box;
border: 1px solid white;
vertical-align: middle;
padding: 2.5vw;
/* center things as much as possible
margin-top: 50vh;
margin-bottom: 50vh;
transform: translateY(-50%);
*/
width: 100vw;
height: 56.25vw; // height:width ratio = 9/16 = .5625
//background: pink;
max-height: 100vh;
max-width: 177.78vh; // 16/9 = 1.778
margin: auto;
position: absolute;
top:0;bottom:0; // vertical center
left:0;right:0; // horizontal center
p, li, pre, code {
2016-09-14 16:00:06 +02:00
.size(2.75);
}
h1 { .size(5); }
h2 { .size(4.2); }
h3 { .size(3.6); }
h4 { .size (3); }
h5 { .size(2.2); }
h6 { .size(1.6); }
2017-01-18 18:02:32 +01:00
h1, h2, h3, h4, h5, h6 {
color: inherit;
}
pre > code {
display: block;
position: relative;
border: 1px solid #333;
width: 90%;
margin: auto;
padding-left: .25vw;
}
ul, ol {
min-width: 50%;
max-width: 100%;
display: table;
margin: 0 auto;
}
}
2016-07-19 16:25:14 +02:00
box-sizing: border-box;
z-index: 9001;
position: fixed;
top: 0px;
left: 0px;
width: 100%;
height: 100vh;
display: none;
2017-01-18 18:02:32 +01:00
background-color: @slide-default-bg;
2016-07-19 16:25:14 +02:00
.center {
position: relative;
width: 80%;
height: 80%;
margin: auto;
border: 1px solid @light-base;
text-align: center;
}
2016-07-19 16:25:14 +02:00
&.shown {
display: block;
}
2016-07-19 16:25:14 +02:00
table {
margin: 30px;
border-collapse: collapse;
tr {
td {
}
}
input {
height: 100%;
2016-07-22 15:42:41 +02:00
width: 90%;
2016-07-19 16:25:14 +02:00
border: 3px solid @base;
}
thead {
tr {
2016-07-22 15:42:41 +02:00
th {
span.remove {
}
2016-07-19 16:25:14 +02:00
}
}
}
tbody {
tr {
td {
}
}
}
tfoot {
tr {
td {
z-index: 4000;
cursor: pointer;
}
}
}
}
2016-07-19 16:25:14 +02:00
#addtime,
#adddate {
color: @cp-green;
border: 1px solid @cp-green;
padding: 15px;
}
2016-07-19 16:25:14 +02:00
#adddate { .top-left; }
#addtime { .bottom-left; }
}
}
2017-01-05 14:45:31 +01:00
// hack for our cross-origin iframe
#cors-store {
display: none;
}