#276 User-made themes

Open
opened 1 month ago by kreyren · 4 comments
kreyren commented 1 month ago

I am doing research for RXT0130/reytea#12

Is there a some way to contribute and maintain custom themes so that they would be available in https://codeberg.org/user/settings/account ?:
image

I am doing research for https://codeberg.org/RXT0130/reytea/issues/12 Is there a some way to contribute and maintain custom themes so that they would be available in https://codeberg.org/user/settings/account ?: ![image](https://codeberg.org/attachments/9770c3fd-3770-400d-8787-a4b637d4e50e)
hw commented 1 month ago
Owner

Nice idea (could be for example in a special repo like pages?). Contributions welcome!

Nice idea (could be for example in a special repo like pages?). Contributions welcome!
kreyren commented 1 month ago
Poster

Can you elaborate on a possible implementation?

From what i was able to find it seems to require changes in config file to define the allowed themes (1fbc50f974/custom/conf/app.example.ini (L189)) and apparently Gitea 1.8.0 has a method to specify user-themes? (4315e313d1/docs/content/doc/advanced/customizing-gitea.en-us.md (customizing-the-look-of-gitea))

So i would think that in theory we could provide a directory web_src/less/themes/ into a separate repository and CI to update the config file? Or do you prefer to do that manually?

Can you elaborate on a possible implementation? From what i was able to find it seems to require changes in config file to define the allowed themes (https://github.com/go-gitea/gitea/blob/1fbc50f9747947541d998de99a6b7f0efb42522c/custom/conf/app.example.ini#L189) and apparently Gitea 1.8.0 has a method to specify user-themes? (https://github.com/go-gitea/gitea/blob/4315e313d12bbf0655710b6ab0aad121e0f7dba2/docs/content/doc/advanced/customizing-gitea.en-us.md#customizing-the-look-of-gitea) So i would think that in theory we could provide a directory `web_src/less/themes/` into a separate repository and CI to update the config file? Or do you prefer to do that manually?
hw commented 1 month ago
Owner

A contributor would have to implement a facility in gitea to load the theme from user repo. (permissioning and security implications need to be well thought-through)

A contributor would have to implement a facility in gitea to load the theme from user repo. (permissioning and security implications need to be well thought-through)
kreyren commented 1 month ago
Poster

Or i guess we could just define these as something like

background: rgb(var(--color-foreground-faded));

and then providing a user interface in the settings to define the value of --color-foreground-faded?

So that the end-user can change the color theme on demand which should be also resource friendly to implement independantly of the default theme?

Or i guess we could just define these as something like ```css background: rgb(var(--color-foreground-faded)); ``` and then providing a user interface in the settings to define the value of `--color-foreground-faded`? So that the end-user can change the color theme on demand which should be also resource friendly to implement independantly of the default theme?
lhinderberger added the
enhancement
label 1 month ago
lhinderberger changed title from Question: User-made themes? to User-made themes 1 month ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.