diff --git a/internal/adapter/http/http.go b/internal/adapter/http/http.go index 08dff3c..6727d6a 100644 --- a/internal/adapter/http/http.go +++ b/internal/adapter/http/http.go @@ -27,7 +27,6 @@ func Recovery(next http.Handler) http.Handler { } func Server(addr string) { - fmt.Println("here") router := http.NewServeMux() router.HandleFunc("/", httpRoutes.Homepage) @@ -35,8 +34,8 @@ func Server(addr string) { router.HandleFunc("GET /cameras/status", httpRoutes.StreamStatus) router.HandleFunc("DELETE /cameras", httpRoutes.DeleteCamera) router.HandleFunc("GET /cameras", httpRoutes.StreamVideo) + router.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static")))) - fmt.Println("hore") server_config := &http.Server{ Addr: addr, Handler: logger.LoggingHandler( diff --git a/static/css/style.css b/static/css/style.css new file mode 100644 index 0000000..4b57ab3 --- /dev/null +++ b/static/css/style.css @@ -0,0 +1,22 @@ +*,:after,:before{background:none;border:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:initial;font-size:100%;font-style:normal;font-weight:400;margin:0;padding:0;vertical-align:baseline}button,select{-webkit-appearance:none;-moz-appearance:none;appearance:none}body{-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;line-height:1.5;min-height:100vh;width:100%}a,button,details,input[type=button],input[type=checkbox],input[type=file],input[type=image],input[type=radio],input[type=range],input[type=reset],input[type=submit],label,select{cursor:pointer}article,aside,audio,canvas,details,figcaption,figure,footer,header,main,nav,rt,ruby,section,summary{display:block}bdi,mark,meter,output,progress,time{display:inline-block}[hidden],datalist,dialog:not([open]),rp{display:none}a{text-decoration:none}ol,ul{list-style:none}embed,iframe,img,object,picture,svg,video{display:block;height:auto;max-width:100%}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:none}strong{font-weight:700}em{font-style:italic}code,kbd,pre,samp{font-family:monospace}sub{vertical-align:sub}sup{vertical-align:super}small{font-size:small}table{border-collapse:collapse} + +body { + background-color: #0d1321; +} + +nav a { + color: #e0e1dd; + font-size: 2rem; + font-family: sans-serif; +} + +button { + background-color: #1d2d44; + border: 2px solid #3e5c76; + margin: 0.2rem; + padding: 0.75rem; + padding-left: 1.5rem; + padding-right: 1.5rem; + border-radius: 3px; + color: #e0e1dd; +} diff --git a/templates/index.html.tpl b/templates/index.html.tpl index c50d8b8..f37cbbc 100644 --- a/templates/index.html.tpl +++ b/templates/index.html.tpl @@ -4,13 +4,14 @@ Phantom dashboard +
- +