consent.html (7214B)
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>Consent mockup</title> 7 <link rel="stylesheet" href="./global.css" /> 8 <style> 9 .consent-page { 10 display: grid; 11 place-items: center; 12 min-height: 100vh; 13 padding: 0; 14 background-color: var(--surface); 15 } 16 17 .consent-card { 18 width: min(calc(100% - 2rem), 28rem); 19 padding: 2rem; 20 background: var(--surface); 21 } 22 23 .consent-card h1 { 24 margin: 0 0 0.5rem; 25 font-size: 1.5rem; 26 font-weight: 400; 27 line-height: 1.3; 28 } 29 30 .consent-note { 31 margin: 0; 32 color: var(--muted); 33 font-size: 0.875rem; 34 line-height: 1.6; 35 } 36 37 .consent-account { 38 display: flex; 39 align-items: center; 40 gap: 0.75rem; 41 margin-top: 1.5rem; 42 padding: 0.75rem; 43 background: var(--row); 44 } 45 46 .consent-account svg { 47 flex: none; 48 width: 1.5rem; 49 height: 1.5rem; 50 } 51 52 .consent-account-body { 53 display: grid; 54 gap: 0.125rem; 55 min-width: 0; 56 } 57 58 .consent-account-name { 59 font-size: 0.875rem; 60 font-weight: 500; 61 line-height: 1.4; 62 } 63 64 .consent-account-meta { 65 overflow-wrap: anywhere; 66 color: var(--muted); 67 font-size: 0.75rem; 68 line-height: 1.4; 69 } 70 71 .consent-account-link { 72 flex: none; 73 margin-left: auto; 74 padding: 0; 75 border: 0; 76 background: none; 77 color: var(--accent-text); 78 font: inherit; 79 font-size: 0.8125rem; 80 cursor: pointer; 81 } 82 83 .consent-account-link:hover { 84 color: var(--accent-text-hover); 85 } 86 87 .consent-account-link:active { 88 color: var(--accent-text-active); 89 } 90 91 .consent-section-title { 92 margin: 1.5rem 0 0; 93 font-size: 0.875rem; 94 font-weight: 500; 95 line-height: 1.5; 96 } 97 98 .consent-scopes { 99 display: grid; 100 gap: 0.5rem; 101 margin: 0.75rem 0 0; 102 padding: 0; 103 list-style: none; 104 } 105 106 .consent-scope { 107 display: flex; 108 align-items: flex-start; 109 gap: 0.5rem; 110 color: var(--muted); 111 font-size: 0.875rem; 112 line-height: 1.5; 113 } 114 115 .consent-scope svg { 116 flex: none; 117 width: 1rem; 118 height: 1rem; 119 margin-top: 0.125rem; 120 } 121 122 .consent-footer { 123 margin: 1.5rem 0 0; 124 color: var(--muted); 125 font-size: 0.8125rem; 126 line-height: 1.6; 127 } 128 129 .consent-actions { 130 display: flex; 131 flex-wrap: wrap; 132 justify-content: flex-end; 133 align-items: center; 134 gap: 1rem; 135 margin-top: 1.5rem; 136 } 137 138 .link-button { 139 padding: 0.5rem 0; 140 border: 0; 141 background: none; 142 color: var(--accent-text); 143 font: inherit; 144 font-size: 0.875rem; 145 cursor: pointer; 146 } 147 148 .link-button:hover { 149 color: var(--accent-text-hover); 150 } 151 152 .link-button:active { 153 color: var(--accent-text-active); 154 } 155 156 @media (min-width: 35em) { 157 .consent-page { 158 background-image: var(--hex); 159 background-position: center; 160 background-repeat: no-repeat; 161 background-size: cover; 162 } 163 164 .consent-card { 165 box-shadow: var(--shadow); 166 } 167 } 168 169 </style> 170 </head> 171 <body> 172 <main class="consent-page"> 173 <section class="consent-card" aria-labelledby="consent-title"> 174 <h1 id="consent-title">Authorize Acme Portal</h1> 175 <p class="consent-note"> 176 Acme Portal is requesting access to your Acme account. 177 </p> 178 179 <div class="consent-account"> 180 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 181 <circle cx="12" cy="12" r="10" /> 182 <circle cx="12" cy="10" r="3" /> 183 <path d="M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662" /> 184 </svg> 185 <span class="consent-account-body"> 186 <span class="consent-account-name">Demo User</span> 187 <span class="consent-account-meta">demo@example.com</span> 188 </span> 189 <button class="consent-account-link" type="button">Not you?</button> 190 </div> 191 192 <p class="consent-section-title">This will allow Acme Portal to:</p> 193 <ul class="consent-scopes"> 194 <li class="consent-scope"> 195 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 196 <path d="m5 12 5 5L20 7" /> 197 </svg> 198 <span>Sign you in with your Acme account.</span> 199 </li> 200 <li class="consent-scope"> 201 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 202 <path d="m5 12 5 5L20 7" /> 203 </svg> 204 <span>See your name and username.</span> 205 </li> 206 <li class="consent-scope"> 207 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"> 208 <path d="m5 12 5 5L20 7" /> 209 </svg> 210 <span>See your email address.</span> 211 </li> 212 </ul> 213 214 <p class="consent-footer"> 215 You can revoke access at any time from your account settings. 216 </p> 217 218 <div class="consent-actions"> 219 <button class="link-button" type="button">Deny</button> 220 <button class="button" type="button">Allow access</button> 221 </div> 222 </section> 223 </main> 224 225 <div class="mockup-controls" aria-label="Mockup theme"> 226 <span class="mockup-label">Mockup</span> 227 <button class="mockup-button is-active" type="button" data-theme-target="auto">Auto</button> 228 <button class="mockup-button" type="button" data-theme-target="light">Light</button> 229 <button class="mockup-button" type="button" data-theme-target="dark">Dark</button> 230 </div> 231 232 <script> 233 const root = document.documentElement; 234 const themeButtons = document.querySelectorAll('[data-theme-target]'); 235 236 function setTheme(value) { 237 if (value === 'auto') { 238 root.removeAttribute('data-theme'); 239 } else { 240 root.setAttribute('data-theme', value); 241 } 242 243 themeButtons.forEach((button) => { 244 button.classList.toggle('is-active', button.dataset.themeTarget === value); 245 }); 246 } 247 248 themeButtons.forEach((button) => { 249 button.addEventListener('click', () => setTheme(button.dataset.themeTarget)); 250 }); 251 252 const initialTheme = new URLSearchParams(window.location.search).get('theme'); 253 if (['auto', 'light', 'dark'].includes(initialTheme)) { 254 setTheme(initialTheme); 255 } 256 </script> 257 </body> 258 </html>