Skip to content

A local-first multi-agent app development platform, built on PenguinHarness

14.8 KB
Raw Blame
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Weekly Glance — Lieflat Report Template · Palm Three Second</title>
<script src="https://cdn.jsdelivr.net/npm/chart.js@4"></script>
<script src="https://cdn.jsdelivr.net/npm/echarts@6/dist/echarts.min.js"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
<style>
  /* ═══════════════════════════════════════════════════════════════
     LIEFLAT REPORT TEMPLATE 12 · WEEKLY GLANCE
     场景:运营周报 dashboard 一页,读者只给不到 10 秒——按
           lieflat-charts/SKILL.md 第〇节的例外条款("用户明确要求
           Glance / dashboard / 周报 / 三秒快读时"),本模板直接走
           Glance 系,不走 Lupi/Basics 的发丝细读路线。不是因为这几个
           数据形状 Lupi 撑不住,是场合本身要三秒读完,用户也点名要
           Glance 的粗笔画质感——这条例外在 SKILL.md 里写得很明白。
     依赖说明:这是模板库里第一张、目前也是唯一一张挂 CDN 依赖的模板。
           库里其余模板都是纯 SVG、离线可开;这两张图来自 Chart.js 和
           ECharts,脚本标签原样照抄 glance-palm.html 画廊,没有联网
           时图表区会是空白。
     图表正本 = templates/color/glance-palm.html:
       图A  G5 Pictorial Bar    (ECharts pictorialBar)
       图B  G3 Chunky Bars      (Chart.js,补上"排名比较"这个数据
                                  形状缺口——G5 覆盖逐日计数,类目排名比较由 G3 承接)
     色板正本 = color-presets.js 的 PALM 一套,与模板 02 共用同一批
       色值,不新增色值。深绿 #43593B 当主墨,琥珀 #D4A017 当强调,
       浓咖 #58402E 当纸浆衬底;RAMP 五档梯(#F2D17E → #ACAD79 →
       #929960 → #77835A → #43593B)直接取自 glance-palm.html 脚本
       内的同名常量。
     排版参考:模板 02 的信纸垫底结构(浓咖衬底 + 纸张、全大写字距
       节标题 + 下划线、claim + 图 + srcline 三件套、页脚双栏)——只学
       骨架,栏位为这张仪表盘重排成 两张图区 + 顶部速览条。
     数据说明:全部为虚构演示数据,仅用于验证版式。
     ═══════════════════════════════════════════════════════════════ */
  :root{
    /* PALM preset roles(与模板 02 同一套) */
    --paper:#F0EFEB; --txt:#58402E;
    --mut:rgba(88,64,46,.60); --lab:rgba(88,64,46,.72);
    --faint:rgba(88,64,46,.32); --quiet:rgba(88,64,46,.15);
    --grid:rgba(88,64,46,.16);
    --data:#43593B; --data2:#58402E; --hero:#D4A017;
    --faintdata:#ACAD79; --bead:#77835A;
    --mat:#58402E;
    /* 暗卡专用(取自 glance-palm.html 的 --dmid/--dq,BG 的纸色透明档) */
    --dmid:rgba(240,239,235,.62); --dq:rgba(240,239,235,.24);
  }
  *{margin:0;padding:0;box-sizing:border-box}
  body{background:var(--mat);font-family:'Inter',sans-serif;color:var(--txt);
    -webkit-font-smoothing:antialiased;font-variant-numeric:tabular-nums lining-nums;
    display:flex;justify-content:center;padding:64px 32px}
  .sheet{width:1080px;max-width:1080px;background:var(--paper);padding:60px 68px 64px}

  /* ── 节标题:全大写 + 字距 + 底线(学模板 02) ── */
  .sect{font-size:13px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;
    padding-bottom:10px;border-bottom:2px solid var(--txt);margin-bottom:22px}
  .sect .yr{float:right;font-weight:600;color:var(--mut);letter-spacing:.1em}

  /* ── 顶部速览条:两个数,当天一句话就懂(学模板 02 的 .miles) ── */
  .miles{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-bottom:44px}
  .miles .m{padding:18px 16px 16px;position:relative}
  .miles .m.hero{background:var(--hero);color:var(--paper)}
  .miles .m.frame{border:1px solid var(--faint)}
  .miles .m.green{background:var(--data);color:var(--paper)}
  .miles .m .tag{font-size:8.5px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;opacity:.7}
  .miles .m .v{font-size:26px;font-weight:800;letter-spacing:-.03em;line-height:1;margin-top:6px}
  .miles .m .v small{font-size:12px;font-weight:700;margin-left:2px;text-transform:uppercase}
  .miles .m .l{font-size:10px;line-height:1.45;margin-top:7px;opacity:.85}

  /* ── 图区(复用模板 02 的 .duo,纵向再叠一份) ── */
  .duo{display:grid;grid-template-columns:1fr 1fr;gap:40px}
  .duo + .duo{margin-top:40px}

  /* ── 图卡:轻卡描边 ── */
  .gcard{padding:24px 26px 22px;border:1px solid var(--faint)}

  .sub{font-size:11px;color:var(--mut);margin-bottom:14px;line-height:1.55}
  .claim{font-size:13px;font-weight:700;margin-bottom:10px;line-height:1.45;letter-spacing:-.01em}
  .wrap{position:relative;height:280px}
  .ch{height:280px}
  svg text{font-family:'Inter',sans-serif}
  .srcline{font-size:9px;font-weight:600;letter-spacing:.11em;text-transform:uppercase;
    color:var(--faint);margin-top:10px;line-height:1.5}

  /* ── 页脚:数据说明 + CDN 依赖说明 + 落款(三栏,比模板 02 多一栏) ── */
  .foot{margin-top:52px;padding-top:16px;border-top:2px solid var(--txt);
    display:grid;grid-template-columns:1fr 1.55fr .85fr;gap:26px;
    font-size:9px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;color:var(--mut)}
  .foot .warn{color:var(--data);font-weight:700;line-height:1.55}
  .foot .warn small{display:block;font-weight:500;color:var(--mut);margin-top:4px;text-transform:none}
  .foot .dep{line-height:1.9}
  .foot .end{text-align:right;line-height:1.55}

  /* ── 动画(mono-tokens MOTION.css 原样) ── */
  .pop{transform-box:fill-box;transform-origin:center;animation:pop .5s cubic-bezier(.2,.7,.3,1.3) both}
  @keyframes pop{from{transform:scale(0)}to{transform:none}}
  .fade{animation:fade .9s ease both}
  @keyframes fade{from{opacity:0}}
  .draw{stroke-dasharray:1;stroke-dashoffset:1;animation:draw 1s cubic-bezier(.4,0,.2,1) both}
  @keyframes draw{to{stroke-dashoffset:0}}
  @media(max-width:640px){body{padding:24px 10px}}
  @media (prefers-reduced-motion:reduce){
    .pop,.fade{animation:none}
    .draw{animation:none;stroke-dasharray:none;stroke-dashoffset:0}
  }
</style>
</head>
<body>
<div class="sheet">

  <div class="sect">Loop weekly ops <span class="yr">Week 32 · Aug 3–9, 2026</span></div>

  <!-- ══ 顶部速览条:两个数,串起下面两张图 ══ -->
  <div class="miles">

    <div class="m frame">
      <div class="tag">Shipped this week</div>
      <div class="v">28<small>changes</small></div>
      <div class="l">Five workdays, added up</div>
    </div>
    <div class="m green">
      <div class="tag">Total tickets</div>
      <div class="v">293<small>tickets</small></div>
      <div class="l">Across four channels, this week</div>
    </div>
  </div>

  <!-- ══ 第二行:逐日计数 | 排名比较 ══ -->
  <div class="duo">
    <div class="gcard">
      <div class="sect" style="border-bottom-width:1px">Shipping pace climbed all week</div>
      <div class="sub">Changes shipped, workday by workday · Monday through Friday</div>
      <!-- 图A · G5 Pictorial Bar
           模板:templates/color/glance-palm.html · "Trees planted, year by year" -->
      <div class="claim">Friday shipped 9 changes, three times Monday's count.</div>
      <div class="ch" id="ship"></div>
      <div class="srcline">Pictorial bar · changes shipped per day (count) · one symbol = one change · amber to deep green tracks Monday through Friday</div>
    </div>

    <div class="gcard">
      <div class="sect" style="border-bottom-width:1px">Most tickets still arrive by email</div>
      <div class="sub">Tickets this week, by channel · 4 channels, 293 tickets</div>
      <!-- 图B · G3 Chunky Bars(补"排名比较"这个数据形状缺口)
           模板:templates/color/glance-palm.html · "Revenue by plan" -->
      <div class="claim">Email alone logged 186 tickets, more than the other three channels combined.</div>
      <div class="wrap"><canvas id="c3"></canvas></div>
      <div class="srcline">Chunky bars · tickets this week, by channel (count) · deep green = the busiest channel, lighter down the ranks</div>
    </div>
  </div>

  <div class="foot">
    <div class="warn">Demo data: every number on this page is fictional and doesn't stand in for any real product's metrics.
      <small>This page exists to check how the Glance chart family reads inside a report template.</small></div>
    <div class="dep">Dependency note: these two charts run on Chart.js and ECharts, the only template in this library that needs a CDN. Open it offline and the chart areas stay blank; reconnect and refresh to render them.</div>
    <div class="end">Loop · weekly ops one-pager<br>Data · internal dashboard (demo) · Lieflat Charts</div>
  </div>
</div>

<script>
/* ── PALM 角色 token(与 glance-palm.html 脚本内同名常量逐一对应,不新增色值) ── */
const BG='#F0EFEB',DARK='#58402E',TXT='#58402E';
const MUT='rgba(88,64,46,.60)',LAB='rgba(88,64,46,.72)',FAINT='rgba(88,64,46,.40)',QUIET='rgba(88,64,46,.15)',GRID='rgba(88,64,46,.16)';
const DATA='#43593B',DATA2='#58402E',HERO='#D4A017';
const HERODK='#F2D17E';
const FAINTDATA='#ACAD79';
const RAMP=['#F2D17E','#ACAD79','#929960','#77835A','#43593B'];
const INK=TXT,PAPER=BG,MUTED=MUT;
const rgb=h=>[0,2,4].map(i=>parseInt(h.slice(1).substr(i,2),16));
const alpha=(h,a)=>h[0]==='#'?'rgba('+rgb(h).join(',')+','+a+')':h;
const rankOf=a=>{const r=[...a].map((v,i)=>[v,i]).sort((x,y)=>y[0]-x[0]).map(d=>d[1]);
  return i=>r.indexOf(i)};
const rampAt=(i,n)=>i===0?RAMP[4]
  :RAMP[Math.max(0,Math.min(3,3-Math.round((i-1)/Math.max(1,n-2)*3)))];
const tipLight={backgroundColor:INK,borderWidth:0,textStyle:{color:PAPER,fontFamily:'Inter',fontSize:12},padding:[10,14]};

/* ── 统一 reveal 机制(滚入播 + 点击重播,与 glance-palm.html 一致) ── */
const timers={};
const obsReveal=(id,fn)=>{
  const el=document.getElementById(id);
  const go=()=>{(timers[id]||[]).forEach(clearInterval);timers[id]=[];fn(el)};
  const io=new IntersectionObserver(es=>{
    if(es[0].isIntersecting){go();io.disconnect()}
  },{threshold:.35});
  io.observe(el);
  el.style.cursor='pointer';
  el.addEventListener('click',go);
};
const keep=(id,t)=>{(timers[id]=timers[id]||[]).push(t)};
const eReveal=(id,opt)=>obsReveal(id,el=>{
  const g=echarts.getInstanceByDom(el)||echarts.init(el);
  g.clear();g.setOption(opt);
});
const cjs={};
const cReveal=(id,mkCfg)=>obsReveal(id,el=>{
  cjs[id]?.destroy();
  cjs[id]=new Chart(el,mkCfg());
});

Chart.defaults.color=MUT;
Chart.defaults.font.family='Inter';
Chart.defaults.font.size=10.5;
Chart.defaults.borderColor=GRID;
Chart.defaults.plugins.legend.display=false;
Chart.defaults.plugins.tooltip.backgroundColor=TXT;
Chart.defaults.plugins.tooltip.titleColor=BG;
Chart.defaults.plugins.tooltip.bodyColor=alpha(BG,.72);
Chart.defaults.plugins.tooltip.padding=12;
Chart.defaults.plugins.tooltip.cornerRadius=12;
Chart.defaults.plugins.tooltip.displayColors=false;

/* ════ 图A · G5 Pictorial Bar ════
   结构照搬 glance-palm.html "Trees planted, year by year":符号
   计数横条,原图 symbol 是树形,这里换成一个中性菱形——上线的是
   功能改动,不是树,符号形状不该借一个不相关的隐喻。 */
(()=>{
const SHIP='path://M14,0 L28,14 L14,28 L0,14 Z';
const DAYS5=['MON','TUE','WED','THU','FRI'];
const SHIPPED=[3,4,5,7,9];
eReveal('ship',{
  animationDuration:900,animationEasing:'quarticOut',animationDelay:i=>i*130,
  tooltip:{...tipLight,formatter:p=>p.name+' — '+SHIPPED[p.dataIndex]+' changes'},
  grid:{left:44,right:56,top:10,bottom:8},
  yAxis:{type:'category',data:DAYS5,inverse:true,
    axisLine:{show:false},axisTick:{show:false},
    axisLabel:{color:MUT,fontFamily:'Inter',fontSize:10.5,fontWeight:700}},
  xAxis:{show:false,max:10},
  series:[{
    type:'pictorialBar',symbol:SHIP,
    symbolRepeat:true,symbolSize:[15,15],symbolMargin:3,symbolClip:true,
    data:SHIPPED.map((v,i)=>({name:DAYS5[i],value:v,itemStyle:{color:RAMP[i]}})),
    label:{show:true,position:'right',offset:[8,0],
      color:TXT,fontFamily:'Inter',fontSize:12,fontWeight:700,
      formatter:p=>SHIPPED[p.dataIndex]},
    z:10,
  },{
    type:'pictorialBar',symbol:SHIP,
    symbolRepeat:'fixed',symbolSize:[15,15],symbolMargin:3,symbolClip:true,
    itemStyle:{color:QUIET},data:DAYS5.map(()=>10),silent:true,z:5,
  }],
});
})();

/* ════ 图B · G3 Chunky Bars(补"排名比较"这个数据形状缺口) ════
   结构照搬 glance-palm.html "Revenue by plan":粗胶囊柱 + 柱顶大字,
   颜色按 rampAt(排名,n) 走,排第一深绿,排最后最浅。 */
(()=>{
const CATS=['EMAIL','IN-APP','SLACK','TICKET FORM'];
const V=[186,54,31,22];
const rk=rankOf(V);
cReveal('c3',()=>({
  type:'bar',
  data:{labels:CATS,
    datasets:[{data:V,
      backgroundColor:V.map((_,i)=>rampAt(rk(i),V.length)),
      borderRadius:{topLeft:99,topRight:99},borderSkipped:false,barPercentage:.52}]},
  options:{
    maintainAspectRatio:false,
    animation:{duration:900,easing:'easeOutQuart',delay:c=>c.type==='data'?c.dataIndex*110:0},
    plugins:{tooltip:{callbacks:{label:i=>i.raw+' tickets'}}},
    scales:{
      x:{grid:{display:false},border:{display:false},ticks:{padding:8,font:{size:9,weight:600}}},
      y:{display:false,suggestedMax:220},
    },
  },
  plugins:[{
    id:'topValues',
    afterDatasetsDraw(chart){
      const {ctx}=chart;
      chart.getDatasetMeta(0).data.forEach((bar,i)=>{
        ctx.save();ctx.font="700 13px Inter";ctx.fillStyle=INK;ctx.textAlign='center';
        ctx.fillText(chart.data.datasets[0].data[i],bar.x,bar.y-10);ctx.restore();
      });
    },
  }],
}));
})();

addEventListener('resize',()=>{
  ['ship'].forEach(id=>echarts.getInstanceByDom(document.getElementById(id))?.resize());
});

</script>
<script>
/* ── fit-width:视口比版心窄时整页等比缩小,不重排 ──
   报告是一张版面,不是响应式网页。窄屏塌成单栏会得到一个
   设计时不存在的版式;等比缩小则保留构图,跟 PDF 的「适合宽度」一致。
   机制同模板 11。 */
(()=>{
  const sheet=document.querySelector('.sheet');
  const W=1080;
  const fit=()=>{
    const cs=getComputedStyle(document.body);
    const avail=document.documentElement.clientWidth
      -parseFloat(cs.paddingLeft)-parseFloat(cs.paddingRight);
    sheet.style.zoom=Math.min(1,avail/W);
  };
  fit();
  addEventListener('resize',fit);
})();
</script>
</body>
</html>