archlinux-common-style merge requestshttps://gitlab.archlinux.org/archlinux/archlinux-common-style/-/merge_requests2024-03-10T16:24:52Zhttps://gitlab.archlinux.org/archlinux/archlinux-common-style/-/merge_requests/10Add PNG icons from archweb2024-03-10T16:24:52ZJakub KlinkovskýAdd PNG icons from archwebA new PNG icon was [recently added to archweb](https://github.com/archlinux/archweb/pull/492) and it would be nice to provide it from the common project. I also added the apple-touch-icons and renamed `archlogo.8a05bc7f6cd1.svg` to `arch...A new PNG icon was [recently added to archweb](https://github.com/archlinux/archweb/pull/492) and it would be nice to provide it from the common project. I also added the apple-touch-icons and renamed `archlogo.8a05bc7f6cd1.svg` to `archlogo.svg`.https://gitlab.archlinux.org/archlinux/archlinux-common-style/-/merge_requests/9Add Django app to simplify integration into Django projects2024-03-10T17:03:56ZJakub KlinkovskýAdd Django app to simplify integration into Django projectsDjango apps have a special structure where resources should be
"namespaced" in a subdirectory based on the app name, where e.g.
`{% include "appname/resource.html" %}` maps to
`templates/appname/resource.html`. This applies to both templ...Django apps have a special structure where resources should be
"namespaced" in a subdirectory based on the app name, where e.g.
`{% include "appname/resource.html" %}` maps to
`templates/appname/resource.html`. This applies to both templates and
static files.
1. The solution for static files is simpler, the app can simply inject
its locations (and prefixes) to the STATICFILES_DIRS list. This works
for prebuilt CSS files, the app does not handle live building of SASS
files. A subcommand for `manage.py` is provided for convenience.
2. For templates we can provide a custom loader, but downstream projects
will need to add it into their configuration manually (see below).
Overall, this allows to integrate archlinux-common-style in a Django
project with a simple configuration:
INSTALLED_APPS = [
...
"archlinux_common_style.django",
...
]
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"OPTIONS": {
"loaders": [
(
"django.template.loaders.cached.Loader",
[
"django.template.loaders.filesystem.Loader",
"django.template.loaders.app_directories.Loader",
"archlinux_common_style.django.template_loader.Loader",
],
),
],
...
},
...
},
...
]
Note that the `name` in apps.py assumes that Django can import the
`archlinux_common_style.django` module in the project where this app is
used. This can be achieved by having archlinux-common-style as a git
submodule in the project, but with the non-canonical name with
underscores instead of dashes: `archlinux_common_style`. Alternatively,
we could drop the prefix, solve the name clash with the main `django`
module and require modifying `sys.path` in the project's settings.https://gitlab.archlinux.org/archlinux/archlinux-common-style/-/merge_requests/6Add color variants of logo SVG2024-03-10T18:47:08ZDaniel M. CapellaAdd color variants of logo SVGhttps://gitlab.archlinux.org/archlinux/archlinux-common-style/-/merge_requests/3Responsive Navbar2024-03-02T11:14:16ZMalte Jürgensmaltejur@dismail.deResponsive Navbar@jelle since in the [pull request on github](https://github.com/archlinux/archweb/pull/255) you mentioned that the responsive navbar has to be added to this repository, I decided to make the existing navbar here responsive from scratch, ...@jelle since in the [pull request on github](https://github.com/archlinux/archweb/pull/255) you mentioned that the responsive navbar has to be added to this repository, I decided to make the existing navbar here responsive from scratch, since the one in the pull request didn't use sass and also generally was a bit different from the one here. This also has the added bonus that the navbar doesn't require any JavaScript, it is pure CSS.
![Screenshot_20211108_210723](/uploads/834491315354f32fa6837cf0aea3c0df/Screenshot_20211108_210723.png)
![Screenshot_20211108_210745](/uploads/5ff4b6f551cb0b06efd237161d6dfb34/Screenshot_20211108_210745.png)
![Screenshot_20211108_210754](/uploads/d5c6d67e38f1d2b0d7816826bd14d465/Screenshot_20211108_210754.png)
~~I also moved the whole sass build process into the `package.json`, since that to me makes installing sass and other future dependencies easier and also feels a bit cleaner, but I can also remove that commit again if you want.~~
Closes #2Jelle van der WaaJelle van der Waa