[Beet Themes] - Seperate all custom changes in themes from upstream #816

Open
opened 2024-03-02 17:08:38 +01:00 by muppeth · 6 comments
Owner

To be able to maintain the forks in easy way we should make sure all custom changes in themes are done on separate files so that no upstream data is changed as it will make it harder to keep track of changes. This approach will create an easy and simple setting for additional future flavors of themes.

List of current custom themes on disroot:

To be able to maintain the forks in easy way we should make sure all custom changes in themes are done on separate files so that no upstream data is changed as it will make it harder to keep track of changes. This approach will create an easy and simple setting for additional future flavors of themes. List of current custom themes on disroot: - [ ] [SearxNG](https://git.disroot.org/Disroot-themes/searxng-beetroot) - [ ] [Forgejo](https://git.disroot.org/Disroot-themes/forgejo-beetroot) - [ ] [Lufi](https://git.disroot.org/Disroot-themes/lufi_beetroot) - [ ] [Roundcube](https://git.disroot.org/Disroot-themes/roundcube_themes)
muppeth added the
Themes
Goal 2024
labels 2024-03-02 17:08:38 +01:00
muppeth added this to the 2024 Goal - Unified Themes project 2024-03-02 17:08:38 +01:00
meaz added this to the 24.03 - March milestone 2024-03-06 15:32:36 +01:00
meaz self-assigned this 2024-03-06 15:32:42 +01:00
Owner

Searxng theme

We don't have the exact same structure as on upstream.

In static:

  • We already have a specific disroot.less file
  • We import it in definitions.less and in style.less. I don't think we could do otherwise.
  • Nothing else is touched, but we have to run grunt to get the css generated.

In template:

  • We change lot of files there, but for most, it is just a matter of replacing mention of simple by beetroot
  • We edit base.html and index.html for dashboard
  • We also have our Searxng logo as searxng-wordmark.min.svg

So at the moment here is what I do when I need to update:

  • git clone searnx repo
  • Check differences between the static/themes/simple folder of the searxng repo and the beetroot_static of our theme repo
  • Check differences between the templates/simple folder of the searxng repo and the `beetroot_template of our theme repo.

I don't have a smart way to that quicker. Perhaps using a script? So we clone the repo, apply the script that would implement this little changes here and there. Then we just have to copy the files over in our repo.

But that's trickier for the base.html and index.html files.

# Searxng theme We don't have the exact same structure as on upstream. ## In static: - We already have a specific `disroot.less` file - We import it in `definitions.less` and in `style.less`. I don't think we could do otherwise. - Nothing else is touched, but we have to run `grunt` to get the css generated. ## In template: - We change lot of files there, but for most, it is just a matter of replacing mention of `simple` by `beetroot` - We edit `base.html` and `index.html` for dashboard - We also have our Searxng logo as searxng-wordmark.min.svg So at the moment here is what I do when I need to update: - `git clone searnx repo` - Check differences between the `static/themes/simple` folder of the searxng repo and the `beetroot_static` of our theme repo - Check differences between the `templates/simple` folder of the searxng repo and the `beetroot_template of our theme repo. I don't have a smart way to that quicker. Perhaps using a script? So we clone the repo, apply the script that would implement this little changes here and there. Then we just have to copy the files over in our repo. But that's trickier for the `base.html` and `index.html` files.
Owner

Forgejo

We have only three files to check so that's pretty easy.

  • theme-beetroot-auto.css: we change change the word forgejo by beetroot
  • For the 2 others files, we have our disroot additions directly into them. I guess we could have our changes into 2 different files (one for light one for dark) and just add @import "disroot.css"; on top of each of those files so that we don't edit them. But that's not that simple as we comment out some of the css rules in there...
  • To be honest, that theme is really quick to update as it is done now. The thing I would focus though is having those --disroot color vars to be set like on any other theme (I mean the exact same colors)
# Forgejo We have only three files to check so that's pretty easy. - `theme-beetroot-auto.css`: we change change the word `forgejo` by `beetroot` - For the 2 others files, we have our disroot additions directly into them. I guess we could have our changes into 2 different files (one for light one for dark) and just add `@import "disroot.css";` on top of each of those files so that we don't edit them. But that's not that simple as we comment out some of the css rules in there... - To be honest, that theme is really quick to update as it is done now. The thing I would focus though is having those `--disroot` color vars to be set like on any other theme (I mean the exact same colors)
Owner

Roundcube

What I do it that I download release and check diff with skins/elastic/.
The easy part is that we have the same structure as upstream.

Images

  • favicon.ico and logo.svg are modified
  • disroot-root and logo.png are added

Styles

We have specific disroot files:

  • _colors.less
  • _dark.less
  • _darkc.less
  • _styles.less
  • _variables.less

In those files we don't only have disroot colors, we also change some rules.

We need to run lessc command also on embed.css, print.css and styles.css files to get the min.css version

Templates

  • Only one change on menu.html from svg to png on a logo
  • A bit more changes on login.html

General

  • We added Disroot info on meta.json
  • We change a bit watermark.html
# Roundcube What I do it that I download release and check diff with `skins/elastic/`. The easy part is that we have the same structure as upstream. ## Images - `favicon.ico` and `logo.svg` are modified - `disroot-root` and `logo.png` are added ## Styles We have specific disroot files: - `_colors.less` - `_dark.less` - `_darkc.less` - `_styles.less` - `_variables.less` In those files we don't only have disroot colors, we also change some rules. We need to run `lessc` command also on `embed.css`, `print.css` and `styles.css` files to get the `min.css` version ## Templates - Only one change on `menu.html` from svg to png on a logo - A bit more changes on `login.html` ## General - We added Disroot info on `meta.json` - We change a bit `watermark.html`
Owner

Lufi

What I do it that I download release and check diff with themes/default/.
The easy part is that we have the same structure as upstream.

CSS

  • I see changes in lufi.css and materialize.css but as we didn't explicit noted what is Disroot changes, I don't even know if differences are because of our changes, or because it was done by dev!
  • We need to minify materialize.css

IMG

We use our own logo

Templates

We remove a line in about.html.ep coz we don't log IPs.

Other

  • README.md is on own file (not in upstream repo)
  • There is a Makefile on our repo, but not in upstream repo so I guess we cold remove this.
# Lufi What I do it that I download release and check diff with `themes/default/`. The easy part is that we have the same structure as upstream. ## CSS - I see changes in `lufi.css` and `materialize.css` but as we didn't explicit noted what is Disroot changes, I don't even know if differences are because of our changes, or because it was done by dev! - We need to minify `materialize.css` ## IMG We use our own logo ## Templates We remove a line in `about.html.ep` coz we don't log IPs. ## Other - `README.md` is on own file (not in upstream repo) - There is a `Makefile` on our repo, but not in upstream repo so I guess we cold remove this.
Owner

@Disroot/Owners as you can see, I've tried to sum up what we change for already existing theme. Now, you can check and see if you can come with a smart solution...

@Disroot/Owners as you can see, I've tried to sum up what we change for already existing theme. Now, you can check and see if you can come with a smart solution...
Author
Owner

@meaz thanks or the above. it makes it easy to work. I'm on it. i will try to push some solution.

@meaz thanks or the above. it makes it easy to work. I'm on it. i will try to push some solution.
muppeth modified the milestone from 24.03 - March to 24.04 - April 2024-04-10 20:59:27 +02:00
muppeth modified the milestone from 24.04 - April to 24.05 - May 2024-04-29 19:24:59 +02:00
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Disroot/Disroot-Project#816
No description provided.