Uploaded image for project: 'Planet4'
  1. Planet4
  2. PLANET-5756

jQuery: remove jQuery from external_links.js / pdf_icon.js

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Released
    • Icon: Should have Should have
    • 2.52.0
    • 8
    • Performance
    • Sprint #150
    • telesto

      planet4-master-theme/assets/src/js/external_links.js
      planet4-master-theme/assets/src/js/pdf_icon.js

      setupExternalLinks() and setupPDFIcon() add an icon to external links and a target _blank for external links.

      The icon might be manageable in CSS (minus tricks to find for images in anchors).
      The automatic _blank target is in discussion:

      External links could depend on a list of allowed domains considered as "internal".

      External links and PDF links icons (pdf_icons.js) are added in a different way, we could try to unify the method.

      • CSS: :before rule depending on href attribute content
      • JS: toggle specific class depending on href content / append inline SVG

            mleray Maud Leray
            fhernand Florent Hernandez
            Magali Fatome Magali Fatome (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: