Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions internal/adapter/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,15 @@ func Recovery(next http.Handler) http.Handler {
}

func Server(addr string) {
fmt.Println("here")
router := http.NewServeMux()

router.HandleFunc("/", httpRoutes.Homepage)
router.HandleFunc("POST /cameras", httpRoutes.CreateCamera)
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(
Expand Down
22 changes: 22 additions & 0 deletions static/css/style.css
Original file line number Diff line number Diff line change
@@ -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;
}
3 changes: 2 additions & 1 deletion templates/index.html.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Phantom dashboard</title>
<link rel="stylesheet" href="/static/css/style.css"></link>
</head>
<body>
<nav>
<a>Phantom</a>
</nav>
<main>
<img src="cameras" style='width: 640px; height: 360px;'/>
<img src="cameras" style='width: 640px; height: 360px;' alt=""/>
<div>
<button onclick="createCamera()">start</button>
<button onclick="deleteCamera()">stop</button>
Expand Down