| 1 | <!DOCTYPE html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta charset="utf-8"> |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 6 | <title>Slides editor: tidy-up mockup</title> |
| 7 | <style> |
| 8 | :root{ |
| 9 | --bg:#f5f6f8; --canvas:#e1e5ee; --surface:#fff; --surface-2:#eceef2; --line:#d5d9e2; |
| 10 | --text:#262a33; --muted:#565c69; --faint:#626875; |
| 11 | --accent:#924b00; --accent-soft:#feece0; --paper:#f9f6ef; |
| 12 | --ui:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif; |
| 13 | } |
| 14 | *{box-sizing:border-box} |
| 15 | html,body{margin:0;height:100%;background:#1b1d22;font-family:var(--ui);color:var(--text)} |
| 16 | [hidden]{display:none!important} |
| 17 | .cap{height:44px;display:flex;align-items:center;gap:16px;padding:0 16px;color:#dfe2e8;font-size:14px} |
| 18 | .cap b{color:#fff} |
| 19 | .cap .tabs{margin-left:auto;display:flex;gap:6px} |
| 20 | .cap button{font:inherit;color:#dfe2e8;background:#2a2d35;border:1px solid #3a3e48;border-radius:6px;padding:5px 12px;cursor:pointer} |
| 21 | .cap button[aria-pressed=true]{background:#fff;color:#1b1d22;border-color:#fff} |
| 22 | .app{height:calc(100% - 44px);display:none} |
| 23 | .app.on{display:grid} |
| 24 | svg.i{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round} |
| 25 | |
| 26 | /* ---- the editor: bar, strip, canvas. The inspector floats over the canvas, as in Docs */ |
| 27 | .ed{position:relative;grid-template-rows:60px minmax(0,1fr);grid-template-columns:188px minmax(0,1fr)} |
| 28 | .bar{grid-column:1/-1;display:flex;align-items:center;gap:10px;padding:0 16px;background:var(--surface);border-bottom:1px solid var(--line)} |
| 29 | .logo{width:30px;height:30px;border-radius:8px;background:var(--accent);display:grid;place-items:center;color:#fff;font-size:14px;font-weight:700} |
| 30 | .title{font-weight:650;font-size:15.5px;line-height:1.25} |
| 31 | .menus{font-size:13px;color:var(--muted);display:flex;gap:13px} |
| 32 | .bar .sp{flex:1} |
| 33 | .saved{font-size:13px;color:var(--faint);margin-right:4px} |
| 34 | .hist{display:flex;background:var(--surface-2);border-radius:999px;padding:2px} |
| 35 | .hist span{width:32px;height:30px;display:grid;place-items:center;color:var(--faint)} |
| 36 | .btn{font:inherit;font-size:13.5px;font-weight:600;border-radius:999px;padding:8px 16px;border:1px solid var(--line);background:var(--surface);color:var(--text);cursor:pointer;display:inline-flex;align-items:center;gap:7px} |
| 37 | .btn.pri{background:var(--accent);border-color:var(--accent);color:#fff;box-shadow:0 1px 2px rgb(0 0 0/.18),0 3px 8px rgb(0 0 0/.12)} |
| 38 | .btn.fmt{border-color:transparent;background:var(--surface-2);color:var(--muted)} |
| 39 | .btn.fmt[aria-pressed=true]{background:var(--accent-soft);color:var(--accent)} |
| 40 | .btn.fmt svg{width:16px;height:16px} |
| 41 | .who{width:30px;height:30px;border-radius:50%;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;font-size:12px;font-weight:700} |
| 42 | |
| 43 | /* the strip: its own surface; New slide pinned at its foot */ |
| 44 | .strip{background:var(--surface);border-right:1px solid var(--line);display:grid;grid-template-rows:minmax(0,1fr) auto;min-height:0} |
| 45 | .strip ol{list-style:none;margin:0;padding:12px 12px 4px;overflow:auto;display:grid;gap:10px;align-content:start} |
| 46 | .strip li{display:grid;grid-template-columns:18px 1fr;gap:6px;align-items:start;font-size:12px;color:var(--faint)} |
| 47 | .th{aspect-ratio:16/9;background:var(--paper);border:1px solid var(--line);border-radius:5px;display:grid;place-items:center;text-align:center;padding:8px} |
| 48 | .th span{font:600 12px/1.15 Georgia,serif;color:#222} |
| 49 | li.cur .th{outline:2px solid var(--accent);outline-offset:1px} |
| 50 | .add{display:flex;padding:10px 12px;border-top:1px solid var(--line);background:var(--surface)} |
| 51 | .add .btn{padding:7px 12px} |
| 52 | .add .btn:first-child{flex:1;justify-content:center;border-radius:999px 0 0 999px} |
| 53 | .add .ico{width:38px;padding:7px 10px 7px 8px;border-radius:0 999px 999px 0;margin-left:-1px;justify-content:center} |
| 54 | .add .ico svg{width:12px;height:12px;stroke:var(--muted);fill:none;stroke-width:2.2} |
| 55 | |
| 56 | /* the canvas: Docs' grey desk */ |
| 57 | .desk{position:relative;background:var(--canvas);display:grid;grid-template-rows:auto minmax(0,1fr);min-width:0;min-height:0} |
| 58 | .tools{display:flex;align-items:center;gap:10px;padding:14px 20px 0} |
| 59 | .pill{display:flex;gap:2px;background:var(--surface);border:1px solid var(--line);border-radius:9px;padding:3px} |
| 60 | .pill button{font:inherit;min-width:34px;height:30px;padding:0 7px;border:0;border-radius:6px;background:none;color:var(--muted);cursor:pointer;display:grid;place-items:center} |
| 61 | .pill button[aria-pressed=true]{background:var(--accent-soft);color:var(--accent)} |
| 62 | .stage{display:flex;gap:28px;align-items:center;justify-content:center;padding:20px;min-height:0;overflow:auto} |
| 63 | .desk.carded .stage{padding-right:316px} |
| 64 | .slide{flex:0 1 760px;aspect-ratio:16/9;background:var(--paper);border-radius:3px;box-shadow:0 0 0 1px rgb(0 0 0/.08),0 1px 2px rgb(0 0 0/.12),0 10px 28px rgb(0 0 0/.10); |
| 65 | display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:48px;text-align:center;min-width:0} |
| 66 | .slide h1{margin:0;font:700 clamp(22px,3.2vw,44px)/1.08 Georgia,serif;color:#1d1b17;padding:2px 6px;border-radius:2px;cursor:text} |
| 67 | .slide p{margin:0;font-size:clamp(12px,1.45vw,20px);line-height:1.3;color:#2a2823;max-width:28ch;padding:2px 6px;border-radius:2px;cursor:text} |
| 68 | .slide .sel{outline:2px solid var(--accent)} |
| 69 | .phone{flex:none;height:min(100%,560px);aspect-ratio:9/19.5;background:var(--paper);border-radius:22px;box-shadow:0 0 0 1px rgb(0 0 0/.1),0 0 0 6px #fff,0 0 0 7px rgb(0 0 0/.12),0 12px 28px rgb(0 0 0/.12); |
| 70 | padding:26px 16px;display:flex;flex-direction:column;gap:10px;text-align:center;overflow:hidden} |
| 71 | .phone{gap:0} |
| 72 | .phone h1{margin:0;font:700 19px/1.12 Georgia,serif;color:#1d1b17} |
| 73 | .phone h2{margin:0;font:700 16px/1.15 Georgia,serif;color:#1d1b17} |
| 74 | .phone p{margin:8px 0 0;font-size:12.5px;line-height:1.4;color:#2a2823} |
| 75 | /* on a phone a deck reads as a document: this slide, then the ones after it (dimmed here: they are not the one being edited) */ |
| 76 | .pcur{padding-bottom:22px;outline:2px solid transparent} |
| 77 | /* letterboxed: the 16:9 slide, whole, scaled to the phone's width and centred */ |
| 78 | .phone:has(.pfit:not([hidden])),.phone:has(.pown:not([hidden])){padding:0} |
| 79 | .pfit{height:100%;display:grid;align-content:center;background:#17181c} |
| 80 | .mini{aspect-ratio:16/9;background:var(--paper);display:grid;align-content:center;justify-items:center;gap:5px;padding:12px;text-align:center} |
| 81 | .mini b{font:700 14px/1.1 Georgia,serif;color:#1d1b17} |
| 82 | .mini span{font-size:12px;line-height:1.35;color:#2a2823;max-width:24ch} |
| 83 | /* arranged: a tall page of its own, each box placed for the phone */ |
| 84 | .pown{position:relative;height:100%} |
| 85 | .pown .placed{position:absolute;left:18px;right:18px;margin:0;outline:1.5px dashed rgb(146 75 0/.55);outline-offset:5px;border-radius:2px} |
| 86 | .pown h1.placed{top:24%;font-size:30px;line-height:1.05;text-align:left} |
| 87 | .pown p.placed{top:58%;font-size:15px;line-height:1.4;text-align:left} |
| 88 | .pnext{padding:20px 0;border-top:1px solid rgb(0 0 0/.12);opacity:.45} |
| 89 | |
| 90 | /* the notes: a floating card at the foot of the canvas, like the inspector's; |
| 91 | closed, one small icon in the canvas's corner */ |
| 92 | .notes{position:absolute;left:20px;right:20px;bottom:16px;z-index:3;background:var(--surface);border-radius:14px; |
| 93 | box-shadow:0 0 0 1px rgb(0 0 0/.06),0 2px 6px rgb(0 0 0/.08),0 14px 34px rgb(0 0 0/.14)} |
| 94 | .desk.carded .notes{right:316px} |
| 95 | .notes.shut{display:none} |
| 96 | .notes .grip{height:10px;cursor:ns-resize;display:grid;place-items:center} |
| 97 | .notes .grip::before{content:"";width:36px;height:3px;border-radius:2px;background:var(--line)} |
| 98 | .notes .nh{display:flex;align-items:center;gap:8px;padding:2px 8px 4px 16px;font-size:12.5px;font-weight:650;color:var(--muted)} |
| 99 | .notes .nh button{margin-left:auto;width:30px;height:28px;border:0;border-radius:8px;background:none;color:var(--muted);cursor:pointer;display:grid;place-items:center} |
| 100 | .notes .nh button:hover{background:var(--surface-2)} |
| 101 | .notes .nh svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round} |
| 102 | .notes .nb{padding:0 16px 14px;font-size:14.5px;line-height:1.5;height:76px;overflow:auto} |
| 103 | .desk.noted .stage{padding-bottom:152px} |
| 104 | .nchip{position:absolute;left:20px;bottom:16px;width:40px;height:40px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--muted); |
| 105 | cursor:pointer;display:grid;place-items:center;box-shadow:0 1px 2px rgb(0 0 0/.08),0 4px 12px rgb(0 0 0/.08)} |
| 106 | .nchip i{position:absolute;right:-4px;top:-4px;width:11px;height:11px;border-radius:50%;background:var(--accent);border:2px solid var(--canvas)} |
| 107 | |
| 108 | /* the inspector: Docs' floating card. One thing at a time, by what is selected; |
| 109 | it stops short of the foot of the canvas and scrolls inside itself */ |
| 110 | .card{position:absolute;right:16px;top:16px;z-index:4;width:284px;max-height:calc(100% - 32px);overflow:auto;background:var(--surface); |
| 111 | border-radius:14px;padding:14px 14px 16px;display:grid;gap:14px;box-shadow:0 0 0 1px rgb(0 0 0/.06),0 2px 6px rgb(0 0 0/.08),0 14px 34px rgb(0 0 0/.14)} |
| 112 | .g{display:grid;gap:7px} |
| 113 | .g > label{font-size:12.5px;font-weight:650;color:var(--muted)} |
| 114 | .sel-box{height:34px;border:1px solid var(--line);border-radius:8px;display:flex;align-items:center;justify-content:space-between;padding:0 10px;font-size:13.5px;color:var(--text);background:var(--surface)} |
| 115 | .sel-box::after{content:"";width:7px;height:7px;border-right:1.8px solid var(--muted);border-bottom:1.8px solid var(--muted);transform:rotate(45deg) translateY(-2px)} |
| 116 | .two{display:grid;grid-template-columns:1fr 84px;gap:8px} |
| 117 | .seg{display:flex;gap:2px;border-radius:8px;overflow:hidden} |
| 118 | .seg span{flex:1;min-height:34px;padding:6px 8px;display:grid;place-items:center;text-align:center;font-size:13px;color:var(--text);background:var(--surface-2)} |
| 119 | .seg span.on{background:var(--accent-soft);color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);border-radius:8px 0 0 8px;font-weight:600} |
| 120 | .seg span.on:not(:first-child){border-radius:0} |
| 121 | .seg span.on:last-child{border-radius:0 8px 8px 0} |
| 122 | #ph span{font-size:12.5px;padding:6px 4px;cursor:pointer} |
| 123 | .seg b{font:700 15px Georgia,serif}.seg em{font:italic 15px Georgia,serif} |
| 124 | .sw{height:34px;border:1px solid var(--line);border-radius:8px;padding:4px;display:flex} |
| 125 | .sw i{flex:1;border-radius:5px;background:var(--accent)} |
| 126 | .rule{height:1px;background:var(--line);margin:2px -14px} |
| 127 | |
| 128 | /* the layout picker: opens upward from the chevron beside New slide */ |
| 129 | .lay{position:absolute;left:12px;bottom:58px;z-index:5;width:336px;padding:12px;background:var(--surface);border-radius:12px; |
| 130 | box-shadow:0 0 0 1px rgb(0 0 0/.06),0 2px 6px rgb(0 0 0/.1),0 14px 36px rgb(0 0 0/.16);display:grid;grid-template-columns:repeat(2,1fr);gap:10px} |
| 131 | .lay h2{grid-column:1/-1;margin:0 0 2px;font-size:12.5px;font-weight:650;color:var(--muted)} |
| 132 | .lay button{font:inherit;font-size:12.5px;color:var(--text);background:none;border:1px solid transparent;border-radius:8px;padding:6px;cursor:pointer;display:grid;gap:6px;text-align:left} |
| 133 | .lay button.next{border-color:var(--accent);background:var(--accent-soft)} |
| 134 | .lay svg{width:100%;aspect-ratio:16/9;background:var(--paper);border:1px solid var(--line);border-radius:4px;fill:#3a3731;stroke:none} |
| 135 | .lay svg .q{fill:#b9b4a8} |
| 136 | |
| 137 | /* ---- the deck list */ |
| 138 | .list{grid-template-rows:60px minmax(0,1fr)} |
| 139 | .decks{background:var(--canvas);padding:44px 120px;overflow:auto} |
| 140 | .decks h1{margin:0 0 28px;font-size:34px;letter-spacing:-.02em} |
| 141 | .dk{width:250px} |
| 142 | .dk .th{border-radius:8px;box-shadow:0 1px 2px rgb(0 0 0/.08),0 6px 18px rgb(0 0 0/.07);padding:12px} |
| 143 | .dk .th span{font-size:15px} |
| 144 | .dk .th small{display:block;margin-top:5px;font:400 12px/1.3 var(--ui);color:#333} |
| 145 | .dk h2{margin:12px 0 2px;font-size:14.5px} |
| 146 | .dk p{margin:0;font-size:12.5px;color:var(--muted);line-height:1.5} |
| 147 | </style> |
| 148 | </head> |
| 149 | <body> |
| 150 | <div class="cap"> |
| 151 | <span><b>Slides editor, tidied.</b> New: “On a phone” in the Slide card (Document, Letterboxed, Arranged). Click each to see the phone change.</span> |
| 152 | <span class="tabs"><button data-tab="ed" aria-pressed="true">Editor</button><button data-tab="list" aria-pressed="false">Deck list</button></span> |
| 153 | </div> |
| 154 | |
| 155 | <div class="app ed on" id="ed"> |
| 156 | <header class="bar"> |
| 157 | <div class="logo">S</div> |
| 158 | <div><div class="title">Welcome to Slides</div><div class="menus"><span>File</span><span>Edit</span><span>Insert</span><span>Slide</span><span>View</span><span>Help</span></div></div> |
| 159 | <span class="sp"></span><span class="saved">Saved</span> |
| 160 | <div class="hist"><span><svg class="i" viewBox="0 0 24 24"><path d="M9 14 4 9l5-5M4 9h10a6 6 0 0 1 0 12h-3"/></svg></span><span><svg class="i" viewBox="0 0 24 24"><path d="m15 14 5-5-5-5M20 9H10a6 6 0 0 0 0 12h3"/></svg></span></div> |
| 161 | <button class="btn fmt" id="fmt" aria-pressed="true"><svg class="i" viewBox="0 0 24 24"><path d="M4 20h4L19 9l-4-4L4 16zM13 7l4 4"/></svg>Format</button> |
| 162 | <button class="btn">Share…</button><button class="btn pri">Present</button> |
| 163 | <div class="who">P</div> |
| 164 | </header> |
| 165 | |
| 166 | <nav class="strip"> |
| 167 | <ol> |
| 168 | <li class="cur">1<div class="th"><span>Welcome to hello Slides</span></div></li> |
| 169 | <li>2<div class="th"><span>One idea a slide</span></div></li> |
| 170 | <li>3<div class="th"><span>Two columns</span></div></li> |
| 171 | <li>4<div class="th"><span>A picture</span></div></li> |
| 172 | <li>5<div class="th"><span>A quote</span></div></li> |
| 173 | <li>6<div class="th"><span>A list</span></div></li> |
| 174 | <li>7<div class="th"><span>Canvas</span></div></li> |
| 175 | <li>8<div class="th"><span>Thank you</span></div></li> |
| 176 | </ol> |
| 177 | <div class="add"><button class="btn">+ New slide</button><button class="btn ico" id="laybtn" title="Choose a layout" aria-label="Choose a layout"><svg viewBox="0 0 12 12"><path d="M2 4l4 4 4-4"/></svg></button></div> |
| 178 | </nav> |
| 179 | |
| 180 | <div class="lay" id="lay" hidden><h2>Choose a layout</h2> |
| 181 | <button><svg viewBox="0 0 80 45" aria-hidden="true"><rect x="18" y="19" width="44" height="6" rx="1"/><rect class="q" x="26" y="29" width="28" height="3" rx="1"/></svg>Title</button> |
| 182 | <button class="next"><svg viewBox="0 0 80 45" aria-hidden="true"><rect x="8" y="7" width="34" height="5" rx="1"/><rect class="q" x="8" y="17" width="60" height="3" rx="1"/><rect class="q" x="8" y="23" width="54" height="3" rx="1"/><rect class="q" x="8" y="29" width="58" height="3" rx="1"/></svg>Title and text</button> |
| 183 | <button><svg viewBox="0 0 80 45" aria-hidden="true"><rect x="8" y="7" width="34" height="5" rx="1"/><circle cx="10" cy="18.5" r="1.5"/><rect class="q" x="15" y="17" width="48" height="3" rx="1"/><circle cx="10" cy="24.5" r="1.5"/><rect class="q" x="15" y="23" width="42" height="3" rx="1"/><circle cx="10" cy="30.5" r="1.5"/><rect class="q" x="15" y="29" width="46" height="3" rx="1"/></svg>Title and list</button> |
| 184 | <button><svg viewBox="0 0 80 45" aria-hidden="true"><rect x="8" y="7" width="34" height="5" rx="1"/><rect class="q" x="8" y="17" width="29" height="3" rx="1"/><rect class="q" x="8" y="23" width="26" height="3" rx="1"/><rect class="q" x="43" y="17" width="29" height="3" rx="1"/><rect class="q" x="43" y="23" width="25" height="3" rx="1"/></svg>Two columns</button> |
| 185 | <button><svg viewBox="0 0 80 45" aria-hidden="true"><rect x="8" y="19" width="40" height="7" rx="1"/></svg>Section</button> |
| 186 | <button><svg viewBox="0 0 80 45" aria-hidden="true"><rect class="q" x="0" y="0" width="80" height="45"/><rect x="8" y="33" width="30" height="5" rx="1"/></svg>Picture</button> |
| 187 | <button><svg viewBox="0 0 80 45" aria-hidden="true"><rect x="14" y="14" width="52" height="4" rx="1"/><rect x="14" y="21" width="44" height="4" rx="1"/><rect class="q" x="14" y="30" width="20" height="3" rx="1"/></svg>Quote</button> |
| 188 | <button><svg viewBox="0 0 80 45" aria-hidden="true"></svg>Blank</button> |
| 189 | </div> |
| 190 | |
| 191 | <main class="desk carded noted" id="deskpane"> |
| 192 | <div class="tools"> |
| 193 | <div class="pill"> |
| 194 | <button data-view="desktop" aria-pressed="true" title="Desktop" aria-label="Desktop"><svg class="i" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="12" rx="2"/><path d="M8 20h8M12 16v4"/></svg></button> |
| 195 | <button data-view="phone" aria-pressed="false" title="Phone" aria-label="Phone"><svg class="i" viewBox="0 0 24 24"><rect x="7" y="2.5" width="10" height="19" rx="2.5"/><path d="M11 18.5h2"/></svg></button> |
| 196 | <button data-view="both" aria-pressed="false" title="Both, side by side" aria-label="Both, side by side"><svg class="i" style="width:23px" viewBox="0 0 30 24"><rect x="2" y="5" width="16" height="11" rx="2"/><path d="M6 20h8M10 16v4"/><rect x="21" y="7" width="7" height="13" rx="1.8"/></svg></button> |
| 197 | </div> |
| 198 | </div> |
| 199 | <div class="stage" id="stage"> |
| 200 | <section class="slide" id="desk"><h1 data-block="Heading">Welcome to hello Slides</h1><p data-block="Text">Eight slides that show what a deck is made of. Open the notes on each one.</p></section> |
| 201 | <section class="phone" id="phone" hidden> |
| 202 | <div class="pv" data-pv="doc"><div class="pcur"><h1>Welcome to hello Slides</h1><p>Eight slides that show what a deck is made of. Open the notes on each one.</p></div> |
| 203 | <div class="pnext"><h2>One idea a slide</h2><p>A heading and a few lines under it. On a phone the slides follow one another, like a document.</p></div> |
| 204 | <div class="pnext"><h2>Two columns</h2><p>Side by side on a desktop. One after the other here.</p></div> |
| 205 | <div class="pnext"><h2>A picture</h2><p>Full width, with its caption under it.</p></div></div> |
| 206 | <div class="pv pfit" data-pv="fit" hidden><div class="mini"><b>Welcome to hello Slides</b><span>Eight slides that show what a deck is made of. Open the notes on each one.</span></div></div> |
| 207 | <div class="pv pown" data-pv="own" hidden><h1 class="placed">Welcome to hello Slides</h1><p class="placed">Eight slides that show what a deck is made of. Open the notes on each one.</p></div> |
| 208 | </section> |
| 209 | </div> |
| 210 | |
| 211 | <!-- the floating inspector: one of three, by what is selected --> |
| 212 | <aside class="card" id="card"> |
| 213 | <div id="c-box" hidden style="display:grid;gap:14px"> |
| 214 | <div class="g"><label>Style</label><div class="sel-box" id="style">Title</div> |
| 215 | <div class="two"><div class="sel-box" id="font">Theme’s heading</div><div class="sel-box" id="size">Large</div></div></div> |
| 216 | <div class="g"><label>Text</label><div class="seg"><span><b>B</b></span><span><em>I</em></span><span data-for="Text"><></span><span data-for="Text"><svg class="i" viewBox="0 0 24 24"><path d="M4 20h7M14 4l6 6-8 8H8v-4z"/></svg></span><span><svg class="i" viewBox="0 0 24 24"><path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1"/></svg></span></div></div> |
| 217 | <div class="g"><label>Alignment</label><div class="seg"><span><svg class="i" viewBox="0 0 24 24"><path d="M4 6h16M4 12h10M4 18h14"/></svg></span><span class="on"><svg class="i" viewBox="0 0 24 24"><path d="M4 6h16M7 12h10M5 18h14"/></svg></span><span><svg class="i" viewBox="0 0 24 24"><path d="M4 6h16M10 12h10M6 18h14"/></svg></span></div></div> |
| 218 | <div class="g"><label>Colour</label><div class="sw"><i style="background:#1d1b17"></i></div></div> |
| 219 | <div class="g"><label>Appears</label><div class="seg"><span class="on">With the slide</span><span>On a press</span></div></div> |
| 220 | </div> |
| 221 | <div id="c-slide" style="display:grid;gap:14px"> |
| 222 | <div class="g"><label>Slide</label><div class="sel-box">Title</div><div class="seg"><span class="on">Flow</span><span>Canvas</span></div></div> |
| 223 | <div class="g"><label>Background</label><div class="sel-box">Theme’s</div></div> |
| 224 | <div class="g"><label>In the talk</label><div class="seg"><span class="on">Always</span><span>Full mode only</span></div></div> |
| 225 | <div class="g"><label>On a phone</label><div class="seg" id="ph"><span class="on" data-ph="doc">Document</span><span data-ph="fit">Letterboxed</span><span data-ph="own">Arranged</span></div></div> |
| 226 | <div class="rule"></div> |
| 227 | <div class="g"><label>Deck</label><div class="sel-box">Paper</div><div class="two"><div class="sel-box">Theme’s heading</div><div class="sw"><i></i></div></div></div> |
| 228 | </div> |
| 229 | </aside> |
| 230 | |
| 231 | <section class="notes" id="notes"> |
| 232 | <div class="grip" title="Drag to resize"></div> |
| 233 | <div class="nh">Notes<button id="nshut" title="Close notes" aria-label="Close notes"><svg viewBox="0 0 14 14"><path d="M3 3l8 8M11 3l-8 8"/></svg></button></div> |
| 234 | <div class="nb">The <b>title</b> template: one heading and one supporting line, centred. It is what a new deck opens on.</div> |
| 235 | </section> |
| 236 | <button class="nchip" id="nchip" hidden title="Show notes (this slide has notes)" aria-label="Show notes"><svg class="i" viewBox="0 0 24 24"><path d="M5 4h14v12H10l-5 4z"/><path d="M9 8.5h6M9 11.5h4"/></svg><i></i></button> |
| 237 | </main> |
| 238 | </div> |
| 239 | |
| 240 | <div class="app list" id="list"> |
| 241 | <header class="bar"><div class="logo">S</div><div class="title">Slides</div><span class="sp"></span><button class="btn pri">+ New deck</button><div class="who">P</div></header> |
| 242 | <div class="decks"> |
| 243 | <h1>Decks</h1> |
| 244 | <div class="dk"> |
| 245 | <div class="th"><div><span>Welcome to hello Slides</span><small>Eight slides that show what a deck is made of.</small></div></div> |
| 246 | <h2>Welcome to Slides</h2><p>2 days ago<br>8 slides · by paul@tito.io</p> |
| 247 | </div> |
| 248 | </div> |
| 249 | </div> |
| 250 | |
| 251 | <script> |
| 252 | const $ = id => document.getElementById(id); |
| 253 | document.querySelectorAll('[data-tab]').forEach(b => b.onclick = () => { |
| 254 | document.querySelectorAll('[data-tab]').forEach(x => x.setAttribute('aria-pressed', x === b)); |
| 255 | document.querySelectorAll('.app').forEach(a => a.classList.toggle('on', a.id === b.dataset.tab)); |
| 256 | }); |
| 257 | // the view: desktop, phone or both side by side; one of the three |
| 258 | document.querySelectorAll('[data-view]').forEach(b => b.onclick = () => { |
| 259 | document.querySelectorAll('[data-view]').forEach(x => x.setAttribute('aria-pressed', String(x === b))); |
| 260 | $('desk').hidden = b.dataset.view === 'phone'; $('phone').hidden = b.dataset.view === 'desktop'; |
| 261 | }); |
| 262 | // on a phone, this slide reads as a document, is letterboxed, or has an arrangement of its own |
| 263 | document.querySelectorAll('[data-ph]').forEach(b => b.onclick = () => { |
| 264 | document.querySelectorAll('[data-ph]').forEach(x => x.classList.toggle('on', x === b)); |
| 265 | document.querySelectorAll('[data-pv]').forEach(x => { x.hidden = x.dataset.pv !== b.dataset.ph; }); |
| 266 | if ($('phone').hidden) document.querySelector('[data-view=both]').click(); |
| 267 | }); |
| 268 | // notes fold to an icon |
| 269 | const notes = open => { $('notes').classList.toggle('shut', !open); $('nchip').hidden = open; $('deskpane').classList.toggle('noted', open); }; |
| 270 | $('nshut').onclick = () => notes(false); |
| 271 | $('nchip').onclick = () => notes(true); |
| 272 | // the layouts |
| 273 | $('laybtn').onclick = e => { e.stopPropagation(); $('lay').hidden = !$('lay').hidden; }; |
| 274 | document.addEventListener('click', e => { if (!$('lay').contains(e.target)) $('lay').hidden = true; }); |
| 275 | // Format shows and hides the card, as in Docs |
| 276 | $('fmt').onclick = () => { |
| 277 | const on = $('fmt').getAttribute('aria-pressed') !== 'true'; |
| 278 | $('fmt').setAttribute('aria-pressed', String(on)); $('card').hidden = !on; $('deskpane').classList.toggle('carded', on); |
| 279 | }; |
| 280 | // the card follows the selection: a box's own options, or the slide's and the deck's |
| 281 | const KIND = { Heading: ['Title', 'Theme’s heading', 'Large'], Text: ['Body text', 'Theme’s body', 'Large'] }; |
| 282 | const select = el => { |
| 283 | document.querySelectorAll('.sel').forEach(x => x.classList.remove('sel')); |
| 284 | $('c-box').hidden = !el; $('c-slide').hidden = !!el; |
| 285 | if (!el) return; |
| 286 | el.classList.add('sel'); |
| 287 | const [style, font, size] = KIND[el.dataset.block]; |
| 288 | $('style').textContent = style; $('font').textContent = font; $('size').textContent = size; |
| 289 | document.querySelectorAll('#c-box [data-for]').forEach(x => { x.hidden = x.dataset.for !== el.dataset.block; }); |
| 290 | }; |
| 291 | document.querySelectorAll('[data-block]').forEach(el => el.onclick = e => { e.stopPropagation(); select(el); }); |
| 292 | $('stage').onclick = () => select(null); |
| 293 | $('card').onclick = e => e.stopPropagation(); |
| 294 | $('notes').onclick = e => e.stopPropagation(); |
| 295 | </script> |
| 296 | </body> |
| 297 | </html> |
| 298 | |