feat(branding): customize Gita platform experience
giteabot backport / giteabot (push) Canceled after 0s
giteabot / giteabot (push) Canceled after 0s
release-nightly / nightly-binary (push) Canceled after 0s
release-nightly / nightly-container (push) Canceled after 0s
release-nightly-snapcraft / build-and-publish (push) Canceled after 0s

Assisted-by: Codex:GPT-5
This commit is contained in:
2026-08-16 07:45:24 +08:00
parent e4afba3416
commit 442ddc5f0d
27 changed files with 129 additions and 123 deletions
+2 -2
View File
@@ -74,10 +74,10 @@ RUN addgroup \
echo "git:*" | chpasswd -e echo "git:*" | chpasswd -e
COPY --from=build-env /tmp/local / COPY --from=build-env /tmp/local /
COPY --from=build-env /go/src/gitea.dev/gitea /app/gitea/gitea COPY --from=build-env /go/src/gitea.dev/gitea /app/gita/gita
ENV USER=git ENV USER=git
ENV GITEA_CUSTOM=/data/gitea ENV GITEA_CUSTOM=/data/gita
VOLUME ["/data"] VOLUME ["/data"]
+17
View File
@@ -0,0 +1,17 @@
# Gita 本地 Docker
启动:
```powershell
docker compose -f contrib/roncarve/compose.local.yaml up -d --build
```
访问:<http://localhost:3300>
首次启动会进入安装页面。完成初始化后,管理员账号和数据保存在 `roncarve-gita-local-data` 卷中;SSH 地址为 `ssh://git@localhost:2222`
停止但保留数据:
```powershell
docker compose -f contrib/roncarve/compose.local.yaml down
```
+38
View File
@@ -0,0 +1,38 @@
services:
gita:
build:
context: ../..
dockerfile: Dockerfile
image: roncarve/gita:1.27.2-local
container_name: roncarve-gita-local
restart: unless-stopped
ports:
- "127.0.0.1:3300:3000"
- "127.0.0.1:2222:22"
environment:
USER_UID: "1000"
USER_GID: "1000"
GITEA_WORK_DIR: /data/gita
GITEA_CUSTOM: /data/gita
GITEA____APP_NAME: Gita 代码协作平台
GITEA__database__DB_TYPE: sqlite3
GITEA__database__PATH: /data/gita/gita.db
GITEA__server__PROTOCOL: http
GITEA__server__HTTP_ADDR: 0.0.0.0
GITEA__server__HTTP_PORT: "3000"
GITEA__server__SSH_DOMAIN: localhost
GITEA__server__SSH_PORT: "2222"
GITEA__server__ROOT_URL: http://localhost:3300/
GITEA__service__DISABLE_REGISTRATION: "true"
GITEA__service__ENABLE_PASSKEY_AUTHENTICATION: "false"
GITEA__openid__ENABLE_OPENID_SIGNIN: "false"
GITEA__openid__ENABLE_OPENID_SIGNUP: "false"
GITEA__ui__DEFAULT_THEME: gitea-light
GITEA__ui_0x2E_meta__AUTHOR: Hainan Roncarve Technology Co., Ltd.
GITEA__ui_0x2E_meta__DESCRIPTION: Gita 代码协作平台
GITEA__ui_0x2E_meta__KEYWORDS: roncarve,gita,go,git,code-collaboration
volumes:
- roncarve-gita-local-data:/data
volumes:
roncarve-gita-local-data:
+8 -8
View File
@@ -41,7 +41,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; App name that shows in every page title ;; App name that shows in every page title
;APP_NAME = Gitea: Git with a cup of tea ;APP_NAME = Roncarve Gita Code Collaboration Platform
;; ;;
;; RUN_USER will automatically detect the current user - but you can set it here change it if you run locally ;; RUN_USER will automatically detect the current user - but you can set it here change it if you run locally
;RUN_USER = ;RUN_USER =
@@ -833,7 +833,7 @@ LEVEL = Info
;ENABLE_PASSWORD_SIGNIN_FORM = true ;ENABLE_PASSWORD_SIGNIN_FORM = true
;; ;;
;; Allow users to sign-in with a passkey ;; Allow users to sign-in with a passkey
;ENABLE_PASSKEY_AUTHENTICATION = true ;ENABLE_PASSKEY_AUTHENTICATION = false
;; ;;
;; More detail: https://github.com/gogits/gogs/issues/165 ;; More detail: https://github.com/gogits/gogs/issues/165
;ENABLE_REVERSE_PROXY_AUTHENTICATION = false ;ENABLE_REVERSE_PROXY_AUTHENTICATION = false
@@ -1454,9 +1454,9 @@ LEVEL = Info
;[ui.meta] ;[ui.meta]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;AUTHOR = Gitea - Git with a cup of tea ;AUTHOR = Hainan Roncarve Technology Co., Ltd.
;DESCRIPTION = Gitea (Git with a cup of tea) is a painless self-hosted Git service written in Go ;DESCRIPTION = Roncarve Gita Code Collaboration Platform
;KEYWORDS = go,git,self-hosted,gitea ;KEYWORDS = roncarve,gita,go,git,code-collaboration
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -1692,11 +1692,11 @@ LEVEL = Info
;; - <username>.livejournal.com ;; - <username>.livejournal.com
;; ;;
;; Whether to allow signin in via OpenID ;; Whether to allow signin in via OpenID
;ENABLE_OPENID_SIGNIN = true ;ENABLE_OPENID_SIGNIN = false
;; ;;
;; Whether to allow registering via OpenID ;; Whether to allow registering via OpenID
;; Do not include to rely on rhw DISABLE_REGISTRATION setting ;; Do not include to keep OpenID registration disabled
;;ENABLE_OPENID_SIGNUP = true ;;ENABLE_OPENID_SIGNUP = false
;; ;;
;; Allowed URI patterns (POSIX regexp). ;; Allowed URI patterns (POSIX regexp).
;; Space separated. ;; Space separated.
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
[[ -f ./setup ]] && source ./setup [[ -f ./setup ]] && source ./setup
pushd /app/gitea >/dev/null pushd /app/gita >/dev/null
exec su-exec $USER /usr/local/bin/gitea web exec su-exec $USER /usr/local/bin/gitea web
popd popd
+3 -3
View File
@@ -60,7 +60,7 @@ fi
environment-to-ini --config ${GITEA_CUSTOM}/conf/app.ini environment-to-ini --config ${GITEA_CUSTOM}/conf/app.ini
# only chown if current owner is not already the gitea ${USER}. No recursive check to save time # only chown if current owner is not already the gitea ${USER}. No recursive check to save time
if ! [[ $(ls -ld /data/gitea | awk '{print $3}') = ${USER} ]]; then chown -R ${USER}:git /data/gitea; fi if ! [[ $(ls -ld /data/gita | awk '{print $3}') = ${USER} ]]; then chown -R ${USER}:git /data/gita; fi
if ! [[ $(ls -ld /app/gitea | awk '{print $3}') = ${USER} ]]; then chown -R ${USER}:git /app/gitea; fi if ! [[ $(ls -ld /app/gita | awk '{print $3}') = ${USER} ]]; then chown -R ${USER}:git /app/gita; fi
if ! [[ $(ls -ld /data/git | awk '{print $3}') = ${USER} ]]; then chown -R ${USER}:git /data/git; fi if ! [[ $(ls -ld /data/git | awk '{print $3}') = ${USER} ]]; then chown -R ${USER}:git /data/git; fi
chmod 0755 /data/gitea /app/gitea /data/git chmod 0755 /data/gita /app/gita /data/git
+10 -10
View File
@@ -5,13 +5,13 @@ RUN_MODE = $RUN_MODE
ROOT = /data/git/repositories ROOT = /data/git/repositories
[repository.local] [repository.local]
LOCAL_COPY_PATH = /data/gitea/tmp/local-repo LOCAL_COPY_PATH = /data/gita/tmp/local-repo
[repository.upload] [repository.upload]
TEMP_PATH = /data/gitea/uploads TEMP_PATH = /data/gita/uploads
[server] [server]
APP_DATA_PATH = /data/gitea APP_DATA_PATH = /data/gita
DOMAIN = $DOMAIN DOMAIN = $DOMAIN
SSH_DOMAIN = $SSH_DOMAIN SSH_DOMAIN = $SSH_DOMAIN
HTTP_PORT = $HTTP_PORT HTTP_PORT = $HTTP_PORT
@@ -22,7 +22,7 @@ SSH_LISTEN_PORT = $SSH_LISTEN_PORT
LFS_START_SERVER = $LFS_START_SERVER LFS_START_SERVER = $LFS_START_SERVER
[database] [database]
PATH = /data/gitea/gitea.db PATH = /data/gita/gita.db
DB_TYPE = $DB_TYPE DB_TYPE = $DB_TYPE
HOST = $DB_HOST HOST = $DB_HOST
NAME = $DB_NAME NAME = $DB_NAME
@@ -31,22 +31,22 @@ PASSWD = $DB_PASSWD
LOG_SQL = false LOG_SQL = false
[indexer] [indexer]
ISSUE_INDEXER_PATH = /data/gitea/indexers/issues.bleve ISSUE_INDEXER_PATH = /data/gita/indexers/issues.bleve
[session] [session]
PROVIDER_CONFIG = /data/gitea/sessions PROVIDER_CONFIG = /data/gita/sessions
[picture] [picture]
AVATAR_UPLOAD_PATH = /data/gitea/avatars AVATAR_UPLOAD_PATH = /data/gita/avatars
REPOSITORY_AVATAR_UPLOAD_PATH = /data/gitea/repo-avatars REPOSITORY_AVATAR_UPLOAD_PATH = /data/gita/repo-avatars
[attachment] [attachment]
PATH = /data/gitea/attachments PATH = /data/gita/attachments
[log] [log]
MODE = console MODE = console
LEVEL = info LEVEL = info
ROOT_PATH = /data/gitea/log ROOT_PATH = /data/gita/log
[security] [security]
INSTALL_LOCK = $INSTALL_LOCK INSTALL_LOCK = $INSTALL_LOCK
+1 -1
View File
@@ -30,7 +30,7 @@ if [ -n "${USER_UID}" ] && [ "${USER_UID}" != "`id -u ${USER}`" ]; then
sed -i -e "s/^${USER}:\([^:]*\):[0-9]*:\([0-9]*\)/${USER}:\1:${USER_UID}:\2/" /etc/passwd sed -i -e "s/^${USER}:\([^:]*\):[0-9]*:\([0-9]*\)/${USER}:\1:${USER_UID}:\2/" /etc/passwd
fi fi
for FOLDER in /data/gitea/conf /data/gitea/log /data/git /data/ssh; do for FOLDER in /data/gita/conf /data/gita/log /data/git /data/ssh; do
mkdir -p ${FOLDER} mkdir -p ${FOLDER}
done done
+1 -1
View File
@@ -1,2 +1,2 @@
#!/bin/bash #!/bin/bash
exec /app/gitea/gitea config edit-ini --in-place --apply-env "$@" exec /app/gita/gita config edit-ini --in-place --apply-env "$@"
+5 -5
View File
@@ -1,15 +1,15 @@
#!/bin/bash #!/bin/bash
############################################################### ###############################################################
# This script sets defaults for gitea to run in the container # # This script sets defaults for Gita to run in the container #
############################################################### ###############################################################
# It assumes that you place this script as gitea in /usr/local/bin # It assumes that you place this script as gitea in /usr/local/bin
# #
# And place the original in /usr/lib/gitea with working files in /data/gitea # And place the original in /app/gita with working files in /data/gita
GITEA="/app/gitea/gitea" GITEA="/app/gita/gita"
WORK_DIR="/data/gitea" WORK_DIR="/data/gita"
CUSTOM_PATH="/data/gitea" CUSTOM_PATH="/data/gita"
# Provide docker defaults # Provide docker defaults
GITEA_WORK_DIR="${GITEA_WORK_DIR:-$WORK_DIR}" GITEA_CUSTOM="${GITEA_CUSTOM:-$CUSTOM_PATH}" exec -a "$0" "$GITEA" $CONF_ARG "$@" GITEA_WORK_DIR="${GITEA_WORK_DIR:-$WORK_DIR}" GITEA_CUSTOM="${GITEA_CUSTOM:-$CUSTOM_PATH}" exec -a "$0" "$GITEA" $CONF_ARG "$@"
+1 -1
View File
@@ -115,7 +115,7 @@ var (
func loadServerFrom(rootCfg ConfigProvider) { func loadServerFrom(rootCfg ConfigProvider) {
sec := rootCfg.Section("server") sec := rootCfg.Section("server")
AppName = rootCfg.Section("").Key("APP_NAME").MustString("Gitea: Git with a cup of tea") AppName = rootCfg.Section("").Key("APP_NAME").MustString("Gita 代码协作平台")
Domain = sec.Key("DOMAIN").MustString("localhost") Domain = sec.Key("DOMAIN").MustString("localhost")
HTTPAddr = sec.Key("HTTP_ADDR").MustString("0.0.0.0") HTTPAddr = sec.Key("HTTP_ADDR").MustString("0.0.0.0")
+3 -3
View File
@@ -181,7 +181,7 @@ func loadServiceFrom(rootCfg ConfigProvider) {
Service.EnableBasicAuth = sec.Key("ENABLE_BASIC_AUTHENTICATION").MustBool(true) Service.EnableBasicAuth = sec.Key("ENABLE_BASIC_AUTHENTICATION").MustBool(true)
Service.EnablePasswordSignInForm = sec.Key("ENABLE_PASSWORD_SIGNIN_FORM").MustBool(true) Service.EnablePasswordSignInForm = sec.Key("ENABLE_PASSWORD_SIGNIN_FORM").MustBool(true)
Service.EnablePasskeyAuth = sec.Key("ENABLE_PASSKEY_AUTHENTICATION").MustBool(true) Service.EnablePasskeyAuth = sec.Key("ENABLE_PASSKEY_AUTHENTICATION").MustBool(false)
Service.EnableReverseProxyAuth = sec.Key("ENABLE_REVERSE_PROXY_AUTHENTICATION").MustBool() Service.EnableReverseProxyAuth = sec.Key("ENABLE_REVERSE_PROXY_AUTHENTICATION").MustBool()
Service.EnableReverseProxyAuthAPI = sec.Key("ENABLE_REVERSE_PROXY_AUTHENTICATION_API").MustBool() Service.EnableReverseProxyAuthAPI = sec.Key("ENABLE_REVERSE_PROXY_AUTHENTICATION_API").MustBool()
Service.EnableReverseProxyAutoRegister = sec.Key("ENABLE_REVERSE_PROXY_AUTO_REGISTRATION").MustBool() Service.EnableReverseProxyAutoRegister = sec.Key("ENABLE_REVERSE_PROXY_AUTO_REGISTRATION").MustBool()
@@ -267,8 +267,8 @@ func loadServiceFrom(rootCfg ConfigProvider) {
func loadOpenIDSetting(rootCfg ConfigProvider) { func loadOpenIDSetting(rootCfg ConfigProvider) {
sec := rootCfg.Section("openid") sec := rootCfg.Section("openid")
Service.EnableOpenIDSignIn = sec.Key("ENABLE_OPENID_SIGNIN").MustBool(!InstallLock) Service.EnableOpenIDSignIn = sec.Key("ENABLE_OPENID_SIGNIN").MustBool(false)
Service.EnableOpenIDSignUp = sec.Key("ENABLE_OPENID_SIGNUP").MustBool(!Service.DisableRegistration && Service.EnableOpenIDSignIn) Service.EnableOpenIDSignUp = sec.Key("ENABLE_OPENID_SIGNUP").MustBool(false)
pats := sec.Key("WHITELISTED_URIS").Strings(" ") pats := sec.Key("WHITELISTED_URIS").Strings(" ")
if len(pats) != 0 { if len(pats) != 0 {
Service.OpenIDWhitelist = make([]*regexp.Regexp, len(pats)) Service.OpenIDWhitelist = make([]*regexp.Regexp, len(pats))
+1 -1
View File
@@ -25,7 +25,7 @@
"enable_javascript": "This website requires JavaScript.", "enable_javascript": "This website requires JavaScript.",
"toc": "Table of Contents", "toc": "Table of Contents",
"licenses": "Licenses", "licenses": "Licenses",
"return_to_gitea": "Return to Gitea", "return_to_gitea": "Return to Roncarve Gita",
"more_items": "More items", "more_items": "More items",
"username": "Username", "username": "Username",
"email": "Email Address", "email": "Email Address",
+3 -3
View File
@@ -25,7 +25,7 @@
"enable_javascript": "此网站需要 JavaScript。", "enable_javascript": "此网站需要 JavaScript。",
"toc": "目录", "toc": "目录",
"licenses": "许可证", "licenses": "许可证",
"return_to_gitea": "返回 Gitea", "return_to_gitea": "返回 Roncarve Gita",
"more_items": "更多选项", "more_items": "更多选项",
"username": "用户名", "username": "用户名",
"email": "邮箱地址", "email": "邮箱地址",
@@ -3253,7 +3253,7 @@
"admin.auths.invalid_openIdConnectAutoDiscoveryURL": "无效的自动发现 URL(这必须是一个以 http:// 或 https:// 开头的有效的 URL", "admin.auths.invalid_openIdConnectAutoDiscoveryURL": "无效的自动发现 URL(这必须是一个以 http:// 或 https:// 开头的有效的 URL",
"admin.config.server_config": "服务器配置", "admin.config.server_config": "服务器配置",
"admin.config.app_name": "站点名称", "admin.config.app_name": "站点名称",
"admin.config.app_ver": "Gitea 版本", "admin.config.app_ver": "Gita 版本",
"admin.config.custom_conf": "配置文件路径", "admin.config.custom_conf": "配置文件路径",
"admin.config.custom_file_root_path": "自定义文件根路径", "admin.config.custom_file_root_path": "自定义文件根路径",
"admin.config.disable_router_log": "关闭路由日志", "admin.config.disable_router_log": "关闭路由日志",
@@ -3290,7 +3290,7 @@
"admin.config.service_config": "服务配置", "admin.config.service_config": "服务配置",
"admin.config.register_email_confirm": "需要邮件确认注册", "admin.config.register_email_confirm": "需要邮件确认注册",
"admin.config.disable_register": "禁止用户注册", "admin.config.disable_register": "禁止用户注册",
"admin.config.allow_only_internal_registration": "仅允许通过 Gitea 进行注册", "admin.config.allow_only_internal_registration": "仅允许通过 Gita 进行注册",
"admin.config.allow_only_external_registration": "仅允许通过外部服务注册", "admin.config.allow_only_external_registration": "仅允许通过外部服务注册",
"admin.config.enable_openid_signup": "启用 OpenID 自助注册", "admin.config.enable_openid_signup": "启用 OpenID 自助注册",
"admin.config.enable_openid_signin": "启用 OpenID 登录", "admin.config.enable_openid_signin": "启用 OpenID 登录",
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 71 KiB

+8 -2
View File
@@ -40,7 +40,7 @@ import (
) )
const ( const (
tplSignIn templates.TplName = "user/auth/signin" // for sign in page tplSignIn templates.TplName = "home" // sign in is part of the landing page
tplSignUp templates.TplName = "user/auth/signup" // for sign up page tplSignUp templates.TplName = "user/auth/signup" // for sign up page
TplActivate templates.TplName = "user/auth/activate" // for activate user TplActivate templates.TplName = "user/auth/activate" // for activate user
TplActivatePrompt templates.TplName = "user/auth/activate_prompt" // for showing a message for user activation TplActivatePrompt templates.TplName = "user/auth/activate_prompt" // for showing a message for user activation
@@ -254,9 +254,10 @@ func prepareSignInPageData(ctx *context.Context) (ret preparedSignInData) {
ctx.Data["Title"] = ctx.Tr("sign_in") ctx.Data["Title"] = ctx.Tr("sign_in")
ctx.Data["OAuth2Providers"] = ret.oauth2Providers ctx.Data["OAuth2Providers"] = ret.oauth2Providers
ctx.Data["Title"] = ctx.Tr("sign_in") ctx.Data["Title"] = ctx.Tr("sign_in")
ctx.Data["SignInLink"] = setting.AppSubURL + "/user/login" ctx.Data["SignInLink"] = setting.AppSubURL + "/"
ctx.Data["PageIsSignIn"] = true ctx.Data["PageIsSignIn"] = true
ctx.Data["PageIsLogin"] = true ctx.Data["PageIsLogin"] = true
ctx.Data["PageIsHome"] = true
ctx.Data["EnableSSPI"] = ret.enableSSPI ctx.Data["EnableSSPI"] = ret.enableSSPI
prepareCommonAuthPageData(ctx, CommonAuthOptions{ prepareCommonAuthPageData(ctx, CommonAuthOptions{
@@ -265,6 +266,11 @@ func prepareSignInPageData(ctx *context.Context) (ret preparedSignInData) {
return ret return ret
} }
// PrepareSignInPageData exposes the shared sign-in data for the landing page.
func PrepareSignInPageData(ctx *context.Context) {
prepareSignInPageData(ctx)
}
// SignIn render sign in page // SignIn render sign in page
func SignIn(ctx *context.Context) { func SignIn(ctx *context.Context) {
if performAutoLogin(ctx) { if performAutoLogin(ctx) {
+1
View File
@@ -61,6 +61,7 @@ func Home(ctx *context.Context) {
ctx.Data["PageIsHome"] = true ctx.Data["PageIsHome"] = true
ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled
auth.PrepareSignInPageData(ctx)
ctx.HTML(http.StatusOK, tplHome) ctx.HTML(http.StatusOK, tplHome)
} }
+1
View File
@@ -513,6 +513,7 @@ func registerWebRoutes(m *web.Router, webAuth *AuthMiddleware) {
// Especially some AJAX requests, we can reduce middleware number to improve performance. // Especially some AJAX requests, we can reduce middleware number to improve performance.
m.Get("/", Home) m.Get("/", Home)
m.Post("/", web.Bind(forms.SignInForm{}), auth.SignInPost)
m.Get("/sitemap.xml", sitemapEnabled, optExploreSignIn, HomeSitemap) m.Get("/sitemap.xml", sitemapEnabled, optExploreSignIn, HomeSitemap)
m.Group("/.well-known", func() { m.Group("/.well-known", func() {
m.Get("/openid-configuration", auth.OIDCWellKnown) m.Get("/openid-configuration", auth.OIDCWellKnown)
-24
View File
@@ -1,26 +1,4 @@
<footer class="page-footer" role="group" aria-label="{{ctx.Locale.Tr "aria.footer"}}"> <footer class="page-footer" role="group" aria-label="{{ctx.Locale.Tr "aria.footer"}}">
<div class="left-links" role="contentinfo" aria-label="{{ctx.Locale.Tr "aria.footer.software"}}">
{{if ShowFooterPoweredBy}}
<a target="_blank" href="https://about.gitea.com">{{ctx.Locale.Tr "powered_by" "Gitea"}}</a>
{{end}}
{{if (or .ShowFooterVersion .PageIsAdmin)}}
<span>
{{ctx.Locale.Tr "version"}}:
{{if .IsAdmin}}
<a href="{{AppSubUrl}}/-/admin/config">{{AppVer}}</a>
{{else}}
{{AppVer}}
{{end}}
</span>
{{end}}
{{if and .TemplateLoadTimes ShowFooterTemplateLoadTime}}
<span>
{{ctx.Locale.Tr "page"}}: <strong>{{LoadTimes .PageStartTime}}</strong>
{{ctx.Locale.Tr "template"}}{{if .TemplateName}} {{.TemplateName}}{{end}}: <strong>{{call .TemplateLoadTimes}}</strong>
</span>
{{end}}
{{if $.ViteModeIsDev}}<span class="ui basic label primary">ViteDevMode</span>{{end}}
</div>
<div class="right-links" role="group" aria-label="{{ctx.Locale.Tr "aria.footer.links"}}"> <div class="right-links" role="group" aria-label="{{ctx.Locale.Tr "aria.footer.links"}}">
<div class="ui dropdown custom" id="footer-theme-selector"> <div class="ui dropdown custom" id="footer-theme-selector">
<span class="default-text">{{ctx.RenderUtils.RenderThemeItem ctx.CurrentWebTheme 16}}</span> <span class="default-text">{{ctx.RenderUtils.RenderThemeItem ctx.CurrentWebTheme 16}}</span>
@@ -34,8 +12,6 @@
{{end -}} {{end -}}
</div> </div>
</div> </div>
<a href="{{AssetUrlPrefix}}/licenses.txt">{{ctx.Locale.Tr "licenses"}}</a>
{{if .EnableSwagger}}<a href="{{AppSubUrl}}/api/swagger">API</a>{{end}}
{{template "custom/extra_links_footer" .}} {{template "custom/extra_links_footer" .}}
</div> </div>
</footer> </footer>
+1 -1
View File
@@ -17,7 +17,7 @@
<link rel="alternate" type="application/atom+xml" title="" href="{{.FeedURL}}.atom"> <link rel="alternate" type="application/atom+xml" title="" href="{{.FeedURL}}.atom">
<link rel="alternate" type="application/rss+xml" title="" href="{{.FeedURL}}.rss"> <link rel="alternate" type="application/rss+xml" title="" href="{{.FeedURL}}.rss">
{{end}} {{end}}
<link rel="icon" href="{{AssetUrlPrefix}}/img/favicon.svg" type="image/svg+xml"> <link rel="icon" href="{{AssetUrlPrefix}}/img/favicon.png" type="image/png">
<link rel="alternate icon" href="{{AssetUrlPrefix}}/img/favicon.png" type="image/png"> <link rel="alternate icon" href="{{AssetUrlPrefix}}/img/favicon.png" type="image/png">
{{template "base/head_opengraph" .}} {{template "base/head_opengraph" .}}
{{template "base/head_style" .}} {{template "base/head_style" .}}
+7 -16
View File
@@ -2,7 +2,7 @@
<div class="navbar-left"> <div class="navbar-left">
<!-- the logo --> <!-- the logo -->
<a class="item" id="navbar-logo" href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home_title"}}{{end}}"> <a class="item" id="navbar-logo" href="{{AppSubUrl}}/" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home_title"}}{{end}}">
<img width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}" aria-hidden="true"> <img width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.png" alt="{{ctx.Locale.Tr "logo"}}" aria-hidden="true">
</a> </a>
<!-- mobile right menu, it must be here because in mobile view, each item is a flex column, the first item is a full row column --> <!-- mobile right menu, it must be here because in mobile view, each item is a flex column, the first item is a full row column -->
@@ -27,17 +27,10 @@
{{end}} {{end}}
{{end}} {{end}}
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{ctx.Locale.Tr "explore_title"}}</a> <a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{ctx.Locale.Tr "explore_title"}}</a>
{{else if .IsLandingPageOrganizations}}
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{ctx.Locale.Tr "explore_title"}}</a>
{{else}}
<a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{ctx.Locale.Tr "explore_title"}}</a>
{{end}} {{end}}
{{template "custom/extra_links" .}} {{template "custom/extra_links" .}}
{{if not .IsSigned}}
<a class="item" target="_blank" href="https://docs.gitea.com">{{ctx.Locale.Tr "help"}}</a>
{{end}}
</div> </div>
<!-- the full dropdown menus --> <!-- the full dropdown menus -->
@@ -119,10 +112,6 @@
{{svg "octicon-tools"}} {{svg "octicon-tools"}}
{{ctx.Locale.Tr "your_settings"}} {{ctx.Locale.Tr "your_settings"}}
</a> </a>
<a class="item" target="_blank" href="https://docs.gitea.com">
{{svg "octicon-question"}}
{{ctx.Locale.Tr "help"}}
</a>
{{if .IsAdmin}} {{if .IsAdmin}}
<div class="divider"></div> <div class="divider"></div>
<a class="{{if .PageIsAdmin}}active {{end}}item" href="{{AppSubUrl}}/-/admin"> <a class="{{if .PageIsAdmin}}active {{end}}item" href="{{AppSubUrl}}/-/admin">
@@ -144,10 +133,12 @@
<span class="tw-ml-1">{{ctx.Locale.Tr "register"}}</span> <span class="tw-ml-1">{{ctx.Locale.Tr "register"}}</span>
</a> </a>
{{end}} {{end}}
<a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login"> {{if not .PageIsHome}}
{{svg "octicon-sign-in"}} <a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login">
<span class="tw-ml-1">{{ctx.Locale.Tr "sign_in"}}</span> {{svg "octicon-sign-in"}}
</a> <span class="tw-ml-1">{{ctx.Locale.Tr "sign_in"}}</span>
</a>
{{end}}
{{end}} {{end}}
</div><!-- end full right menu --> </div><!-- end full right menu -->
+3 -37
View File
@@ -2,50 +2,16 @@
<div role="main" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home_title"}}{{end}}" class="page-content home"> <div role="main" aria-label="{{if .IsSigned}}{{ctx.Locale.Tr "dashboard"}}{{else}}{{ctx.Locale.Tr "home_title"}}{{end}}" class="page-content home">
<div class="tw-mb-8 tw-px-8"> <div class="tw-mb-8 tw-px-8">
<div class="center"> <div class="center">
<img class="logo" width="220" height="220" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}"> <img class="logo" width="220" height="220" src="{{AssetUrlPrefix}}/img/logo.png" alt="{{ctx.Locale.Tr "logo"}}">
<div class="hero"> <div class="hero">
<h1 class="ui icon header title tw-text-balance"> <h1 class="ui icon header title tw-text-balance">
{{AppName}} {{AppName}}
</h1> </h1>
<h2 class="tw-text-balance">{{ctx.Locale.Tr "startpage.app_desc"}}</h2>
</div> </div>
</div> </div>
</div> </div>
<div class="ui stackable middle very relaxed page grid"> <div class="home-login">
<div class="eight wide center column"> {{template "user/auth/signin_inner" .}}
<h1 class="hero ui icon header">
{{svg "octicon-flame"}} {{ctx.Locale.Tr "startpage.install"}}
</h1>
<p class="large tw-text-balance">
{{ctx.Locale.Tr "startpage.install_desc" "https://docs.gitea.com/installation/install-from-binary" "https://github.com/go-gitea/gitea/tree/master/docker" "https://docs.gitea.com/installation/install-from-package"}}
</p>
</div>
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-device-desktop"}} {{ctx.Locale.Tr "startpage.platform"}}
</h1>
<p class="large tw-text-balance">
{{ctx.Locale.Tr "startpage.platform_desc" "https://go.dev/"}}
</p>
</div>
</div>
<div class="ui stackable middle very relaxed page grid">
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-rocket"}} {{ctx.Locale.Tr "startpage.lightweight"}}
</h1>
<p class="large tw-text-balance">
{{ctx.Locale.Tr "startpage.lightweight_desc"}}
</p>
</div>
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-code"}} {{ctx.Locale.Tr "startpage.license"}}
</h1>
<p class="large tw-text-balance">
{{ctx.Locale.Tr "startpage.license_desc" "https://gitea.dev" "gitea.dev" "https://github.com/go-gitea/gitea"}}
</p>
</div>
</div> </div>
</div> </div>
{{template "base/footer" .}} {{template "base/footer" .}}
+2 -3
View File
@@ -11,8 +11,7 @@
{{ctx.HeadMetaContentSecurityPolicy}} {{ctx.HeadMetaContentSecurityPolicy}}
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>Internal Server Error - {{AppName}}</title> <title>Internal Server Error - {{AppName}}</title>
<link rel="icon" href="{{AssetUrlPrefix}}/img/favicon.svg" type="image/svg+xml"> <link rel="icon" href="{{AssetUrlPrefix}}/img/favicon.png" type="image/png">
<link rel="alternate icon" href="{{AssetUrlPrefix}}/img/favicon.png" type="image/png">
{{template "base/head_style" .}} {{template "base/head_style" .}}
</head> </head>
<body> <body>
@@ -21,7 +20,7 @@
<div class="ui container tw-flex"> <div class="ui container tw-flex">
<div class="item tw-flex-1"> <div class="item tw-flex-1">
<a href="{{AppSubUrl}}/" aria-label="{{ctx.Locale.Tr "home_title"}}"> <a href="{{AppSubUrl}}/" aria-label="{{ctx.Locale.Tr "home_title"}}">
<img width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}" aria-hidden="true"> <img width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.png" alt="{{ctx.Locale.Tr "logo"}}" aria-hidden="true">
</a> </a>
</div> </div>
<div class="item"> <div class="item">
+1 -1
View File
@@ -3,7 +3,7 @@
<div class="ui middle very relaxed page grid"> <div class="ui middle very relaxed page grid">
<div class="column tw-flex tw-flex-col tw-gap-4 tw-max-w-2xl tw-m-auto"> <div class="column tw-flex tw-flex-col tw-gap-4 tw-max-w-2xl tw-m-auto">
<a href="{{AppSubUrl}}/user/login" class="tw-mx-auto"> <a href="{{AppSubUrl}}/user/login" class="tw-mx-auto">
<img width="100" height="100" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}"> <img width="100" height="100" src="{{AssetUrlPrefix}}/img/logo.png" alt="{{ctx.Locale.Tr "logo"}}">
</a> </a>
<div class="ui container fluid"> <div class="ui container fluid">
+11
View File
@@ -2,6 +2,16 @@
max-width: 220px; max-width: 220px;
} }
.home-login {
max-width: 420px;
margin: 0 auto 32px;
text-align: left;
}
.home-login > .ui.container {
width: 100%;
}
@media (max-width: 767.98px) { @media (max-width: 767.98px) {
.home .hero h1 { .home .hero h1 {
font-size: 3.5em; font-size: 3.5em;
@@ -60,6 +70,7 @@
} }
.page-footer .right-links { .page-footer .right-links {
margin-left: auto;
min-width: 180px; /* make sure the menu dropdown doesn't overflow horizontally when language name is short */ min-width: 180px; /* make sure the menu dropdown doesn't overflow horizontally when language name is short */
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;