[wip] Create cropped version of Globe2?

Probably not ideal as the canvas is still bigger, mostly styling for now
This commit is contained in:
2022-08-11 23:28:43 +02:00
parent 35d0b1d17f
commit 4a83ade94b
4 changed files with 10 additions and 15 deletions

View File

@@ -110,7 +110,9 @@
on:resize={resize}
/>
<div class="globe" bind:this={globeParentEl}>
<div class="globe" bind:this={globeParentEl}
class:is-cropped={type === 'cropped'}
>
<div class="globe__inner">
<div class="globe__canvas" bind:this={globeEl} />
</div>

View File

@@ -241,12 +241,17 @@
/*
** States and Variants
*/
// Cropped version
&.is-cropped {
overflow: hidden;
height: clamp(300px, 30vw, 500px);
}
// When dragging
:global(.is-grabbing) {
cursor: grabbing;
}
// Tweakpane
:global(.tp-rotv) {
position: absolute;

View File

@@ -118,16 +118,4 @@
}
}
}
}
:global(.credits) {
// Globe
:global(.globe) {
:global(*) {
pointer-events: none;
}
:global(canvas) {
opacity: 0.5;
}
}
}

View File

@@ -60,7 +60,7 @@
}
// Globe
:global(.subscribe .globe-cropped) {
:global(.subscribe .globe) {
margin-top: 96px;
@include bp (sm) {