File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 11{{ define "styles" }}
2- < link rel ="stylesheet " href ="{{ " . / covidcast/vendors.css" | relURL }}" />
3- < link rel ="stylesheet " href ="{{ " . / covidcast/styles.css" | relURL }}" />
2+ < link rel ="stylesheet " href ="{{ (partial " covidcast /find-file.html" "vendor.*\\.css$") | relURL }}" />
3+ < link rel ="stylesheet " href ="{{ (partial " covidcast /find-file.html" " styles.*\\. css$") | relURL }}" />
44{{ end }}
55{{ define "scripts" }}
6- < script src ="{{ " . / covidcast/vendors.js" | relURL }}"> </ script >
7- < script src ="{{ " . / covidcast/styles.js" | relURL }}"> </ script >
8- < script src ="{{ " . / covidcast/bundle.js" | relURL }}"> </ script >
6+ < script src ="{{ (partial " covidcast /find-file.html" "vendor.*\\.js$") | relURL }}"> </ script >
7+ < script src ="{{ (partial " covidcast /find-file.html" " styles.*\\.js$") | relURL }}"> </ script >
8+ < script src ="{{ (partial " covidcast /find-file.html" " bundle.*\\.js$") | relURL }}"> </ script >
99{{ end }}
1010{{ define "body_class" }}covidcast_wrapper{{ end }}
1111{{ define "main" }}
Original file line number Diff line number Diff line change 1+ <!--find a file given a prefix and directory -->
2+ {{ $pattern := . }}
3+ {{ $matchedFile := false }}
4+ {{ range (readDir "./static/covidcast") }}
5+ {{ $testFile := . }}
6+ {{ with (index (findRE $pattern .Name 1) 0) }}
7+ {{ $matchedFile = path.Join "./covidcast" $testFile.Name }}
8+ {{ end }}
9+ {{ end }}
10+ {{ return $matchedFile }}
You can’t perform that action at this time.
0 commit comments