Common style, more footers

This commit is contained in:
Carl Pearson
2024-09-20 14:08:09 -06:00
parent 3783c269c5
commit 1446e8b337
7 changed files with 28 additions and 13 deletions

View File

@@ -54,7 +54,10 @@ func loginHandler(c echo.Context) error {
} }
func homeHandler(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 { func loginPostHandler(c echo.Context) error {
@@ -99,7 +102,10 @@ func logoutHandler(c echo.Context) error {
} }
func downloadHandler(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 { func downloadPostHandler(c echo.Context) error {

10
static/style/common.css Normal file
View File

@@ -0,0 +1,10 @@
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
box-sizing: border-box;
}
h1 {
text-align: center;
}

View File

@@ -1,14 +1,3 @@
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
box-sizing: border-box;
}
h1 {
text-align: center;
}
.video-container { .video-container {
max-width: 600px; max-width: 600px;
margin: 0 auto; margin: 0 auto;

View File

@@ -4,6 +4,8 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <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> <title>Download Video</title>
</head> </head>
@@ -20,6 +22,8 @@
</form> </form>
<a href="/videos">View Downloaded Videos</a> <a href="/videos">View Downloaded Videos</a>
<a href="/logout">Logout</a> <a href="/logout">Logout</a>
{{template "footer" .}}
</body> </body>
</html> </html>

View File

@@ -4,6 +4,8 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <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> <title>Video Downloader</title>
</head> </head>
@@ -11,6 +13,8 @@
<h1>Welcome to Video Downloader</h1> <h1>Welcome to Video Downloader</h1>
<a href="/login">Login</a> <a href="/login">Login</a>
<a href="/videos">Videos</a> <a href="/videos">Videos</a>
{{template "footer" .}}
</body> </body>
</html> </html>

View File

@@ -4,6 +4,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/static/style/common.css">
<title>Login</title> <title>Login</title>
</head> </head>

View File

@@ -6,6 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="refresh" content="10"> <meta http-equiv="refresh" content="10">
<title>Downloaded Videos</title> <title>Downloaded Videos</title>
<link rel="stylesheet" href="/static/style/common.css">
<link rel="stylesheet" href="/static/style/videos.css"> <link rel="stylesheet" href="/static/style/videos.css">
{{template "footer-css" .}} {{template "footer-css" .}}
</head> </head>