marzipano/assets/style.css

413 lines
6.7 KiB
CSS
Raw Normal View History

2024-10-02 20:01:42 +02:00
* {
-webkit-box-sizing: border-box;
box-sizing: border-box;
-webkit-user-select: none;
user-select: none;
-webkit-text-size-adjust: none;
text-size-adjust: none;
-webkit-user-drag: none;
-webkit-touch-callout: none;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
min-width: 0;
}
video {
width: 100%;
}
html,
body {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
overflow: hidden;
font-size: 16px;
background-color: #000;
}
a,
a:hover,
a:active,
a:visited {
text-decoration: none;
color: inherit;
}
#pano {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
#titleBar {
position: absolute;
top: 0;
left: 0;
right: 40px;
height: 40px;
text-align: center;
border-radius: 12px;
margin: 10px;
margin-left: 20px;
margin-right: 30px;
}
/* If there is a fullscreen button the title bar must make space for it */
body.fullscreen-enabled #titleBar {
right: 80px;
}
body.fullscreen-enabled.mobile #titleBar {
right: 100px;
}
/* If there are multiple scenes the title bar must make space for the scene list toggle */
body.multiple-scenes #titleBar {
left: 40px;
}
#titleBar .sceneName {
width: 100%;
height: 100%;
line-height: 27.5px;
padding: 5px;
background-color: #1a1a37;
font-weight: 900;
font-size: 1.5rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
-webkit-user-select: text;
user-select: text;
border-radius: 30px;
}
.button {
cursor: pointer;
display: flex;
align-items: center;
font-size: 30px;
}
.button > .on {
display: none;
}
.button > .off {
display: block;
}
.button.enabled > .on {
display: block;
}
.button.enabled > .off {
display: none;
}
#fullscreenToggle {
justify-content: center;
position: absolute;
top: 0;
right: 0;
width: 40px;
height: 40px;
padding: 5px;
background-color: #ffbc3b;
border-radius: 50%;
margin: 10px;
color: #fff;
font-size: 30px;
}
#autorotateToggle {
display: flex;
align-items: center;
justify-content: center;
position: absolute;
top: 0;
right: 0;
width: 40px;
height: 40px;
padding: 5px;
background-color: #ffbc3b;
border-radius: 20px;
margin: 10px;
margin-right: 20px;
cursor: pointer;
color: #fff;
font-size: 30px;
}
/* If there is a fullscreen button, autorotate must placed a bit to the left */
body.fullscreen-enabled #autorotateToggle {
right: 40px;
}
#sceneListToggle {
position: absolute;
top: 0;
left: 0;
width: 40px;
height: 40px;
padding: 5px;
background-color: #ffbc3b;
border-radius: 50%;
margin: 10px;
color: #fff;
}
#sceneList {
position: absolute;
width: 50px;
margin: 10px;
margin-top: 60px;
max-height: calc(100vh - 70px);
display: flex;
flex-direction: column;
gap: 5px;
padding: 5px;
overflow: auto;
background-color: #1a1a37;
border-radius: 15px;
transition: 0.2s ease;
}
#sceneList.enabled {
width: 250px;
}
/* Hide scene title on collapse */
#sceneList:not(.enabled) .scene > *:not(svg) {
display: none;
}
#sceneList .scene {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem;
border-radius: 10px;
color: #fff;
font-weight: 700;
height: 40px;
cursor: pointer;
}
#sceneList .scene svg {
font-size: 24px;
flex-shrink: 0;
}
#sceneList .scene span {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
#sceneList .scene:hover,
#sceneList .scene:active {
background-color: #fff !important;
color: #1a1a37;
transition: 0.3s ease;
}
#sceneList .scene.current {
background-color: rgb(103, 115, 131);
background-color: #ffbc3b;
}
/* Link hotspot */
.link-hotspot {
width: 60px;
height: 60px;
margin-left: -30px;
margin-top: -30px;
opacity: 0.9;
transition: opacity 0.2s;
font-size: 60px;
}
.link-hotspot svg {
cursor: pointer;
}
.link-hotspot:hover,
.link-hotspot:active {
opacity: 1;
}
.mobile .link-hotspot {
width: 70px;
height: 70px;
}
.link-hotspot-tooltip {
position: absolute;
left: 100%;
top: 30px; /* ( 60 - (16 + 2*8) ) / 2 */
margin-left: 3px;
font-size: 16px;
max-width: 300px;
padding: 8px 10px;
border-radius: 5px;
background-color: rgb(58, 68, 84);
background-color: #1a1a37;
color: #fff;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
cursor: pointer;
opacity: 0;
transform: translateX(-8px);
transition: -webkit-transform 0.3s, transform 0.3s, opacity 0.3s;
}
.link-hotspot:hover .link-hotspot-tooltip,
.link-hotspot:active .link-hotspot-tooltip {
opacity: 1;
transform: translateX(0);
}
/* Prevent tooltip from triggering */
.link-hotspot-tooltip {
pointer-events: none;
}
.link-hotspot:hover .link-hotspot-tooltip,
.link-hotspot:active .link-hotspot-tooltip {
pointer-events: all;
}
/* Info hotspot */
.info-hotspot {
line-height: 1.2em;
opacity: 0.9;
transition: opacity 0.2s 0.2s;
}
.info-hotspot svg {
font-size: 40px;
}
.info-hotspot .info-hotspot-header {
width: 50px;
height: 50px;
max-width: 50px;
padding: 5px;
padding-right: 10px;
border-radius: 25px;
background-color: #1a1a37;
cursor: pointer;
transition: max-width 0.5s ease;
color: #fff;
display: flex;
gap: 0.5rem;
align-items: center;
}
.info-hotspot.audio-room .info-hotspot-header {
background-color: #ffbc3b;
width: 75px;
height: 75px;
max-width: 75px;
border-radius: 37.5px;
}
.info-hotspot.audio-room svg {
font-size: 65px;
}
.info-hotspot-header:not(:hover):not(:active) .info-hotspot-title {
display: none;
}
.info-hotspot.visible .info-hotspot-header:hover,
.info-hotspot.visible .info-hotspot-header:active,
.info-hotspot .info-hotspot-header:hover,
.info-hotspot .info-hotspot-header:active {
width: auto;
max-width: 500px;
transition: max-width 0.2s ease;
}
.info-hotspot .info-hotspot-icon-wrapper {
flex-shrink: 0;
}
.info-hotspot .info-hotspot-title {
-webkit-user-select: text;
user-select: text;
font-weight: 900;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
/* View control buttons */
.viewControlButtons {
display: flex;
gap: 0.5rem;
position: absolute;
bottom: 10px;
left: 0;
right: 0;
margin-left: auto;
margin-right: auto;
text-align: center;
width: 280px;
}
.viewControlButton {
width: 40px;
height: 40px;
padding: 5px;
background-color: rgb(103, 115, 131);
background-color: #fff;
border-radius: 50%;
color: #000;
}
/* Hide controls when width is too small */
@media (max-width: 600px) {
body.view-control-buttons .viewControlButton {
display: none;
}
}
.modal * {
-webkit-user-select: text;
user-select: text;
}
.modal-content > iframe {
height: 60vh;
}
.modal-body audio {
width: 100%;
}
.content li {
color: var(--bs-secondary-color);
font-family: var(--gcg-font-primary);
}