Common style, more footers
This commit is contained in:
10
handlers.go
10
handlers.go
@@ -54,7 +54,10 @@ func loginHandler(c echo.Context) error {
|
||||
}
|
||||
|
||||
func homeHandler(c echo.Context) error {
|
||||
return c.Render(http.StatusOK, "home.html", nil)
|
||||
return c.Render(http.StatusOK, "home.html",
|
||||
map[string]interface{}{
|
||||
"Footer": makeFooter(),
|
||||
})
|
||||
}
|
||||
|
||||
func loginPostHandler(c echo.Context) error {
|
||||
@@ -99,7 +102,10 @@ func logoutHandler(c echo.Context) error {
|
||||
}
|
||||
|
||||
func downloadHandler(c echo.Context) error {
|
||||
return c.Render(http.StatusOK, "download.html", nil)
|
||||
return c.Render(http.StatusOK, "download.html",
|
||||
map[string]interface{}{
|
||||
"Footer": makeFooter(),
|
||||
})
|
||||
}
|
||||
|
||||
func downloadPostHandler(c echo.Context) error {
|
||||
|
10
static/style/common.css
Normal file
10
static/style/common.css
Normal file
@@ -0,0 +1,10 @@
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
}
|
@@ -1,14 +1,3 @@
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.video-container {
|
||||
max-width: 600px;
|
||||
margin: 0 auto;
|
||||
|
@@ -4,6 +4,8 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="/static/style/common.css">
|
||||
{{template "footer-css" .}}
|
||||
<title>Download Video</title>
|
||||
</head>
|
||||
|
||||
@@ -20,6 +22,8 @@
|
||||
</form>
|
||||
<a href="/videos">View Downloaded Videos</a>
|
||||
<a href="/logout">Logout</a>
|
||||
|
||||
{{template "footer" .}}
|
||||
</body>
|
||||
|
||||
</html>
|
@@ -4,6 +4,8 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="/static/style/common.css">
|
||||
{{template "footer-css" .}}
|
||||
<title>Video Downloader</title>
|
||||
</head>
|
||||
|
||||
@@ -11,6 +13,8 @@
|
||||
<h1>Welcome to Video Downloader</h1>
|
||||
<a href="/login">Login</a>
|
||||
<a href="/videos">Videos</a>
|
||||
|
||||
{{template "footer" .}}
|
||||
</body>
|
||||
|
||||
</html>
|
@@ -4,6 +4,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="/static/style/common.css">
|
||||
<title>Login</title>
|
||||
</head>
|
||||
|
||||
|
@@ -6,6 +6,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="refresh" content="10">
|
||||
<title>Downloaded Videos</title>
|
||||
<link rel="stylesheet" href="/static/style/common.css">
|
||||
<link rel="stylesheet" href="/static/style/videos.css">
|
||||
{{template "footer-css" .}}
|
||||
</head>
|
||||
|
Reference in New Issue
Block a user