everytab/frontend/index.html

405 lines
11 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>EveryTab</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
:root {
--bg: #f0f0f4;
--tab-bg: #ffffff;
--tab-hover: #e8e8ed;
--tab-border: #cfcfd8;
--text: #15141a;
--text-muted: #5b5b66;
--viewer-bg: #f0f0f4;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #1c1b22;
--tab-bg: #2b2a33;
--tab-hover: #42414d;
--tab-border: #3a3944;
--text: #fbfbfe;
--text-muted: #8f8f9d;
--viewer-bg: #1c1b22;
}
}
body {
background: var(--bg);
overflow-x: hidden;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.tab-row {
display: flex;
width: max-content;
padding: 2px 0;
will-change: transform;
}
/* Firefox snaps transforms to device pixels (Bug 739176), causing
visible jitter. A no-op filter forces a different compositing path
that enables sub-pixel rendering during transform animations. */
.browser-firefox .tab-row {
filter: blur(0px);
}
.browser-firefox .tab-icon {
image-rendering: auto;
}
/* ── Base tab styles ── */
.tab {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 12px;
cursor: pointer;
flex-shrink: 0;
max-width: 200px;
min-width: 100px;
height: 36px;
transition: background 0.15s;
border: none;
background: transparent;
}
/* ── Linux Firefox (default) ── */
/* Inactive: transparent, small margin, rounded */
.tab {
border-radius: 6px;
margin: 0 1px;
}
/* Hover: pill-shaped background */
.tab:hover {
background: var(--tab-hover);
border-radius: 8px;
}
/* Selected: white bg, rounded top, connects to viewer below */
.tab-active,
.tab-active:hover {
background: var(--tab-bg);
border-radius: 8px 8px 0 0;
box-shadow: 0 1px 0 0 var(--tab-bg);
}
/* ── Chrome (Linux + Mac) ── */
/* Inactive: always inset dimensions, separator via ::before */
.browser-chrome .tab {
border-radius: 8px;
margin: 3px 2px;
padding: 3px 12px;
height: 30px;
position: relative;
}
.browser-chrome .tab::before {
content: "";
position: absolute;
left: -2px;
top: 25%;
height: 50%;
width: 1px;
background: var(--tab-border);
}
/* Hide separator on hover/active tab AND on the tab after hover/active */
.browser-chrome .tab:hover::before,
.browser-chrome .tab-active::before,
.browser-chrome .tab:hover + .tab::before,
.browser-chrome .tab-active + .tab::before {
background: transparent;
}
/* Hover: just add background (no layout change) */
.browser-chrome .tab:hover {
background: var(--tab-hover);
}
/* Selected: white bg, subtle shadow */
.browser-chrome .tab-active,
.browser-chrome .tab-active:hover {
background: var(--tab-bg);
box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.1);
}
/* ── Windows Chrome / Edge — rounded top only, more angular ── */
.os-windows.browser-chrome .tab,
.os-windows.browser-edge .tab {
border-radius: 0;
margin: 3px 2px;
padding: 3px 12px;
height: 30px;
position: relative;
}
.os-windows.browser-chrome .tab::before,
.os-windows.browser-edge .tab::before {
content: "";
position: absolute;
left: -2px;
top: 25%;
height: 50%;
width: 1px;
background: var(--tab-border);
}
.os-windows.browser-chrome .tab:hover::before,
.os-windows.browser-chrome .tab-active::before,
.os-windows.browser-chrome .tab:hover + .tab::before,
.os-windows.browser-chrome .tab-active + .tab::before,
.os-windows.browser-edge .tab:hover::before,
.os-windows.browser-edge .tab-active::before,
.os-windows.browser-edge .tab:hover + .tab::before,
.os-windows.browser-edge .tab-active + .tab::before {
background: transparent;
}
.os-windows.browser-chrome .tab:hover,
.os-windows.browser-edge .tab:hover {
background: var(--tab-hover);
border-radius: 8px 8px 0 0;
}
.os-windows.browser-chrome .tab-active,
.os-windows.browser-chrome .tab-active:hover,
.os-windows.browser-edge .tab-active,
.os-windows.browser-edge .tab-active:hover {
background: var(--tab-bg);
border-radius: 8px 8px 0 0;
box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.1);
}
/* ── Safari (Mac only) ── */
/* Compact, flat, evenly spaced, no icons on inactive tabs */
.browser-safari .tab {
border-radius: 6px;
margin: 0 1px;
height: 28px;
padding: 4px 10px;
min-width: 80px;
}
.browser-safari .tab:hover {
background: var(--tab-hover);
border-radius: 6px;
}
/* Selected: subtle white pill, show icon */
.browser-safari .tab-active,
.browser-safari .tab-active:hover {
background: var(--tab-bg);
border-radius: 6px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.tab-about .tab-title {
font-weight: 600;
}
.tab-icon {
width: 16px;
height: 16px;
flex-shrink: 0;
image-rendering: pixelated;
}
.tab-title {
font-size: 12px;
color: var(--text);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tab-external {
position: relative;
}
.tab-external::after {
content: "↗";
font-size: 9px;
color: var(--text-muted);
position: absolute;
top: 3px;
right: 4px;
}
/* Marquee animations (Chrome/Safari — Firefox uses JS in site.js) */
.tab-row.scroll-left {
animation: marquee-left var(--speed) linear infinite;
}
.tab-row.scroll-right {
animation: marquee-right var(--speed) linear infinite;
}
@keyframes marquee-left {
0% { transform: translateX(0); }
100% { transform: translateX(-50%); }
}
@keyframes marquee-right {
0% { transform: translateX(-50%); }
100% { transform: translateX(0); }
}
/* ── Inline iframe viewer ── */
.iframe-viewer {
width: 100%;
height: 75vh;
display: flex;
flex-direction: column;
}
.iframe-viewer.iframe-viewer-small {
height: 50vh;
}
/* Toolbar area (address bar) */
.iframe-toolbar {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 12px;
background: var(--tab-bg);
}
/* URL bar — rounded pill, looks like a browser address bar */
.iframe-urlbar {
flex: 1;
display: flex;
align-items: center;
gap: 8px;
padding: 10px 16px;
background: var(--bg);
border-radius: 24px;
min-width: 0;
}
/* Firefox: more rectangular address bar */
.browser-firefox .iframe-urlbar {
border-radius: 8px;
}
/* Safari: centered URL bar, more minimal */
.browser-safari .iframe-urlbar {
justify-content: center;
border-radius: 8px;
}
.iframe-urlbar .tab-icon {
flex-shrink: 0;
}
.iframe-urlbar .url-text {
font-size: 14px;
line-height: 1;
color: var(--text);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-decoration: none;
flex-shrink: 0;
}
.iframe-urlbar .url-text:hover {
text-decoration: underline;
}
.iframe-urlbar .url-title {
font-size: 12px;
line-height: 1;
color: var(--text-muted);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
text-align: right;
flex: 1;
min-width: 0;
}
@media (max-width: 640px) {
.iframe-urlbar .url-title {
display: none;
}
}
/* Title bar above address bar — hidden on desktop (title goes in urlbar) */
.iframe-titlebar {
display: none;
padding: 6px 12px 2px;
background: var(--tab-bg);
font-size: 13px;
color: var(--text);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
@media (max-width: 640px) {
.iframe-titlebar {
display: block;
text-align: center;
}
}
/* Paused marquee row */
.tab-row.paused {
animation-play-state: paused !important;
}
.iframe-close {
background: none;
border: none;
color: var(--text);
font-size: 16px;
cursor: pointer;
padding: 4px 8px;
border-radius: 50%;
line-height: 1;
}
.iframe-close:hover {
background: var(--tab-hover);
}
.iframe-viewer iframe {
width: 100%;
flex: 1;
border: none;
background: white;
}
#loading {
color: var(--text-muted);
text-align: center;
padding: 20px;
font-size: 14px;
}
</style>
</head>
<body>
<div id="tab-container"></div>
<div id="loading">Loading tabs...</div>
<script>const TOTAL_BUNDLES = 779;</script>
<script src="site.js"></script>
</body>
</html>