Skip to content

Commit 46da8c8

Browse files
authored
3.0.2
2 parents 05dd5c8 + 7145ac0 commit 46da8c8

File tree

4 files changed

+66
-23
lines changed

4 files changed

+66
-23
lines changed

full.css

+25-18
Original file line numberDiff line numberDiff line change
@@ -522,25 +522,10 @@ body.notransition .live-view.file-open {
522522
z-index: 999;
523523
}
524524

525-
.bookmark::after {
526-
content: '';
527-
position: absolute;
528-
left: 45px;
529-
bottom: 0;
530-
height: 100vh;
531-
width: 10px;
532-
cursor: default;
533-
z-index: -1;
534-
}
535-
536525
.bookmark.visible {
537526
box-shadow: 1px 2px 6px 0px rgb(0 0 0 / 5%);
538527
}
539528

540-
.bookmark.visible::after {
541-
pointer-events: none;
542-
}
543-
544529
.bookmark:active {
545530
background: hsl(228deg 16% 10%);
546531
}
@@ -572,10 +557,25 @@ body.scroll-enabled .bookmark {
572557
.4s var(--cubic-function) padding;
573558
}
574559

560+
.sidebar-toggle::after {
561+
content: '';
562+
position: absolute;
563+
left: 45px;
564+
bottom: 0;
565+
height: 100vh;
566+
width: 10px;
567+
cursor: text;
568+
z-index: -1;
569+
}
570+
575571
.sidebar-toggle.visible {
576572
left: -1px;
577573
}
578574

575+
.sidebar-toggle.visible::after {
576+
pointer-events: none;
577+
}
578+
579579
.live-toggle.file-open + .sidebar-toggle,
580580
body.embed .sidebar-toggle {
581581
display: none;
@@ -628,9 +628,12 @@ body.expanded .sidebar-toggle svg .left {
628628
box-shadow: 2px 5px 6px 0px rgb(0 0 0 / 9%);
629629
}
630630

631-
.live-view.visible ~ .live-toggle:hover,
632-
.live-view.file-open ~ .live-toggle:hover {
631+
.live-view.visible ~ .live-toggle:hover {
633632
width: 136px;
633+
transition-delay: .22s;
634+
}
635+
636+
.live-view.file-open ~ .live-toggle:hover {
634637
width: 97px;
635638
transition-delay: .22s;
636639
}
@@ -1123,14 +1126,18 @@ body:not(.mobile) .sidebar .header .title .branch-icon:active {
11231126
.sidebar .header .search-screen .clear {
11241127
opacity: 0;
11251128
pointer-events: none;
1126-
transition: none;
1129+
transition: .18s var(--ease-function) transform;
11271130
}
11281131

11291132
.sidebar .header .search-screen .clear.visible {
11301133
opacity: 1;
11311134
pointer-events: auto;
11321135
}
11331136

1137+
.sidebar .header:not(.searching) .search-screen .clear.visible {
1138+
transform: rotate(-45deg);
1139+
}
1140+
11341141

11351142
.sidebar .header.searching .roundbutton.add,
11361143
.sidebar .header.searching .title-screen {

full.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@
9292

9393
<div class="bookmark live-toggle">
9494
<div class="buttons">
95+
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" class="popout">
96+
<path d="M0 0h24v24H0z" fill="none"></path>
97+
<path d="M18 19H6c-.55 0-1-.45-1-1V6c0-.55.45-1 1-1h5c.55 0 1-.45 1-1s-.45-1-1-1H5c-1.11 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-6c0-.55-.45-1-1-1s-1 .45-1 1v5c0 .55-.45 1-1 1zM14 4c0 .55.45 1 1 1h2.59l-9.13 9.13c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L19 6.41V9c0 .55.45 1 1 1s1-.45 1-1V4c0-.55-.45-1-1-1h-5c-.55 0-1 .45-1 1z" fill="currentColor"></path>
98+
</svg>
9599
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" class="share">
96100
<path d="M0 0h24v24H0z" fill="none"></path>
97101
<path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92-1.31-2.92-2.92-2.92z" fill="currentColor"></path>
@@ -100,10 +104,6 @@
100104
<path d="M0 0h24v24H0z" fill="none"></path>
101105
<path d="M16.59,9H15V4c0-0.55-0.45-1-1-1h-4C9.45,3,9,3.45,9,4v5H7.41c-0.89,0-1.34,1.08-0.71,1.71l4.59,4.59 c0.39,0.39,1.02,0.39,1.41,0l4.59-4.59C17.92,10.08,17.48,9,16.59,9z M5,19c0,0.55,0.45,1,1,1h12c0.55,0,1-0.45,1-1s-0.45-1-1-1H6 C5.45,18,5,18.45,5,19z" fill="currentColor" class="left"></path>
102106
</svg>
103-
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" class="expand" style="display: none">
104-
<path d="M0 0h24v24H0z" fill="none"></path>
105-
<path d="M21,8.59V4c0-0.55-0.45-1-1-1h-4.59c-0.89,0-1.34,1.08-0.71,1.71l1.59,1.59l-10,10l-1.59-1.59C4.08,14.08,3,14.52,3,15.41 V20c0,0.55,0.45,1,1,1h4.59c0.89,0,1.34-1.08,0.71-1.71l-1.59-1.59l10-10l1.59,1.59C19.92,9.92,21,9.48,21,8.59z" fill="currentColor"></path>
106-
</svg>
107107
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" class="arrow">
108108
<path d="M0 0h24v24H0z" fill="none"></path>
109109
<path d="M8.7 15.9L4.8 12l3.9-3.9c.39-.39.39-1.01 0-1.4-.39-.39-1.01-.39-1.4 0l-4.59 4.59c-.39.39-.39 1.02 0 1.41l4.59 4.6c.39.39 1.01.39 1.4 0 .39-.39.39-1.01 0-1.4zm6.6 0l3.9-3.9-3.9-3.9c-.39-.39-.39-1.01 0-1.4.39-.39 1.01-.39 1.4 0l4.59 4.59c.39.39.39 1.02 0 1.41l-4.59 4.6c-.39.39-1.01.39-1.4 0-.39-.39-.39-1.01 0-1.4z" fill="currentColor" class="right"></path>

live-view/live-view.js

+36
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,42 @@ if (isMobile) {
605605
});
606606

607607
});
608+
609+
liveToggle.querySelector('.popout').addEventListener('click', () => {
610+
611+
// pop out live view to new window
612+
613+
614+
// get live view URL
615+
const liveViewURL = livePath +'?'+ workerClientId +'/';
616+
617+
// open a new window with live view URL
618+
window.open(liveViewURL, '_blank');
619+
620+
621+
// close inline live view
622+
623+
liveViewToggle = !liveViewToggle;
624+
625+
// clear live view
626+
liveView.innerHTML = '';
627+
628+
// show loader
629+
liveView.classList.remove('loaded');
630+
631+
632+
// don't transition live view
633+
liveView.classList.add('notransition');
634+
635+
// hide live view
636+
liveView.classList.remove('visible');
637+
638+
// restore transition on next frame
639+
onNextFrame(() => {
640+
liveView.classList.remove('notransition');
641+
});
642+
643+
});
608644

609645

610646
document.addEventListener('keydown', handleMetaP);

worker/client-channel.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
// update worker name when updating worker
7-
const WORKER_NAME = 'codeit-worker-v533';
7+
const WORKER_NAME = 'codeit-worker-v534';
88

99

1010
// internal paths

0 commit comments

Comments
 (0)