Search code examples
slim-lang

in slim how can i place in image between 2 lines of text?


I wand to display logo image wrapped between h1 style lines of text. I am using slim. How can I rewrite this code that it shows all in one line?

h1 text1
=image_tag 'image'
h1 text 2

or

h1 text1 =image_tag 'image' rest of text1

is that possible?


Solution

  • figured this out:

    h1 
     |text1 
     =image_tag "image" 
     |text2
    

    the solution was inspired by this question which has a great example of using Slim:

    rails slim indent syntax error