mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-26 12:27:06 +00:00 
			
		
		
		
	Setup templates structure
This commit is contained in:
		| @@ -1,4 +1,4 @@ | ||||
| APP_NAME = Go Git Service | ||||
| APP_NAME = Gogs - Go Git Service | ||||
|  | ||||
| [server] | ||||
| HTTP_ADDR =  | ||||
|   | ||||
							
								
								
									
										2
									
								
								gogs.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								gogs.go
									
									
									
									
									
								
							| @@ -31,7 +31,7 @@ func main() { | ||||
| 	m.Use(render.Renderer()) | ||||
|  | ||||
| 	// Routers. | ||||
| 	m.Get("/", routers.Home) | ||||
| 	m.Get("/", routers.Dashboard) | ||||
|  | ||||
| 	listenAddr := fmt.Sprintf("%s:%s", | ||||
| 		utils.Cfg.MustValue("server", "HTTP_ADDR"), | ||||
|   | ||||
							
								
								
									
										35
									
								
								public/css/gogs.css
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										35
									
								
								public/css/gogs.css
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,35 @@ | ||||
| /*! | ||||
|  * Gogs - Go Git Service (http://gogits.org) | ||||
|  * Copyright 2014 Gogs. | ||||
|  * Licensed under MIT (https://github.com/gogits/gogs/blob/master/LICENSE) | ||||
|  */ | ||||
|  | ||||
| body { | ||||
| 	padding-top: 60px; | ||||
| } | ||||
| .navbar { | ||||
| 	min-height: 45px; | ||||
| } | ||||
| .navbar-brand { | ||||
| 	height: 45px; | ||||
| 	padding: 5px 10px 0px 10px; | ||||
| 	border-left: 1px solid #e5e5e5; | ||||
| 	border-right: 1px solid #e5e5e5; | ||||
| } | ||||
| .navbar-inverse .navbar-brand:focus, .navbar-inverse .navbar-brand:hover { | ||||
| 	background-color: #f0f0f0; | ||||
| } | ||||
| .navbar-brand img { | ||||
| 	width: 32px; | ||||
| } | ||||
| .navbar-nav > li > a { | ||||
| 	font-size: 16px; | ||||
| 	padding-top: 13px; | ||||
| } | ||||
| .navbar-inverse .navbar-nav > li > a:hover, .navbar-inverse .navbar-nav > li > a:focus { | ||||
| 	color: rgb(153, 153, 153); | ||||
| } | ||||
| .navbar-btn, .navbar .btn { | ||||
| 	padding: 5px 15px; | ||||
| 	margin-top: 7px; | ||||
| } | ||||
							
								
								
									
										6
									
								
								public/js/jquery-1.10.1.min.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								public/js/jquery-1.10.1.min.js
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
							
								
								
									
										1
									
								
								public/js/jquery-1.10.1.min.map
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								public/js/jquery-1.10.1.min.map
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @@ -8,6 +8,8 @@ import ( | ||||
| 	"github.com/martini-contrib/render" | ||||
| ) | ||||
| 
 | ||||
| func Home(r render.Render) { | ||||
| 	r.HTML(200, "home", map[string]interface{}{}) | ||||
| func Dashboard(r render.Render) { | ||||
| 	r.HTML(200, "dashboard", map[string]interface{}{ | ||||
| 		"Title": "Dashboard", | ||||
| 	}) | ||||
| } | ||||
| @@ -1,2 +1,15 @@ | ||||
| this is base.html | ||||
| Hello world! | ||||
| <!DOCTYPE html> | ||||
| <html> | ||||
| 	<head> | ||||
| 		{{template "base/head" .}} | ||||
| 		{{template "head" .}} | ||||
| 	</head> | ||||
| 	<body> | ||||
| 		<noscript>Please enable JavaScript in your browser!</noscript> | ||||
| 		{{template "base/navbar" .}} | ||||
| 		<div class="container"> | ||||
| 			{{template "body" .}} | ||||
| 	    </div> | ||||
| 		{{template "base/footer" .}} | ||||
| 	</body> | ||||
| </html> | ||||
							
								
								
									
										0
									
								
								templates/base/footer.tmpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								templates/base/footer.tmpl
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										14
									
								
								templates/base/head.tmpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								templates/base/head.tmpl
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | ||||
| <link rel="shortcut icon" href="img/favicon.png" /> | ||||
| <meta name="author" content="Gogs - Go Git Service" /> | ||||
| <meta name="description" content="Gogs(Go Git Service) is a GitHub-like clone in the Go Programming Language" /> | ||||
| <meta name="keywords" content="go, git"> | ||||
|  | ||||
|  <!-- Stylesheets --> | ||||
| <link href="css/bootstrap.min.css" rel="stylesheet" /> | ||||
| <link href="css/todc-bootstrap.min.css" rel="stylesheet" /> | ||||
| <link href="css/font-awesome.min.css" rel="stylesheet" /> | ||||
| <link href="css/gogs.css" rel="stylesheet" /> | ||||
|  | ||||
| <script src="js/jquery-1.10.1.min.js"></script> | ||||
| <script src="js/bootstrap.min.js"></script> | ||||
							
								
								
									
										18
									
								
								templates/base/navbar.tmpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								templates/base/navbar.tmpl
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| <nav class="navbar navbar-inverse navbar-fixed-top"> | ||||
| 	<div class="container"> | ||||
| 		<div class="navbar-header"> | ||||
| 			<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#gogs-navbar-collapse"> | ||||
| 				<i class="fa fa-bars"></i> | ||||
| 			</button> | ||||
| 			<a class="navbar-brand" href="/"><img src="img/favicon.png" alt="Gogs Logo"></a> | ||||
| 		</div> | ||||
|  | ||||
| 		<div class="collapse navbar-collapse" id="gopmweb-navbar-collapse"> | ||||
| 			<ul class="nav navbar-nav"> | ||||
| 				<li><a>{{.Title}}</a></li> | ||||
| 			</ul> | ||||
| 			 | ||||
| 			<a href="/login" class="navbar-right btn btn-success navbar-btn">Log In</a> | ||||
| 		</div> | ||||
| 	</div> | ||||
| </nav> | ||||
							
								
								
									
										5
									
								
								templates/dashboard.tmpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								templates/dashboard.tmpl
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,5 @@ | ||||
| {{template "base/base" .}} | ||||
| {{define "head"}} <title>{{.Title}} | Gogs - Go Git Service</title>{{end}} | ||||
| {{define "body"}} | ||||
| Website is still in the progress of building...please come back later! | ||||
| {{end}} | ||||
| @@ -1 +0,0 @@ | ||||
| {{template "base/base"}} | ||||
		Reference in New Issue
	
	Block a user
	 Unknown
					Unknown