@@ -1,6 +1,5 @@ | |||||
; App name that shows on every page title | ; App name that shows on every page title | ||||
APP_NAME = Gogs: Go Git Service | APP_NAME = Gogs: Go Git Service | ||||
APP_LOGO = img/favicon.png | |||||
; Change it if you run locally | ; Change it if you run locally | ||||
RUN_USER = git | RUN_USER = git | ||||
; Either "dev", "prod" or "test", default is "dev" | ; Either "dev", "prod" or "test", default is "dev" | ||||
@@ -45,7 +45,6 @@ func GetMailTmplData(u *models.User) map[interface{}]interface{} { | |||||
data["AppName"] = setting.AppName | data["AppName"] = setting.AppName | ||||
data["AppVer"] = setting.AppVer | data["AppVer"] = setting.AppVer | ||||
data["AppUrl"] = setting.AppUrl | data["AppUrl"] = setting.AppUrl | ||||
data["AppLogo"] = setting.AppLogo | |||||
data["ActiveCodeLives"] = setting.Service.ActiveCodeLives / 60 | data["ActiveCodeLives"] = setting.Service.ActiveCodeLives / 60 | ||||
data["ResetPwdCodeLives"] = setting.Service.ResetPwdCodeLives / 60 | data["ResetPwdCodeLives"] = setting.Service.ResetPwdCodeLives / 60 | ||||
if u != nil { | if u != nil { | ||||
@@ -32,7 +32,6 @@ var ( | |||||
// App settings. | // App settings. | ||||
AppVer string | AppVer string | ||||
AppName string | AppName string | ||||
AppLogo string | |||||
AppUrl string | AppUrl string | ||||
// Server settings. | // Server settings. | ||||
@@ -155,7 +154,6 @@ func NewConfigContext() { | |||||
} | } | ||||
AppName = Cfg.MustValue("", "APP_NAME", "Gogs: Go Git Service") | AppName = Cfg.MustValue("", "APP_NAME", "Gogs: Go Git Service") | ||||
AppLogo = Cfg.MustValue("", "APP_LOGO", "img/favicon.png") | |||||
AppUrl = Cfg.MustValue("server", "ROOT_URL", "http://localhost:3000/") | AppUrl = Cfg.MustValue("server", "ROOT_URL", "http://localhost:3000/") | ||||
if AppUrl[len(AppUrl)-1] != '/' { | if AppUrl[len(AppUrl)-1] != '/' { | ||||
AppUrl += "/" | AppUrl += "/" | ||||
@@ -16,7 +16,6 @@ func TemplatePreview(ctx *middleware.Context) { | |||||
ctx.Data["AppName"] = setting.AppName | ctx.Data["AppName"] = setting.AppName | ||||
ctx.Data["AppVer"] = setting.AppVer | ctx.Data["AppVer"] = setting.AppVer | ||||
ctx.Data["AppUrl"] = setting.AppUrl | ctx.Data["AppUrl"] = setting.AppUrl | ||||
ctx.Data["AppLogo"] = setting.AppLogo | |||||
ctx.Data["Code"] = "2014031910370000009fff6782aadb2162b4a997acb69d4400888e0b9274657374" | ctx.Data["Code"] = "2014031910370000009fff6782aadb2162b4a997acb69d4400888e0b9274657374" | ||||
ctx.Data["ActiveCodeLives"] = setting.Service.ActiveCodeLives / 60 | ctx.Data["ActiveCodeLives"] = setting.Service.ActiveCodeLives / 60 | ||||
ctx.Data["ResetPwdCodeLives"] = setting.Service.ResetPwdCodeLives / 60 | ctx.Data["ResetPwdCodeLives"] = setting.Service.ResetPwdCodeLives / 60 | ||||
@@ -9,7 +9,7 @@ | |||||
<div style="width:600px;margin:0 auto; padding:40px 0 20px;"> | <div style="width:600px;margin:0 auto; padding:40px 0 20px;"> | ||||
<div style="border:1px solid #d9d9d9;border-radius:3px; background:#fff; box-shadow: 0px 2px 5px rgba(0, 0, 0,.05); -webkit-box-shadow: 0px 2px 5px rgba(0, 0, 0,.05);"> | <div style="border:1px solid #d9d9d9;border-radius:3px; background:#fff; box-shadow: 0px 2px 5px rgba(0, 0, 0,.05); -webkit-box-shadow: 0px 2px 5px rgba(0, 0, 0,.05);"> | ||||
<div style="padding: 20px 15px;"> | <div style="padding: 20px 15px;"> | ||||
<h1 style="font-size:20px; padding:10px 0 20px; margin:0; border-bottom:1px solid #ddd;"><img src="{{.AppUrl}}/{{.AppLogo}}" style="height: 32px; margin-bottom: -10px;"> <a style="color:#333;text-decoration:none;" target="_blank" href="{{.AppUrl}}">{{.AppName}}</a></h1> | |||||
<h1 style="font-size:20px; padding:10px 0 20px; margin:0; border-bottom:1px solid #ddd;"><img src="{{.AppUrl}}/img/favicon.png" style="height: 32px; margin-bottom: -10px;"> <a style="color:#333;text-decoration:none;" target="_blank" href="{{.AppUrl}}">{{.AppName}}</a></h1> | |||||
<div style="padding:40px 15px;"> | <div style="padding:40px 15px;"> | ||||
<div style="font-size:16px; padding-bottom:30px; font-weight:bold;"> | <div style="font-size:16px; padding-bottom:30px; font-weight:bold;"> | ||||
Hi <span style="color: #00BFFF;">{{.User.Name}}</span>, | Hi <span style="color: #00BFFF;">{{.User.Name}}</span>, | ||||
@@ -9,7 +9,7 @@ | |||||
<div style="width:600px;margin:0 auto; padding:40px 0 20px;"> | <div style="width:600px;margin:0 auto; padding:40px 0 20px;"> | ||||
<div style="border:1px solid #d9d9d9;border-radius:3px; background:#fff; box-shadow: 0px 2px 5px rgba(0, 0, 0,.05); -webkit-box-shadow: 0px 2px 5px rgba(0, 0, 0,.05);"> | <div style="border:1px solid #d9d9d9;border-radius:3px; background:#fff; box-shadow: 0px 2px 5px rgba(0, 0, 0,.05); -webkit-box-shadow: 0px 2px 5px rgba(0, 0, 0,.05);"> | ||||
<div style="padding: 20px 15px;"> | <div style="padding: 20px 15px;"> | ||||
<h1 style="font-size:20px; padding:10px 0 20px; margin:0; border-bottom:1px solid #ddd;"><img src="{{.AppUrl}}/{{.AppLogo}}" style="height: 32px; margin-bottom: -10px;"> <a style="color:#333;text-decoration:none;" target="_blank" href="{{.AppUrl}}">{{.AppName}}</a></h1> | |||||
<h1 style="font-size:20px; padding:10px 0 20px; margin:0; border-bottom:1px solid #ddd;"><img src="{{.AppUrl}}/img/favicon.png" style="height: 32px; margin-bottom: -10px;"> <a style="color:#333;text-decoration:none;" target="_blank" href="{{.AppUrl}}">{{.AppName}}</a></h1> | |||||
<div style="padding:40px 15px;"> | <div style="padding:40px 15px;"> | ||||
<div style="font-size:16px; padding-bottom:30px; font-weight:bold;"> | <div style="font-size:16px; padding-bottom:30px; font-weight:bold;"> | ||||
Hi <span style="color: #00BFFF;">{{.User.Name}}</span>, this is your registration email for {{.AppName}}! | Hi <span style="color: #00BFFF;">{{.User.Name}}</span>, this is your registration email for {{.AppName}}! | ||||
@@ -9,7 +9,7 @@ | |||||
<div style="width:600px;margin:0 auto; padding:40px 0 20px;"> | <div style="width:600px;margin:0 auto; padding:40px 0 20px;"> | ||||
<div style="border:1px solid #d9d9d9;border-radius:3px; background:#fff; box-shadow: 0px 2px 5px rgba(0, 0, 0,.05); -webkit-box-shadow: 0px 2px 5px rgba(0, 0, 0,.05);"> | <div style="border:1px solid #d9d9d9;border-radius:3px; background:#fff; box-shadow: 0px 2px 5px rgba(0, 0, 0,.05); -webkit-box-shadow: 0px 2px 5px rgba(0, 0, 0,.05);"> | ||||
<div style="padding: 20px 15px;"> | <div style="padding: 20px 15px;"> | ||||
<h1 style="font-size:20px; padding:10px 0 20px; margin:0; border-bottom:1px solid #ddd;"><img src="{{.AppUrl}}/{{.AppLogo}}" style="height: 32px; margin-bottom: -10px;"> <a style="color:#333;text-decoration:none;" target="_blank" href="{{.AppUrl}}">{{.AppName}}</a></h1> | |||||
<h1 style="font-size:20px; padding:10px 0 20px; margin:0; border-bottom:1px solid #ddd;"><img src="{{.AppUrl}}/img/favicon.png" style="height: 32px; margin-bottom: -10px;"> <a style="color:#333;text-decoration:none;" target="_blank" href="{{.AppUrl}}">{{.AppName}}</a></h1> | |||||
<div style="padding:40px 15px;"> | <div style="padding:40px 15px;"> | ||||
<div style="font-size:16px; padding-bottom:30px; font-weight:bold;"> | <div style="font-size:16px; padding-bottom:30px; font-weight:bold;"> | ||||
Hi <span style="color: #00BFFF;">{{.User.Name}}</span>, | Hi <span style="color: #00BFFF;">{{.User.Name}}</span>, | ||||