pub / zeitung

News-Aggregator in newspaper style as HTML/PDF/EPUB
git clone src.jayvii.de/pub/zeitung.git
Home | Log | Files | Exports | Refs | README | RSS

commit fa0ac5440a7d7507584164f64c7019faa2c20089
parent ca2b3da53107115f77080e706d503b9da8362ba9
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date:   Sat,  2 May 2026 16:23:35 +0200

feat: use icons for font scale buttons

Diffstat:
Mtemplates/scale_fonts.html | 11++++++++++-
Mtemplates/style.css | 10++++++++++
2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/templates/scale_fonts.html b/templates/scale_fonts.html @@ -31,7 +31,16 @@ // add function and label anchor.href = "javascript:scale_fonts('" + size +"');"; - anchor.innerText = label; + if (label === "Large") { + anchor.innerHTML = '<svg title="' + label + '" alt="' + label + '" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5.12,14L7.5,7.67L9.87,14M6.5,5L1,19H3.25L4.37,16H10.62L11.75,19H14L8.5,5H6.5M18,7L13,12.07L14.41,13.5L17,10.9V17H19V10.9L21.59,13.5L23,12.07L18,7Z" /></svg>'; + } + if (label === "Medium") { + anchor.innerHTML = '<svg title="' + label + '" alt="' + label + '" version="1.2" viewBox="0 0 687 687" preserveAspectRatio="xMidYMid" fill-rule="evenodd" stroke-width="28.222" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg" xmlns:ooo="http://xml.openoffice.org/svg/export" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:presentation="http://sun.com/xmlns/staroffice/presentation" xmlns:smil="http://www.w3.org/2001/SMIL20/" xmlns:anim="urn:oasis:names:tc:opendocument:xmlns:animation:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xml:space="preserve"> <defs class="ClipPathGroup"><clipPath id="presentation_clip_path" clipPathUnits="userSpaceOnUse"><rect x="0" y="0" width="687" height="687"/></clipPath><clipPath id="presentation_clip_path_shrink" clipPathUnits="userSpaceOnUse"><rect x="0" y="0" width="686" height="686"/></clipPath> </defs> <defs class="TextShapeIndex"><g ooo:slide="id1" ooo:id-list="id3 id4 id5"/> </defs> <defs class="EmbeddedBulletChars"><g id="bullet-char-template-57356" transform="scale(0.00048828125,-0.00048828125)"><path d="M 580,1141 L 1163,571 580,0 -4,571 580,1141 Z"/></g><g id="bullet-char-template-57354" transform="scale(0.00048828125,-0.00048828125)"><path d="M 8,1128 L 1137,1128 1137,0 8,0 8,1128 Z"/></g><g id="bullet-char-template-10146" transform="scale(0.00048828125,-0.00048828125)"><path d="M 174,0 L 602,739 174,1481 1456,739 174,0 Z M 1358,739 L 309,1346 659,739 1358,739 Z"/></g><g id="bullet-char-template-10132" transform="scale(0.00048828125,-0.00048828125)"><path d="M 2015,739 L 1276,0 717,0 1260,543 174,543 174,936 1260,936 717,1481 1274,1481 2015,739 Z"/></g><g id="bullet-char-template-10007" transform="scale(0.00048828125,-0.00048828125)"><path d="M 0,-2 C -7,14 -16,27 -25,37 L 356,567 C 262,823 215,952 215,954 215,979 228,992 255,992 264,992 276,990 289,987 310,991 331,999 354,1012 L 381,999 492,748 772,1049 836,1024 860,1049 C 881,1039 901,1025 922,1006 886,937 835,863 770,784 769,783 710,716 594,584 L 774,223 C 774,196 753,168 711,139 L 727,119 C 717,90 699,76 672,76 641,76 570,178 457,381 L 164,-76 C 142,-110 111,-127 72,-127 30,-127 9,-110 8,-76 1,-67 -2,-52 -2,-32 -2,-23 -1,-13 0,-2 Z"/></g><g id="bullet-char-template-10004" transform="scale(0.00048828125,-0.00048828125)"><path d="M 285,-33 C 182,-33 111,30 74,156 52,228 41,333 41,471 41,549 55,616 82,672 116,743 169,778 240,778 293,778 328,747 346,684 L 369,508 C 377,444 397,411 428,410 L 1163,1116 C 1174,1127 1196,1133 1229,1133 1271,1133 1292,1118 1292,1087 L 1292,965 C 1292,929 1282,901 1262,881 L 442,47 C 390,-6 338,-33 285,-33 Z"/></g><g id="bullet-char-template-9679" transform="scale(0.00048828125,-0.00048828125)"><path d="M 813,0 C 632,0 489,54 383,161 276,268 223,411 223,592 223,773 276,916 383,1023 489,1130 632,1184 813,1184 992,1184 1136,1130 1245,1023 1353,916 1407,772 1407,592 1407,412 1353,268 1245,161 1136,54 992,0 813,0 Z"/></g><g id="bullet-char-template-8226" transform="scale(0.00048828125,-0.00048828125)"><path d="M 346,457 C 273,457 209,483 155,535 101,586 74,649 74,723 74,796 101,859 155,911 209,963 273,989 346,989 419,989 480,963 531,910 582,859 608,796 608,723 608,648 583,586 532,535 482,483 420,457 346,457 Z"/></g><g id="bullet-char-template-8211" transform="scale(0.00048828125,-0.00048828125)"><path d="M -4,459 L 1135,459 1135,606 -4,606 -4,459 Z"/></g><g id="bullet-char-template-61548" transform="scale(0.00048828125,-0.00048828125)"><path d="M 173,740 C 173,903 231,1043 346,1159 462,1274 601,1332 765,1332 928,1332 1067,1274 1183,1159 1299,1043 1357,903 1357,740 1357,577 1299,437 1183,322 1067,206 928,148 765,148 601,148 462,206 346,322 231,437 173,577 173,740 Z"/></g> </defs> <g><g id="id2" class="Master_Slide"><g id="bg-id2" class="Background"/><g id="bo-id2" class="BackgroundObjects"/></g> </g> <g class="SlideGroup"><g><g id="container-id1"><g id="id1" class="Slide" clip-path="url(#presentation_clip_path)"><g class="Page"><g class="Group"><g class="com.sun.star.drawing.PolyPolygonShape"><g id="id3"><rect class="BoundingBox" stroke="none" fill="none" x="52" y="157" width="343" height="370"/><path fill="rgb(0,0,0)" stroke="none" d="M 161,393 L 224,229 287,393 161,393 Z M 53,525 L 112,525 142,446 307,446 336,525 393,525 251,158 198,158 53,525 Z "/></g></g><g class="com.sun.star.drawing.PolyPolygonShape"><g id="id4"><rect class="BoundingBox" stroke="none" fill="none" x="378" y="155" width="254" height="375"/><path fill="rgb(0,0,0)" stroke="none" d="M 630,342 L 630,364 628,385 626,404 622,422 618,439 612,454 606,468 602,475 598,481 594,487 590,492 585,497 581,502 575,506 570,510 565,514 559,517 553,520 547,522 540,524 533,526 526,527 519,528 512,529 504,529 496,529 489,528 482,527 475,526 468,524 461,522 455,520 449,517 443,514 438,510 433,506 428,502 423,498 418,493 414,487 410,481 406,475 403,469 396,455 391,439 386,423 383,405 381,385 379,364 379,342 379,320 380,298 383,279 386,260 390,244 396,228 402,214 405,208 409,202 413,196 417,191 422,186 427,182 432,177 437,174 443,170 448,167 455,164 461,162 468,160 475,158 482,157 490,156 505,155 521,156 528,157 535,158 542,160 549,162 555,164 561,167 567,170 572,174 578,178 583,182 587,187 592,191 596,197 600,203 604,209 607,215 613,229 619,244 623,261 626,279 629,299 630,320 630,342 Z M 583,342 L 583,323 582,306 581,289 579,274 576,261 573,249 570,238 567,233 565,228 563,224 560,220 558,216 555,213 552,210 548,207 545,204 541,202 537,200 533,198 529,196 525,195 520,194 516,194 511,193 505,193 500,193 495,194 490,194 486,195 481,196 477,198 473,200 469,202 465,204 461,207 458,209 455,213 452,216 449,220 447,224 444,228 442,232 440,237 436,248 433,260 430,274 428,289 427,305 426,323 425,342 426,361 427,378 428,394 430,409 433,423 436,435 440,446 442,451 444,455 447,460 449,464 452,467 455,471 458,474 462,477 465,480 469,482 473,484 477,486 481,488 485,489 490,490 494,491 499,491 504,491 509,491 514,491 519,490 524,489 528,488 532,486 536,484 540,482 544,480 547,477 550,474 553,471 556,467 559,463 562,459 564,455 569,445 573,434 576,422 579,408 581,393 582,378 583,361 583,342 Z "/></g></g><g class="com.sun.star.drawing.PolyPolygonShape"><g id="id5"><rect class="BoundingBox" stroke="none" fill="none" x="380" y="156" width="254" height="377"/><path fill="rgb(0,0,0)" stroke="none" d="M 632,344 L 632,366 630,387 628,406 624,424 620,441 614,456 608,470 604,477 600,483 596,489 592,494 587,499 582,504 577,508 572,512 566,516 560,519 554,522 548,524 542,526 535,528 528,529 521,530 513,531 506,531 498,531 490,530 483,529 476,528 469,526 463,524 457,522 451,519 445,516 439,512 434,509 429,504 424,500 420,495 416,489 411,483 408,477 404,471 398,457 392,441 388,425 384,407 382,387 381,366 380,344 381,321 382,300 384,280 388,262 392,245 397,230 403,216 407,210 411,204 415,198 419,193 423,188 428,183 433,179 438,175 444,172 450,169 456,166 463,163 469,161 476,160 484,159 491,158 507,157 523,158 530,159 537,160 544,162 550,164 557,166 563,169 569,172 574,175 579,179 584,183 589,188 594,193 598,198 602,204 605,210 609,217 615,231 620,246 625,263 628,281 630,301 632,322 632,344 Z M 585,344 L 585,325 584,307 583,291 581,276 578,263 575,250 571,239 569,235 567,230 565,226 562,222 559,218 556,214 553,211 550,208 547,206 543,203 539,201 535,200 531,198 526,197 522,196 517,195 512,195 507,195 502,195 497,195 492,196 487,197 483,198 478,199 474,201 470,203 467,206 463,208 460,211 456,214 453,218 451,221 448,225 446,229 443,234 441,239 437,250 434,262 432,275 430,291 428,307 427,325 427,344 427,363 428,380 430,396 432,411 434,425 438,437 441,448 444,453 446,457 448,462 451,466 454,469 457,473 460,476 463,479 467,482 470,484 474,486 478,488 482,490 487,491 491,492 496,493 501,493 506,493 511,493 516,493 521,492 525,491 529,490 534,488 538,486 542,484 545,482 549,479 552,476 555,473 558,469 561,465 564,461 566,457 571,447 574,436 578,424 580,410 582,395 584,379 585,362 585,344 Z "/></g></g></g></g></g></g></g> </g></svg>'; + } + if (label === "Small") { + anchor.innerHTML = '<svg title="' + label + '" alt="' + label + '" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5.12,14L7.5,7.67L9.87,14M6.5,5L1,19H3.25L4.37,16H10.62L11.75,19H14L8.5,5H6.5M18,17L23,11.93L21.59,10.5L19,13.1V7H17V13.1L14.41,10.5L13,11.93L18,17Z" /></svg>'; + } + // add anchor to list object list.appendChild(anchor); diff --git a/templates/style.css b/templates/style.css @@ -42,3 +42,13 @@ nav > ul > li { display: inline-block; margin: 5px; } +nav > ul > li > a > svg { + height: 1em; + border-radius: 3px; + border-style: solid; + border-width: 2px; + margin-left: 5px; + margin-right: 5px; + margin-bottom: -0.5em; + padding: 0.2em; +}