Changeset 3665758
- Timestamp:
- 08/25/2026 05:27:29 PM (2 months ago)
- Location:
- hesapis-market-data-gold-currency-crypto-prices
- Files:
-
- 10 edited
- 1 copied
-
tags/2.4.7 (copied) (copied from hesapis-market-data-gold-currency-crypto-prices/trunk )
-
tags/2.4.7/hesapis-market-data.php (modified) (2 diffs)
-
tags/2.4.7/includes/class-hesapis-shortcodes.php (modified) (2 diffs)
-
tags/2.4.7/public/css/hesapis-style.css (modified) (9 diffs)
-
tags/2.4.7/public/js/hesapis-script.js (modified) (4 diffs)
-
tags/2.4.7/readme.txt (modified) (3 diffs)
-
trunk/hesapis-market-data.php (modified) (2 diffs)
-
trunk/includes/class-hesapis-shortcodes.php (modified) (2 diffs)
-
trunk/public/css/hesapis-style.css (modified) (9 diffs)
-
trunk/public/js/hesapis-script.js (modified) (4 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
hesapis-market-data-gold-currency-crypto-prices/tags/2.4.7/hesapis-market-data.php
r3665637 r3665758 4 4 * Plugin URI: https://www.hesapis.com/api/ 5 5 * Description: Real-time gold prices, currency exchange rates, and cryptocurrency data widgets. Display financial market data with beautiful, customizable widgets. 6 * Version: 2.4. 36 * Version: 2.4.7 7 7 * Requires at least: 5.0 8 8 * Requires PHP: 7.4 … … 23 23 24 24 // Plugin sabitleri 25 define( 'HESAPIS_VERSION', '2.4. 3' );25 define( 'HESAPIS_VERSION', '2.4.7' ); 26 26 define( 'HESAPIS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 27 27 define( 'HESAPIS_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); -
hesapis-market-data-gold-currency-crypto-prices/tags/2.4.7/includes/class-hesapis-shortcodes.php
r3665637 r3665758 380 380 'font_size' => '', 381 381 'padding' => '', 382 // Seridin ALTINDAKI bosluk. Basligin hemen altina koyan 383 // kullanicilarda tema widget kabi genelde 30-40px alt bosluk 384 // ekliyor ve serit icerikten kopuk duruyor; margin="0" ile 385 // kapatilabilsin diye acildi. 386 'margin' => '', 382 387 // DIKKAT: varsayilan 'normal' OLAMAZ. Oyle olursa 383 388 // get_scroll_duration() her zaman 30s kademesine duser ve … … 898 903 } 899 904 905 // Alt bosluk: "0" gecerli bir deger oldugu icin empty() ile 906 // kontrol EDILEMEZ - empty('0') true doner ve kullanicinin 907 // "bosluk istemiyorum" istegi sessizce yok sayilirdi. 908 if ( isset( $atts['margin'] ) && '' !== trim( (string) $atts['margin'] ) ) { 909 $bosluk = trim( (string) $atts['margin'] ); 910 $bosluk = is_numeric( $bosluk ) ? $bosluk . 'px' : $bosluk; 911 $styles[] = '--hesapis-margin: ' . esc_attr( $bosluk ); 912 } 913 900 914 if ( empty( $styles ) ) { 901 915 return ''; -
hesapis-market-data-gold-currency-crypto-prices/tags/2.4.7/public/css/hesapis-style.css
r3665637 r3665758 66 66 67 67 .hesapis-card { 68 background: var(--hesapis- bg);68 background: var(--hesapis-card-bg, var(--hesapis-bg)); 69 69 border: 1px solid var(--hesapis-border); 70 70 border-radius: var(--hesapis-radius); … … 216 216 217 217 .hesapis-table th { 218 background: var(--hesapis- divider);218 background: var(--hesapis-bg-secondary, var(--hesapis-divider)); 219 219 color: var(--hesapis-muted); 220 220 font-weight: 600; … … 399 399 ============================================ */ 400 400 .hesapis-ticker { 401 /* Alt bosluk kisa koddan ayarlanabilir; varsayilan 0 cunku serit 402 genelde baska bir kabin (widget alani) icinde duruyor ve o kap 403 zaten kendi boslugunu veriyor. */ 404 margin-bottom: var(--hesapis-margin, 0); 401 405 background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); 402 406 border-radius: var(--hesapis-radius); … … 436 440 } 437 441 438 .hesapis-ticker -track::before,439 .hesapis-ticker -track::after {442 .hesapis-ticker::before, 443 .hesapis-ticker::after { 440 444 content: ''; 441 445 position: absolute; … … 447 451 } 448 452 449 .hesapis-ticker -track::before {453 .hesapis-ticker::before { 450 454 left: 0; 451 455 background: linear-gradient(90deg, var(--hesapis-bg, #0f172a), transparent); 452 456 } 453 457 454 .hesapis-ticker -track::after {458 .hesapis-ticker::after { 455 459 right: 0; 456 460 background: linear-gradient(-90deg, var(--hesapis-bg, #1e293b), transparent); … … 459 463 .hesapis-ticker-content { 460 464 display: flex; 461 animation: hesapis-scroll var(--hesapis-duration, 30s) linear infinite; 465 /* CSS animasyonu KALDIRILDI. 466 Animasyon transform ile, elle kaydirma scrollLeft ile calisiyordu: 467 iki ayri koordinat sistemi ayni anda hareket edince hizalama tutmuyor 468 ve serit bos alana kayabiliyordu. Artik ikisi de scrollLeft uzerinden 469 yurutuluyor (hesapis-script.js), boylece cakisacak iki sistem yok. 470 JS calismazsa serit durur ama okunabilir ve elle kaydirilabilir kalir. */ 462 471 padding: var(--hesapis-padding, 12px) 0; 463 } 464 465 .hesapis-ticker:hover .hesapis-ticker-content { 466 animation-play-state: paused; 467 } 472 /* transform ile yapilan hareket TASMA OLUSTURMAZ; kap 473 overflow-x:auto olsa bile kaydirilacak alan dogmaz. Icerige 474 gercek genislik verince serit fiilen tasiyor ve parmakla 475 kaydirilabiliyor. */ 476 width: max-content; 477 } 478 479 /* Duraklatma artik JS tarafinda (rAF dongusu durduruluyor). */ 468 480 469 481 @keyframes hesapis-scroll { … … 474 486 .hesapis-ticker-item { 475 487 display: inline-flex; 488 flex-shrink: 0; 476 489 align-items: center; 477 490 gap: 8px; … … 785 798 animation: hesapis-scroll var(--hesapis-duration, 25s) linear infinite; 786 799 white-space: nowrap; 800 /* Seritte oldugu gibi: transform tasma olusturmadigi icin elle 801 kaydirma calismaz; gercek genislik sart. */ 802 width: max-content; 803 } 804 805 .hesapis-marquee-item { 806 flex-shrink: 0; 787 807 } 788 808 … … 1102 1122 } 1103 1123 } 1124 1125 /* ============================================ 1126 Vurgu rengi (accent_color) 1127 ============================================ 1128 --hesapis-accent ve --hesapis-primary :root'ta TANIMLIYDI ama hicbir 1129 kural okumuyordu; yani kisa koddaki accent_color parametresi 1130 belgelenmis olmasina ragmen hicbir sey yapmiyordu. Vurgu artik 1131 baslik altindaki cizgide ve secili/one cikan ogelerde kullaniliyor. */ 1132 .hesapis-widget .hesapis-header{ 1133 border-bottom: 2px solid var(--hesapis-accent, var(--hesapis-border)); 1134 } 1135 .hesapis-ticker-name{ 1136 color: var(--hesapis-accent, inherit); 1137 } -
hesapis-market-data-gold-currency-crypto-prices/tags/2.4.7/public/js/hesapis-script.js
r3665637 r3665758 322 322 var $content = $ticker.find('.hesapis-ticker-content'); 323 323 324 // İçeriği çoğalt (sonsuz scroll için) 325 if ($content.children().length > 0) { 326 $content.append($content.html()); 327 } 324 // Cogaltma YAPILMIYOR: PHP zaten iki kopya basiyor ve 325 // kaydirma dongusu yarim genislikte basa sariyor. 326 // Onceki surumde burada her init'te bir kopya daha 327 // ekleniyordu; init otomatik yenilemede de calistigi 328 // icin kopyalar katlaniyordu. 328 329 }); 329 330 } … … 349 350 * kaybolur ve hareket takilir. 350 351 */ 351 function kaydirmayiEtkinlestir() { 352 var kaplar = document.querySelectorAll('.hesapis-ticker, .hesapis-marquee'); 352 /** 353 * Seridi kaydirir ve parmakla surumeye izin verir. 354 * 355 * TEK MEKANIZMA: hem otomatik akis hem elle surukleme scrollLeft 356 * uzerinden yurur. Onceki surumlerde akis CSS transform, surukleme 357 * ise scrollLeft ile yapiliyordu; iki koordinat sistemi ayni anda 358 * hareket edince hizalama bozuluyor ve serit bos alana kayiyordu. 359 * 360 * PHP icerigi IKI KEZ basiyor. Yarim genisligi gecince scrollLeft'i 361 * yarim geriye aliyoruz: gorunum ayni oldugu icin sicrama fark 362 * edilmiyor, sonsuz donguyu bu saglıyor. 363 */ 364 function seritleriBaslat() { 365 var kaplar = document.querySelectorAll('.hesapis-ticker'); 366 var azHareket = window.matchMedia 367 && window.matchMedia('(prefers-reduced-motion: reduce)').matches; 353 368 354 369 Array.prototype.forEach.call(kaplar, function (kap) { 355 if (kap.dataset.hesapisKaydirma === '1') { return; } 356 kap.dataset.hesapisKaydirma = '1'; 357 358 var raf = kap.querySelector('.hesapis-ticker-track') || kap; 359 var zamanlayici = null; 370 if (kap.dataset.hesapisSerit === '1') { return; } 371 kap.dataset.hesapisSerit = '1'; 372 373 var raf = kap.querySelector('.hesapis-ticker-track'); 374 if (!raf) { return; } 375 376 // Sure kabin uzerindeki --hesapis-duration degiskeninden gelir; 377 // ayarlar sayfasindaki kaydirac bu degeri yaziyor. 378 var sure = parseFloat( 379 getComputedStyle(kap).getPropertyValue('--hesapis-duration') 380 ) || 30; 381 382 var duruyor = false; 383 var bekleme = null; 384 var oncekiAn = null; 360 385 361 386 function tut() { 362 if (zamanlayici) { clearTimeout(zamanlayici); zamanlayici = null; }363 kap.classList.add('hesapis-elde');387 duruyor = true; 388 if (bekleme) { clearTimeout(bekleme); bekleme = null; } 364 389 } 365 390 366 391 function birak() { 367 if ( zamanlayici) { clearTimeout(zamanlayici); }368 // Parmak kalkar kalkmaz devam et tirmek sarsintili duruyor;369 // kisa bir bekleme kullaniciya okumak icin firsat veriyor.370 zamanlayici = setTimeout(function () {371 kap.classList.remove('hesapis-elde');372 zamanlayici= null;392 if (bekleme) { clearTimeout(bekleme); } 393 // Parmak kalkar kalkmaz devam etmek sarsintili duruyor. 394 bekleme = setTimeout(function () { 395 duruyor = false; 396 oncekiAn = null; 397 bekleme = null; 373 398 }, 2500); 374 399 } … … 377 402 raf.addEventListener('touchend', birak, { passive: true }); 378 403 raf.addEventListener('touchcancel', birak, { passive: true }); 379 380 // Fare tekerlegiyle yatay kaydirma ve trackpad icin 381 raf.addEventListener('scroll', function () { 382 tut(); 383 birak(); 384 }, { passive: true }); 404 kap.addEventListener('mouseenter', tut); 405 kap.addEventListener('mouseleave', birak); 406 407 // Isletim sisteminde "hareketi azalt" seciliyse akis hic 408 // baslamaz; serit elle kaydirilabilir oldugu icin veri yine 409 // erisilebilir kalir (WCAG 2.3.3). 410 if (azHareket) { return; } 411 412 function adim(an) { 413 var yarim = raf.scrollWidth / 2; 414 if (yarim > 0 && !duruyor) { 415 if (oncekiAn !== null) { 416 // Bir tam tur = yarim genislik / sure saniye 417 var px = (yarim / sure) * ((an - oncekiAn) / 1000); 418 raf.scrollLeft += px; 419 if (raf.scrollLeft >= yarim) { raf.scrollLeft -= yarim; } 420 } 421 oncekiAn = an; 422 } else { 423 oncekiAn = an; 424 } 425 requestAnimationFrame(adim); 426 } 427 requestAnimationFrame(adim); 385 428 }); 386 429 } … … 388 431 $(document).ready(function() { 389 432 HesapisWidget.init(); 390 kaydirmayiEtkinlestir();433 seritleriBaslat(); 391 434 }); 392 435 393 436 // Ajax ile yenilenen seritler icin tekrar bagla 394 $(document).on('hesapis:refreshed', kaydirmayiEtkinlestir);437 $(document).on('hesapis:refreshed', seritleriBaslat); 395 438 396 439 // Global erişim için -
hesapis-market-data-gold-currency-crypto-prices/tags/2.4.7/readme.txt
r3665637 r3665758 6 6 Tested up to: 7.1 7 7 Requires PHP: 7.4 8 Stable tag: 2.4. 38 Stable tag: 2.4.7 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 152 152 153 153 == Changelog == 154 155 = 2.4.7 = 156 **Fixed** 157 158 * **`accent_color` and `bg_secondary_color` did nothing.** Both are 159 documented shortcode attributes and both were accepted without 160 complaint, but no stylesheet rule ever read the custom properties they 161 set - `--hesapis-accent` and `--hesapis-primary` were declared in 162 `:root` and never used, and `--hesapis-bg-secondary` / `--hesapis-card-bg` 163 were not declared at all. The accent colour now drives the widget 164 heading rule and the ticker labels; the secondary background drives 165 table header rows and card surfaces. 166 * **The swipeable ticker from 2.4.3 did not work.** The strip was animated 167 with a CSS transform, and transforms create no scrollable overflow, so a 168 scrollable container had nothing to scroll. Auto-scroll and dragging now 169 share one mechanism (`scrollLeft`), which also removes the class of bug 170 where the two fought each other and pushed content out of view. 171 * **Ticker text sped up and vanished after a few minutes.** The script 172 duplicated the strip's contents on every initialisation, and 173 initialisation also runs on each auto-refresh, so copies doubled: 4, 8, 174 16. With a fixed duration every doubling made the strip twice as fast. 175 The markup already contains the two copies the loop needs, so the 176 duplication was removed entirely. This affected 2.4.1 and 2.4.2 too. 177 178 **Added** 179 180 * **`margin` attribute for the ticker.** Themes often wrap widget areas in 181 30-40px of bottom margin, which leaves the strip floating away from the 182 content below it. `margin="0"` closes the gap; any CSS length works. 183 * Ticker edge fades stay pinned to the edges while the strip is scrolled. 184 185 = 2.4.4 = 186 **Fixed** 187 188 * **The swipeable ticker introduced in 2.4.3 did not actually work.** The 189 strip is animated with a CSS transform, and transforms do not create 190 scrollable overflow - so making the container scrollable had nothing to 191 scroll. The content now carries its real width and dragging works as 192 described. 193 * **Ticker text sped up and vanished after a few minutes.** The script 194 duplicated the strip's contents on every initialisation, and 195 initialisation also runs on each auto-refresh: 4 copies became 8, then 196 16. With the animation duration fixed, every doubling made the strip 197 twice as fast until the text was unreadable. The duplication now happens 198 once per element. This affected 2.4.1 and 2.4.2 as well. 199 * Dragging and the animation no longer fight each other: the strip eases 200 back to the start before the animation resumes, instead of drifting out 201 of view. 202 * The ticker's edge fades stay pinned to the edges while you scroll. 154 203 155 204 = 2.4.3 = … … 224 273 == Upgrade Notice == 225 274 275 = 2.4.7 = 276 Makes accent_color and bg_secondary_color actually work, fixes the swipeable 277 ticker introduced in 2.4.3, and stops ticker text speeding up and disappearing. 278 279 = 2.4.4 = 280 Fixes the swipeable ticker from 2.4.3, which did not work, and a long-standing 281 bug that made ticker text speed up and disappear after a few minutes. 282 226 283 = 2.4.3 = 227 284 Important fix: the Settings link was broken, which prevented new users from -
hesapis-market-data-gold-currency-crypto-prices/trunk/hesapis-market-data.php
r3665637 r3665758 4 4 * Plugin URI: https://www.hesapis.com/api/ 5 5 * Description: Real-time gold prices, currency exchange rates, and cryptocurrency data widgets. Display financial market data with beautiful, customizable widgets. 6 * Version: 2.4. 36 * Version: 2.4.7 7 7 * Requires at least: 5.0 8 8 * Requires PHP: 7.4 … … 23 23 24 24 // Plugin sabitleri 25 define( 'HESAPIS_VERSION', '2.4. 3' );25 define( 'HESAPIS_VERSION', '2.4.7' ); 26 26 define( 'HESAPIS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); 27 27 define( 'HESAPIS_PLUGIN_URL', plugin_dir_url( __FILE__ ) ); -
hesapis-market-data-gold-currency-crypto-prices/trunk/includes/class-hesapis-shortcodes.php
r3665637 r3665758 380 380 'font_size' => '', 381 381 'padding' => '', 382 // Seridin ALTINDAKI bosluk. Basligin hemen altina koyan 383 // kullanicilarda tema widget kabi genelde 30-40px alt bosluk 384 // ekliyor ve serit icerikten kopuk duruyor; margin="0" ile 385 // kapatilabilsin diye acildi. 386 'margin' => '', 382 387 // DIKKAT: varsayilan 'normal' OLAMAZ. Oyle olursa 383 388 // get_scroll_duration() her zaman 30s kademesine duser ve … … 898 903 } 899 904 905 // Alt bosluk: "0" gecerli bir deger oldugu icin empty() ile 906 // kontrol EDILEMEZ - empty('0') true doner ve kullanicinin 907 // "bosluk istemiyorum" istegi sessizce yok sayilirdi. 908 if ( isset( $atts['margin'] ) && '' !== trim( (string) $atts['margin'] ) ) { 909 $bosluk = trim( (string) $atts['margin'] ); 910 $bosluk = is_numeric( $bosluk ) ? $bosluk . 'px' : $bosluk; 911 $styles[] = '--hesapis-margin: ' . esc_attr( $bosluk ); 912 } 913 900 914 if ( empty( $styles ) ) { 901 915 return ''; -
hesapis-market-data-gold-currency-crypto-prices/trunk/public/css/hesapis-style.css
r3665637 r3665758 66 66 67 67 .hesapis-card { 68 background: var(--hesapis- bg);68 background: var(--hesapis-card-bg, var(--hesapis-bg)); 69 69 border: 1px solid var(--hesapis-border); 70 70 border-radius: var(--hesapis-radius); … … 216 216 217 217 .hesapis-table th { 218 background: var(--hesapis- divider);218 background: var(--hesapis-bg-secondary, var(--hesapis-divider)); 219 219 color: var(--hesapis-muted); 220 220 font-weight: 600; … … 399 399 ============================================ */ 400 400 .hesapis-ticker { 401 /* Alt bosluk kisa koddan ayarlanabilir; varsayilan 0 cunku serit 402 genelde baska bir kabin (widget alani) icinde duruyor ve o kap 403 zaten kendi boslugunu veriyor. */ 404 margin-bottom: var(--hesapis-margin, 0); 401 405 background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%); 402 406 border-radius: var(--hesapis-radius); … … 436 440 } 437 441 438 .hesapis-ticker -track::before,439 .hesapis-ticker -track::after {442 .hesapis-ticker::before, 443 .hesapis-ticker::after { 440 444 content: ''; 441 445 position: absolute; … … 447 451 } 448 452 449 .hesapis-ticker -track::before {453 .hesapis-ticker::before { 450 454 left: 0; 451 455 background: linear-gradient(90deg, var(--hesapis-bg, #0f172a), transparent); 452 456 } 453 457 454 .hesapis-ticker -track::after {458 .hesapis-ticker::after { 455 459 right: 0; 456 460 background: linear-gradient(-90deg, var(--hesapis-bg, #1e293b), transparent); … … 459 463 .hesapis-ticker-content { 460 464 display: flex; 461 animation: hesapis-scroll var(--hesapis-duration, 30s) linear infinite; 465 /* CSS animasyonu KALDIRILDI. 466 Animasyon transform ile, elle kaydirma scrollLeft ile calisiyordu: 467 iki ayri koordinat sistemi ayni anda hareket edince hizalama tutmuyor 468 ve serit bos alana kayabiliyordu. Artik ikisi de scrollLeft uzerinden 469 yurutuluyor (hesapis-script.js), boylece cakisacak iki sistem yok. 470 JS calismazsa serit durur ama okunabilir ve elle kaydirilabilir kalir. */ 462 471 padding: var(--hesapis-padding, 12px) 0; 463 } 464 465 .hesapis-ticker:hover .hesapis-ticker-content { 466 animation-play-state: paused; 467 } 472 /* transform ile yapilan hareket TASMA OLUSTURMAZ; kap 473 overflow-x:auto olsa bile kaydirilacak alan dogmaz. Icerige 474 gercek genislik verince serit fiilen tasiyor ve parmakla 475 kaydirilabiliyor. */ 476 width: max-content; 477 } 478 479 /* Duraklatma artik JS tarafinda (rAF dongusu durduruluyor). */ 468 480 469 481 @keyframes hesapis-scroll { … … 474 486 .hesapis-ticker-item { 475 487 display: inline-flex; 488 flex-shrink: 0; 476 489 align-items: center; 477 490 gap: 8px; … … 785 798 animation: hesapis-scroll var(--hesapis-duration, 25s) linear infinite; 786 799 white-space: nowrap; 800 /* Seritte oldugu gibi: transform tasma olusturmadigi icin elle 801 kaydirma calismaz; gercek genislik sart. */ 802 width: max-content; 803 } 804 805 .hesapis-marquee-item { 806 flex-shrink: 0; 787 807 } 788 808 … … 1102 1122 } 1103 1123 } 1124 1125 /* ============================================ 1126 Vurgu rengi (accent_color) 1127 ============================================ 1128 --hesapis-accent ve --hesapis-primary :root'ta TANIMLIYDI ama hicbir 1129 kural okumuyordu; yani kisa koddaki accent_color parametresi 1130 belgelenmis olmasina ragmen hicbir sey yapmiyordu. Vurgu artik 1131 baslik altindaki cizgide ve secili/one cikan ogelerde kullaniliyor. */ 1132 .hesapis-widget .hesapis-header{ 1133 border-bottom: 2px solid var(--hesapis-accent, var(--hesapis-border)); 1134 } 1135 .hesapis-ticker-name{ 1136 color: var(--hesapis-accent, inherit); 1137 } -
hesapis-market-data-gold-currency-crypto-prices/trunk/public/js/hesapis-script.js
r3665637 r3665758 322 322 var $content = $ticker.find('.hesapis-ticker-content'); 323 323 324 // İçeriği çoğalt (sonsuz scroll için) 325 if ($content.children().length > 0) { 326 $content.append($content.html()); 327 } 324 // Cogaltma YAPILMIYOR: PHP zaten iki kopya basiyor ve 325 // kaydirma dongusu yarim genislikte basa sariyor. 326 // Onceki surumde burada her init'te bir kopya daha 327 // ekleniyordu; init otomatik yenilemede de calistigi 328 // icin kopyalar katlaniyordu. 328 329 }); 329 330 } … … 349 350 * kaybolur ve hareket takilir. 350 351 */ 351 function kaydirmayiEtkinlestir() { 352 var kaplar = document.querySelectorAll('.hesapis-ticker, .hesapis-marquee'); 352 /** 353 * Seridi kaydirir ve parmakla surumeye izin verir. 354 * 355 * TEK MEKANIZMA: hem otomatik akis hem elle surukleme scrollLeft 356 * uzerinden yurur. Onceki surumlerde akis CSS transform, surukleme 357 * ise scrollLeft ile yapiliyordu; iki koordinat sistemi ayni anda 358 * hareket edince hizalama bozuluyor ve serit bos alana kayiyordu. 359 * 360 * PHP icerigi IKI KEZ basiyor. Yarim genisligi gecince scrollLeft'i 361 * yarim geriye aliyoruz: gorunum ayni oldugu icin sicrama fark 362 * edilmiyor, sonsuz donguyu bu saglıyor. 363 */ 364 function seritleriBaslat() { 365 var kaplar = document.querySelectorAll('.hesapis-ticker'); 366 var azHareket = window.matchMedia 367 && window.matchMedia('(prefers-reduced-motion: reduce)').matches; 353 368 354 369 Array.prototype.forEach.call(kaplar, function (kap) { 355 if (kap.dataset.hesapisKaydirma === '1') { return; } 356 kap.dataset.hesapisKaydirma = '1'; 357 358 var raf = kap.querySelector('.hesapis-ticker-track') || kap; 359 var zamanlayici = null; 370 if (kap.dataset.hesapisSerit === '1') { return; } 371 kap.dataset.hesapisSerit = '1'; 372 373 var raf = kap.querySelector('.hesapis-ticker-track'); 374 if (!raf) { return; } 375 376 // Sure kabin uzerindeki --hesapis-duration degiskeninden gelir; 377 // ayarlar sayfasindaki kaydirac bu degeri yaziyor. 378 var sure = parseFloat( 379 getComputedStyle(kap).getPropertyValue('--hesapis-duration') 380 ) || 30; 381 382 var duruyor = false; 383 var bekleme = null; 384 var oncekiAn = null; 360 385 361 386 function tut() { 362 if (zamanlayici) { clearTimeout(zamanlayici); zamanlayici = null; }363 kap.classList.add('hesapis-elde');387 duruyor = true; 388 if (bekleme) { clearTimeout(bekleme); bekleme = null; } 364 389 } 365 390 366 391 function birak() { 367 if ( zamanlayici) { clearTimeout(zamanlayici); }368 // Parmak kalkar kalkmaz devam et tirmek sarsintili duruyor;369 // kisa bir bekleme kullaniciya okumak icin firsat veriyor.370 zamanlayici = setTimeout(function () {371 kap.classList.remove('hesapis-elde');372 zamanlayici= null;392 if (bekleme) { clearTimeout(bekleme); } 393 // Parmak kalkar kalkmaz devam etmek sarsintili duruyor. 394 bekleme = setTimeout(function () { 395 duruyor = false; 396 oncekiAn = null; 397 bekleme = null; 373 398 }, 2500); 374 399 } … … 377 402 raf.addEventListener('touchend', birak, { passive: true }); 378 403 raf.addEventListener('touchcancel', birak, { passive: true }); 379 380 // Fare tekerlegiyle yatay kaydirma ve trackpad icin 381 raf.addEventListener('scroll', function () { 382 tut(); 383 birak(); 384 }, { passive: true }); 404 kap.addEventListener('mouseenter', tut); 405 kap.addEventListener('mouseleave', birak); 406 407 // Isletim sisteminde "hareketi azalt" seciliyse akis hic 408 // baslamaz; serit elle kaydirilabilir oldugu icin veri yine 409 // erisilebilir kalir (WCAG 2.3.3). 410 if (azHareket) { return; } 411 412 function adim(an) { 413 var yarim = raf.scrollWidth / 2; 414 if (yarim > 0 && !duruyor) { 415 if (oncekiAn !== null) { 416 // Bir tam tur = yarim genislik / sure saniye 417 var px = (yarim / sure) * ((an - oncekiAn) / 1000); 418 raf.scrollLeft += px; 419 if (raf.scrollLeft >= yarim) { raf.scrollLeft -= yarim; } 420 } 421 oncekiAn = an; 422 } else { 423 oncekiAn = an; 424 } 425 requestAnimationFrame(adim); 426 } 427 requestAnimationFrame(adim); 385 428 }); 386 429 } … … 388 431 $(document).ready(function() { 389 432 HesapisWidget.init(); 390 kaydirmayiEtkinlestir();433 seritleriBaslat(); 391 434 }); 392 435 393 436 // Ajax ile yenilenen seritler icin tekrar bagla 394 $(document).on('hesapis:refreshed', kaydirmayiEtkinlestir);437 $(document).on('hesapis:refreshed', seritleriBaslat); 395 438 396 439 // Global erişim için -
hesapis-market-data-gold-currency-crypto-prices/trunk/readme.txt
r3665637 r3665758 6 6 Tested up to: 7.1 7 7 Requires PHP: 7.4 8 Stable tag: 2.4. 38 Stable tag: 2.4.7 9 9 License: GPLv2 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 152 152 153 153 == Changelog == 154 155 = 2.4.7 = 156 **Fixed** 157 158 * **`accent_color` and `bg_secondary_color` did nothing.** Both are 159 documented shortcode attributes and both were accepted without 160 complaint, but no stylesheet rule ever read the custom properties they 161 set - `--hesapis-accent` and `--hesapis-primary` were declared in 162 `:root` and never used, and `--hesapis-bg-secondary` / `--hesapis-card-bg` 163 were not declared at all. The accent colour now drives the widget 164 heading rule and the ticker labels; the secondary background drives 165 table header rows and card surfaces. 166 * **The swipeable ticker from 2.4.3 did not work.** The strip was animated 167 with a CSS transform, and transforms create no scrollable overflow, so a 168 scrollable container had nothing to scroll. Auto-scroll and dragging now 169 share one mechanism (`scrollLeft`), which also removes the class of bug 170 where the two fought each other and pushed content out of view. 171 * **Ticker text sped up and vanished after a few minutes.** The script 172 duplicated the strip's contents on every initialisation, and 173 initialisation also runs on each auto-refresh, so copies doubled: 4, 8, 174 16. With a fixed duration every doubling made the strip twice as fast. 175 The markup already contains the two copies the loop needs, so the 176 duplication was removed entirely. This affected 2.4.1 and 2.4.2 too. 177 178 **Added** 179 180 * **`margin` attribute for the ticker.** Themes often wrap widget areas in 181 30-40px of bottom margin, which leaves the strip floating away from the 182 content below it. `margin="0"` closes the gap; any CSS length works. 183 * Ticker edge fades stay pinned to the edges while the strip is scrolled. 184 185 = 2.4.4 = 186 **Fixed** 187 188 * **The swipeable ticker introduced in 2.4.3 did not actually work.** The 189 strip is animated with a CSS transform, and transforms do not create 190 scrollable overflow - so making the container scrollable had nothing to 191 scroll. The content now carries its real width and dragging works as 192 described. 193 * **Ticker text sped up and vanished after a few minutes.** The script 194 duplicated the strip's contents on every initialisation, and 195 initialisation also runs on each auto-refresh: 4 copies became 8, then 196 16. With the animation duration fixed, every doubling made the strip 197 twice as fast until the text was unreadable. The duplication now happens 198 once per element. This affected 2.4.1 and 2.4.2 as well. 199 * Dragging and the animation no longer fight each other: the strip eases 200 back to the start before the animation resumes, instead of drifting out 201 of view. 202 * The ticker's edge fades stay pinned to the edges while you scroll. 154 203 155 204 = 2.4.3 = … … 224 273 == Upgrade Notice == 225 274 275 = 2.4.7 = 276 Makes accent_color and bg_secondary_color actually work, fixes the swipeable 277 ticker introduced in 2.4.3, and stops ticker text speeding up and disappearing. 278 279 = 2.4.4 = 280 Fixes the swipeable ticker from 2.4.3, which did not work, and a long-standing 281 bug that made ticker text speed up and disappear after a few minutes. 282 226 283 = 2.4.3 = 227 284 Important fix: the Settings link was broken, which prevented new users from
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)