Changeset 2675560
- Timestamp:
- 02/09/2022 09:08:48 AM (4 years ago)
- Location:
- wpgancio/trunk
- Files:
-
- 2 edited
-
js/gancio-events.es.js (modified) (17 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
wpgancio/trunk/js/gancio-events.es.js
r2658720 r2675560 67 67 if (text2.wholeText !== data) 68 68 text2.data = data; 69 } 70 function toggle_class(element2, name, toggle) { 71 element2.classList[toggle ? "add" : "remove"](name); 69 72 } 70 73 function attribute_to_object(attributes) { … … 280 283 function get_each_context(ctx, list, i) { 281 284 const child_ctx = ctx.slice(); 282 child_ctx[ 9] = list[i];285 child_ctx[11] = list[i]; 283 286 return child_ctx; 284 287 } 288 function get_each_context_1(ctx, list, i) { 289 const child_ctx = ctx.slice(); 290 child_ctx[14] = list[i]; 291 return child_ctx; 292 } 285 293 function create_if_block$1(ctx) { 286 let div1; 287 let a; 288 let div0; 289 let span; 290 let t0_value = (ctx[1] || "Gancio") + ""; 291 let t0; 292 let t1; 293 let img; 294 let img_src_value; 295 let t2; 296 let each_value = ctx[3]; 294 let div; 295 let t; 296 let if_block = ctx[1] && ctx[3] === "true" && create_if_block_4(ctx); 297 let each_value = ctx[4]; 297 298 let each_blocks = []; 298 299 for (let i = 0; i < each_value.length; i += 1) { … … 301 302 return { 302 303 c() { 303 div1 = element("div"); 304 a = element("a"); 305 div0 = element("div"); 306 span = element("span"); 307 t0 = text(t0_value); 308 t1 = space(); 309 img = element("img"); 310 t2 = space(); 304 div = element("div"); 305 if (if_block) 306 if_block.c(); 307 t = space(); 311 308 for (let i = 0; i < each_blocks.length; i += 1) { 312 309 each_blocks[i].c(); 313 310 } 314 attr(span, "id", "headerTitle"); 315 attr(img, "id", "logo"); 316 attr(img, "alt", "logo"); 317 if (!src_url_equal(img.src, img_src_value = "" + (ctx[0] + "/logo.png"))) 318 attr(img, "src", img_src_value); 319 attr(div0, "class", "content"); 320 attr(a, "href", ctx[0]); 321 attr(a, "target", "_blank"); 322 attr(div1, "id", "gancioEvents"); 323 attr(div1, "class", ctx[2]); 311 attr(div, "id", "gancioEvents"); 312 toggle_class(div, "dark", ctx[2] === "dark"); 313 toggle_class(div, "light", ctx[2] === "light"); 314 toggle_class(div, "sidebar", ctx[3] === "true"); 315 toggle_class(div, "nosidebar", ctx[3] !== "true"); 324 316 }, 325 317 m(target, anchor) { 326 insert(target, div1, anchor); 327 append(div1, a); 328 append(a, div0); 329 append(div0, span); 330 append(span, t0); 331 append(div0, t1); 332 append(div0, img); 333 append(div1, t2); 318 insert(target, div, anchor); 319 if (if_block) 320 if_block.m(div, null); 321 append(div, t); 334 322 for (let i = 0; i < each_blocks.length; i += 1) { 335 each_blocks[i].m(div 1, null);323 each_blocks[i].m(div, null); 336 324 } 337 325 }, 338 326 p(ctx2, dirty) { 339 if (dirty & 2 && t0_value !== (t0_value = (ctx2[1] || "Gancio") + "")) 340 set_data(t0, t0_value); 341 if (dirty & 1 && !src_url_equal(img.src, img_src_value = "" + (ctx2[0] + "/logo.png"))) { 342 attr(img, "src", img_src_value); 343 } 344 if (dirty & 1) { 345 attr(a, "href", ctx2[0]); 346 } 347 if (dirty & 9) { 348 each_value = ctx2[3]; 327 if (ctx2[1] && ctx2[3] === "true") { 328 if (if_block) { 329 if_block.p(ctx2, dirty); 330 } else { 331 if_block = create_if_block_4(ctx2); 332 if_block.c(); 333 if_block.m(div, t); 334 } 335 } else if (if_block) { 336 if_block.d(1); 337 if_block = null; 338 } 339 if (dirty & 25) { 340 each_value = ctx2[4]; 349 341 let i; 350 342 for (i = 0; i < each_value.length; i += 1) { … … 355 347 each_blocks[i] = create_each_block(child_ctx); 356 348 each_blocks[i].c(); 357 each_blocks[i].m(div 1, null);349 each_blocks[i].m(div, null); 358 350 } 359 351 } … … 364 356 } 365 357 if (dirty & 4) { 366 attr(div1, "class", ctx2[2]); 358 toggle_class(div, "dark", ctx2[2] === "dark"); 359 } 360 if (dirty & 4) { 361 toggle_class(div, "light", ctx2[2] === "light"); 362 } 363 if (dirty & 8) { 364 toggle_class(div, "sidebar", ctx2[3] === "true"); 365 } 366 if (dirty & 8) { 367 toggle_class(div, "nosidebar", ctx2[3] !== "true"); 367 368 } 368 369 }, 369 370 d(detaching) { 370 371 if (detaching) 371 detach(div1); 372 detach(div); 373 if (if_block) 374 if_block.d(); 372 375 destroy_each(each_blocks, detaching); 373 376 } 374 377 }; 375 378 } 376 function create_ each_block(ctx) {379 function create_if_block_4(ctx) { 377 380 let a; 378 let div 2;381 let div1; 379 382 let div0; 380 let t0_value = when$1(ctx[9].start_datetime) + "";381 383 let t0; 382 384 let t1; 383 let span; 384 let t2; 385 let t3_value = ctx[9].place.name + ""; 386 let t3; 387 let t4; 388 let div1; 389 let t5_value = ctx[9].title + ""; 390 let t5; 391 let t6; 392 let a_href_value; 393 let a_title_value; 385 let img; 386 let img_src_value; 394 387 return { 395 388 c() { 396 389 a = element("a"); 397 div 2= element("div");390 div1 = element("div"); 398 391 div0 = element("div"); 399 t0 = text( t0_value);392 t0 = text(ctx[1]); 400 393 t1 = space(); 401 span = element("span"); 402 t2 = text("@"); 403 t3 = text(t3_value); 404 t4 = space(); 405 div1 = element("div"); 406 t5 = text(t5_value); 407 t6 = space(); 408 attr(span, "class", "place"); 409 attr(div0, "class", "subtitle"); 410 attr(div1, "class", "title"); 411 attr(div2, "class", "content"); 412 attr(a, "href", a_href_value = "" + (ctx[0] + "/event/" + (ctx[9].slug || ctx[9].id))); 413 attr(a, "title", a_title_value = ctx[9].title); 394 img = element("img"); 395 attr(div0, "class", "title"); 396 attr(img, "id", "logo"); 397 attr(img, "alt", "logo"); 398 if (!src_url_equal(img.src, img_src_value = "" + (ctx[0] + "/logo.png"))) 399 attr(img, "src", img_src_value); 400 attr(div1, "class", "content"); 401 attr(a, "href", ctx[0]); 414 402 attr(a, "target", "_blank"); 403 attr(a, "id", "header"); 415 404 }, 416 405 m(target, anchor) { 417 406 insert(target, a, anchor); 418 append(a, div 2);419 append(div 2, div0);407 append(a, div1); 408 append(div1, div0); 420 409 append(div0, t0); 421 append(div0, t1); 422 append(div0, span); 423 append(span, t2); 424 append(span, t3); 425 append(div2, t4); 426 append(div2, div1); 427 append(div1, t5); 428 append(a, t6); 410 append(div1, t1); 411 append(div1, img); 429 412 }, 430 413 p(ctx2, dirty) { 431 if (dirty & 8 && t0_value !== (t0_value = when$1(ctx2[9].start_datetime) + "")) 432 set_data(t0, t0_value); 433 if (dirty & 8 && t3_value !== (t3_value = ctx2[9].place.name + "")) 434 set_data(t3, t3_value); 435 if (dirty & 8 && t5_value !== (t5_value = ctx2[9].title + "")) 436 set_data(t5, t5_value); 437 if (dirty & 9 && a_href_value !== (a_href_value = "" + (ctx2[0] + "/event/" + (ctx2[9].slug || ctx2[9].id)))) { 438 attr(a, "href", a_href_value); 439 } 440 if (dirty & 8 && a_title_value !== (a_title_value = ctx2[9].title)) { 441 attr(a, "title", a_title_value); 414 if (dirty & 2) 415 set_data(t0, ctx2[1]); 416 if (dirty & 1 && !src_url_equal(img.src, img_src_value = "" + (ctx2[0] + "/logo.png"))) { 417 attr(img, "src", img_src_value); 418 } 419 if (dirty & 1) { 420 attr(a, "href", ctx2[0]); 442 421 } 443 422 }, … … 448 427 }; 449 428 } 429 function create_if_block_2(ctx) { 430 let div; 431 function select_block_type(ctx2, dirty) { 432 if (ctx2[11].media.length) 433 return create_if_block_3; 434 return create_else_block; 435 } 436 let current_block_type = select_block_type(ctx); 437 let if_block = current_block_type(ctx); 438 return { 439 c() { 440 div = element("div"); 441 if_block.c(); 442 attr(div, "class", "img"); 443 }, 444 m(target, anchor) { 445 insert(target, div, anchor); 446 if_block.m(div, null); 447 }, 448 p(ctx2, dirty) { 449 if (current_block_type === (current_block_type = select_block_type(ctx2)) && if_block) { 450 if_block.p(ctx2, dirty); 451 } else { 452 if_block.d(1); 453 if_block = current_block_type(ctx2); 454 if (if_block) { 455 if_block.c(); 456 if_block.m(div, null); 457 } 458 } 459 }, 460 d(detaching) { 461 if (detaching) 462 detach(div); 463 if_block.d(); 464 } 465 }; 466 } 467 function create_else_block(ctx) { 468 let img; 469 let img_alt_value; 470 let img_src_value; 471 return { 472 c() { 473 img = element("img"); 474 attr(img, "style", "aspect-ratio=1.7778;"); 475 attr(img, "alt", img_alt_value = ctx[11].title); 476 if (!src_url_equal(img.src, img_src_value = ctx[0] + "/noimg.svg")) 477 attr(img, "src", img_src_value); 478 attr(img, "loading", "lazy"); 479 }, 480 m(target, anchor) { 481 insert(target, img, anchor); 482 }, 483 p(ctx2, dirty) { 484 if (dirty & 16 && img_alt_value !== (img_alt_value = ctx2[11].title)) { 485 attr(img, "alt", img_alt_value); 486 } 487 if (dirty & 1 && !src_url_equal(img.src, img_src_value = ctx2[0] + "/noimg.svg")) { 488 attr(img, "src", img_src_value); 489 } 490 }, 491 d(detaching) { 492 if (detaching) 493 detach(img); 494 } 495 }; 496 } 497 function create_if_block_3(ctx) { 498 let img; 499 let img_style_value; 500 let img_alt_value; 501 let img_src_value; 502 return { 503 c() { 504 img = element("img"); 505 attr(img, "style", img_style_value = "object-position: " + position$1(ctx[11]) + "; aspect-ratio=1.7778;"); 506 attr(img, "alt", img_alt_value = ctx[11].media[0].name); 507 if (!src_url_equal(img.src, img_src_value = ctx[0] + "/media/thumb/" + ctx[11].media[0].url)) 508 attr(img, "src", img_src_value); 509 attr(img, "loading", "lazy"); 510 }, 511 m(target, anchor) { 512 insert(target, img, anchor); 513 }, 514 p(ctx2, dirty) { 515 if (dirty & 16 && img_style_value !== (img_style_value = "object-position: " + position$1(ctx2[11]) + "; aspect-ratio=1.7778;")) { 516 attr(img, "style", img_style_value); 517 } 518 if (dirty & 16 && img_alt_value !== (img_alt_value = ctx2[11].media[0].name)) { 519 attr(img, "alt", img_alt_value); 520 } 521 if (dirty & 17 && !src_url_equal(img.src, img_src_value = ctx2[0] + "/media/thumb/" + ctx2[11].media[0].url)) { 522 attr(img, "src", img_src_value); 523 } 524 }, 525 d(detaching) { 526 if (detaching) 527 detach(img); 528 } 529 }; 530 } 531 function create_if_block_1$1(ctx) { 532 let div; 533 let each_value_1 = ctx[11].tags; 534 let each_blocks = []; 535 for (let i = 0; i < each_value_1.length; i += 1) { 536 each_blocks[i] = create_each_block_1(get_each_context_1(ctx, each_value_1, i)); 537 } 538 return { 539 c() { 540 div = element("div"); 541 for (let i = 0; i < each_blocks.length; i += 1) { 542 each_blocks[i].c(); 543 } 544 attr(div, "class", "tags"); 545 }, 546 m(target, anchor) { 547 insert(target, div, anchor); 548 for (let i = 0; i < each_blocks.length; i += 1) { 549 each_blocks[i].m(div, null); 550 } 551 }, 552 p(ctx2, dirty) { 553 if (dirty & 16) { 554 each_value_1 = ctx2[11].tags; 555 let i; 556 for (i = 0; i < each_value_1.length; i += 1) { 557 const child_ctx = get_each_context_1(ctx2, each_value_1, i); 558 if (each_blocks[i]) { 559 each_blocks[i].p(child_ctx, dirty); 560 } else { 561 each_blocks[i] = create_each_block_1(child_ctx); 562 each_blocks[i].c(); 563 each_blocks[i].m(div, null); 564 } 565 } 566 for (; i < each_blocks.length; i += 1) { 567 each_blocks[i].d(1); 568 } 569 each_blocks.length = each_value_1.length; 570 } 571 }, 572 d(detaching) { 573 if (detaching) 574 detach(div); 575 destroy_each(each_blocks, detaching); 576 } 577 }; 578 } 579 function create_each_block_1(ctx) { 580 let span; 581 let t0; 582 let t1_value = ctx[14] + ""; 583 let t1; 584 return { 585 c() { 586 span = element("span"); 587 t0 = text("#"); 588 t1 = text(t1_value); 589 attr(span, "class", "tag"); 590 }, 591 m(target, anchor) { 592 insert(target, span, anchor); 593 append(span, t0); 594 append(span, t1); 595 }, 596 p(ctx2, dirty) { 597 if (dirty & 16 && t1_value !== (t1_value = ctx2[14] + "")) 598 set_data(t1, t1_value); 599 }, 600 d(detaching) { 601 if (detaching) 602 detach(span); 603 } 604 }; 605 } 606 function create_each_block(ctx) { 607 let a; 608 let t0; 609 let div2; 610 let div0; 611 let t1_value = when$1(ctx[11].start_datetime) + ""; 612 let t1; 613 let t2; 614 let div1; 615 let t3_value = ctx[11].title + ""; 616 let t3; 617 let t4; 618 let span1; 619 let t5; 620 let t6_value = ctx[11].place.name + ""; 621 let t6; 622 let t7; 623 let span0; 624 let t8_value = ctx[11].place.address + ""; 625 let t8; 626 let t9; 627 let t10; 628 let a_href_value; 629 let a_title_value; 630 let if_block0 = ctx[3] !== "true" && create_if_block_2(ctx); 631 let if_block1 = ctx[11].tags.length && create_if_block_1$1(ctx); 632 return { 633 c() { 634 a = element("a"); 635 if (if_block0) 636 if_block0.c(); 637 t0 = space(); 638 div2 = element("div"); 639 div0 = element("div"); 640 t1 = text(t1_value); 641 t2 = space(); 642 div1 = element("div"); 643 t3 = text(t3_value); 644 t4 = space(); 645 span1 = element("span"); 646 t5 = text("@"); 647 t6 = text(t6_value); 648 t7 = space(); 649 span0 = element("span"); 650 t8 = text(t8_value); 651 t9 = space(); 652 if (if_block1) 653 if_block1.c(); 654 t10 = space(); 655 attr(div0, "class", "subtitle"); 656 attr(div1, "class", "title"); 657 attr(span0, "class", "subtitle"); 658 attr(span1, "class", "place"); 659 attr(div2, "class", "content"); 660 attr(a, "href", a_href_value = "" + (ctx[0] + "/event/" + (ctx[11].slug || ctx[11].id))); 661 attr(a, "class", "event"); 662 attr(a, "title", a_title_value = ctx[11].title); 663 attr(a, "target", "_blank"); 664 }, 665 m(target, anchor) { 666 insert(target, a, anchor); 667 if (if_block0) 668 if_block0.m(a, null); 669 append(a, t0); 670 append(a, div2); 671 append(div2, div0); 672 append(div0, t1); 673 append(div2, t2); 674 append(div2, div1); 675 append(div1, t3); 676 append(div2, t4); 677 append(div2, span1); 678 append(span1, t5); 679 append(span1, t6); 680 append(span1, t7); 681 append(span1, span0); 682 append(span0, t8); 683 append(div2, t9); 684 if (if_block1) 685 if_block1.m(div2, null); 686 append(a, t10); 687 }, 688 p(ctx2, dirty) { 689 if (ctx2[3] !== "true") { 690 if (if_block0) { 691 if_block0.p(ctx2, dirty); 692 } else { 693 if_block0 = create_if_block_2(ctx2); 694 if_block0.c(); 695 if_block0.m(a, t0); 696 } 697 } else if (if_block0) { 698 if_block0.d(1); 699 if_block0 = null; 700 } 701 if (dirty & 16 && t1_value !== (t1_value = when$1(ctx2[11].start_datetime) + "")) 702 set_data(t1, t1_value); 703 if (dirty & 16 && t3_value !== (t3_value = ctx2[11].title + "")) 704 set_data(t3, t3_value); 705 if (dirty & 16 && t6_value !== (t6_value = ctx2[11].place.name + "")) 706 set_data(t6, t6_value); 707 if (dirty & 16 && t8_value !== (t8_value = ctx2[11].place.address + "")) 708 set_data(t8, t8_value); 709 if (ctx2[11].tags.length) { 710 if (if_block1) { 711 if_block1.p(ctx2, dirty); 712 } else { 713 if_block1 = create_if_block_1$1(ctx2); 714 if_block1.c(); 715 if_block1.m(div2, null); 716 } 717 } else if (if_block1) { 718 if_block1.d(1); 719 if_block1 = null; 720 } 721 if (dirty & 17 && a_href_value !== (a_href_value = "" + (ctx2[0] + "/event/" + (ctx2[11].slug || ctx2[11].id)))) { 722 attr(a, "href", a_href_value); 723 } 724 if (dirty & 16 && a_title_value !== (a_title_value = ctx2[11].title)) { 725 attr(a, "title", a_title_value); 726 } 727 }, 728 d(detaching) { 729 if (detaching) 730 detach(a); 731 if (if_block0) 732 if_block0.d(); 733 if (if_block1) 734 if_block1.d(); 735 } 736 }; 737 } 450 738 function create_fragment$1(ctx) { 451 739 let if_block_anchor; 452 let if_block = ctx[ 3].length && create_if_block$1(ctx);740 let if_block = ctx[4].length && create_if_block$1(ctx); 453 741 return { 454 742 c() { … … 464 752 }, 465 753 p(ctx2, [dirty]) { 466 if (ctx2[ 3].length) {754 if (ctx2[4].length) { 467 755 if (if_block) { 468 756 if_block.p(ctx2, dirty); … … 487 775 }; 488 776 } 777 function position$1(event) { 778 if (event.media[0].focalpoint) { 779 const focalpoint = event.media[0].focalpoint; 780 return `${(focalpoint[0] + 1) * 50}% ${(focalpoint[1] + 1) * 50}%`; 781 } 782 return "center center"; 783 } 489 784 function when$1(timestamp) { 490 785 return new Date(timestamp * 1e3).toLocaleDateString(void 0, { 491 786 weekday: "long", 492 month: " short",787 month: "long", 493 788 day: "numeric", 494 789 hour: "2-digit", … … 498 793 function instance$1($$self, $$props, $$invalidate) { 499 794 let { baseurl = "" } = $$props; 500 let { title = " Gancio events" } = $$props;795 let { title = "" } = $$props; 501 796 let { maxlength = false } = $$props; 502 797 let { tags = "" } = $$props; 503 798 let { places = "" } = $$props; 504 799 let { theme = "light" } = $$props; 800 let { show_recurrent = false } = $$props; 801 let { sidebar = "true" } = $$props; 505 802 let mounted = false; 506 803 let events = []; 507 asyncfunction update2(v) {804 function update2(v) { 508 805 if (!mounted) 509 806 return; … … 518 815 params.push(`places=${places}`); 519 816 } 817 if (show_recurrent) { 818 params.push(`show_recurrent=true`); 819 } 520 820 fetch(`${baseurl}/api/events?${params.join("&")}`).then((res) => res.json()).then((e) => { 521 $$invalidate( 3, events = e);821 $$invalidate(4, events = e); 522 822 }).catch((e) => { 523 823 console.error("Error loading Gancio API -> ", e); … … 534 834 $$invalidate(1, title = $$props2.title); 535 835 if ("maxlength" in $$props2) 536 $$invalidate( 4, maxlength = $$props2.maxlength);836 $$invalidate(5, maxlength = $$props2.maxlength); 537 837 if ("tags" in $$props2) 538 $$invalidate( 5, tags = $$props2.tags);838 $$invalidate(6, tags = $$props2.tags); 539 839 if ("places" in $$props2) 540 $$invalidate( 6, places = $$props2.places);840 $$invalidate(7, places = $$props2.places); 541 841 if ("theme" in $$props2) 542 842 $$invalidate(2, theme = $$props2.theme); 843 if ("show_recurrent" in $$props2) 844 $$invalidate(8, show_recurrent = $$props2.show_recurrent); 845 if ("sidebar" in $$props2) 846 $$invalidate(3, sidebar = $$props2.sidebar); 543 847 }; 544 848 $$self.$$.update = () => { 545 if ($$self.$$.dirty & 118) {849 if ($$self.$$.dirty & 494) { 546 850 update2(); 547 851 } 548 852 }; 549 return [baseurl, title, theme, events, maxlength, tags, places]; 853 return [ 854 baseurl, 855 title, 856 theme, 857 sidebar, 858 events, 859 maxlength, 860 tags, 861 places, 862 show_recurrent 863 ]; 550 864 } 551 865 class GancioEvents extends SvelteElement { 552 866 constructor(options) { 553 867 super(); 554 this.shadowRoot.innerHTML = `<style>#gancioEvents{font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;overflow-x:hidden;font-size:1rem;width:100%;max-width:500px;box-sizing:content-box;box-shadow:rgba(60, 64, 67, 0.4) 0px 1px 2px 0px, rgba(60, 64, 67, 0.25) 0px 1px 3px 1px;border-radius:5px}#logo{position:absolute;top:10px;right:10px;height:40px}#headerTitle{line-height:45px;font-size:1.3rem;font-weight:600}a{text-decoration:none;color:var(--text-color);display:flex;flex-direction:column;flex:1 1 100%;padding:8px 20px;margin:0;line-height:1.275rem;font-weight:400;font-size:.875rem;position:relative;transition:background-color .3s cubic-bezier(.25,.8,.5,1), padding-left .3s;box-sizing:content-box}.dark{--bg-odd-color:#161616;--bg-even-color:#222;--bg-hover-color:#333;--text-color:white;--title-color:white}.light{--bg-odd-color:#f5f5f5;--bg-even-color:#FAFAFA;--bg-hover-color:#EEE;--text-color:#222;--title-color:black}a:nth-child(odd){background-color:var(--bg-odd-color)}a:nth-child(even){background-color:var(--bg-even-color)}a:first-child{border-radius:5px 5px 0px 0px}a:last-child{border-radius:0px 0px 5px 5px;padding-bottom:5px}a:hover{background-color:var(--bg-hover-color);padding-left:23px}.place{font-weight:600;color:#ff6e40}.title{color:var(--title-color)}</style>`;868 this.shadowRoot.innerHTML = `<style>#gancioEvents{font-family:ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";overflow-x:hidden;width:100%;box-sizing:content-box;margin:0 auto;font-size:1rem}.nosidebar{max-width:1200px}#header{padding:1.2rem 1rem;background-color:var(--bg-odd-color)}.sidebar{max-width:500px;box-shadow:rgba(60, 64, 67, 0.4) 0px 1px 2px 0px, rgba(60, 64, 67, 0.25) 0px 1px 3px 1px;border-radius:5px;font-size:1rem}.event .img{width:100%;max-width:450px;max-height:250px;aspect-ratio:1.7778;flex:1 0 auto}@media screen and (max-width: 800px){.event{flex-wrap:wrap}.event .img{max-width:100%}}.event img{object-fit:cover;border-radius:15px;width:100%;height:100%;box-shadow:rgba(50, 50, 93, 0.25) 0px 6px 12px -2px, rgba(0, 0, 0, 0.3) 0px 3px 7px -3px}.nosidebar .event{margin-bottom:2rem}.nosidebar .content{margin-left:1rem;margin-top:5px}.tags{margin-top:2px}#logo{position:absolute;top:10px;right:10px;height:40px}a{text-decoration:none;color:var(--text-color);display:flex;padding:8px 20px;margin:0;line-height:1.275rem;font-weight:400;font-size:.875rem;position:relative;transition:background-color .3s cubic-bezier(.25,.8,.5,1), padding .3s;box-sizing:content-box}a:hover .title,a:focus .title,a:active .title{text-decoration:underline}.dark{--bg-odd-color:#161616;--bg-even-color:#222;--bg-hover-color:#333;--text-color:white;--title-color:white;--line-color:rgba(120, 120, 120, 0.2)}.light{--bg-odd-color:#f5f5f5;--bg-even-color:#FAFAFA;--bg-hover-color:#EEE;--text-color:#222;--title-color:black;--line-color:rgba(220, 220, 220, 0.9)}.sidebar a{background-color:var(--bg-even-color);border-bottom:1px solid var(--line-color)}.sidebar a:hover,.sidebar a:focus,.sidebar a:active{background-color:var(--bg-hover-color);padding-left:15px;padding-right:25px}.place{font-weight:400;font-size:1.2rem;line-height:1.4rem;color:orangered}.title{color:var(--title-color);font-weight:bold;font-size:1.3rem;line-height:1.1em}.nosidebar .title{font-size:1.9em;line-height:1.1em}.subtitle{font-size:1rem;line-height:1.1em;color:var(--title-color);opacity:0.9}.tag{margin-right:10px;display:inline-block}</style>`; 555 869 init(this, { 556 870 target: this.shadowRoot, … … 560 874 baseurl: 0, 561 875 title: 1, 562 maxlength: 4, 563 tags: 5, 564 places: 6, 565 theme: 2 876 maxlength: 5, 877 tags: 6, 878 places: 7, 879 theme: 2, 880 show_recurrent: 8, 881 sidebar: 3 566 882 }, null); 567 883 if (options) { … … 576 892 } 577 893 static get observedAttributes() { 578 return ["baseurl", "title", "maxlength", "tags", "places", "theme"]; 894 return [ 895 "baseurl", 896 "title", 897 "maxlength", 898 "tags", 899 "places", 900 "theme", 901 "show_recurrent", 902 "sidebar" 903 ]; 579 904 } 580 905 get baseurl() { … … 593 918 } 594 919 get maxlength() { 595 return this.$$.ctx[ 4];920 return this.$$.ctx[5]; 596 921 } 597 922 set maxlength(maxlength) { … … 600 925 } 601 926 get tags() { 602 return this.$$.ctx[ 5];927 return this.$$.ctx[6]; 603 928 } 604 929 set tags(tags) { … … 607 932 } 608 933 get places() { 609 return this.$$.ctx[ 6];934 return this.$$.ctx[7]; 610 935 } 611 936 set places(places) { … … 618 943 set theme(theme) { 619 944 this.$$set({ theme }); 945 flush(); 946 } 947 get show_recurrent() { 948 return this.$$.ctx[8]; 949 } 950 set show_recurrent(show_recurrent) { 951 this.$$set({ show_recurrent }); 952 flush(); 953 } 954 get sidebar() { 955 return this.$$.ctx[3]; 956 } 957 set sidebar(sidebar) { 958 this.$$set({ sidebar }); 620 959 flush(); 621 960 } -
wpgancio/trunk/readme.txt
r2658727 r2675560 4 4 Tags: events, gancio, fediverse, AP, activity pub 5 5 Requires at least: 4.7 6 Tested up to: 5. 7.27 Stable tag: 1. 26 Tested up to: 5.9 7 Stable tag: 1.3 8 8 Requires PHP: 7.0 9 9 License: AGPLv3 or later 10 10 License URI: https://www.gnu.org/licenses/agpl-3.0.html 11 11 12 Connect a gancio instance to a Wordpress user so that published events are automatically pushed.12 This plugin allows you to [embed](https://gancio.org/usage/embed) a list of events or a single event from your [Gancio](https://gancio.org) website using a shortcode. 13 13 14 14 == Description ==
Note: See TracChangeset
for help on using the changeset viewer.