diff options
author | Martin Fischer <martin@push-f.com> | 2021-03-04 08:01:53 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2021-03-04 08:04:05 +0100 |
commit | d5ae42fa1d63749de5ac332c83fd62c51eaaa5e2 (patch) | |
tree | 0427ad1657dfc8a71764c8d226b44cb078145c66 /views | |
parent | b0c30d5b3cc05c27270c9c6fdfb7576397bfccb0 (diff) |
add scraper for Mexico
Diffstat (limited to 'views')
-rw-r--r-- | views/search.html | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/views/search.html b/views/search.html index 5cf0483..9373375 100644 --- a/views/search.html +++ b/views/search.html @@ -8,15 +8,22 @@ <body> <a href="//{{.Domain}}"><img height=140 class=logo src="//{{.Domain}}/assets/logo.svg"></a> <h1>National Law of {{.Country.Name}}</h1> + {{if not .Country.HasPlaceholder}} + <p><big><a href="{{.Country.SearchURL}}">{{.Country.SearchURL}}</a></big></p> + + {{if not .HasJSONLaws}} + (No search form here because the search isn't linkable.) + {{end}} + {{end}} {{if .Country.HasPlaceholder}} - <form autocomplete="off"> - <input id=search name=q autofocus {{if .HasJSONLaws}}data-json{{end}}> + <form> + {{end}} + {{if or .Country.HasPlaceholder .HasJSONLaws}} + <input id=search name=q autocomplete="off" autofocus {{if .HasJSONLaws}}data-json{{end}}> <ul id=suggestions></ul> - </form> - {{else}} - <p><big><a href="{{.Country.SearchURL}}">{{.Country.SearchURL}}</a></big></p> - - (No search form here because the search isn't linkable.) + {{end}} + {{if .Country.HasPlaceholder}} + </form> {{end}} <script src="//{{.Domain}}/assets/script.js"></script> </body> |