25 lines
483 B
Plaintext
25 lines
483 B
Plaintext
|
package main
|
||
|
|
||
|
import "strconv"
|
||
|
|
||
|
var red = "#ff0000";
|
||
|
|
||
|
css className() {
|
||
|
background-color: #ffffff;
|
||
|
color: { red };
|
||
|
}
|
||
|
|
||
|
script graph(data []any) {
|
||
|
const chart = LightweightCharts.createChart(document.body, { width: 400, height: 300 });
|
||
|
const lineSeries = chart.addLineSeries();
|
||
|
lineSeries.setData(data);
|
||
|
}
|
||
|
|
||
|
templ hello(name string, vars []string) {
|
||
|
<div>Hello, { name }</div>
|
||
|
for i, path := range vars {
|
||
|
<a href={ templ.URL(path) }>lol { strconv.Itoa(i) }/</a>
|
||
|
}
|
||
|
}
|
||
|
|