#3493 add theme support
Merged by pingou. Opened by ryanlerch.
ryanlerch/pagure theme  into  master

Download 3493.patch

Adds the ability to theme pagure. Adds a new config variable
theme, and a new default theme that uses stock bootstrap and
no fonts. Also, split out the old theme into a new pagureio theme.

No docs for this yet, want to make sure this approach is approved before
re-writing docs.

Signed-off-by: Ryan Lerch rlerch@redhat.com

Let's not rely on external sources, even for the default theme

Let's drop this if not needed :)

This should be pointing to fedora-bootstrap 1.2.0.

This should be pointing to fedora-bootstrap 1.2.0.

The code looks good, but could you please split the commits so that it's easier to see how a theme could be added?

That is, a commit that adds theme support and a default theme with bootstrap 4 (though I think the vanilla bs4 theme is a bit too plain...), and a commit that adds the pagureio theme.

That way, it's easy for people to see how to add their own themes (like Mageia and openSUSE ones...).

Also, can we have some way to allow user-configurable light/dark variants?

I actually don't have a problem with this, CDNs would be more efficient than local serving in most cases anyway. If people want to adjust this for their own setups, it's easy to do.

The code looks good, but could you please split the commits so that it's easier to see how a theme could be added?
That is, a commit that adds theme support and a default theme with bootstrap 4 (though I think the vanilla bs4 theme is a bit too plain...), and a commit that adds the pagureio theme.
That way, it's easy for people to see how to add their own themes (like Mageia and openSUSE ones...).

It's kinda hard to make a stand-alone commit here, i kinda did the bare minimum to make the themes, and add the support.

Documentation will come in a later commit.

Also, the current default in the config for pagure is 1.1.1, so i just stuck with that.

we can bump the fedora-bootstrap version in a seperate PR, when i can check that the changes it brings in

ok, fair

I think @ryanlerch's point make sense, doing this in a separate PR is likely safer :)

As long as we have good doc, I'm fine with having this one commit, I expect people will look more at the files and directory structure than the commit itself to be honest.

Also, can we have some way to allow user-configurable light/dark variants?

This is tracked in https://pagure.io/pagure/issue/3395 which you opened ;-)

I'm fixing the broken test and seeing if there are more :)

Feedback from Stasiek Michalski from openSUSE:

would be nice if navbar was changable

1 new commit added

  • Drop test that is no longer supported

Feedback from Stasiek Michalski from openSUSE:

would be nice if navbar was changable

The themes use flask blueprints, so you can overwrite an entire template file by just putting a template of the same name in the templates dir of the theme. Currently the masthead is in the master template, but that can easily be broken out into another template in another PR.

rebased onto 0793d49b6dfbd14a5bd5348873d4a1a7a1a4a3a5

rebased onto e4cf7b8307107c2427e91aa4fb46d65c968e5588

okies, updated the original commit to remove the commented out code, and add stock bootstrap in the static dir of the default theme.

rebased onto adc0e9cee4639df238010185412e32bddeb4df47

Pretty please pagure-ci rebuild

rebased onto 3056c3314421863f01aef33dc96566b2955be318

rebased onto a20e9646b1efe369ec3996b658f5290af7f182b9

This approach looks good to me, and pending successful test run, I'd say it's good to merge.

All green, let's merge :)

Pull-Request has been merged by pingou

Metadata