Comment: | Use included SVG icons on homepage as well, so we can change the SVG colors |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | dev |
Files: | files | file ages | folders |
SHA3-256: |
88e0e306c47fadf9e1698a6d07752b64 |
User & Date: | bohwaz on 2023-02-03 17:32:16 |
Other Links: | branch diff | manifest | tags |
2023-02-03
| ||
17:41 | Add missing CSS rule for coloring some SVG icons check-in: e8cbdf847d user: bohwaz tags: dev | |
17:32 | Use included SVG icons on homepage as well, so we can change the SVG colors check-in: 88e0e306c4 user: bohwaz tags: dev | |
14:27 | Use current text color for svg color check-in: 50e4d9e862 user: bohwaz tags: dev | |
Modified src/include/lib/Garradin/UserTemplate/CommonFunctions.php from [bc6f2d4af1] to [7e0181f539].
︙ | ︙ | |||
299 300 301 302 303 304 305 | } return $out; } static public function icon(array $params): string { | | > > > > > > > > > > > | | > | | > > > > > > > | > > > > > > > > > > > > > > > > < < < | < | | 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 | } return $out; } static public function icon(array $params): string { if (isset($params['shape']) && isset($params['html']) && $params['html'] == false) { return Utils::iconUnicode($params['shape']); } if (!isset($params['shape']) && !isset($params['url'])) { throw new \InvalidArgumentException('Missing parameter: shape or url'); } $html = ''; if (isset($params['url'])) { $html = self::getIconHTML(['icon' => $params['url']]); unset($params['url']); } $html .= htmlspecialchars($params['label'] ?? ''); unset($params['label']); self::setIconAttribute($params); $attributes = array_diff_key($params, ['shape']); $attributes = array_map(fn($v, $k) => sprintf('%s="%s"', $k, htmlspecialchars($v)), $attributes, array_keys($attributes)); $attributes = implode(' ', $attributes); return sprintf('<span %s>%s</span>', $attributes, $html); } static public function link(array $params): string { $href = $params['href']; $label = $params['label']; $prefix = $params['prefix'] ?? ''; // href can be prefixed with '!' to make the URL relative to ADMIN_URL if (substr($href, 0, 1) == '!') { $href = ADMIN_URL . substr($params['href'], 1); } // propagate _dialog param if we are in an iframe if (isset($_GET['_dialog']) && !isset($params['target'])) { $href .= (strpos($href, '?') === false ? '?' : '&') . '_dialog'; } if (!isset($params['class'])) { $params['class'] = ''; } unset($params['href'], $params['label'], $params['prefix']); array_walk($params, function (&$v, $k) { $v = sprintf('%s="%s"', $k, htmlspecialchars($v)); }); $params = implode(' ', $params); return sprintf('<a href="%s" %s>%s<span>%s</span></a>', htmlspecialchars($href), $params, $prefix, htmlspecialchars($label)); } static public function button(array $params): string { $label = isset($params['label']) ? htmlspecialchars($params['label']) : ''; unset($params['label']); self::setIconAttribute($params); if (!isset($params['type'])) { $params['type'] = 'button'; } if (!isset($params['class'])) { $params['class'] = ''; } if (isset($params['name']) && !isset($params['value'])) { $params['value'] = 1; } $prefix = ''; if (isset($params['icon'])) { $prefix = self::getIconHTML($params); unset($params['icon'], $params['icon_html']); } $params['class'] .= ' icn-btn'; // Remove NULL params $params = array_filter($params); array_walk($params, function (&$v, $k) { $v = sprintf('%s="%s"', $k, htmlspecialchars($v)); }); $params = implode(' ', $params); return sprintf('<button %s>%s%s</button>', $params, $prefix, $label); } static public function linkbutton(array $params): string { self::setIconAttribute($params); if (isset($params['icon']) || isset($params['icon_html'])) { $params['prefix'] = self::getIconHTML($params); unset($params['icon'], $params['icon_html']); } if (!isset($params['class'])) { $params['class'] = ''; } $params['class'] .= ' icn-btn'; return self::link($params); } static protected function getIconHTML(array $params): string { if (isset($params['icon_html'])) { return '<i class="icon">' . $params['icon_html'] . '</i>'; } return sprintf('<svg class="icon"><use xlink:href="%s#img" href="%1$s#img"></use></svg> ', htmlspecialchars(Utils::getLocalURL($params['icon'])) ); } static protected function setIconAttribute(array &$params): void { if (isset($params['shape'])) { $params['data-icon'] = Utils::iconUnicode($params['shape']); } unset($params['shape']); } } |
Modified src/skel-dist/modules/bilan_pc/icon.svg from [a7067a2e0b] to [c195a4c36b].
|
| | | 1 | <svg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" id="img" stroke="none"><path d="m224 50h-192a6.00029 6.00029 0 0 0 -6 6v136a14.01572 14.01572 0 0 0 14 14h176a14.01572 14.01572 0 0 0 14-14v-136a6.00029 6.00029 0 0 0 -6-6zm-186 60h44v36h-44zm56 0h124v36h-124zm124-48v36h-180v-36zm-180 130v-34h44v36h-42a2.002 2.002 0 0 1 -2-2zm178 2h-122v-36h124v34a2.002 2.002 0 0 1 -2 2z"/></svg> |
Modified src/skel-dist/modules/carte_membre/icon.svg from [eb56079363] to [c561bd2bef].
|
| | | 1 | <svg version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" id="img" stroke="none"><g><path d="m15 3v10h-14v-10zm1-1h-16v12h16z"/><path d="m8 5h6v1h-6z"/><path d="m8 7h6v1h-6z"/><path d="m8 9h3v1h-3z"/><path d="m5.4 7h-.4v-.1c.6-.2 1-.8 1-1.4 0-.8-.7-1.5-1.5-1.5s-1.5.7-1.5 1.5c0 .7.4 1.2 1 1.4v.1h-.4c-.9 0-1.6.7-1.6 1.6v2.4h5v-2.4c0-.9-.7-1.6-1.6-1.6z"/></g></svg> |
Modified src/skel-dist/modules/invoice/icon.svg from [20d1661429] to [d4539d8aff].
|
| | | 1 | <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" stroke-width="3" fill="none" width="100%" height="100%" id="img"><path d="M52.35,57.08H11.65v-50A.11.11,0,0,1,11.81,7l4.11,3.85a.11.11,0,0,0,.13,0L19.35,7a.09.09,0,0,1,.12,0l3.72,3.89a.11.11,0,0,0,.13,0L26.61,7a.09.09,0,0,1,.13,0l2.86,3.87a.1.1,0,0,0,.14,0L33,7a.09.09,0,0,1,.13,0l2.69,3.85a.1.1,0,0,0,.14,0L38.86,7A.1.1,0,0,1,39,7l2.85,3.85a.1.1,0,0,0,.14,0L44.7,7a.09.09,0,0,1,.15,0l2.25,3.84a.09.09,0,0,0,.13,0L52.2,7a.1.1,0,0,1,.15.09Z" stroke-linecap="round"/><line x1="19.42" y1="43.04" x2="46.02" y2="43.04" stroke-linecap="round"/><line x1="19.42" y1="49.29" x2="46.02" y2="49.29" stroke-linecap="round"/><path d="M40.21,34.51a9,9,0,1,1-5.48-16.15,8.86,8.86,0,0,1,3.78.83"/><line x1="21.22" y1="25.18" x2="36.21" y2="25.18"/><line x1="21.22" y1="29.76" x2="34.4" y2="29.76"/></svg> |
Modified src/skel-dist/modules/ouvertures/icon.svg from [a760737d4d] to [f809b11fbe].
|
| | | 1 | <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" id="img" stroke="none" ><path d="m13 2.03v.02 2c4.39.54 7.5 4.53 6.96 8.92-.46 3.64-3.32 6.53-6.96 6.96v2c5.5-.55 9.5-5.43 8.95-10.93-.45-4.75-4.22-8.5-8.95-8.97m-2 .03c-1.95.19-3.81.94-5.33 2.2l1.43 1.48c1.12-.9 2.47-1.48 3.9-1.68zm-6.74 3.61c-1.26 1.52-2.01 3.37-2.21 5.33h2c.19-1.42.75-2.77 1.64-3.9zm-2.2 7.33c.2 1.96.97 3.81 2.21 5.33l1.42-1.43c-.88-1.13-1.45-2.48-1.63-3.9zm5.04 5.37-1.43 1.37c1.51 1.26 3.37 2.05 5.33 2.26v-2c-1.42-.18-2.77-.75-3.9-1.63m5.4-11.37v5.25l4.5 2.67-.75 1.23-5.25-3.15v-6z"/></svg> |
Modified src/skel-dist/modules/recu_don/icon.svg from [dd01515720] to [adc409220d].
|
| | | 1 | <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" id="img" stroke="none" viewBox="0 0 24 24"><path d="M17.726 13.02L14 16H9v-1h4.065c.399 0 .638-.445.416-.777l-.888-1.332C12.223 12.334 11.599 12 10.93 12H9 3c-.553 0-1 .447-1 1v6c0 1.104.896 2 2 2h9.639c.865 0 1.688-.373 2.258-1.024L22 13l-1.452-.484C19.583 12.194 18.521 12.384 17.726 13.02zM19.258 7.39c.451-.465.73-1.108.73-1.818s-.279-1.353-.73-1.818C18.807 3.288 18.183 3 17.494 3c0 0-1.244-.003-2.494 1.286C13.75 2.997 12.506 3 12.506 3c-.689 0-1.313.288-1.764.753-.451.466-.73 1.108-.73 1.818s.279 1.354.73 1.818L15 12 19.258 7.39z"/></svg> |
Modified src/skel-dist/modules/recu_fiscal/icon.svg from [0cc688f24c] to [9f7d289eef].
|
| | | 1 | <svg width="100%" height="100%" stroke="none" version="1.1" viewBox="0 0 67.73 67.73" xmlns="http://www.w3.org/2000/svg" id="img"><path transform="scale(.2646)" d="m186.1 13.22c-2.185 0.02461-4.384 0.169-6.592 0.4355-25.08 3.014-36.49 18.45-52.77 36.29-19.54-19.99-32.16-35.68-62.16-36.1-33.58-0.4489-62.77 24.48-61.45 63.38 1.89 55.53 59.24 100.4 94.4 136l29.23 29.58 35.37-36.89c12.97-13.53 31.49-31.38 48.22-49.59 15.25-16.59 29.03-33.49 35.8-47.71 22.67-47.57-15.62-95.86-60.04-95.36zm-48.95 61.32c7.899 0 14.76 1.435 20.59 4.303l-4.16 19.54c-3.997-3.997-9.828-5.996-17.49-5.996-7.664 1e-6 -13.87 2.751-18.62 8.252-2.68 3.103-4.584 6.982-5.713 11.64h38.79l-2.258 10.93h-37.94c-0.04702 1.081-0.07032 2.467-0.07032 4.16 0 1.646 0.04659 3.362 0.1406 5.148h35.9l-2.256 10.93h-32.16c1.175 5.031 2.987 8.981 5.432 11.85 4.702 5.548 10.81 8.322 18.34 8.322 9.028 0 16.22-2.774 21.58-8.322v21.58c-6.112 3.056-13.23 4.586-21.37 4.586-13.73 0-25.01-4.702-33.85-14.11-6.018-6.395-9.992-14.37-11.92-23.91h-10.44l2.258-10.93h6.91c-0.04702-1.128-0.07031-2.328-0.07031-3.598 0-2.163 0.04659-4.065 0.1406-5.711h-9.238l2.258-10.93h8.393c1.975-9.357 5.9-17.18 11.78-23.48 8.887-9.498 20.57-14.25 35.05-14.25z" stroke-width="2.084"/></svg> |
Modified src/skel-dist/modules/recu_fiscal/nouveau.html from [f05920986a] to [9ca23701f7].
︙ | ︙ | |||
97 98 99 100 101 102 103 | var type = $('[name="type"]:checked')[0].value; g.toggle('.type-user', type == 'user'); g.toggle('.type-transaction', type == 'transaction'); g.toggle('.submit', true); } </script> | < < | 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | var type = $('[name="type"]:checked')[0].value; g.toggle('.type-user', type == 'user'); g.toggle('.type-transaction', type == 'transaction'); g.toggle('.submit', true); } </script> {{else}} <form method="post" action=""> <fieldset> <legend>Nouveau reçu</legend> <dl> {{:input type="text" name="nom" label="Nom du bénéficiaire" required=true default=$user._name}} |
︙ | ︙ |
Modified src/skel-dist/modules/recu_paiement/icon.svg from [c86a21c140] to [19540df506].
|
| | | 1 | <svg stroke="none" width="100%" height="100%" id="img" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="m21 16h2v2h-2z"/><path d="m9 16h8v2h-8z"/><path d="m21 12h2v2h-2z"/><path d="m9 12h8v2h-8z"/><path d="m9 8h14v2h-14z"/><path d="m25 2h-18a2.002 2.002 0 0 0 -2 2v25a1 1 0 0 0 1 1h1a.9987.9987 0 0 0 .8-.4l2.2-2.933 2.2 2.933a1.0353 1.0353 0 0 0 1.6 0l2.2-2.933 2.2 2.933a1.0353 1.0353 0 0 0 1.6 0l2.2-2.933 2.2 2.933a.9993.9993 0 0 0 .8.4h1a1 1 0 0 0 1-1v-25a2.0023 2.0023 0 0 0 -2-2zm0 25.333-2.2-2.933a1.0353 1.0353 0 0 0 -1.6 0l-2.2 2.933-2.2-2.933a1.0353 1.0353 0 0 0 -1.6 0l-2.2 2.933-2.2-2.933a1.0353 1.0353 0 0 0 -1.6 0l-2.2 2.933v-23.333h18z"/><path d="m0 0h32v32h-32z" fill="none"/></svg> |
Modified src/skel-dist/modules/remise_cheques/icon.svg from [9fd2725ba3] to [79a2654d42].
|
| | | 1 | <svg width="100%" height="100%" id="img" viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg"><g><path d="m90.24 103.7h-90.24v-58.96h89.62v4h-85.62v50.96h86.24z"/><path d="m128 103.7h-25.5v-4h21.5v-50.96h-21.19v-4h25.19z"/><path d="m117.9 82.56h-6.966v-4h2.966v-7.414h-2.966v-4h6.966z"/><path d="m83.65 82.56h-73.59v-15.41h73.59v4h-69.59v7.414h69.59z"/><path d="m9.541 55.72h24.77v4h-24.77z"/><path d="m111 89.12h7.481v4h-7.481z"/><path d="m60.58 89.12h23.06v4h-23.06z"/><path d="m9.541 89.12h7.606v4h-7.606z"/><path d="m103.9 113h-4v-107h-7.256v107h-4v-111h15.26z"/><path d="m91.43 68.25h10.91v4h-10.91z"/><path d="m91.43 60.96h10.91v4h-10.91z"/><path d="m83.85 38.82h-4v-28.64h23.89v4h-19.89z"/><path d="m100.5 126.1h-8.525l-3.363-10.24v-4.713h15.26v4.713zm-5.629-4h2.734l2.262-6.951h-7.256v0.072z"/></g></svg> |
Modified src/www/admin/static/styles/02-common.css from [deb85d27da] to [10027d5d4e].
︙ | ︙ | |||
632 633 634 635 636 637 638 | max-width: 90%; overflow: auto; margin: 1em auto; background: #eee; padding: .5em; white-space: pre-wrap; } | > > > > > | 632 633 634 635 636 637 638 639 640 641 642 643 | max-width: 90%; overflow: auto; margin: 1em auto; background: #eee; padding: .5em; white-space: pre-wrap; } svg.icon { fill: rgb(var(--gTextColor)); stroke: rgb(var(--gTextColor)); } |
Modified src/www/admin/static/styles/03-forms.css from [b9691040d8] to [e0ead5d5d9].
︙ | ︙ | |||
219 220 221 222 223 224 225 226 227 228 229 230 231 232 | content: attr(data-icon); font-weight: normal; } [data-icon]:empty:before { padding: 0; } button.main, .icn-btn.main { color: rgb(var(--gTextColor)); font-size: 1.2em; border-radius: 1em; padding: .5em 1em; } | > > > > > > > > > > > > > > > | 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | content: attr(data-icon); font-weight: normal; } [data-icon]:empty:before { padding: 0; } /* Custom SVG icon */ .icn-btn > .icon { display: inline-block; padding-right: .3em; height: 1em; width: 1em; vertical-align: middle; transition: fill .3s, stroke .3s; } .icn-btn:hover > .icon { fill: rgb(var(--gHoverLinkColor)) !important; stroke: rgb(var(--gHoverLinkColor)) !important; } button.main, .icn-btn.main { color: rgb(var(--gTextColor)); font-size: 1.2em; border-radius: 1em; padding: .5em 1em; } |
︙ | ︙ |
Modified src/www/admin/static/styles/05-navigation.css from [4983057d4d] to [5019cfe2e7].
︙ | ︙ | |||
130 131 132 133 134 135 136 | padding: .5em; text-align: center; position: relative; border: none; text-decoration: none; } | | < < < < < < < < | 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | padding: .5em; text-align: center; position: relative; border: none; text-decoration: none; } nav.home ul li a::before, nav.home ul li a .icon { display: flex; font-size: 48px; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: .1em; margin: 0 auto 0 auto; padding: .1em; background: rgba(var(--gSecondColor), .5); margin-bottom: 5px; text-shadow: none; } |
Modified src/www/admin/static/styles/06-tables.css from [7e93f98ea7] to [29141f5514].
︙ | ︙ | |||
191 192 193 194 195 196 197 | width: 1.5em; color: rgba(var(--gMainColor), 0.5); text-shadow: none; transition: color .2s; } table.list td.icon svg { | < < | 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | width: 1.5em; color: rgba(var(--gMainColor), 0.5); text-shadow: none; transition: color .2s; } table.list td.icon svg { max-width: 48px; max-height: 48px; } table.list .folder .icon span::before { color: rgba(var(--gMainColor), 0.9); } |
︙ | ︙ |