Skip to content

Simpler Custom Logo Workflow #13969

@kdumontnu

Description

@kdumontnu
  • Gitea version (or commit ref): develop, ee7133d

Description

generate-images.js (which is an incredible piece of code!) creates logo pngs with 'gitea' in the title (ex. gitea-lg.png). I propose we use generic naming 'logo' (ex. logo-lg.png) to allow users to take advantage of the generate-images code and update the logo without having to customize the template file for each logo image reference.

Specifically, users would be able to replace assets/logo.svg with a custom logo and run make generate-images to have the logo updated across the app. Admittedly, we COULD use the code as is, but the logo name reference gitea... would technically not be correct.

I would add that this might be considered a breaking change, as it would result in many existing HTML template references to break. I'm not sure if the gitea community considers this when creating releases.

I'm happy to implement a change if I can get some initial feedback.

Ex. code from home.tmpl

{{template "base/head" .}}
<div class="home">
	<div class="ui stackable middle very relaxed page grid">
		<div class="sixteen wide center aligned centered column">
			<div>
				<img class="logo" src="{{StaticUrlPrefix}}/img/gitea-lg.png" />
			</div>
			<div class="hero">
				<h1 class="ui icon header title">
					{{AppName}}
				</h1>
				<h2>{{.i18n.Tr "startpage.app_desc"}}</h2>
			</div>
		</div>
	</div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    pr/breakingMerging this PR means builds will break. Needs a description what exactly breaks, and how to fix it!type/refactoringExisting code has been cleaned up. There should be no new functionality.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions