diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..6f798938 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "archlinux_common_style"] + path = archlinux_common_style + url = https://gitlab.archlinux.org/lahwaacz/archlinux-common-style.git diff --git a/archlinux_common_style b/archlinux_common_style new file mode 160000 index 00000000..08cfecfd --- /dev/null +++ b/archlinux_common_style @@ -0,0 +1 @@ +Subproject commit 08cfecfd80add760dd3ec10dbba8b43562f19e4d diff --git a/settings.py b/settings.py index 9955758d..9cf9594a 100644 --- a/settings.py +++ b/settings.py @@ -70,9 +70,9 @@ STATIC_ROOT = path.join(DEPLOY_PATH, 'collected_static') # Look for more static files in these locations -STATICFILES_DIRS = ( +STATICFILES_DIRS = [ path.join(DEPLOY_PATH, 'sitestatic'), -) +] # Static files backend that allows us to use far future Expires headers STATICFILES_STORAGE = 'main.storage.MinifiedStaticFilesStorage' @@ -125,6 +125,8 @@ 'django_countries', 'django_extensions', + 'archlinux_common_style.django', + 'main', 'mirrors', 'news', @@ -244,7 +246,6 @@ 'DIRS': [ path.join(DEPLOY_PATH, 'templates') ], - 'APP_DIRS': True, 'OPTIONS': { 'debug': DEBUG, 'context_processors': [ @@ -255,6 +256,16 @@ 'csp.context_processors.nonce', 'main.context_processors.mastodon_link', ], + "loaders": [ + ( + "django.template.loaders.cached.Loader", + [ + "django.template.loaders.filesystem.Loader", + "django.template.loaders.app_directories.Loader", + "archlinux_common_style.django.template_loader.Loader", + ], + ), + ], } } ] diff --git a/sitestatic/archnavbar/archlogo.png b/sitestatic/archnavbar/archlogo.png deleted file mode 100644 index 3d2cd40f..00000000 Binary files a/sitestatic/archnavbar/archlogo.png and /dev/null differ diff --git a/sitestatic/archnavbar/archlogo.svg b/sitestatic/archnavbar/archlogo.svg deleted file mode 100644 index 3f7aa74a..00000000 --- a/sitestatic/archnavbar/archlogo.svg +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/sitestatic/archnavbar/archnavbar.css b/sitestatic/archnavbar/archnavbar.css deleted file mode 100644 index 5a83dfd2..00000000 --- a/sitestatic/archnavbar/archnavbar.css +++ /dev/null @@ -1,25 +0,0 @@ -/* - * ARCH GLOBAL NAVBAR - * We're forcing all generic selectors with !important - * to help prevent other stylesheets from interfering. - */ - -/* container for the entire bar */ -#archnavbar { min-height: 40px !important; padding: 10px 15px !important; background: #333 !important; border-bottom: 5px #08c solid !important; } -#archnavbarlogo { background: url('archlogo.png') no-repeat !important; } - -/* move the heading/paragraph text offscreen */ -#archnavbarlogo p { margin: 0 !important; padding: 0 !important; text-indent: -9999px !important; } -#archnavbarlogo h1 { margin: 0 !important; padding: 0 !important; text-indent: -9999px !important; } - -/* make the link the same size as the logo */ -#archnavbarlogo a { display: block !important; height: 40px !important; width: 190px !important; } - -/* display the list inline, float it to the right and style it */ -#archnavbar ul { display: block !important; list-style: none !important; margin: 0 !important; padding: 0 !important; font-size: 0px !important; text-align: right !important; } -#archnavbar ul li { display: inline-block !important; font-size: 14px !important; font-family: sans-serif !important; line-height: 14px !important; padding: 14px 15px 0px !important; } - -/* style the links */ -#archnavbar ul#archnavbarlist li a { color: #999; font-weight: bold !important; text-decoration: none !important; } -#archnavbar ul li a:hover { color: white !important; text-decoration: underline !important; } - diff --git a/sitestatic/archweb.css b/sitestatic/archweb.css index f7c61f10..80e08fc5 100644 --- a/sitestatic/archweb.css +++ b/sitestatic/archweb.css @@ -6,36 +6,6 @@ * 11px = 0.6875em */ -/* - * ARCH GLOBAL NAVBAR - * We're forcing all generic selectors with !important - * to help prevent other stylesheets from interfering. - */ - -/* container for the entire bar */ -#archnavbar { min-height: 40px !important; padding: 10px 15px !important; background: #333 !important; border-bottom: 5px #08c solid !important; } -#archnavbarlogo { float: left !important; margin: 0 !important; padding: 0 !important; height: 40px !important; width: 190px !important; background: url('archnavbar/archlogo.png') no-repeat !important; } -@media (-webkit-min-device-pixel-ratio: 1.2), (min--moz-device-pixel-ratio: 1.2), (-o-min-device-pixel-ratio: 2/1) { - #archnavbarlogo { float: left !important; margin: 0 !important; padding: 0 !important; height: 40px !important; width: 190px !important; background: url(archnavbar/archlogo.svg) no-repeat !important;background-size:100% !important; - } -} - -/* move the heading text offscreen */ -#archnavbarlogo h1 { margin: 0 !important; padding: 0 !important; text-indent: -9999px !important; } - -/* make the link the same size as the logo */ -#archnavbarlogo a { display: block !important; height: 40px !important; width: 190px !important; } - -/* display the list inline, float it to the right and style it */ -#archnavbarlist { display: block !important; list-style: none !important; margin: 0 !important; padding: 0 !important; font-size: 0px !important; text-align: right !important; } -#archnavbarlist li { display: inline-block !important; font-size: 14px !important; font-family: sans-serif !important; line-height: 14px !important; padding: 14px 15px 0px !important; } - -/* style the links */ -#archnavbarlist li a { color: #999; font-weight: bold !important; text-decoration: none !important; } -#archnavbarlist li a:hover { color: white !important; text-decoration: underline !important; } - -/* END ARCH GLOBAL NAVBAR */ - /* simple reset */ * { margin: 0; @@ -1145,9 +1115,9 @@ ul.signoff-list { } /* highlight current website in the navbar */ -#archnavbar.anb-home ul li#anb-home a, -#archnavbar.anb-packages ul li#anb-packages a, -#archnavbar.anb-download ul li#anb-download a { +header.anb-home ul li#anb-home a, +header.anb-packages ul li#anb-packages a, +header.anb-download ul li#anb-download a { color: white !important; } diff --git a/sitestatic/favicon.png b/sitestatic/favicon.png deleted file mode 100644 index 8c7f3411..00000000 Binary files a/sitestatic/favicon.png and /dev/null differ diff --git a/sitestatic/logos/apple-touch-icon-114x114.png b/sitestatic/logos/apple-touch-icon-114x114.png deleted file mode 100644 index a5b4282a..00000000 Binary files a/sitestatic/logos/apple-touch-icon-114x114.png and /dev/null differ diff --git a/sitestatic/logos/apple-touch-icon-144x144.png b/sitestatic/logos/apple-touch-icon-144x144.png deleted file mode 100644 index cd177f2c..00000000 Binary files a/sitestatic/logos/apple-touch-icon-144x144.png and /dev/null differ diff --git a/sitestatic/logos/apple-touch-icon-57x57.png b/sitestatic/logos/apple-touch-icon-57x57.png deleted file mode 100644 index d7d592c7..00000000 Binary files a/sitestatic/logos/apple-touch-icon-57x57.png and /dev/null differ diff --git a/sitestatic/logos/apple-touch-icon-72x72.png b/sitestatic/logos/apple-touch-icon-72x72.png deleted file mode 100644 index 5983885f..00000000 Binary files a/sitestatic/logos/apple-touch-icon-72x72.png and /dev/null differ diff --git a/sitestatic/logos/icon-transparent-64x64.png b/sitestatic/logos/icon-transparent-64x64.png deleted file mode 100644 index 0318f183..00000000 Binary files a/sitestatic/logos/icon-transparent-64x64.png and /dev/null differ diff --git a/templates/base.html b/templates/base.html index 7dfedd1a..eb7e90e4 100644 --- a/templates/base.html +++ b/templates/base.html @@ -5,32 +5,21 @@ {% block title %}Arch Linux{% endblock %} + - - - - - - + + + + + + {% block head %}{% endblock %} - +
{% if user.is_authenticated %} diff --git a/templates/packages/flaghelp.html b/templates/packages/flaghelp.html index 15214335..179cc3c9 100644 --- a/templates/packages/flaghelp.html +++ b/templates/packages/flaghelp.html @@ -3,8 +3,8 @@ Flagging Packages - - + + diff --git a/templates/packages/opensearch.xml b/templates/packages/opensearch.xml index 4e16d252..85204949 100644 --- a/templates/packages/opensearch.xml +++ b/templates/packages/opensearch.xml @@ -4,8 +4,9 @@ Arch Linux Package Repository Search Search the Arch Linux package repositories by keyword in package names and descriptions. linux archlinux package software - {{ domain }}{% static "favicon.png" %} - {{ domain }}{% static "logos/icon-transparent-64x64.png" %} + {{ domain }}{% static "archlinux_common_style/favicon.ico" %} + {{ domain }}{% static "archlinux_common_style/favicon.png" %} + {{ domain }}{% static "archlinux_common_style/icon-transparent-64x64.png" %} en-us UTF-8 UTF-8