Animationen hinzugefügt
This commit is contained in:
parent
e83d0f8544
commit
2c3775308f
@ -5,8 +5,7 @@
|
||||
* Licensed under MIT Open Source
|
||||
*/
|
||||
.top-bar-title {
|
||||
white-space: nowrap;
|
||||
}
|
||||
white-space: nowrap; }
|
||||
|
||||
#action-bar .close-listener {
|
||||
position: fixed;
|
||||
@ -15,197 +14,136 @@
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: transparent;
|
||||
z-index: 9000;
|
||||
}
|
||||
z-index: 9000; }
|
||||
#action-bar #responsive-menu .top-bar-right {
|
||||
position: relative;
|
||||
text-align: right;
|
||||
width: 100%;
|
||||
}
|
||||
width: 100%; }
|
||||
#action-bar .top-bar-right {
|
||||
width: auto;
|
||||
}
|
||||
#action-bar .top-bar-right .menu.action-bar a img + span {
|
||||
display: none;
|
||||
}
|
||||
#action-bar .top-bar-right .menu.action-bar .action {
|
||||
position: relative;
|
||||
z-index: 9000;
|
||||
}
|
||||
#action-bar .top-bar-right .menu.action-bar .action.is-dropdown-submenu-parent {
|
||||
z-index: 9001;
|
||||
}
|
||||
#action-bar .top-bar-right .menu.action-bar .action.hidden {
|
||||
display: none;
|
||||
}
|
||||
@media screen and (max-width: 24.9375em) {
|
||||
#action-bar .top-bar-right .menu.action-bar .action.smedium {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 39.9375em) {
|
||||
#action-bar .top-bar-right .menu.action-bar .action li {
|
||||
display: table-cell;
|
||||
}
|
||||
#action-bar .top-bar-right .menu.action-bar .action.medium {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 63.9375em) {
|
||||
#action-bar .top-bar-right .menu.action-bar .action.large {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
#action-bar .top-bar-right .menu.action-bar .action.never {
|
||||
display: none;
|
||||
}
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
z-index: 9000;
|
||||
border: 1px solid #cacaca;
|
||||
padding: 0.2rem;
|
||||
transform: translateX(-100%);
|
||||
text-align: left;
|
||||
}
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.hidden {
|
||||
display: none;
|
||||
}
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.is-dropdown-submenu-parent {
|
||||
z-index: 9001;
|
||||
}
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.is-dropdown-submenu-parent ul.is-dropdown-submenu {
|
||||
top: auto;
|
||||
}
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.is-dropdown-submenu-parent ul.is-dropdown-submenu > li.action, #action-bar .top-bar-right .menu.action-bar.hidden .action.is-dropdown-submenu-parent ul.is-dropdown-submenu > .close-listener {
|
||||
z-index: 9001;
|
||||
}
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.is-dropdown-submenu-parent > a:after {
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: 6px inset;
|
||||
content: "";
|
||||
border-bottom-width: 0;
|
||||
border-top-style: solid;
|
||||
border-color: #ffffff transparent transparent;
|
||||
right: 5px;
|
||||
left: auto;
|
||||
margin-top: -3px;
|
||||
}
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action a {
|
||||
white-space: nowrap;
|
||||
}
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action a img {
|
||||
display: none;
|
||||
}
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action a img + span {
|
||||
display: inherit;
|
||||
}
|
||||
@media print, screen and (min-width: 40em) {
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.medium {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media print, screen and (min-width: 25em) {
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.smedium {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media print, screen and (min-width: 64em) {
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.large {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 24.9375em) {
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.smedium {
|
||||
display: block;
|
||||
}
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.smedium.hidden {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 39.9375em) {
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.medium {
|
||||
display: block;
|
||||
}
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.medium.hidden {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 63.9375em) {
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.large {
|
||||
display: block;
|
||||
}
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.large.hidden {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.never {
|
||||
display: block;
|
||||
}
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.never.hidden {
|
||||
display: none;
|
||||
}
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.always {
|
||||
display: none;
|
||||
}
|
||||
#action-bar .top-bar-right .menu .action {
|
||||
z-index: 100;
|
||||
}
|
||||
@media screen and (max-width: 39.9375em) {
|
||||
#action-bar .top-bar-right .menu .action a {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 39.9375em) {
|
||||
#action-bar .top-bar-right .menu .action a {
|
||||
padding-left: 0.68rem;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 24.9375em) {
|
||||
#action-bar .top-bar-right .menu .action a {
|
||||
padding-left: 0.236rem;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 39.9375em) {
|
||||
#action-bar .top-bar-right .menu .action:not(.is-dropdown-submenu-parent) a {
|
||||
padding-right: 0.68rem;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 24.9375em) {
|
||||
#action-bar .top-bar-right .menu .action:not(.is-dropdown-submenu-parent) a {
|
||||
padding-right: 0.236rem;
|
||||
}
|
||||
}
|
||||
#action-bar .top-bar-right .menu .action.img a {
|
||||
padding-top: 0;
|
||||
}
|
||||
#action-bar .top-bar-right .menu .action.img a img {
|
||||
vertical-align: inherit;
|
||||
max-height: 1.4rem;
|
||||
}
|
||||
#action-bar .top-bar-right .menu > li > ul.is-dropdown-submenu {
|
||||
min-width: 0;
|
||||
}
|
||||
#action-bar .top-bar-right .menu > li > ul.is-dropdown-submenu .action {
|
||||
display: inherit;
|
||||
}
|
||||
#action-bar .top-bar-right .menu > li.opens-right > ul.is-dropdown-submenu {
|
||||
right: auto;
|
||||
left: auto;
|
||||
}
|
||||
#action-bar .top-bar-right .menu > li.opens-right > ul.is-dropdown-submenu a {
|
||||
text-align: left;
|
||||
}
|
||||
width: auto; }
|
||||
#action-bar .top-bar-right .menu.action-bar a img + span {
|
||||
display: none; }
|
||||
#action-bar .top-bar-right .menu.action-bar .action {
|
||||
position: relative;
|
||||
z-index: 9000; }
|
||||
#action-bar .top-bar-right .menu.action-bar .action.is-dropdown-submenu-parent {
|
||||
z-index: 9001; }
|
||||
#action-bar .top-bar-right .menu.action-bar .action.hidden {
|
||||
display: none; }
|
||||
@media screen and (max-width: 24.9375em) {
|
||||
#action-bar .top-bar-right .menu.action-bar .action.smedium {
|
||||
display: none; } }
|
||||
@media screen and (max-width: 39.9375em) {
|
||||
#action-bar .top-bar-right .menu.action-bar .action li {
|
||||
display: table-cell; }
|
||||
#action-bar .top-bar-right .menu.action-bar .action.medium {
|
||||
display: none; } }
|
||||
@media screen and (max-width: 63.9375em) {
|
||||
#action-bar .top-bar-right .menu.action-bar .action.large {
|
||||
display: none; } }
|
||||
#action-bar .top-bar-right .menu.action-bar .action.never {
|
||||
display: none; }
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
z-index: 9000;
|
||||
border: 1px solid #cacaca;
|
||||
padding: 0.2rem;
|
||||
transform: translateX(-100%);
|
||||
text-align: left; }
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.hidden {
|
||||
display: none; }
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.is-dropdown-submenu-parent {
|
||||
z-index: 9001; }
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.is-dropdown-submenu-parent ul.is-dropdown-submenu {
|
||||
top: auto; }
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.is-dropdown-submenu-parent ul.is-dropdown-submenu > li.action, #action-bar .top-bar-right .menu.action-bar.hidden .action.is-dropdown-submenu-parent ul.is-dropdown-submenu > .close-listener {
|
||||
z-index: 9001; }
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.is-dropdown-submenu-parent > a:after {
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: 6px inset;
|
||||
content: "";
|
||||
border-bottom-width: 0;
|
||||
border-top-style: solid;
|
||||
border-color: #ffffff transparent transparent;
|
||||
right: 5px;
|
||||
left: auto;
|
||||
margin-top: -3px; }
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action a {
|
||||
white-space: nowrap; }
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action a img {
|
||||
display: none; }
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action a img + span {
|
||||
display: inherit; }
|
||||
@media print, screen and (min-width: 40em) {
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.medium {
|
||||
display: none; } }
|
||||
@media print, screen and (min-width: 25em) {
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.smedium {
|
||||
display: none; } }
|
||||
@media print, screen and (min-width: 64em) {
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.large {
|
||||
display: none; } }
|
||||
@media screen and (max-width: 24.9375em) {
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.smedium {
|
||||
display: block; }
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.smedium.hidden {
|
||||
display: none; } }
|
||||
@media screen and (max-width: 39.9375em) {
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.medium {
|
||||
display: block; }
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.medium.hidden {
|
||||
display: none; } }
|
||||
@media screen and (max-width: 63.9375em) {
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.large {
|
||||
display: block; }
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.large.hidden {
|
||||
display: none; } }
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.never {
|
||||
display: block; }
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.never.hidden {
|
||||
display: none; }
|
||||
#action-bar .top-bar-right .menu.action-bar.hidden .action.always {
|
||||
display: none; }
|
||||
#action-bar .top-bar-right .menu .action {
|
||||
z-index: 100; }
|
||||
@media screen and (max-width: 39.9375em) {
|
||||
#action-bar .top-bar-right .menu .action a {
|
||||
width: 100%; } }
|
||||
@media screen and (max-width: 39.9375em) {
|
||||
#action-bar .top-bar-right .menu .action a {
|
||||
padding-left: 0.68rem; } }
|
||||
@media screen and (max-width: 24.9375em) {
|
||||
#action-bar .top-bar-right .menu .action a {
|
||||
padding-left: 0.236rem; } }
|
||||
@media screen and (max-width: 39.9375em) {
|
||||
#action-bar .top-bar-right .menu .action:not(.is-dropdown-submenu-parent) a {
|
||||
padding-right: 0.68rem; } }
|
||||
@media screen and (max-width: 24.9375em) {
|
||||
#action-bar .top-bar-right .menu .action:not(.is-dropdown-submenu-parent) a {
|
||||
padding-right: 0.236rem; } }
|
||||
#action-bar .top-bar-right .menu .action.img a {
|
||||
padding-top: 0; }
|
||||
#action-bar .top-bar-right .menu .action.img a img {
|
||||
vertical-align: inherit;
|
||||
max-height: 1.4rem; }
|
||||
#action-bar .top-bar-right .menu > li > ul.is-dropdown-submenu {
|
||||
min-width: 0; }
|
||||
#action-bar .top-bar-right .menu > li > ul.is-dropdown-submenu .action {
|
||||
display: inherit; }
|
||||
#action-bar .top-bar-right .menu > li.opens-right > ul.is-dropdown-submenu {
|
||||
right: auto;
|
||||
left: auto; }
|
||||
#action-bar .top-bar-right .menu > li.opens-right > ul.is-dropdown-submenu a {
|
||||
text-align: left; }
|
||||
|
||||
.dropdown.menu > li.is-dropdown-submenu-parent > a:after {
|
||||
border-color: #ffffff transparent transparent;
|
||||
}
|
||||
border-color: #ffffff transparent transparent; }
|
||||
|
||||
form {
|
||||
position: relative;
|
||||
}
|
||||
position: relative; }
|
||||
|
||||
.sending .sending-loader {
|
||||
position: absolute;
|
||||
@ -219,103 +157,83 @@ form {
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
z-index: 10;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.sending .sending-loader .loader {
|
||||
position: absolute;
|
||||
}
|
||||
border-radius: 2px; }
|
||||
.sending .sending-loader .loader {
|
||||
position: absolute; }
|
||||
|
||||
.sending-loader {
|
||||
display: none;
|
||||
}
|
||||
display: none; }
|
||||
|
||||
input.notEmpty:invalid {
|
||||
background-color: lightcoral;
|
||||
}
|
||||
background-color: lightcoral; }
|
||||
|
||||
label {
|
||||
position: relative;
|
||||
}
|
||||
label [type=text], label [type=password], label [type=date], label [type=datetime], label [type=datetime-local], label [type=month], label [type=week], label [type=email], label [type=number], label [type=search], label [type=tel], label [type=time], label [type=url], label [type=color], label textarea, label input[type=text], label input:not([type]) {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 2.4375rem;
|
||||
margin: 0 0 1rem;
|
||||
padding: 0.5rem;
|
||||
box-shadow: none !important;
|
||||
font-size: 1rem;
|
||||
font-weight: normal;
|
||||
line-height: 1.5;
|
||||
border: none;
|
||||
border-bottom: solid black;
|
||||
outline: 0;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
label [type=text]:focus, label [type=password]:focus, label [type=date]:focus, label [type=datetime]:focus, label [type=datetime-local]:focus, label [type=month]:focus, label [type=week]:focus, label [type=email]:focus, label [type=number]:focus, label [type=search]:focus, label [type=tel]:focus, label [type=time]:focus, label [type=url]:focus, label [type=color]:focus, label textarea:focus, label input[type=text]:focus, label input:not([type]):focus {
|
||||
border: none;
|
||||
box-shadow: none !important;
|
||||
border-bottom: solid black;
|
||||
}
|
||||
label [type=text]:focus ~ span, label [type=text].notEmpty:not(:focus) ~ span, label [type=password]:focus ~ span, label [type=password].notEmpty:not(:focus) ~ span, label [type=date]:focus ~ span, label [type=date].notEmpty:not(:focus) ~ span, label [type=datetime]:focus ~ span, label [type=datetime].notEmpty:not(:focus) ~ span, label [type=datetime-local]:focus ~ span, label [type=datetime-local].notEmpty:not(:focus) ~ span, label [type=month]:focus ~ span, label [type=month].notEmpty:not(:focus) ~ span, label [type=week]:focus ~ span, label [type=week].notEmpty:not(:focus) ~ span, label [type=email]:focus ~ span, label [type=email].notEmpty:not(:focus) ~ span, label [type=number]:focus ~ span, label [type=number].notEmpty:not(:focus) ~ span, label [type=search]:focus ~ span, label [type=search].notEmpty:not(:focus) ~ span, label [type=tel]:focus ~ span, label [type=tel].notEmpty:not(:focus) ~ span, label [type=time]:focus ~ span, label [type=time].notEmpty:not(:focus) ~ span, label [type=url]:focus ~ span, label [type=url].notEmpty:not(:focus) ~ span, label [type=color]:focus ~ span, label [type=color].notEmpty:not(:focus) ~ span, label textarea:focus ~ span, label textarea.notEmpty:not(:focus) ~ span, label input[type=text]:focus ~ span, label input[type=text].notEmpty:not(:focus) ~ span, label input:not([type]):focus ~ span, label input:not([type]).notEmpty:not(:focus) ~ span {
|
||||
top: -11px;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
font-size: 11px;
|
||||
opacity: 1;
|
||||
color: black;
|
||||
}
|
||||
label [type=text] ~ span, label [type=password] ~ span, label [type=date] ~ span, label [type=datetime] ~ span, label [type=datetime-local] ~ span, label [type=month] ~ span, label [type=week] ~ span, label [type=email] ~ span, label [type=number] ~ span, label [type=search] ~ span, label [type=tel] ~ span, label [type=time] ~ span, label [type=url] ~ span, label [type=color] ~ span, label textarea ~ span, label input[type=text] ~ span, label input:not([type]) ~ span {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
left: 10px;
|
||||
bottom: 10px;
|
||||
top: 7px;
|
||||
transition: 0.2s ease all;
|
||||
color: #626262;
|
||||
}
|
||||
position: relative; }
|
||||
label [type='text'], label [type='password'], label [type='date'], label [type='datetime'], label [type='datetime-local'], label [type='month'], label [type='week'], label [type='email'], label [type='number'], label [type='search'], label [type='tel'], label [type='time'], label [type='url'], label [type='color'], label textarea, label input[type=text], label input:not([type]) {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 2.4375rem;
|
||||
margin: 0 0 1rem;
|
||||
padding: 0.5rem;
|
||||
box-shadow: none !important;
|
||||
font-size: 1rem;
|
||||
font-weight: normal;
|
||||
line-height: 1.5;
|
||||
border: none;
|
||||
border-bottom: solid black;
|
||||
outline: 0;
|
||||
margin-bottom: 15px; }
|
||||
label [type='text']:focus, label [type='password']:focus, label [type='date']:focus, label [type='datetime']:focus, label [type='datetime-local']:focus, label [type='month']:focus, label [type='week']:focus, label [type='email']:focus, label [type='number']:focus, label [type='search']:focus, label [type='tel']:focus, label [type='time']:focus, label [type='url']:focus, label [type='color']:focus, label textarea:focus, label input[type=text]:focus, label input:not([type]):focus {
|
||||
border: none;
|
||||
box-shadow: none !important;
|
||||
border-bottom: solid black; }
|
||||
label [type='text']:focus ~ span, label [type='text'].notEmpty:not(:focus) ~ span, label [type='password']:focus ~ span, label [type='password'].notEmpty:not(:focus) ~ span, label [type='date']:focus ~ span, label [type='date'].notEmpty:not(:focus) ~ span, label [type='datetime']:focus ~ span, label [type='datetime'].notEmpty:not(:focus) ~ span, label [type='datetime-local']:focus ~ span, label [type='datetime-local'].notEmpty:not(:focus) ~ span, label [type='month']:focus ~ span, label [type='month'].notEmpty:not(:focus) ~ span, label [type='week']:focus ~ span, label [type='week'].notEmpty:not(:focus) ~ span, label [type='email']:focus ~ span, label [type='email'].notEmpty:not(:focus) ~ span, label [type='number']:focus ~ span, label [type='number'].notEmpty:not(:focus) ~ span, label [type='search']:focus ~ span, label [type='search'].notEmpty:not(:focus) ~ span, label [type='tel']:focus ~ span, label [type='tel'].notEmpty:not(:focus) ~ span, label [type='time']:focus ~ span, label [type='time'].notEmpty:not(:focus) ~ span, label [type='url']:focus ~ span, label [type='url'].notEmpty:not(:focus) ~ span, label [type='color']:focus ~ span, label [type='color'].notEmpty:not(:focus) ~ span, label textarea:focus ~ span, label textarea.notEmpty:not(:focus) ~ span, label input[type=text]:focus ~ span, label input[type=text].notEmpty:not(:focus) ~ span, label input:not([type]):focus ~ span, label input:not([type]).notEmpty:not(:focus) ~ span {
|
||||
top: -11px;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
font-size: 11px;
|
||||
opacity: 1;
|
||||
color: black; }
|
||||
label [type='text'] ~ span, label [type='password'] ~ span, label [type='date'] ~ span, label [type='datetime'] ~ span, label [type='datetime-local'] ~ span, label [type='month'] ~ span, label [type='week'] ~ span, label [type='email'] ~ span, label [type='number'] ~ span, label [type='search'] ~ span, label [type='tel'] ~ span, label [type='time'] ~ span, label [type='url'] ~ span, label [type='color'] ~ span, label textarea ~ span, label input[type=text] ~ span, label input:not([type]) ~ span {
|
||||
position: absolute;
|
||||
pointer-events: none;
|
||||
left: 10px;
|
||||
bottom: 10px;
|
||||
top: 7px;
|
||||
transition: 0.2s ease all;
|
||||
color: #626262; }
|
||||
|
||||
.listjs {
|
||||
position: relative;
|
||||
}
|
||||
.listjs label {
|
||||
display: inline-block;
|
||||
}
|
||||
.listjs label input {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.listjs table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
.listjs table thead tr th, .listjs table tfoot tr th {
|
||||
text-align: left;
|
||||
}
|
||||
.listjs table thead tr th.sort, .listjs table tfoot tr th.sort {
|
||||
cursor: pointer;
|
||||
}
|
||||
.listjs table tbody.list tr:first-child td {
|
||||
border-top: solid 1px #696969;
|
||||
}
|
||||
.listjs table tbody.list tr:last-child td {
|
||||
border-bottom: solid 1px #696969;
|
||||
}
|
||||
.listjs table tbody.list tr td {
|
||||
border-top: solid 1px #c8c8c8;
|
||||
padding: 0.3rem;
|
||||
}
|
||||
.listjs ul.pagination {
|
||||
float: right;
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
}
|
||||
.listjs ul.pagination li {
|
||||
display: inline-block;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
text-decoration: underline;
|
||||
}
|
||||
.listjs ul.pagination li.active, .listjs ul.pagination li.disabled {
|
||||
text-decoration: none;
|
||||
}
|
||||
position: relative; }
|
||||
.listjs label {
|
||||
display: inline-block; }
|
||||
.listjs label input {
|
||||
margin-bottom: 0; }
|
||||
.listjs table {
|
||||
border-collapse: collapse; }
|
||||
.listjs table thead tr th, .listjs table tfoot tr th {
|
||||
text-align: left; }
|
||||
.listjs table thead tr th.sort, .listjs table tfoot tr th.sort {
|
||||
cursor: pointer; }
|
||||
.listjs table tbody.list tr:first-child td {
|
||||
border-top: solid 1px #696969; }
|
||||
.listjs table tbody.list tr:last-child td {
|
||||
border-bottom: solid 1px #696969; }
|
||||
.listjs table tbody.list tr td {
|
||||
border-top: solid 1px #c8c8c8;
|
||||
padding: 0.3rem; }
|
||||
.listjs ul.pagination {
|
||||
float: right;
|
||||
display: inline-block;
|
||||
margin: 0; }
|
||||
.listjs ul.pagination li {
|
||||
display: inline-block;
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
text-decoration: underline; }
|
||||
.listjs ul.pagination li.active, .listjs ul.pagination li.disabled {
|
||||
text-decoration: none; }
|
||||
|
||||
/**
|
||||
* Foundation for Sites by ZURB
|
||||
* Version 6.4.3
|
||||
@ -323,21 +241,18 @@ label [type=text] ~ span, label [type=password] ~ span, label [type=date] ~ span
|
||||
* Licensed under MIT Open Source
|
||||
*/
|
||||
*, :after, :before {
|
||||
box-sizing: inherit;
|
||||
}
|
||||
box-sizing: inherit; }
|
||||
|
||||
html {
|
||||
min-height: 100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 18px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
letter-spacing: 1px; }
|
||||
|
||||
.max-height {
|
||||
height: 100%;
|
||||
min-height: 100%;
|
||||
}
|
||||
min-height: 100%; }
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
@ -350,19 +265,16 @@ body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #fefefe;
|
||||
color: #0a0a0a;
|
||||
}
|
||||
color: #0a0a0a; }
|
||||
|
||||
footer {
|
||||
border-top: #d8d8d8 solid 1px;
|
||||
text-align: center;
|
||||
}
|
||||
text-align: center; }
|
||||
|
||||
.top-bar .top-bar-title strong {
|
||||
vertical-align: middle;
|
||||
display: inline-block;
|
||||
/*margin-left: 8px;*/
|
||||
}
|
||||
/*margin-left: 8px;*/ }
|
||||
|
||||
nav.top-bar {
|
||||
color: #FFF;
|
||||
@ -370,52 +282,40 @@ nav.top-bar {
|
||||
font-size: 20px;
|
||||
box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 2px 9px 1px rgba(0, 0, 0, 0.12), 0 4px 2px -2px rgba(0, 0, 0, 0.2);
|
||||
padding: 0.6rem;
|
||||
display: block;
|
||||
}
|
||||
display: block; }
|
||||
|
||||
.top-bar ul {
|
||||
background: red !important;
|
||||
}
|
||||
background: red !important; }
|
||||
|
||||
button.button, a.button {
|
||||
border-radius: 2px;
|
||||
background-color: red;
|
||||
}
|
||||
button.button.disabled, button.button.disabled:hover, button.button.disabled:focus, a.button.disabled, a.button.disabled:hover, a.button.disabled:focus {
|
||||
background-color: red;
|
||||
}
|
||||
button.button:focus, button.button:hover, a.button:focus, a.button:hover {
|
||||
background-color: #e00000;
|
||||
}
|
||||
background-color: red; }
|
||||
button.button.disabled, button.button.disabled:hover, button.button.disabled:focus, a.button.disabled, a.button.disabled:hover, a.button.disabled:focus {
|
||||
background-color: red; }
|
||||
button.button:focus, button.button:hover, a.button:focus, a.button:hover {
|
||||
background-color: #e00000; }
|
||||
|
||||
.fill-me {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.fill-me.vertical {
|
||||
flex-direction: row;
|
||||
}
|
||||
.fill-me .grow {
|
||||
flex: 1;
|
||||
}
|
||||
flex-direction: column; }
|
||||
.fill-me.vertical {
|
||||
flex-direction: row; }
|
||||
.fill-me .grow {
|
||||
flex: 1; }
|
||||
|
||||
.flex-center {
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.flex-center > * {
|
||||
max-height: 100%;
|
||||
}
|
||||
align-items: center; }
|
||||
.flex-center > * {
|
||||
max-height: 100%; }
|
||||
|
||||
.menu a, .dropdown.menu a {
|
||||
padding: 0.4rem 0.5rem;
|
||||
}
|
||||
padding: 0.4rem 0.5rem; }
|
||||
|
||||
svg path {
|
||||
fill: currentColor;
|
||||
}
|
||||
fill: currentColor; }
|
||||
|
||||
div.mainContainer {
|
||||
position: relative;
|
||||
@ -423,52 +323,42 @@ div.mainContainer {
|
||||
max-width: 100%;
|
||||
overflow: auto;
|
||||
flex: 1;
|
||||
margin: 0.5rem;
|
||||
}
|
||||
div.mainContainer > .row, div.mainContainer #main-content, div.mainContainer #site-content {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
margin: 0.5rem; }
|
||||
div.mainContainer > .row, div.mainContainer #main-content, div.mainContainer #site-content {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0; }
|
||||
|
||||
.inline-block {
|
||||
display: inline-block;
|
||||
}
|
||||
display: inline-block; }
|
||||
|
||||
.right {
|
||||
float: right;
|
||||
}
|
||||
float: right; }
|
||||
|
||||
#logo-img {
|
||||
max-height: 2.2rem;
|
||||
}
|
||||
max-height: 2.2rem; }
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
color: inherit;
|
||||
}
|
||||
color: inherit; }
|
||||
|
||||
a.hidden-link {
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
}
|
||||
color: inherit; }
|
||||
|
||||
label {
|
||||
cursor: pointer;
|
||||
}
|
||||
cursor: pointer; }
|
||||
|
||||
.align-right {
|
||||
text-align: right;
|
||||
}
|
||||
text-align: right; }
|
||||
|
||||
.view-panel {
|
||||
display: none;
|
||||
}
|
||||
display: none; }
|
||||
|
||||
.loader {
|
||||
left: 50%;
|
||||
@ -476,212 +366,160 @@ label {
|
||||
position: fixed;
|
||||
-webkit-transform: translate(-50%, -50%);
|
||||
transform: translate(-50%, -50%);
|
||||
text-align: center;
|
||||
}
|
||||
.loader.inline {
|
||||
left: initial;
|
||||
top: initial;
|
||||
position: initial;
|
||||
-webkit-transform: initial;
|
||||
transform: initial;
|
||||
text-align: center;
|
||||
display: inline;
|
||||
}
|
||||
.loader.small #spinner {
|
||||
transform: scale(0.5);
|
||||
}
|
||||
.loader #spinner {
|
||||
box-sizing: border-box;
|
||||
stroke: #b71c1a;
|
||||
stroke-width: 3px;
|
||||
transform-origin: 50%;
|
||||
animation: line 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite, rotate 1.6s linear infinite;
|
||||
}
|
||||
text-align: center; }
|
||||
.loader.inline {
|
||||
left: initial;
|
||||
top: initial;
|
||||
position: initial;
|
||||
-webkit-transform: initial;
|
||||
transform: initial;
|
||||
text-align: center;
|
||||
display: inline; }
|
||||
.loader.small #spinner {
|
||||
transform: scale(0.5); }
|
||||
.loader #spinner {
|
||||
box-sizing: border-box;
|
||||
stroke: #b71c1a;
|
||||
stroke-width: 3px;
|
||||
transform-origin: 50%;
|
||||
animation: line 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite, rotate 1.6s linear infinite; }
|
||||
|
||||
@keyframes rotate {
|
||||
from {
|
||||
transform: rotate(0);
|
||||
}
|
||||
transform: rotate(0); }
|
||||
to {
|
||||
transform: rotate(450deg);
|
||||
}
|
||||
}
|
||||
transform: rotate(450deg); } }
|
||||
@keyframes line {
|
||||
0% {
|
||||
stroke-dasharray: 2, 85.964;
|
||||
transform: rotate(0);
|
||||
}
|
||||
transform: rotate(0); }
|
||||
50% {
|
||||
stroke-dasharray: 65.973, 21.9911;
|
||||
stroke-dashoffset: 0;
|
||||
}
|
||||
stroke-dashoffset: 0; }
|
||||
100% {
|
||||
stroke-dasharray: 2, 85.964;
|
||||
stroke-dashoffset: -65.973;
|
||||
transform: rotate(90deg);
|
||||
}
|
||||
}
|
||||
transform: rotate(90deg); } }
|
||||
#print-content {
|
||||
display: none;
|
||||
}
|
||||
display: none; }
|
||||
|
||||
.action-button {
|
||||
max-height: 1.7rem;
|
||||
margin-left: 0.4rem;
|
||||
margin-right: 0.4rem;
|
||||
}
|
||||
.action-button:hover {
|
||||
background: #e8e8e8;
|
||||
}
|
||||
margin-right: 0.4rem; }
|
||||
.action-button:hover {
|
||||
background: #e8e8e8; }
|
||||
|
||||
.vcenter-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: table;
|
||||
}
|
||||
.vcenter-container .vcenter {
|
||||
vertical-align: middle;
|
||||
display: table-cell;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
display: table; }
|
||||
.vcenter-container .vcenter {
|
||||
vertical-align: middle;
|
||||
display: table-cell;
|
||||
flex-direction: column;
|
||||
justify-content: center; }
|
||||
|
||||
.max-width {
|
||||
width: 100%;
|
||||
}
|
||||
width: 100%; }
|
||||
|
||||
input, button {
|
||||
letter-spacing: 1px !important;
|
||||
}
|
||||
letter-spacing: 1px !important; }
|
||||
|
||||
.no-padding {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
border: 0; }
|
||||
|
||||
.center {
|
||||
text-align: center;
|
||||
}
|
||||
text-align: center; }
|
||||
|
||||
@media print {
|
||||
nav, .mainContainer, footer, #styles {
|
||||
display: none !important;
|
||||
}
|
||||
display: none !important; }
|
||||
|
||||
#print-content {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
display: block !important; } }
|
||||
.overflow-y-auto {
|
||||
overflow-y: auto !important;
|
||||
}
|
||||
overflow-y: auto !important; }
|
||||
|
||||
.row.no-after:after {
|
||||
content: initial;
|
||||
}
|
||||
content: initial; }
|
||||
|
||||
.margin-bottom {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
@media print, screen and (min-width: 25em) {
|
||||
.margin-bottom {
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
}
|
||||
@media print, screen and (min-width: 40em) {
|
||||
.margin-bottom {
|
||||
margin-bottom: 3rem;
|
||||
}
|
||||
}
|
||||
@media print, screen and (min-width: 64em) {
|
||||
.margin-bottom {
|
||||
margin-bottom: 4rem;
|
||||
}
|
||||
}
|
||||
@media screen and (min-width: 75em) {
|
||||
.margin-bottom {
|
||||
margin-bottom: 5rem;
|
||||
}
|
||||
}
|
||||
margin-bottom: 1rem; }
|
||||
@media print, screen and (min-width: 25em) {
|
||||
.margin-bottom {
|
||||
margin-bottom: 2rem; } }
|
||||
@media print, screen and (min-width: 40em) {
|
||||
.margin-bottom {
|
||||
margin-bottom: 3rem; } }
|
||||
@media print, screen and (min-width: 64em) {
|
||||
.margin-bottom {
|
||||
margin-bottom: 4rem; } }
|
||||
@media screen and (min-width: 75em) {
|
||||
.margin-bottom {
|
||||
margin-bottom: 5rem; } }
|
||||
|
||||
.font-small {
|
||||
font-size: 0.7em;
|
||||
}
|
||||
font-size: 0.7em; }
|
||||
|
||||
.border-bottom {
|
||||
border-bottom: 1px solid #cacaca;
|
||||
}
|
||||
border-bottom: 1px solid #cacaca; }
|
||||
|
||||
.border-right {
|
||||
border-right: 1px solid #cacaca;
|
||||
}
|
||||
border-right: 1px solid #cacaca; }
|
||||
|
||||
.border-left {
|
||||
border-left: 1px solid #cacaca;
|
||||
}
|
||||
border-left: 1px solid #cacaca; }
|
||||
|
||||
img.logo {
|
||||
vertical-align: inherit;
|
||||
display: inline-block;
|
||||
height: auto;
|
||||
max-width: 1.1rem;
|
||||
margin-right: 2px;
|
||||
}
|
||||
margin-right: 2px; }
|
||||
|
||||
.align-center {
|
||||
text-align: center;
|
||||
}
|
||||
text-align: center; }
|
||||
|
||||
hr.separator {
|
||||
margin: 1rem 0;
|
||||
}
|
||||
margin: 1rem 0; }
|
||||
|
||||
.button-line {
|
||||
display: flex;
|
||||
}
|
||||
.button-line .button {
|
||||
flex: 1;
|
||||
margin-left: 1px;
|
||||
margin-right: 1px;
|
||||
padding: 0.5rem 0.77rem;
|
||||
}
|
||||
display: flex; }
|
||||
.button-line .button {
|
||||
flex: 1;
|
||||
margin-left: 1px;
|
||||
margin-right: 1px;
|
||||
padding: 0.5rem 0.77rem; }
|
||||
|
||||
@media screen and (max-width: 24.9375em) {
|
||||
.small-small {
|
||||
font-size: small;
|
||||
}
|
||||
}
|
||||
font-size: small; } }
|
||||
|
||||
select {
|
||||
border: 0;
|
||||
padding: 0.3rem 0.3rem;
|
||||
}
|
||||
padding: 0.3rem 0.3rem; }
|
||||
|
||||
.share-icon {
|
||||
max-width: 1.5rem;
|
||||
margin: 0.1rem;
|
||||
}
|
||||
margin: 0.1rem; }
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
display: none; }
|
||||
|
||||
.no-transition {
|
||||
transition: none !important;
|
||||
}
|
||||
transition: none !important; }
|
||||
|
||||
img.action-image {
|
||||
max-height: 1.4rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
cursor: pointer; }
|
||||
|
||||
img.back-button {
|
||||
max-height: 0.6rem;
|
||||
margin-right: 0.2rem;
|
||||
cursor: pointer;
|
||||
vertical-align: inherit;
|
||||
}
|
||||
vertical-align: inherit; }
|
||||
|
||||
.no-margin-bottom {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
margin-bottom: 0; }
|
||||
|
||||
@ -8,85 +8,64 @@
|
||||
overflow: auto;
|
||||
background-color: black;
|
||||
/* Fallback color */
|
||||
background-color: rgba(0, 0, 0, 0.56);
|
||||
}
|
||||
.background .modal {
|
||||
position: relative;
|
||||
top: 50%;
|
||||
margin: auto;
|
||||
width: 80%;
|
||||
background-color: #fefefe;
|
||||
transform: translateY(-50%);
|
||||
padding: 0.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-height: 80%;
|
||||
max-width: 1024px;
|
||||
}
|
||||
@media screen and (max-width: 63.9375em) {
|
||||
.background .modal.small-margin {
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 24.9375em) {
|
||||
.background .modal.small-margin {
|
||||
width: 95%;
|
||||
}
|
||||
}
|
||||
.background .modal.max-small {
|
||||
max-width: 0;
|
||||
}
|
||||
.background .modal.max-smedium {
|
||||
max-width: 400px;
|
||||
}
|
||||
.background .modal.max-medium {
|
||||
max-width: 640px;
|
||||
}
|
||||
.background .modal.max-large {
|
||||
max-width: 1024px;
|
||||
}
|
||||
.background .modal.max-xlarge {
|
||||
max-width: 1200px;
|
||||
}
|
||||
.background .modal.max-xxlarge {
|
||||
max-width: 1440px;
|
||||
}
|
||||
.background .modal .title {
|
||||
font-weight: bold;
|
||||
padding-bottom: 0.5rem;
|
||||
}
|
||||
.background .modal .content-container {
|
||||
overflow-y: auto;
|
||||
max-height: 100%;
|
||||
}
|
||||
.background .modal .content-container .loader {
|
||||
position: static;
|
||||
transform: none;
|
||||
}
|
||||
.background .modal .close {
|
||||
text-align: right;
|
||||
color: #aaa;
|
||||
float: right;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
}
|
||||
.background .modal .close:hover, .background .modal .close:focus {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
.background .modal .modal-button-container {
|
||||
padding-top: 0.5rem;
|
||||
}
|
||||
.background .modal .modal-button-container .button {
|
||||
margin-left: 0.2rem;
|
||||
margin-bottom: 0 !important;
|
||||
padding: 0.6em 0.8em;
|
||||
}
|
||||
@media screen and (max-width: 24.9375em) {
|
||||
.background .modal .modal-button-container .button {
|
||||
margin-left: 0.1rem;
|
||||
padding: 0.3em 0.5em;
|
||||
}
|
||||
}
|
||||
background-color: rgba(0, 0, 0, 0.56); }
|
||||
.background .modal {
|
||||
position: relative;
|
||||
top: 50%;
|
||||
margin: auto;
|
||||
width: 80%;
|
||||
background-color: #fefefe;
|
||||
transform: translateY(-50%);
|
||||
padding: 0.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
max-height: 80%;
|
||||
max-width: 1024px; }
|
||||
@media screen and (max-width: 63.9375em) {
|
||||
.background .modal.small-margin {
|
||||
width: 90%; } }
|
||||
@media screen and (max-width: 24.9375em) {
|
||||
.background .modal.small-margin {
|
||||
width: 95%; } }
|
||||
.background .modal.max-small {
|
||||
max-width: 0; }
|
||||
.background .modal.max-smedium {
|
||||
max-width: 400px; }
|
||||
.background .modal.max-medium {
|
||||
max-width: 640px; }
|
||||
.background .modal.max-large {
|
||||
max-width: 1024px; }
|
||||
.background .modal.max-xlarge {
|
||||
max-width: 1200px; }
|
||||
.background .modal.max-xxlarge {
|
||||
max-width: 1440px; }
|
||||
.background .modal .title {
|
||||
font-weight: bold;
|
||||
padding-bottom: 0.5rem; }
|
||||
.background .modal .content-container {
|
||||
overflow-y: auto;
|
||||
max-height: 100%; }
|
||||
.background .modal .content-container .loader {
|
||||
position: static;
|
||||
transform: none; }
|
||||
.background .modal .close {
|
||||
text-align: right;
|
||||
color: #aaa;
|
||||
float: right;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
line-height: 1; }
|
||||
.background .modal .close:hover, .background .modal .close:focus {
|
||||
color: black;
|
||||
text-decoration: none;
|
||||
cursor: pointer; }
|
||||
.background .modal .modal-button-container {
|
||||
padding-top: 0.5rem; }
|
||||
.background .modal .modal-button-container .button {
|
||||
margin-left: 0.2rem;
|
||||
margin-bottom: 0 !important;
|
||||
padding: 0.6em 0.8em; }
|
||||
@media screen and (max-width: 24.9375em) {
|
||||
.background .modal .modal-button-container .button {
|
||||
margin-left: 0.1rem;
|
||||
padding: 0.3em 0.5em; } }
|
||||
|
||||
@ -7,16 +7,11 @@
|
||||
.settings-container {
|
||||
border: 1px solid black;
|
||||
border-radius: 2px;
|
||||
padding: 0.3rem;
|
||||
}
|
||||
@media print, screen and (min-width: 40em) {
|
||||
.settings-container #settings-fragments-container {
|
||||
border-left: 1px solid #cacaca;
|
||||
}
|
||||
}
|
||||
.settings-container #settings-fragments-container #settings-fragments > * {
|
||||
display: none;
|
||||
}
|
||||
.settings-container #settings-fragments-container #settings-fragments > *.active {
|
||||
display: block;
|
||||
}
|
||||
padding: 0.3rem; }
|
||||
@media print, screen and (min-width: 40em) {
|
||||
.settings-container #settings-fragments-container {
|
||||
border-left: 1px solid #cacaca; } }
|
||||
.settings-container #settings-fragments-container #settings-fragments > * {
|
||||
display: none; }
|
||||
.settings-container #settings-fragments-container #settings-fragments > *.active {
|
||||
display: block; }
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1 +1 @@
|
||||
<div class="max-height overflow-hidden"><div id=segment-leaf-template class="segment segment-leaf"><div class=leaf-element></div></div><div id=segment-parent-template class="segment segment-parent"><div class=child-container></div></div><div id=segment-row-template class="segment segment-row"><div class=child-container></div></div><div id=segment-triangle-template class="segment segment-triangle"><div class=child-container></div></div><div class=max-height><div class="show-while-playing height-20 text-right"><button class=button id=help-button data-translation=help></button></div><div class="show-when-won height-20 center flex-center"><b data-translation=won id=won-text></b><div id=coin-container><div id=coin-template class=coin><img src=img/coin.png></div></div></div><div class="flex-center height-60"><div id=level></div></div><div class="show-when-won flex-center height-20"><button class="button max-width" id=continue-button data-translation=continue></button></div></div></div>
|
||||
<div class="max-height overflow-hidden"><div id=segment-leaf-template class="segment segment-leaf"><div class=leaf-element></div></div><div id=segment-parent-template class="segment segment-parent"><div class=child-container></div></div><div id=segment-row-template class="segment segment-row"><div class=child-container></div></div><div id=segment-triangle-template class="segment segment-triangle"><div class=child-container></div></div><div class=max-height><div class="text-right max-width"><button class="button right show-while-playing" id=help-button data-translation=help></button></div><div class="height-20 show-when-won center flex-center fill-me"><div class="grow max-width"><b data-translation=won id=won-text></b></div><div id=coin-container><div id=coin-template class=coin style="opacity: 0"><img src=img/coin.png></div></div></div><div class="flex-center level-container"><div id=level></div></div><div class="show-when-won flex-center height-20"><button class="button max-width" id=continue-button data-translation=continue></button></div></div></div>
|
||||
136
public/js/app.js
136
public/js/app.js
@ -4578,17 +4578,55 @@ InitPromise.addPromise(function(app){
|
||||
});
|
||||
|
||||
class ScaleHelper {
|
||||
scaleTo(scale, fontElement, container, ignoreHeight, ignoreWidth, margin, fontWeight, addListener) {
|
||||
async scaleTo(scale, fontElement, container, ignoreHeight, ignoreWidth, margin, fontWeight, animationDelay, addListener) {
|
||||
|
||||
addListener = Helper.nonNull(addListener, true);
|
||||
animationDelay = Helper.nonNull(animationDelay, 0);
|
||||
|
||||
let newFontSize = await this._getNewFontSize(scale, fontElement, container, ignoreHeight, ignoreWidth, margin, fontWeight, animationDelay === 0);
|
||||
|
||||
if (animationDelay > 0) {
|
||||
await new Promise(r => {
|
||||
setTimeout(r, animationDelay);
|
||||
fontElement.style.fontSize = newFontSize + "px";
|
||||
});
|
||||
}
|
||||
|
||||
let self = this;
|
||||
let listener = function () {
|
||||
let timeout = (typeof addListener === 'number')?addListener:255;
|
||||
setTimeout(() => {
|
||||
self.scaleTo(scale, fontElement, container, ignoreHeight, ignoreWidth, margin, fontWeight, animationDelay, false);
|
||||
}, timeout);
|
||||
};
|
||||
if (addListener !== false) {
|
||||
window.addEventListener("resize", listener);
|
||||
}
|
||||
return listener;
|
||||
}
|
||||
|
||||
async scaleToFull(fontElement, container, ignoreHeight, ignoreWidth, margin, fontWeight, animDelay, addListener) {
|
||||
return this.scaleTo(1, fontElement, container, ignoreHeight, ignoreWidth, margin, fontWeight, animDelay, addListener);
|
||||
}
|
||||
|
||||
async _getNewFontSize(scale, fontElement, container, ignoreHeight, ignoreWidth, margin, fontWeight, setFontSize) {
|
||||
|
||||
|
||||
margin = Helper.nonNull(margin, 10);
|
||||
ignoreHeight = Helper.nonNull(ignoreHeight, false);
|
||||
ignoreWidth = Helper.nonNull(ignoreWidth, false);
|
||||
fontWeight = Helper.nonNull(fontWeight, fontElement.innerHTML.length);
|
||||
addListener = Helper.nonNull(addListener, true);
|
||||
setFontSize = Helper.nonNull(setFontSize, true);
|
||||
|
||||
let hasNoTransitionClass = container.classList.contains("no-transition");
|
||||
container.classList.add("no-transition");
|
||||
|
||||
if (!hasNoTransitionClass) {
|
||||
container.classList.add("no-transition");
|
||||
}
|
||||
|
||||
// debugger;
|
||||
|
||||
let beforeFontSize = fontElement.style.fontSize;
|
||||
let currentFontSize = 1;
|
||||
let diff = 0;
|
||||
let widthDiff = 0;
|
||||
@ -4613,26 +4651,20 @@ class ScaleHelper {
|
||||
}
|
||||
diff = newDiff;
|
||||
} while ((widthDiff > (1 - scale) * containerWidth || ignoreWidth) && (heightDiff > (1 - scale) * containerHeight || ignoreHeight));
|
||||
fontElement.style.fontSize = (currentFontSize - margin) + 'px';
|
||||
|
||||
|
||||
console.log(setFontSize, currentFontSize, beforeFontSize, fontElement.style.fontSize, fontElement);
|
||||
currentFontSize -= margin;
|
||||
fontElement.style.fontSize = ((setFontSize) ? currentFontSize + "px" : beforeFontSize);
|
||||
|
||||
if (!hasNoTransitionClass) {
|
||||
await new Promise((r) => {
|
||||
setTimeout(r, 50);
|
||||
});
|
||||
container.classList.remove("no-transition");
|
||||
}
|
||||
|
||||
let self = this;
|
||||
let listener = function () {
|
||||
setTimeout(() => {
|
||||
self.scaleTo(scale, fontElement, container, ignoreHeight, ignoreWidth, margin, fontWeight, false);
|
||||
}, 255);
|
||||
};
|
||||
if (addListener) {
|
||||
window.addEventListener("resize", listener);
|
||||
}
|
||||
return listener;
|
||||
}
|
||||
|
||||
scaleToFull(fontElement, container, ignoreHeight, ignoreWidth, margin, fontWeight) {
|
||||
return this.scaleTo(1, fontElement, container, ignoreHeight, ignoreWidth, margin, fontWeight);
|
||||
return currentFontSize;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4926,7 +4958,6 @@ class ParentSegment extends Segment {
|
||||
}
|
||||
|
||||
applyLocks(locks) {
|
||||
console.log(locks);
|
||||
this.rotatable = locks[0];
|
||||
locks.splice(0, 1);
|
||||
for (let i = 0, n = this.children.length; i < n; i++) {
|
||||
@ -5605,7 +5636,7 @@ class LevelSite extends WordRotatorBaseSite {
|
||||
return super.onConstruct(args);
|
||||
}
|
||||
|
||||
onFirstStart() {
|
||||
async onFirstStart() {
|
||||
super.onFirstStart();
|
||||
|
||||
let leafSegmentTemplate = this.findBy("#segment-leaf-template");
|
||||
@ -5632,14 +5663,17 @@ class LevelSite extends WordRotatorBaseSite {
|
||||
let wonText = this.findBy("#won-text");
|
||||
|
||||
let scaleHelper = new ScaleHelper();
|
||||
this.continueButtonScaler = scaleHelper.scaleToFull(continueButton, continueButton.parentElement, false, true);
|
||||
this.wonTextScaler = scaleHelper.scaleToFull(wonText, wonText.parentElement);
|
||||
this.continueButtonScaler = await scaleHelper.scaleToFull(continueButton, continueButton.parentElement, false, true);
|
||||
this.wonTextScaler = await scaleHelper.scaleToFull(wonText, wonText.parentElement, false, false, 10, null, 5);
|
||||
this.wonText = wonText;
|
||||
this.wonText.style.fontSize = "0";
|
||||
|
||||
//Benutze Document, da Element außerhalb von Seite (eigentlich unschön!)
|
||||
this.levelCounterActionContainer = document.getElementById("level-number-container");
|
||||
this.levelCounterAction = document.getElementById("level-number");
|
||||
this.levelCounterAction.innerText = this.levelCounter;
|
||||
this.levelNumberScaler = scaleHelper.scaleToFull(this.levelCounterAction, this.levelCounterActionContainer, false, false, 4);
|
||||
this.levelNumberScaler = await scaleHelper.scaleToFull(this.levelCounterAction, this.levelCounterActionContainer, false, false, 4);
|
||||
this.levelCounterActionContainer.classList.add("visible");
|
||||
this.templateContainer = new TemplateContainer(leafSegmentTemplate, parentSegmentTemplate, rowSegmentTemplate, triangleTemplate);
|
||||
|
||||
this.coinTemplate = this.findBy("#coin-template");
|
||||
@ -5685,7 +5719,7 @@ class LevelSite extends WordRotatorBaseSite {
|
||||
let levelSegment = this.findBy("#level");
|
||||
levelSegment.removeAllChildren().appendChild(level.getRootSegment().getElement());
|
||||
let scaleHelper = new ScaleHelper();
|
||||
this.levelScaler = scaleHelper.scaleToFull(levelSegment, levelSegment.parentElement, false, false, 2, level.words[0].length * 2);
|
||||
this.levelScaler = await scaleHelper.scaleToFull(levelSegment, levelSegment.parentElement, false, false, 2, level.words[0].length * 2, null, 0);
|
||||
|
||||
this.level = level;
|
||||
return;
|
||||
@ -5700,6 +5734,7 @@ class LevelSite extends WordRotatorBaseSite {
|
||||
async nextLevel() {
|
||||
try {
|
||||
this._siteContent.classList.remove('won');
|
||||
this.wonText.style.fontSize = "0";
|
||||
|
||||
const db = WordRotatorDb.getInstance();
|
||||
const nextLevelJson = await db.loadNextLevel([20, 40, 60, 100, 120, 140, 160]);
|
||||
@ -5722,7 +5757,7 @@ class LevelSite extends WordRotatorBaseSite {
|
||||
let levelSegment = this.findBy("#level");
|
||||
levelSegment.removeAllChildren().appendChild(level.getRootSegment().getElement());
|
||||
let scaleHelper = new ScaleHelper();
|
||||
this.levelScaler = scaleHelper.scaleToFull(levelSegment, levelSegment.parentElement, false, false, 2, level.words[0].length * 2);
|
||||
this.levelScaler = await scaleHelper.scaleToFull(levelSegment, levelSegment.parentElement, false, false, 2, level.words[0].length * 2, null, 0);
|
||||
|
||||
this.level = level;
|
||||
this.levelCounterAction.innerText = this.levelCounter;
|
||||
@ -5739,8 +5774,11 @@ class LevelSite extends WordRotatorBaseSite {
|
||||
onStart(args) {
|
||||
let res = super.onStart(args);
|
||||
|
||||
this.levelCounterAction.innerText = this.levelCounter;
|
||||
this.levelCounterActionContainer.classList.add("visible");
|
||||
if (this.levelCounterAction) {
|
||||
|
||||
this.levelCounterAction.innerText = this.levelCounter;
|
||||
this.levelCounterActionContainer.classList.add("visible");
|
||||
}
|
||||
this.levelScaler();
|
||||
return res;
|
||||
}
|
||||
@ -5761,17 +5799,52 @@ class LevelSite extends WordRotatorBaseSite {
|
||||
this._siteContent.classList.add('won');
|
||||
localStorage.removeItem("currentLevel");
|
||||
|
||||
let continueButton = this.findBy("#continue-button");
|
||||
continueButton.style.transition = "none";
|
||||
continueButton.style.opacity = 0;
|
||||
|
||||
this.coinContainer.removeAllChildren();
|
||||
let coinsPerLevel = SystemSettings.get("coinsPerLevel", 5);
|
||||
let coinsBefore = parseInt(Helper.nonNull(localStorage.getItem("coins"), "0"));
|
||||
localStorage.setItem("coins", coinsBefore + parseInt(coinsPerLevel));
|
||||
|
||||
let audio = (new Audio(Helper.basePath("/sound/single_coin_fall_on_concrete_.mp3")));
|
||||
let coinPromise = Promise.all([new Promise((r) => {
|
||||
setTimeout(r, 500);
|
||||
}),
|
||||
new Promise(r => {
|
||||
audio.addEventListener('loadeddata', r);
|
||||
})
|
||||
]);
|
||||
for (let i = 0; i < coinsPerLevel; i++) {
|
||||
let coinElem = Helper.cloneNode(this.coinTemplate);
|
||||
this.coinContainer.appendChild(coinElem);
|
||||
coinPromise = coinPromise.then(() => {
|
||||
return new Promise(r => {
|
||||
let timeout = 350;
|
||||
coinElem.fadeIn(timeout / 1000);
|
||||
if (audio !== null) {
|
||||
audio.pause();
|
||||
audio.currentTime = 0;
|
||||
audio.play();
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
this.coinAction.setTitle(coinsBefore++);
|
||||
this.coinAction.redraw();
|
||||
}, timeout / 2);
|
||||
setTimeout(r, timeout);
|
||||
})
|
||||
});
|
||||
}
|
||||
localStorage.setItem("coins", parseInt(Helper.nonNull(localStorage.getItem("coins"), "0")) + parseInt(coinsPerLevel));
|
||||
|
||||
this.wonTextScaler();
|
||||
this.continueButtonScaler();
|
||||
this.levelScaler();
|
||||
|
||||
coinPromise.then(() => {
|
||||
continueButton.fadeIn();
|
||||
});
|
||||
await savePromise;
|
||||
}
|
||||
catch (e) {
|
||||
@ -5790,8 +5863,11 @@ class LevelSite extends WordRotatorBaseSite {
|
||||
this.coinAction.redraw();
|
||||
|
||||
let rotatables = this.level.getRotatableSegments();
|
||||
rotatables = rotatables.filter((segment) => {
|
||||
return (segment.rotation !== 0);
|
||||
});
|
||||
|
||||
let index = Math.floor(Math.random() * rotatables.length);
|
||||
console.log(rotatables, index);
|
||||
|
||||
let segmentToHelp = rotatables[index];
|
||||
while (segmentToHelp.rotation !== 0) {
|
||||
@ -5800,7 +5876,7 @@ class LevelSite extends WordRotatorBaseSite {
|
||||
segmentToHelp.setIsRotatable(false);
|
||||
this.level.saveAsCurrentLevel();
|
||||
}
|
||||
else{
|
||||
else {
|
||||
FlashMessenger.addMessage("not-enough-coins");
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,3 +8,8 @@
|
||||
.tab-header-container .tab-header.active {
|
||||
border-bottom: 0;
|
||||
background-color: #FFF; }
|
||||
|
||||
.no-transition {
|
||||
transition: none !important; }
|
||||
.no-transition * {
|
||||
transition: none !important; }
|
||||
|
||||
BIN
public/sound/single_coin_fall_on_concrete_.mp3
Normal file
BIN
public/sound/single_coin_fall_on_concrete_.mp3
Normal file
Binary file not shown.
@ -9,17 +9,55 @@ class DelayPromise extends Promise {
|
||||
}
|
||||
|
||||
class ScaleHelper {
|
||||
scaleTo(scale, fontElement, container, ignoreHeight, ignoreWidth, margin, fontWeight, addListener) {
|
||||
async scaleTo(scale, fontElement, container, ignoreHeight, ignoreWidth, margin, fontWeight, animationDelay, addListener) {
|
||||
|
||||
addListener = Helper.nonNull(addListener, true);
|
||||
animationDelay = Helper.nonNull(animationDelay, 0);
|
||||
|
||||
let newFontSize = await this._getNewFontSize(scale, fontElement, container, ignoreHeight, ignoreWidth, margin, fontWeight, animationDelay === 0);
|
||||
|
||||
if (animationDelay > 0) {
|
||||
await new Promise(r => {
|
||||
setTimeout(r, animationDelay);
|
||||
fontElement.style.fontSize = newFontSize + "px";
|
||||
});
|
||||
}
|
||||
|
||||
let self = this;
|
||||
let listener = function () {
|
||||
let timeout = (typeof addListener === 'number')?addListener:255;
|
||||
setTimeout(() => {
|
||||
self.scaleTo(scale, fontElement, container, ignoreHeight, ignoreWidth, margin, fontWeight, animationDelay, false);
|
||||
}, timeout);
|
||||
};
|
||||
if (addListener !== false) {
|
||||
window.addEventListener("resize", listener);
|
||||
}
|
||||
return listener;
|
||||
}
|
||||
|
||||
async scaleToFull(fontElement, container, ignoreHeight, ignoreWidth, margin, fontWeight, animDelay, addListener) {
|
||||
return this.scaleTo(1, fontElement, container, ignoreHeight, ignoreWidth, margin, fontWeight, animDelay, addListener);
|
||||
}
|
||||
|
||||
async _getNewFontSize(scale, fontElement, container, ignoreHeight, ignoreWidth, margin, fontWeight, setFontSize) {
|
||||
|
||||
|
||||
margin = Helper.nonNull(margin, 10);
|
||||
ignoreHeight = Helper.nonNull(ignoreHeight, false);
|
||||
ignoreWidth = Helper.nonNull(ignoreWidth, false);
|
||||
fontWeight = Helper.nonNull(fontWeight, fontElement.innerHTML.length);
|
||||
addListener = Helper.nonNull(addListener, true);
|
||||
setFontSize = Helper.nonNull(setFontSize, true);
|
||||
|
||||
let hasNoTransitionClass = container.classList.contains("no-transition");
|
||||
container.classList.add("no-transition");
|
||||
|
||||
if (!hasNoTransitionClass) {
|
||||
container.classList.add("no-transition");
|
||||
}
|
||||
|
||||
// debugger;
|
||||
|
||||
let beforeFontSize = fontElement.style.fontSize;
|
||||
let currentFontSize = 1;
|
||||
let diff = 0;
|
||||
let widthDiff = 0;
|
||||
@ -44,26 +82,20 @@ class ScaleHelper {
|
||||
}
|
||||
diff = newDiff;
|
||||
} while ((widthDiff > (1 - scale) * containerWidth || ignoreWidth) && (heightDiff > (1 - scale) * containerHeight || ignoreHeight));
|
||||
fontElement.style.fontSize = (currentFontSize - margin) + 'px';
|
||||
|
||||
|
||||
console.log(setFontSize, currentFontSize, beforeFontSize, fontElement.style.fontSize, fontElement);
|
||||
currentFontSize -= margin;
|
||||
fontElement.style.fontSize = ((setFontSize) ? currentFontSize + "px" : beforeFontSize);
|
||||
|
||||
if (!hasNoTransitionClass) {
|
||||
await new Promise((r) => {
|
||||
setTimeout(r, 50);
|
||||
});
|
||||
container.classList.remove("no-transition");
|
||||
}
|
||||
|
||||
let self = this;
|
||||
let listener = function () {
|
||||
setTimeout(() => {
|
||||
self.scaleTo(scale, fontElement, container, ignoreHeight, ignoreWidth, margin, fontWeight, false);
|
||||
}, 255);
|
||||
};
|
||||
if (addListener) {
|
||||
window.addEventListener("resize", listener);
|
||||
}
|
||||
return listener;
|
||||
}
|
||||
|
||||
scaleToFull(fontElement, container, ignoreHeight, ignoreWidth, margin, fontWeight) {
|
||||
return this.scaleTo(1, fontElement, container, ignoreHeight, ignoreWidth, margin, fontWeight);
|
||||
return currentFontSize;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -14,18 +14,20 @@
|
||||
</div>
|
||||
<!-- Site Content -->
|
||||
<div class='max-height'>
|
||||
<div class = 'show-while-playing height-20 text-right'>
|
||||
<button class="button" id = 'help-button' data-translation="help"></button>
|
||||
<div class="text-right max-width">
|
||||
<button class="button right show-while-playing" id='help-button' data-translation="help"></button>
|
||||
</div>
|
||||
<div class = 'show-when-won height-20 center flex-center'>
|
||||
<b data-translation="won" id = "won-text"></b>
|
||||
<div id = 'coin-container'>
|
||||
<div id = 'coin-template' class='coin'>
|
||||
<img src = 'img/coin.png'/>
|
||||
<div class='height-20 show-when-won center flex-center fill-me'>
|
||||
<div class = 'grow max-width'>
|
||||
<b data-translation="won" id="won-text"></b>
|
||||
</div>
|
||||
<div id='coin-container'>
|
||||
<div id='coin-template' class='coin' style="opacity: 0">
|
||||
<img src='img/coin.png'/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex-center height-60">
|
||||
<div class="flex-center level-container">
|
||||
<div id='level'>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -34,7 +34,7 @@ export class LevelSite extends WordRotatorBaseSite {
|
||||
return super.onConstruct(args);
|
||||
}
|
||||
|
||||
onFirstStart() {
|
||||
async onFirstStart() {
|
||||
super.onFirstStart();
|
||||
|
||||
let leafSegmentTemplate = this.findBy("#segment-leaf-template");
|
||||
@ -61,14 +61,17 @@ export class LevelSite extends WordRotatorBaseSite {
|
||||
let wonText = this.findBy("#won-text");
|
||||
|
||||
let scaleHelper = new ScaleHelper();
|
||||
this.continueButtonScaler = scaleHelper.scaleToFull(continueButton, continueButton.parentElement, false, true);
|
||||
this.wonTextScaler = scaleHelper.scaleToFull(wonText, wonText.parentElement);
|
||||
this.continueButtonScaler = await scaleHelper.scaleToFull(continueButton, continueButton.parentElement, false, true);
|
||||
this.wonTextScaler = await scaleHelper.scaleToFull(wonText, wonText.parentElement, false, false, 10, null, 5);
|
||||
this.wonText = wonText;
|
||||
this.wonText.style.fontSize = "0";
|
||||
|
||||
//Benutze Document, da Element außerhalb von Seite (eigentlich unschön!)
|
||||
this.levelCounterActionContainer = document.getElementById("level-number-container");
|
||||
this.levelCounterAction = document.getElementById("level-number");
|
||||
this.levelCounterAction.innerText = this.levelCounter;
|
||||
this.levelNumberScaler = scaleHelper.scaleToFull(this.levelCounterAction, this.levelCounterActionContainer, false, false, 4);
|
||||
this.levelNumberScaler = await scaleHelper.scaleToFull(this.levelCounterAction, this.levelCounterActionContainer, false, false, 4);
|
||||
this.levelCounterActionContainer.classList.add("visible");
|
||||
this.templateContainer = new TemplateContainer(leafSegmentTemplate, parentSegmentTemplate, rowSegmentTemplate, triangleTemplate);
|
||||
|
||||
this.coinTemplate = this.findBy("#coin-template");
|
||||
@ -114,7 +117,7 @@ export class LevelSite extends WordRotatorBaseSite {
|
||||
let levelSegment = this.findBy("#level");
|
||||
levelSegment.removeAllChildren().appendChild(level.getRootSegment().getElement());
|
||||
let scaleHelper = new ScaleHelper();
|
||||
this.levelScaler = scaleHelper.scaleToFull(levelSegment, levelSegment.parentElement, false, false, 2, level.words[0].length * 2);
|
||||
this.levelScaler = await scaleHelper.scaleToFull(levelSegment, levelSegment.parentElement, false, false, 2, level.words[0].length * 2, null, 0);
|
||||
|
||||
this.level = level;
|
||||
return;
|
||||
@ -129,6 +132,7 @@ export class LevelSite extends WordRotatorBaseSite {
|
||||
async nextLevel() {
|
||||
try {
|
||||
this._siteContent.classList.remove('won');
|
||||
this.wonText.style.fontSize = "0";
|
||||
|
||||
const db = WordRotatorDb.getInstance();
|
||||
const nextLevelJson = await db.loadNextLevel([20, 40, 60, 100, 120, 140, 160]);
|
||||
@ -151,7 +155,7 @@ export class LevelSite extends WordRotatorBaseSite {
|
||||
let levelSegment = this.findBy("#level");
|
||||
levelSegment.removeAllChildren().appendChild(level.getRootSegment().getElement());
|
||||
let scaleHelper = new ScaleHelper();
|
||||
this.levelScaler = scaleHelper.scaleToFull(levelSegment, levelSegment.parentElement, false, false, 2, level.words[0].length * 2);
|
||||
this.levelScaler = await scaleHelper.scaleToFull(levelSegment, levelSegment.parentElement, false, false, 2, level.words[0].length * 2, null, 0);
|
||||
|
||||
this.level = level;
|
||||
this.levelCounterAction.innerText = this.levelCounter;
|
||||
@ -168,8 +172,11 @@ export class LevelSite extends WordRotatorBaseSite {
|
||||
onStart(args) {
|
||||
let res = super.onStart(args);
|
||||
|
||||
this.levelCounterAction.innerText = this.levelCounter;
|
||||
this.levelCounterActionContainer.classList.add("visible");
|
||||
if (this.levelCounterAction) {
|
||||
|
||||
this.levelCounterAction.innerText = this.levelCounter;
|
||||
this.levelCounterActionContainer.classList.add("visible");
|
||||
}
|
||||
this.levelScaler();
|
||||
return res;
|
||||
}
|
||||
@ -190,17 +197,52 @@ export class LevelSite extends WordRotatorBaseSite {
|
||||
this._siteContent.classList.add('won');
|
||||
localStorage.removeItem("currentLevel");
|
||||
|
||||
let continueButton = this.findBy("#continue-button");
|
||||
continueButton.style.transition = "none";
|
||||
continueButton.style.opacity = 0;
|
||||
|
||||
this.coinContainer.removeAllChildren();
|
||||
let coinsPerLevel = SystemSettings.get("coinsPerLevel", 5);
|
||||
let coinsBefore = parseInt(Helper.nonNull(localStorage.getItem("coins"), "0"));
|
||||
localStorage.setItem("coins", coinsBefore + parseInt(coinsPerLevel));
|
||||
|
||||
let audio = (new Audio(Helper.basePath("/sound/single_coin_fall_on_concrete_.mp3")));
|
||||
let coinPromise = Promise.all([new Promise((r) => {
|
||||
setTimeout(r, 500)
|
||||
}),
|
||||
new Promise(r => {
|
||||
audio.addEventListener('loadeddata', r);
|
||||
})
|
||||
]);
|
||||
for (let i = 0; i < coinsPerLevel; i++) {
|
||||
let coinElem = Helper.cloneNode(this.coinTemplate);
|
||||
this.coinContainer.appendChild(coinElem);
|
||||
coinPromise = coinPromise.then(() => {
|
||||
return new Promise(r => {
|
||||
let timeout = 350;
|
||||
coinElem.fadeIn(timeout / 1000);
|
||||
if (audio !== null) {
|
||||
audio.pause();
|
||||
audio.currentTime = 0;
|
||||
audio.play();
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
this.coinAction.setTitle(coinsBefore++);
|
||||
this.coinAction.redraw();
|
||||
}, timeout / 2);
|
||||
setTimeout(r, timeout);
|
||||
})
|
||||
});
|
||||
}
|
||||
localStorage.setItem("coins", parseInt(Helper.nonNull(localStorage.getItem("coins"), "0")) + parseInt(coinsPerLevel));
|
||||
|
||||
this.wonTextScaler();
|
||||
this.continueButtonScaler();
|
||||
this.levelScaler();
|
||||
|
||||
coinPromise.then(() => {
|
||||
continueButton.fadeIn();
|
||||
});
|
||||
await savePromise;
|
||||
}
|
||||
catch (e) {
|
||||
@ -219,8 +261,11 @@ export class LevelSite extends WordRotatorBaseSite {
|
||||
this.coinAction.redraw();
|
||||
|
||||
let rotatables = this.level.getRotatableSegments();
|
||||
rotatables = rotatables.filter((segment) => {
|
||||
return (segment.rotation !== 0);
|
||||
});
|
||||
|
||||
let index = Math.floor(Math.random() * rotatables.length);
|
||||
console.log(rotatables, index);
|
||||
|
||||
let segmentToHelp = rotatables[index];
|
||||
while (segmentToHelp.rotation !== 0) {
|
||||
@ -229,7 +274,7 @@ export class LevelSite extends WordRotatorBaseSite {
|
||||
segmentToHelp.setIsRotatable(false);
|
||||
this.level.saveAsCurrentLevel();
|
||||
}
|
||||
else{
|
||||
else {
|
||||
FlashMessenger.addMessage("not-enough-coins");
|
||||
}
|
||||
}
|
||||
|
||||
@ -100,7 +100,6 @@ export class ParentSegment extends Segment {
|
||||
}
|
||||
|
||||
applyLocks(locks) {
|
||||
console.log(locks);
|
||||
this.rotatable = locks[0];
|
||||
locks.splice(0, 1);
|
||||
for (let i = 0, n = this.children.length; i < n; i++) {
|
||||
|
||||
@ -1,19 +0,0 @@
|
||||
#author-list {
|
||||
.author-entry {
|
||||
border-bottom: 1px solid $borderColor;
|
||||
.author-image-container {
|
||||
.author-image {
|
||||
position: relative;
|
||||
}
|
||||
}
|
||||
.user-flag{
|
||||
display: none;
|
||||
}
|
||||
|
||||
&.isUser{
|
||||
.user-flag{
|
||||
display: inherit;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -61,10 +61,15 @@ $coinTowerDimension: 28px;
|
||||
}
|
||||
}
|
||||
|
||||
#coin-container .coin {
|
||||
margin: 3px;
|
||||
max-width: 30px;
|
||||
display: inline-block;
|
||||
#coin-container {
|
||||
height: 30px;
|
||||
.coin {
|
||||
margin-left: 3px;
|
||||
margin-right: 3px;
|
||||
//height: 30px;
|
||||
max-width:30px;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
//Segments
|
||||
@ -247,18 +252,28 @@ $animationDuration: 0.25s;
|
||||
}
|
||||
|
||||
//Won-screen
|
||||
.show-when-won {
|
||||
//visibility: hidden;
|
||||
display: none;
|
||||
transition: none;
|
||||
* {
|
||||
transition: none;
|
||||
#site-content > :not(.won) {
|
||||
.show-when-won {
|
||||
//visibility: hidden;
|
||||
display: none;
|
||||
//transition: none;
|
||||
//* {
|
||||
// transition: none;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
.level-container {
|
||||
height: 100%;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.won {
|
||||
.level-container {
|
||||
height: 60%;
|
||||
}
|
||||
.show-when-won {
|
||||
display: flex;
|
||||
//visibility: initial;
|
||||
}
|
||||
.show-while-playing {
|
||||
display: none;
|
||||
@ -268,4 +283,3 @@ $animationDuration: 0.25s;
|
||||
.text-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user