cerrado @ b9b6688c8751b3ff0fe89655683af48eff195501

feat: Add skeleton login page
diff --git a/pkg/handler/auth/login.go b/pkg/handler/auth/login.go
new file mode 100644
index 0000000000000000000000000000000000000000..7e77a67ba295d77bb0b742eb3ccefea98d9fd411
--- /dev/null
+++ b/pkg/handler/auth/login.go
@@ -0,0 +1,20 @@
+package auth
+
+import (
+	"net/http"
+
+	"git.gabrielgio.me/cerrado/pkg/ext"
+	"git.gabrielgio.me/cerrado/templates"
+)
+
+type (
+	LoginHandler struct{}
+)
+
+func (g *LoginHandler) Login(w http.ResponseWriter, r *http.Request) error {
+	ext.SetHTML(w)
+
+	login := &templates.LoginPage{}
+	templates.WritePageTemplate(w, login)
+	return nil
+}
diff --git a/pkg/handler/router.go b/pkg/handler/router.go
index a2ac98a151f99376795efb2ad8a5b2268f35e578..32bd78adff98f82bca843aba96d2ddb85d7c79f7 100644
--- a/pkg/handler/router.go
+++ b/pkg/handler/router.go
@@ -6,6 +6,7 @@
 	serverconfig "git.gabrielgio.me/cerrado/pkg/config"
 	"git.gabrielgio.me/cerrado/pkg/ext"
 	"git.gabrielgio.me/cerrado/pkg/handler/about"
+	"git.gabrielgio.me/cerrado/pkg/handler/auth"
 	"git.gabrielgio.me/cerrado/pkg/handler/git"
 	"git.gabrielgio.me/cerrado/pkg/handler/static"
 	"git.gabrielgio.me/cerrado/pkg/service"
@@ -21,6 +22,7 @@ ) (http.Handler, error) {
 	var (
 		gitHandler   = git.NewGitHandler(gitService, configRepo)
 		aboutHandler = about.NewAboutHandler(configRepo)
+		loginHandler = &auth.LoginHandler{}
 	)
 
 	staticHandler, err := static.ServeStaticHandler()
@@ -33,6 +35,7 @@ 	mux.AddMiddleware(ext.Compress)
 	mux.AddMiddleware(ext.Log)
 
 	mux.HandleFunc("/static/{file}", staticHandler)
+	mux.HandleFunc("/login/{$}", loginHandler.Login)
 	mux.HandleFunc("/{name}/about/{$}", gitHandler.About)
 	mux.HandleFunc("/{name}/", gitHandler.Summary)
 	mux.HandleFunc("/{name}/refs/{$}", gitHandler.Refs)
diff --git a/scss/main.scss b/scss/main.scss
index b76423f843be94eb52197bf2e42b219eada6c556..21701f5408920e4d33ab77f61ccd496064469e36 100644
--- a/scss/main.scss
+++ b/scss/main.scss
@@ -5,6 +5,10 @@ $base-font-size: 1rem;
 $font-family-monospace: monospace;
 $headings-margin-bottom: 0;
 
+$input-border-radius: 0;
+
+$btn-border-radius: 0;
+
 // basic functionality
 @import "bootstrap/scss/_functions.scss";
 @import "bootstrap/scss/_variables.scss";
@@ -21,6 +25,8 @@ @import "bootstrap/scss/_containers.scss";
 @import "bootstrap/scss/_nav.scss";
 @import "bootstrap/scss/_navbar.scss";
 @import "bootstrap/scss/_grid.scss";
+@import "bootstrap/scss/_forms.scss";
+@import "bootstrap/scss/_buttons.scss";
 @import "tree.scss";
 
 // TODO remove once is not needed
@@ -80,7 +86,6 @@     property: margin-left,
     class: ms,
     values: map-merge($spacers, (auto: auto))
   ),
-
 );
 
 @import "bootstrap/scss/utilities/_api.scss";
@@ -162,3 +167,10 @@     padding: $spacer;
     max-width: calc(100% - calc(2 * #{$spacer}));
   }
 }
+
+input {
+     width: 100%; 
+     box-sizing: border-box;
+     -webkit-box-sizing:border-box;
+     -moz-box-sizing: border-box;
+}
diff --git a/templates/login.qtpl b/templates/login.qtpl
new file mode 100644
index 0000000000000000000000000000000000000000..eee57117106360c2f0d9bbf104e0b820bf051e92
--- /dev/null
+++ b/templates/login.qtpl
@@ -0,0 +1,31 @@
+{% code
+type LoginPage struct {
+}
+%}
+
+{% func (p *LoginPage) Title() %}Hello{% endfunc %}
+
+{% func (p *LoginPage) Navbar() %}{%= Navbar(Login) %}{% endfunc %}
+
+{% func (p *LoginPage) Content() %}
+<div class="row">
+  <div class="col-md-6 offset-md-3">
+    <form>
+      <div class="form-group m-3">
+        <label for="username" class="form-label">Username</label>
+        <input type="text" class="form-control" id="username" aria-describedby="emailHelp">
+      </div>
+      <div class="form-group m-3">
+        <label for="password" class="form-label">Password</label>
+        <input type="password" class="form-control" id="password">
+      </div>
+      <div class="form-group m-3">
+        <button type="submit" class="btn btn-primary">Login</button>
+      </div>
+    </form>
+  </div>
+</div>
+{% endfunc %}
+
+{% func (p *LoginPage) Script() %}
+{% endfunc %}
diff --git a/templates/login.qtpl.go b/templates/login.qtpl.go
new file mode 100644
index 0000000000000000000000000000000000000000..0d3d2b0c41d592cf030a0806131d1057e8726786
--- /dev/null
+++ b/templates/login.qtpl.go
@@ -0,0 +1,173 @@
+// Code generated by qtc from "login.qtpl". DO NOT EDIT.
+// See https://github.com/valyala/quicktemplate for details.
+
+//line templates/login.qtpl:1
+package templates
+
+//line templates/login.qtpl:1
+import (
+	qtio422016 "io"
+
+	qt422016 "github.com/valyala/quicktemplate"
+)
+
+//line templates/login.qtpl:1
+var (
+	_ = qtio422016.Copy
+	_ = qt422016.AcquireByteBuffer
+)
+
+//line templates/login.qtpl:2
+type LoginPage struct {
+}
+
+//line templates/login.qtpl:6
+func (p *LoginPage) StreamTitle(qw422016 *qt422016.Writer) {
+//line templates/login.qtpl:6
+	qw422016.N().S(`Hello`)
+//line templates/login.qtpl:6
+}
+
+//line templates/login.qtpl:6
+func (p *LoginPage) WriteTitle(qq422016 qtio422016.Writer) {
+//line templates/login.qtpl:6
+	qw422016 := qt422016.AcquireWriter(qq422016)
+//line templates/login.qtpl:6
+	p.StreamTitle(qw422016)
+//line templates/login.qtpl:6
+	qt422016.ReleaseWriter(qw422016)
+//line templates/login.qtpl:6
+}
+
+//line templates/login.qtpl:6
+func (p *LoginPage) Title() string {
+//line templates/login.qtpl:6
+	qb422016 := qt422016.AcquireByteBuffer()
+//line templates/login.qtpl:6
+	p.WriteTitle(qb422016)
+//line templates/login.qtpl:6
+	qs422016 := string(qb422016.B)
+//line templates/login.qtpl:6
+	qt422016.ReleaseByteBuffer(qb422016)
+//line templates/login.qtpl:6
+	return qs422016
+//line templates/login.qtpl:6
+}
+
+//line templates/login.qtpl:8
+func (p *LoginPage) StreamNavbar(qw422016 *qt422016.Writer) {
+//line templates/login.qtpl:8
+	StreamNavbar(qw422016, Login)
+//line templates/login.qtpl:8
+}
+
+//line templates/login.qtpl:8
+func (p *LoginPage) WriteNavbar(qq422016 qtio422016.Writer) {
+//line templates/login.qtpl:8
+	qw422016 := qt422016.AcquireWriter(qq422016)
+//line templates/login.qtpl:8
+	p.StreamNavbar(qw422016)
+//line templates/login.qtpl:8
+	qt422016.ReleaseWriter(qw422016)
+//line templates/login.qtpl:8
+}
+
+//line templates/login.qtpl:8
+func (p *LoginPage) Navbar() string {
+//line templates/login.qtpl:8
+	qb422016 := qt422016.AcquireByteBuffer()
+//line templates/login.qtpl:8
+	p.WriteNavbar(qb422016)
+//line templates/login.qtpl:8
+	qs422016 := string(qb422016.B)
+//line templates/login.qtpl:8
+	qt422016.ReleaseByteBuffer(qb422016)
+//line templates/login.qtpl:8
+	return qs422016
+//line templates/login.qtpl:8
+}
+
+//line templates/login.qtpl:10
+func (p *LoginPage) StreamContent(qw422016 *qt422016.Writer) {
+//line templates/login.qtpl:10
+	qw422016.N().S(`
+<div class="row">
+  <div class="col-md-6 offset-md-3">
+    <form>
+      <div class="form-group m-3">
+        <label for="username" class="form-label">Username</label>
+        <input type="text" class="form-control" id="username" aria-describedby="emailHelp">
+      </div>
+      <div class="form-group m-3">
+        <label for="password" class="form-label">Password</label>
+        <input type="password" class="form-control" id="password">
+      </div>
+      <div class="form-group m-3">
+        <button type="submit" class="btn btn-primary">Login</button>
+      </div>
+    </form>
+  </div>
+</div>
+`)
+//line templates/login.qtpl:28
+}
+
+//line templates/login.qtpl:28
+func (p *LoginPage) WriteContent(qq422016 qtio422016.Writer) {
+//line templates/login.qtpl:28
+	qw422016 := qt422016.AcquireWriter(qq422016)
+//line templates/login.qtpl:28
+	p.StreamContent(qw422016)
+//line templates/login.qtpl:28
+	qt422016.ReleaseWriter(qw422016)
+//line templates/login.qtpl:28
+}
+
+//line templates/login.qtpl:28
+func (p *LoginPage) Content() string {
+//line templates/login.qtpl:28
+	qb422016 := qt422016.AcquireByteBuffer()
+//line templates/login.qtpl:28
+	p.WriteContent(qb422016)
+//line templates/login.qtpl:28
+	qs422016 := string(qb422016.B)
+//line templates/login.qtpl:28
+	qt422016.ReleaseByteBuffer(qb422016)
+//line templates/login.qtpl:28
+	return qs422016
+//line templates/login.qtpl:28
+}
+
+//line templates/login.qtpl:30
+func (p *LoginPage) StreamScript(qw422016 *qt422016.Writer) {
+//line templates/login.qtpl:30
+	qw422016.N().S(`
+`)
+//line templates/login.qtpl:31
+}
+
+//line templates/login.qtpl:31
+func (p *LoginPage) WriteScript(qq422016 qtio422016.Writer) {
+//line templates/login.qtpl:31
+	qw422016 := qt422016.AcquireWriter(qq422016)
+//line templates/login.qtpl:31
+	p.StreamScript(qw422016)
+//line templates/login.qtpl:31
+	qt422016.ReleaseWriter(qw422016)
+//line templates/login.qtpl:31
+}
+
+//line templates/login.qtpl:31
+func (p *LoginPage) Script() string {
+//line templates/login.qtpl:31
+	qb422016 := qt422016.AcquireByteBuffer()
+//line templates/login.qtpl:31
+	p.WriteScript(qb422016)
+//line templates/login.qtpl:31
+	qs422016 := string(qb422016.B)
+//line templates/login.qtpl:31
+	qt422016.ReleaseByteBuffer(qb422016)
+//line templates/login.qtpl:31
+	return qs422016
+//line templates/login.qtpl:31
+}
diff --git a/templates/navbar.qtpl b/templates/navbar.qtpl
index 8f5f9e135c7cc960e0b529f044e972f792ad95fb..62de2196f4367c47b805d6a25835a03fed55332c 100644
--- a/templates/navbar.qtpl
+++ b/templates/navbar.qtpl
@@ -5,6 +5,7 @@     Git Selection = iota
     List
     About
     Config
+    Login
 )
 %}
 
@@ -16,7 +17,6 @@     Log
     Summary
     Refs
     Tree
-    Login
 )
 %}
 
diff --git a/templates/navbar.qtpl.go b/templates/navbar.qtpl.go
index e6ca0aa2783df2afe1e88a57186f46649b0986a9..ad857f78a8c07825fa29201131580cfb30f6444b 100644
--- a/templates/navbar.qtpl.go
+++ b/templates/navbar.qtpl.go
@@ -25,9 +25,10 @@ 	Git Selection = iota
 	List
 	About
 	Config
+	Login
 )
 
-//line templates/navbar.qtpl:12
+//line templates/navbar.qtpl:13
 type GitSelection int
 
 const (
@@ -36,7 +37,6 @@ 	Log
 	Summary
 	Refs
 	Tree
-	Login
 )
 
 //line templates/navbar.qtpl:23
@@ -93,7 +93,7 @@             <a class="nav-link`)
 //line templates/navbar.qtpl:31
 	streaminsertIfEqual(qw422016, s, Login)
 //line templates/navbar.qtpl:31
-	qw422016.N().S(`" href="/">login</a>
+	qw422016.N().S(`" href="/login">login</a>
 `)
 //line templates/navbar.qtpl:35
 	qw422016.N().S(`