Jade: Links inside a paragraph

后端 未结 13 1938
野趣味
野趣味 2020-12-07 17:34

I\'m trying to author a few paragraphs with Jade, but finding it difficult when there are links inside a paragraph.

The best I can come up with, and I\'m wondering

相关标签:
13条回答
  • 2020-12-07 17:38

    Turns out there is (now at least) a perfectly simple option

    p Convert a .fit file using <a href="http://connect.garmin.com/"> Garmin Connect's</a> export functionality.
    
    0 讨论(0)
  • 2020-12-07 17:41

    If your links come from a data source you can use:

      ul
        each val in results
          p
            | blah blah 
            a(href="#{val.url}") #{val.name}
            |  more blah
    

    See interpolation

    0 讨论(0)
  • 2020-12-07 17:41

    As suggested by Daniel Baulig, used below with dynamic params

    | <a href=!{aData.link}>link</a>
    
    0 讨论(0)
  • 2020-12-07 17:42

    I did not realize that jade requires a line per tag. I thought we can save space. Much better if this can be understood ul>li>a[class="emmet"]{text}

    0 讨论(0)
  • 2020-12-07 17:50

    I had to add a period directly behind a link, like this:

    This is your test [link].

    I solved it like this:

    label(for="eula").lbl.lbl-checkbox.lbl-eula #{i18n.signup.text.accept_eula}
        | <a href="#about/termsandconditions" class=".lnk.lnk-eula">#{i18n.signup.links.eula}</a>.
    
    0 讨论(0)
  • 2020-12-07 17:53

    Another way to do it:

    p
      | this is the start of the para
      a(href="http://example.com") a link
      | this is he rest of the paragraph.
    
    0 讨论(0)
提交回复
热议问题