• Resolved belyvolk

    (@belyvolk)


    Добрый день.
    В подписи изображения Подпись и Описание сливаются. Возможно между ними сделать пробел или вынести Описание строчкой ниже?

    Good day.
    In the image caption, the Caption and Description merge. Is it possible to make a space between them or make the Description a line below?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Arno Welzel

    (@awelzel)

    Lightbox with PhotoSwipe only uses one single text for the caption.

    Can you show me an example where two text elements come together?

    В лайтбоксе с PhotoSwipe для надписи используется только один текст.

    Можете ли вы показать мне пример, где два текстовых элемента собираются вместе?

    Thread Starter belyvolk

    (@belyvolk)

    Извините, забыл прикрепить ссылку с примером.

    http://shainurau.com/en/portrait/#&gid=1&pid=1

    Plugin Author Arno Welzel

    (@awelzel)

    Ok, I see the problem:

    <figure class="fg-item-inner">
      <a href="http://shainurau.com/wp-content/uploads/2019/07/polly.jpg" data-caption-title="Polyanna" data-caption-desc="45x35 cm, oil on canvas, 2019" data-attachment-id="1764" class="foogallery-thumb  fg-thumb" data-width="1199" data-height="1553">
        <span class="fg-image-wrap">
          <img alt="polly" title="Polyanna" class="bf-img fg-image" data-src-fg="http://shainurau.com/wp-content/uploads/cache/2019/07/polly/1260625560.jpg" src="http://shainurau.com/wp-content/uploads/cache/2019/07/polly/1260625560.jpg" style="" width="250" height="250">
        </span>
      </a>
      <figcaption class="fg-caption">
        <div class="fg-caption-inner">
          <div class="fg-caption-title">Polyanna</div>
          <div class="fg-caption-desc">45×35 cm, oil on canvas, 2019</div>
        </div>
      </figcaption>
    </figure>

    There are two elements in the caption (fg-caption-title and fg-caption-desc) and Lightbox with PhotoSwipe only uses the text part of these DIV elements. Also see here, line 44 and 45:

    https://github.com/arnowelzel/lightbox-photoswipe/blob/master/js/frontend.js

    I never had these kind of captions before – I see, what I can do. The next update should fix this. I will use the data-caption-title and data-caption-desc attributes if they are present and output them with a line break – first title, then a new line with the description. The elements will have CSS classes, so you can style with different fonts if needed.

    Thread Starter belyvolk

    (@belyvolk)

    Thank you very much, I will wait for the next update of your wonderful plugin.

    Plugin Author Arno Welzel

    (@awelzel)

    Release 2.5 contains additional support for data-caption-title and data-caption-desc attributes in the image link. You may need to turn off the backend option “Get the image captions from the database” to avoid using captions from the database.

    The output will be two <div> elements which you can also style with custom styles for the CSS classes pswp__caption__title and pswp__caption__desc in your theme styles or theme customize options.

    Thread Starter belyvolk

    (@belyvolk)

    Thank you, now everything is beautiful

    Plugin Author Arno Welzel

    (@awelzel)

    Thank you for the feedback. Your pictures are also nice.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘The Caption and Description merge’ is closed to new replies.