UNPKG

mdsjs

Version:

MDS and PCA projections in JavaScript

453 lines (372 loc) 6.37 kB
/* general */ * { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; line-height: 30px; box-sizing: border-box; } body { margin: 0; padding: 0; } @media (hover: none) and (max-width: 480px) { * { font-size: 16px; line-height: 32px; } } /* links */ a, a:visited { color: black; } a:hover, a:focus { color: #444; } /* scene */ .hmain { display: flex; justify-content: center; align-items: center; min-height: 100vh; max-width: 100vw; } .vmain { display: flex; justify-content: center; align-items: center; flex-direction: column; flex-grow: 0; } @media (hover: none) and (max-width: 480px) { .hmain { justify-content: start; align-items: start; } .vmain { justify-content: start; } } /* pre loading */ @keyframes blink { 0% { background-color: white; } 50% { background-color: #efefef; } 100% { background-color: white; } } .header:empty { width: 400px; height: 29px; transition: all 0.5s ease-in-out; animation: blink normal 2s infinite ease-in-out; filter: blur(5px); } .topbar:empty { width: 802px; height: 31.383px; transition: all 0.5s ease-in-out; animation: blink normal 2s infinite ease-in-out; filter: blur(5px); } .main:empty { width: 802px; height: 602px; border: none; transition: all 0.5s ease-in-out; animation: blink normal 2s infinite ease-in-out; filter: blur(5px); } .bottombar:empty { width: 802px; height: 30px; transition: all 0.5s ease-in-out; animation: blink normal 2s infinite ease-in-out; filter: blur(5px); } .footer:empty { width: 500px; height: 40px; transition: all 0.5s ease-in-out; animation: blink normal 2s infinite ease-in-out; filter: blur(5px); } @media (hover: none) and (max-width: 480px) { .header:empty { width: 70vw; height: 56px; } .topbar:empty { width: calc(100vw - 10px); height: 127px; } .main:empty { width: 100vw; height: calc(75vw + 0.5px); } .bottombar:empty { width: calc(100vw - 10px); height: 67px; } .footer:empty { width: 80vw; height: 88px; } } /* header */ .header { height: 29px; } .header div, .header span, .header a { font-weight: 500; } @media (hover: none) and (max-width: 480px) { .header { height: auto; } .header div, .header span, .header a { margin-top: 8px; margin-bottom: 16px; font-size: 16px; line-height: 32px; } } /* control panel */ .topbar { display: flex; justify-content: flex-start; align-items: start; margin: 5px; width: 100%; } @media (hover: none) and (max-width: 480px) { .topbar { justify-content: space-between; flex-wrap: wrap; } } .topbar > div { margin-right: 5px; flex-grow: 0; } .topbar > div:last-child { margin-right: 0; flex-grow: 0; text-align: right; } .topbar > div.divider { flex-grow: 1; margin-right: 0; } .topbar label { vertical-align: middle; user-select: none; } @media (hover: none) and (max-width: 480px) { .topbar > div { margin-bottom: 3px; flex-grow: 0; } .topbar > div.divider { flex-grow: 0; } } /* controls */ input { line-height: 20px; vertical-align: middle; } input[type='checkbox'] { margin-left: 0; } input.range { width: 50px; } input.rangeedit { width: 2em; } input.invalid { color: white; background-color: crimson; } @media (hover: none) and (max-width: 480px) { input { line-height: 32px; } input[type='checkbox'], input[type='range'] { zoom: 2; } } select { vertical-align: middle; } label::after { content: '\00a0'; } /* canvas area */ .main { position: relative; border: 1px solid black; margin: 0; padding: 0; } canvas { display: inherit; margin: 0; padding: 0; touch-action: manipulation; } .videocounter { position: absolute; display: flex; justify-content: center; align-items: center; top: 0; left: 0; color: white; text-shadow: -1px -1px 0 black, 1px -1px 0 black, -1px 1px 0 black, 1px 1px 0 black; opacity: 75%; pointer-events: none; user-select: none; } @media (hover: none) and (max-width: 480px) { .main { width: 100%; height: auto; } canvas { width: 100% !important; height: auto !important; } .videocounter { width: 100% !important; height: auto !important; } } /* info panel */ .bottombar { display: flex; justify-content: flex-start; align-items: start; margin: 5px; width: 100%; } @media (hover: none) and (max-width: 480px) { .bottombar { flex-wrap: wrap; } } .bottombar > div, .bottombar > input { margin-right: 5px; } .bottombar > div:last-child { margin-right: 0; flex-grow: 1; text-align: right; } @media (hover: none) and (max-width: 480px) { .bottombar > div, .bottombar > input { margin-bottom: 5px; flex-grow: 0; } .bottombar > div:last-child { text-align: center; } } .refstatus { font-family: 'Courier New', Courier, monospace; } /* footer */ .footer { display: flex; flex-direction: column; align-items: center; justify-content: start; } .footer div, .footer span, .footer a { font-weight: 300; line-height: 20px; } @media (hover: none) and (max-width: 480px) { .footer { align-items: start; } .footer div, .footer span, .footer a { line-height: 26px; margin-bottom: 5px; } .footer div { width: 100%; } } /* help text */ .normalonly { display: block; } .mobileonly { display: none; } @media (hover: none) { .normalonly { display: none; } .mobileonly { display: block; } } /* copyright */ footer { position: fixed; bottom: 0; width: 100%; z-index: 1; pointer-events: none; } .footer-style { padding: 10px; text-align: right; filter: drop-shadow(0 0 4px white) drop-shadow(0 0 4px white) drop-shadow(0 0 4px white) drop-shadow(0 0 4px white); font-weight: 300; } .footer-style a { font-weight: 300; pointer-events: fill; } /* errors */ #error { position: fixed; top: 10px; left: 10px; max-height: 40vh; overflow: auto; color: crimson; background-color: white; margin: 5px; padding: 5px; border: 1px solid black; border-radius: 7.5px; } #error:empty { display: none; }