summaryrefslogtreecommitdiff
path: root/lex-serve/templates
diff options
context:
space:
mode:
Diffstat (limited to 'lex-serve/templates')
-rw-r--r--lex-serve/templates/index.html.tmpl17
-rw-r--r--lex-serve/templates/search.html.tmpl30
2 files changed, 47 insertions, 0 deletions
diff --git a/lex-serve/templates/index.html.tmpl b/lex-serve/templates/index.html.tmpl
new file mode 100644
index 0000000..3d8c04f
--- /dev/null
+++ b/lex-serve/templates/index.html.tmpl
@@ -0,0 +1,17 @@
+<!doctype html>
+<html>
+<head>
+ <title>Lex.surf: Portal to National Law</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
+ <link rel="stylesheet" href="/assets/style.css" />
+</head>
+<body>
+ <img alt="lex.surf" height=140 class=logo src="/assets/logo.svg">
+ <h2>The portal to&nbsp;national&nbsp;law.</h2>
+ <div class=countries>
+ {{range $key, $c := .Countries -}}
+ <a class=cc-link href="//{{$key}}.{{$.Domain}}" title="{{$c.Name}}">{{$key | ToUpper}}</a>
+ {{- end}}
+ </div>
+</body>
+</html>
diff --git a/lex-serve/templates/search.html.tmpl b/lex-serve/templates/search.html.tmpl
new file mode 100644
index 0000000..70c8c86
--- /dev/null
+++ b/lex-serve/templates/search.html.tmpl
@@ -0,0 +1,30 @@
+<!doctype html>
+<html>
+<head>
+ <title>National Law of {{.Country.Name}}</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
+ <link rel="stylesheet" href="//{{.Domain}}/assets/style.css" />
+</head>
+<body>
+ <a href="//{{.Domain}}"><img alt="lex.surf" 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>
+ {{end}}
+ {{if or .Country.HasPlaceholder .HasJSONLaws}}
+ <input id=search name=q aria-label="Search" autocomplete="off" autofocus {{if .HasJSONLaws}}data-json{{end}}>
+ <ul id=suggestions></ul>
+ {{end}}
+ {{if .Country.HasPlaceholder}}
+ </form>
+ {{end}}
+ <script src="//{{.Domain}}/assets/script.js"></script>
+</body>
+</html>