github.com/servernoj/jade@v0.0.0-20231225191405-efec98d19db1/example/index.jade.go (about)

     1  // Code generated by "jade.go"; DO NOT EDIT.
     2  
     3  package main
     4  
     5  import (
     6  	"io"
     7  
     8  	"github.com/Joker/hpp"
     9  )
    10  
    11  const (
    12  	index__0 = `<!DOCTYPE html><html lang="en"><head><title>`
    13  	index__1 = `</title><script type="text/javascript">			if(question){
    14  				answer(40 + 2)
    15  			}</script></head><body><h1>Jade - template engine`
    16  	index__2 = `</h1><div id="container" class="col">`
    17  	index__3 = `<p>				Jade/Pug is a terse and simple
    18  				templating language with
    19  				a <strong>focus</strong> on performance 
    20  				and powerful features.</p></div><footer><div class="footer">2019</div></footer></body></html>`
    21  	index__4 = `<div id="cmd">Precompile jade templates to `
    22  	index__5 = ` code.</div>`
    23  	index__6 = `<p>You are amazing</p>`
    24  	index__7 = `<p>Get on it!</p>`
    25  )
    26  
    27  func Index(pageTitle string, youAreUsingJade bool, wr io.Writer) {
    28  
    29  	r, w := io.Pipe()
    30  	go func() {
    31  		buffer := &WriterAsBuffer{w}
    32  
    33  		buffer.WriteString(index__0)
    34  		WriteEscString(pageTitle, buffer)
    35  		buffer.WriteString(index__1)
    36  
    37  		{
    38  			var (
    39  				golang = "Go"
    40  			)
    41  
    42  			buffer.WriteString(index__4)
    43  			WriteEscString(golang, buffer)
    44  			buffer.WriteString(index__5)
    45  		}
    46  
    47  		buffer.WriteString(index__2)
    48  
    49  		if youAreUsingJade {
    50  			buffer.WriteString(index__6)
    51  
    52  		} else {
    53  			buffer.WriteString(index__7)
    54  
    55  		}
    56  		buffer.WriteString(index__3)
    57  
    58  		w.Close()
    59  	}()
    60  	hpp.Format(r, wr)
    61  }