Replace footer and modal icons with SVG (#13245)

- Replace two font icons with SVG in the footer
- Replace icons in delete modals with SVG
- Horizontally center message text in modals
release/v1.15
silverwind 2020-10-21 23:07:33 +02:00 committed by GitHub
parent a06ea38207
commit 83106c166d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
32 changed files with 51 additions and 34 deletions

View File

@ -333,7 +333,7 @@
<div class="ui small basic delete modal"> <div class="ui small basic delete modal">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "admin.auths.delete_auth_title"}} {{.i18n.Tr "admin.auths.delete_auth_title"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -72,7 +72,7 @@
<div class="ui small basic delete modal"> <div class="ui small basic delete modal">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "repo.settings.delete"}} {{.i18n.Tr "repo.settings.delete"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -123,7 +123,7 @@
<div class="ui small basic delete modal"> <div class="ui small basic delete modal">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "settings.delete_account_title"}} {{.i18n.Tr "settings.delete_account_title"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -1,10 +1,10 @@
<div class="actions"> <div class="actions">
<div class="ui red basic inverted cancel button"> <div class="ui red basic inverted cancel button">
<i class="remove icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "modal.no"}} {{.i18n.Tr "modal.no"}}
</div> </div>
<div class="ui green basic inverted ok button"> <div class="ui green basic inverted ok button">
<i class="checkmark icon"></i> {{svg "octicon-check"}}
{{.i18n.Tr "modal.yes"}} {{.i18n.Tr "modal.yes"}}
</div> </div>
</div> </div>

View File

@ -5,10 +5,10 @@
</div> </div>
<div class="ui right links"> <div class="ui right links">
{{if .ShowFooterBranding}} {{if .ShowFooterBranding}}
<a target="_blank" rel="noopener noreferrer" href="https://github.com/go-gitea/gitea"><i class="fa fa-github-square"></i><span class="sr-only">GitHub</span></a> <a target="_blank" rel="noopener noreferrer" href="https://github.com/go-gitea/gitea">{{svg "octicon-mark-github"}}<span class="sr-only">GitHub</span></a>
{{end}} {{end}}
<div class="ui language bottom floating slide up dropdown link item"> <div class="ui language bottom floating slide up dropdown link item">
<i class="world icon"></i> {{svg "octicon-globe"}}
<div class="text">{{.LangName}}</div> <div class="text">{{.LangName}}</div>
<div class="menu language-menu"> <div class="menu language-menu">
{{range .AllLangs}} {{range .AllLangs}}

View File

@ -32,7 +32,7 @@
<div class="ui small basic delete modal"> <div class="ui small basic delete modal">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "org.settings.delete_org_title"}} {{.i18n.Tr "org.settings.delete_org_title"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -116,7 +116,7 @@
<div class="ui small basic delete modal"> <div class="ui small basic delete modal">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "org.teams.delete_team_title"}} {{.i18n.Tr "org.teams.delete_team_title"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -66,7 +66,7 @@
<div class="ui small basic delete modal"> <div class="ui small basic delete modal">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "org.teams.remove_all_repos_title"}} {{.i18n.Tr "org.teams.remove_all_repos_title"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -131,7 +131,7 @@
<div class="ui small basic delete modal"> <div class="ui small basic delete modal">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "repo.branch.delete_html"}} <span class="name"></span> {{.i18n.Tr "repo.branch.delete_html"}} <span class="name"></span>
</div> </div>
<div class="content"> <div class="content">

View File

@ -1,6 +1,6 @@
<div class="ui small basic delete modal"> <div class="ui small basic delete modal">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "repo.issues.label_deletion"}} {{.i18n.Tr "repo.issues.label_deletion"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -95,7 +95,7 @@
{{if or .CanWriteIssues .CanWritePulls}} {{if or .CanWriteIssues .CanWritePulls}}
<div class="ui small basic delete modal"> <div class="ui small basic delete modal">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "repo.milestones.deletion"}} {{.i18n.Tr "repo.milestones.deletion"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -219,7 +219,7 @@
<div class="ui small basic delete modal"> <div class="ui small basic delete modal">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "repo.branch.delete" .HeadTarget }} {{.i18n.Tr "repo.branch.delete" .HeadTarget }}
</div> </div>
<div class="content"> <div class="content">

View File

@ -611,7 +611,7 @@
<div class="ui basic modal remove-dependency"> <div class="ui basic modal remove-dependency">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "repo.issues.dependency.remove_header"}} {{.i18n.Tr "repo.issues.dependency.remove_header"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -78,7 +78,7 @@
{{if or .CanWriteIssues .CanWritePulls}} {{if or .CanWriteIssues .CanWritePulls}}
<div class="ui small basic delete modal"> <div class="ui small basic delete modal">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "repo.projects.deletion"}} {{.i18n.Tr "repo.projects.deletion"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -99,7 +99,7 @@
{{if .PageIsEditRelease}} {{if .PageIsEditRelease}}
<div class="ui small basic delete modal"> <div class="ui small basic delete modal">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "repo.release.deletion"}} {{.i18n.Tr "repo.release.deletion"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -114,7 +114,7 @@
<div class="ui small basic delete modal"> <div class="ui small basic delete modal">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "repo.settings.collaborator_deletion"}} {{.i18n.Tr "repo.settings.collaborator_deletion"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -82,7 +82,7 @@
<div class="ui small basic delete modal"> <div class="ui small basic delete modal">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "repo.settings.deploy_key_deletion"}} {{.i18n.Tr "repo.settings.deploy_key_deletion"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -1,6 +1,6 @@
<div class="ui small basic delete modal"> <div class="ui small basic delete modal">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "repo.settings.webhook_deletion"}} {{.i18n.Tr "repo.settings.webhook_deletion"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -101,7 +101,7 @@
<div class="ui small basic delete modal"> <div class="ui small basic delete modal">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "repo.wiki.delete_page_button"}} {{.i18n.Tr "repo.wiki.delete_page_button"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -194,7 +194,7 @@
<div class="ui small basic delete modal" id="delete-email"> <div class="ui small basic delete modal" id="delete-email">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "settings.email_deletion"}} {{.i18n.Tr "settings.email_deletion"}}
</div> </div>
<div class="content"> <div class="content">
@ -205,7 +205,7 @@
<div class="ui small basic delete modal" id="delete-account"> <div class="ui small basic delete modal" id="delete-account">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "settings.delete_account_title"}} {{.i18n.Tr "settings.delete_account_title"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -55,7 +55,7 @@
<div class="ui small basic delete modal" id="delete-token"> <div class="ui small basic delete modal" id="delete-token">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "settings.access_token_deletion"}} {{.i18n.Tr "settings.access_token_deletion"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -48,7 +48,7 @@
<div class="ui small basic delete modal" id="remove-gitea-oauth2-application"> <div class="ui small basic delete modal" id="remove-gitea-oauth2-application">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "settings.remove_oauth2_application"}} {{.i18n.Tr "settings.remove_oauth2_application"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -57,7 +57,7 @@
<div class="ui small basic delete modal" id="delete-oauth2-application"> <div class="ui small basic delete modal" id="delete-oauth2-application">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "settings.remove_oauth2_application"}} {{.i18n.Tr "settings.remove_oauth2_application"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -59,7 +59,7 @@
<div class="ui small basic delete modal" id="delete-gpg"> <div class="ui small basic delete modal" id="delete-gpg">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "settings.gpg_key_deletion"}} {{.i18n.Tr "settings.gpg_key_deletion"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -56,7 +56,7 @@
<div class="ui small basic delete modal" id="delete-principal"> <div class="ui small basic delete modal" id="delete-principal">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "settings.ssh_principal_deletion"}} {{.i18n.Tr "settings.ssh_principal_deletion"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -63,7 +63,7 @@
<div class="ui small basic delete modal" id="delete-ssh"> <div class="ui small basic delete modal" id="delete-ssh">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "settings.ssh_key_deletion"}} {{.i18n.Tr "settings.ssh_key_deletion"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -142,7 +142,7 @@
<div class="ui small basic delete modal"> <div class="ui small basic delete modal">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "settings.remove_account_link"}} {{.i18n.Tr "settings.remove_account_link"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -26,7 +26,7 @@
<div class="ui small basic delete modal" id="delete-account-link"> <div class="ui small basic delete modal" id="delete-account-link">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "settings.remove_account_link"}} {{.i18n.Tr "settings.remove_account_link"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -53,7 +53,7 @@
<div class="ui small basic delete modal" id="delete-openid"> <div class="ui small basic delete modal" id="delete-openid">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "settings.openid_deletion"}} {{.i18n.Tr "settings.openid_deletion"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -25,7 +25,7 @@
<div class="ui small basic delete modal" id="disable-twofa"> <div class="ui small basic delete modal" id="disable-twofa">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "settings.twofa_disable"}} {{.i18n.Tr "settings.twofa_disable"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -45,7 +45,7 @@
<div class="ui small basic delete modal" id="delete-registration"> <div class="ui small basic delete modal" id="delete-registration">
<div class="ui icon header"> <div class="ui icon header">
<i class="trash icon"></i> {{svg "octicon-trashcan"}}
{{.i18n.Tr "settings.u2f_delete_key"}} {{.i18n.Tr "settings.u2f_delete_key"}}
</div> </div>
<div class="content"> <div class="content">

View File

@ -679,6 +679,23 @@ code,
} }
} }
} }
/* modal svg icons, copied from fomantic except width and height */
&.icon.header svg {
width: 3em;
height: 3em;
float: none;
display: block;
line-height: 1;
padding: 0;
margin: 0 auto .5rem;
opacity: 1;
}
/* center text in fomantic modal dialogs */
&.modal > .content {
text-align: center;
}
} }
.file-comment { .file-comment {