Cloudflare Git

Repos/herdr-appPublic

main
112 lines · 9.3 KBRaw
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>rail</title>
<script src="./support.js"></script>
</head>
<body>
<x-dc>
<helmet>
<style>
body{margin:0}
</style>
</helmet>
<div style="width: 340px; height: 900px; box-sizing: border-box; display: flex; gap: 40px; padding: 0 0 0 0; background: #141916; color: #d8ded6; font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif; font-size: 13px; overflow: hidden">

<!-- The rail, pointer on the first agent -->
<div style="width: 340px; flex: none; display: flex; flex-direction: column">
<div style="height: 40px; flex: none; display: flex; align-items: center; padding: 0 4px; color: #d8ded6; font-size: 12.5px">The rail: open and search up top, agents by space color, then spaces. Pointer on an agent shows its card.</div>
<div style="flex: 1; min-height: 0; display: flex; border: 1px solid #2a332e; border-radius: 10px; overflow: hidden; position: relative">
<div style="width: 76px; flex: none; display: flex; flex-direction: column; background: #171d1a; border-right: 1px solid #2a332e">
<div style="height: 44px; flex: none; display: flex; align-items: center; gap: 8px; padding-left: 13px"><div style="width: 12px; height: 12px; border-radius: 50%; flex: none; background: #ff5f57"></div><div style="width: 12px; height: 12px; border-radius: 50%; flex: none; background: #febc2e"></div><div style="width: 12px; height: 12px; border-radius: 50%; flex: none; background: #28c840"></div></div>
<div style="height: 34px; flex: none; display: flex; align-items: center; justify-content: center; gap: 4px">
<div style="{{btn}}"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="3" y="4" width="18" height="16" rx="2"></rect><path d="M9 4v16"></path><path d="M13 10l2 2-2 2"></path></svg></div>
<div style="{{btn}}"><svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="7"></circle><path d="M21 21l-4.3-4.3"></path></svg></div>
</div>
<div style="border-top: 1px solid #2a332e; padding: 10px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 4px">
<div style="font-size: 10.5px; color: #66726a; padding-bottom: 2px">Agents</div>
<sc-for list="{{agentsHover}}" as="a" hint-placeholder-count="2">
<div style="{{a.cell}}"><div style="position: relative"><div style="{{a.tile}}">{{a.letter}}</div><div style="{{a.badge}}"></div></div></div>
</sc-for>
</div>
<div style="flex: 1"></div>
<div style="border-top: 1px solid #2a332e; padding: 10px 0; display: flex; flex-direction: column; align-items: center; gap: 6px">
<div style="font-size: 10.5px; color: #66726a; padding-bottom: 2px">Spaces</div>
<div style="width: 56px; display: flex; flex-wrap: wrap; gap: 4px">
<sc-for list="{{spaces}}" as="s" hint-placeholder-count="8">
<div style="{{s.ring}}"><div style="{{s.tile}}">{{s.letter}}</div></div>
</sc-for>
</div>
<div style="width: 56px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #93a096">{{more}}</div>
</div>
<div style="border-top: 1px solid #2a332e; padding: 4px 0 8px; display: flex; flex-direction: column; align-items: center; color: #93a096">
<div style="height: 28px; display: flex; align-items: center"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1.1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1.1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9a1.7 1.7 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"></path></svg></div>
</div>
</div>
<div style="{{paneStyle}}"><div style="height: 30px; display: flex; align-items: center; padding: 0 12px; border-radius: 7px 0 0 7px; background: #2f3431; border: 1px solid #2a332e; border-right: none; font-size: 12.5px; color: #d8ded6; white-space: nowrap; overflow: hidden">Claude Code</div><div style="flex: 1; margin-top: 8px; border: 1px solid #66726a; border-right: none; border-radius: 10px 0 0 10px; background: #1a201d; padding: 14px 16px; font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: 12.5px; line-height: 20px; color: #b8c0b6; white-space: nowrap; overflow: hidden"><div>❯ mock up the rail</div><div style="color: #66726a">● Reading agents-activity</div></div></div>

<!-- space card: the pointer on aliasroute (row 2, right); the row's card opens past the right column, in its space's color -->
<div style="position: absolute; left: 66px; top: 703px; display: flex; align-items: center">
<div style="width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-right: 6px solid #e3814f; margin-right: -1px"></div>
<div style="padding: 5px 10px; border-radius: 8px; background: #e3814f; color: #fff; font-size: 13px; font-weight: 600; white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,.35)">aliasroute</div>
</div>

<!-- hover card, arrow pointing at the first agent tile (tile centre is 44 + 34 + 1 + 10 + 16 + 4 + 18 = 127px down) -->
<div style="position: absolute; left: 70px; top: 109px; display: flex; align-items: center">
<div style="width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-right: 6px solid #22a99a; margin-right: -1px"></div>
<div style="width: 236px; box-sizing: border-box; padding: 10px 12px; border-radius: 8px; background: #22a99a; color: #ffffff; box-shadow: 0 8px 24px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 6px">
<div style="display: flex; align-items: center; gap: 8px">
<div style="flex: none; padding: 1px 6px; border-radius: 4px; background: #e3b65f; color: #1a201d; font-size: 10.5px; font-weight: 600">Working</div><div style="font-size: 13px; font-weight: 600">development</div>
<div style="flex: 1"></div>
<div style="font-size: 11px; opacity: .8">2m</div>
</div>
<div style="font-size: 12px; line-height: 16px; opacity: .9">Mocking up the collapsed sidebar rail</div>
</div>
</div>
</div>
</div>

</div>
</x-dc>
<script type="text/x-dc" data-dc-script data-props='{"$preview":{"width":340,"height":900}}'>
class Component extends DCLogic {
renderVals() {
const ic = (d, s = 15) => '<svg width="' + s + '" height="' + s + '" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">' + d + '</svg>';
const tile = (color, px) => 'width: ' + px + 'px; height: ' + px + 'px; border-radius: ' + Math.round(px * 0.28) + 'px; background: ' + color + '; color: #fff; font-size: ' + Math.round(px * 0.56) + 'px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none';
const badge = (status) => {
  const base = 'position: absolute; right: -4px; bottom: -4px; width: 11px; height: 11px; border-radius: 50%; box-sizing: border-box; box-shadow: 0 0 0 2px #171d1a; ';
  if (status === 'working') return base + 'background: #e3b65f';
  if (status === 'done') return base + 'background: #93c47d';
  if (status === 'blocked') return base + 'background: #e2735f';
  return base + 'background: #171d1a; border: 1.5px solid #93a096';
};
const agentList = (hover) => [
  ['development', '#22a99a', 'working', true],
  ['herdr-app', '#09672e', 'idle', false],
].map(([name, color, status, shown], i) => ({
  letter: name[0].toUpperCase(),
  tile: tile(color, 24),
  badge: badge(status),
  cell: 'width: 44px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 8px' + (hover && i === 0 ? '; background: #2c312f; box-shadow: inset 0 0 0 1px #3c4640' : shown ? '; background: #2c312f' : ''),
}));
const spaceList = [["development","#22a99a",true],["herdr-app","#09672e",false],["flipd","#8e7699",false],["aliasroute","#e3814f",false],["reviewsteer","#5b8def",false],["nowtimer","#8b7cf6",false],["health-check","#3fae6a",false],["cloudflare-git","#d9649a",false],["docs-sftinc-app","#883c00",false],["voicebar","#792798",false],["claude-code-model-router","#977e0d",false],["snapzo","#ad215f",false]];
const dot = 'width: 12px; height: 12px; border-radius: 50%; flex: none';
return {
  btn: 'width: 26px; height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #93a096',
  agentsHover: agentList(true),
  // The last used 8; the rest behind the "+N" toggle.
  more: `+${spaceList.length - 8}`,
  spaces: spaceList.slice(0, 8).map(([n, c, active], i) => ({
    letter: n[0].toUpperCase(),
    tile: tile(c, 22),
    ring: 'padding: 2px; border-radius: 7px' + (active ? '; background: #2c312f' : i === 3 ? '; background: #3c4540; box-shadow: 0 0 0 3px #3c4540; border-radius: 7px' : ''),
  })),
  cardTile: tile('#22a99a', 20),
  paneStyle: 'flex: 1; min-width: 0; display: flex; flex-direction: column; background: #141916; padding: 8px 0 8px 10px',
};
}
}
</script>
</body>
</html>