refactor: moving templates into dir
routes probably can live in main.go for simpler exercises
This commit is contained in:
16
templates/hello.templ
Normal file
16
templates/hello.templ
Normal file
@@ -0,0 +1,16 @@
|
||||
package templates
|
||||
|
||||
var myVar string = "some string, changed. and more"
|
||||
var anotherVar string = "hoho, cool"
|
||||
|
||||
templ Hello(name string) {
|
||||
<html>
|
||||
<head>
|
||||
<title>This is the title of the the webpage!</title>
|
||||
<link href="/static/output.css" rel="stylesheet"/>
|
||||
</head>
|
||||
<body class="bg-blue-100 text-xl">
|
||||
<p class="text-purple-700">This is an example paragraph. Anything in the <strong>body</strong> tag will appear on the page, just like this <strong>p</strong> tag and its contents.</p>
|
||||
</body>
|
||||
</html>
|
||||
}
|
||||
Reference in New Issue
Block a user