10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-11-04 13:13:55 +01: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> <script>
{{- $files := readDir "/static/data/abs" }} {{- $dir := "/static/data/" }}
{{- $subdir := "abs" }}
{{- $files := readDir (path.Join $dir $subdir )}}
{{- $list := slice }} {{- $list := slice }}
function getAbsFilesName(){ function getAbsFilesName(){
{{- range $files }} {{- range $files }}
{{- $ext := path.Ext .Name}} {{- $ext := path.Ext .Name}}
{{- if eq $ext ".dat" }} {{- if eq $ext ".dat" }}
{{- $list = $list | append (print "abs/" .Name) }} {{- $list = $list | append (path.Join $subdir .Name) }}
{{- end }} {{- end }}
{{- end }} {{- end }}
var files=JSON.parse({{ jsonify $list }}) var files=JSON.parse({{ jsonify $list }})
return files return files
} }
{{- $files := readDir "/static/data/fluo" }} {{- $subdir := "fluo" }}
{{- $files := readDir (path.Join $dir $subdir )}}
{{- $list := slice }} {{- $list := slice }}
function getFluoFilesName(){ function getFluoFilesName(){
{{- range $files }} {{- range $files }}
{{- $ext := path.Ext .Name}} {{- $ext := path.Ext .Name}}
{{- if eq $ext ".dat" }} {{- if eq $ext ".dat" }}
{{- $list = $list | append (print "fluo/" .Name) }} {{- $list = $list | append (path.Join $subdir .Name) }}
{{- end }} {{- end }}
{{- end }} {{- end }}
var files=JSON.parse({{ jsonify $list }}) var files=JSON.parse({{ jsonify $list }})