10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-07-03 18:06:06 +02:00

More Hugo code

This commit is contained in:
Mickaël Véril 2020-05-24 12:34:51 +02:00
parent 9b57d18319
commit 149837d3c2

View File

@ -1,23 +1,26 @@
<script>
{{- $files := readDir "/static/data/abs" }}
{{- $dir := "/static/data/" }}
{{- $subdir := "abs" }}
{{- $files := readDir (path.Join $dir $subdir )}}
{{- $list := slice }}
function getAbsFilesName(){
{{- range $files }}
{{- $ext := path.Ext .Name}}
{{- if eq $ext ".dat" }}
{{- $list = $list | append (print "abs/" .Name) }}
{{- $list = $list | append (path.Join $subdir .Name) }}
{{- end }}
{{- end }}
var files=JSON.parse({{ jsonify $list }})
return files
}
{{- $files := readDir "/static/data/fluo" }}
{{- $subdir := "fluo" }}
{{- $files := readDir (path.Join $dir $subdir )}}
{{- $list := slice }}
function getFluoFilesName(){
{{- range $files }}
{{- $ext := path.Ext .Name}}
{{- if eq $ext ".dat" }}
{{- $list = $list | append (print "fluo/" .Name) }}
{{- $list = $list | append (path.Join $subdir .Name) }}
{{- end }}
{{- end }}
var files=JSON.parse({{ jsonify $list }})