taldir

Directory service to resolve wallet mailboxes by messenger addresses
Log | Files | Refs | Submodules | README | LICENSE

commit 22f0457b1be0ecb09b48938c2f7bd2be8a2aa1e1
parent 29a37cd97541ce039eaedd6de851ec0cd1598d7a
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date:   Mon, 11 Jul 2022 19:39:29 +0200

serve static files for styles

Diffstat:
Mcmd/taldir-server/testdata/taldir-validate-test | 1+
Mpkg/rest/taldir.go | 2++
Astatic/css/style.css | 9+++++++++
Mtemplates/validation_landing.html | 5+++--
4 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/cmd/taldir-server/testdata/taldir-validate-test b/cmd/taldir-server/testdata/taldir-validate-test @@ -1,3 +1,4 @@ #!/bin/bash echo $1 $2 +echo $(./taldir-cli -l -a $1 -c $2) echo $2 > validation_code diff --git a/pkg/rest/taldir.go b/pkg/rest/taldir.go @@ -639,6 +639,8 @@ func (t *Taldir) setupHandlers() { /* Config API */ t.Router.HandleFunc("/config", t.configResponse).Methods("GET") + /* Aissets HTML */ + t.Router.PathPrefix("/css").Handler(http.StripPrefix("/css", http.FileServer(http.Dir("./static/css")))) /* Registration API */ t.Router.HandleFunc("/{h_address}", t.getSingleEntry).Methods("GET") diff --git a/static/css/style.css b/static/css/style.css @@ -0,0 +1,9 @@ +.qr { + text-align: center; +} + +.taldir-qr { + margin: 1em; + border: 1px solid #555; + border-radius: 1em; +} diff --git a/templates/validation_landing.html b/templates/validation_landing.html @@ -4,13 +4,14 @@ <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <link href="/css/style.css" rel="stylesheet"> <title>Validation Landing Page</title> </head> <body> - <div class="container"> + <div class="qr"> <h1>Scan this QR code with your Taler Wallet to complete your registration.</h1> <a href="{{.WalletLink}}"> - <img src="{{.QRCode}}"/> + <img class="taldir-qr" src="{{.QRCode}}"/> </a> </div> </body>