From e7818d7fb459759daeebcc5db572bf115448b99d Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Thu, 22 Jul 2021 18:33:24 +0100 Subject: [PATCH] Tweak Featured styling, fix various issues --- app/flatpages/help.md | 1 + app/flatpages/help/featured.md | 6 ++++++ app/logic/packages.py | 2 +- app/scss/custom.scss | 27 ++++++++++++++++++++++++--- app/templates/base.html | 2 +- app/templates/index.html | 14 ++++++++++---- 6 files changed, 43 insertions(+), 9 deletions(-) create mode 100644 app/flatpages/help/featured.md diff --git a/app/flatpages/help.md b/app/flatpages/help.md index d4762976..975f8c8f 100644 --- a/app/flatpages/help.md +++ b/app/flatpages/help.md @@ -9,6 +9,7 @@ toc: False * [Ranks and Permissions](ranks_permissions) * [Reporting Content](reporting) * [Top Packages Algorithm](top_packages) +* [Featured Packages](featured) ## Help for Package Authors diff --git a/app/flatpages/help/featured.md b/app/flatpages/help/featured.md new file mode 100644 index 00000000..04875f1b --- /dev/null +++ b/app/flatpages/help/featured.md @@ -0,0 +1,6 @@ +title: Featured Packages + +Editors can choose packages to feature on the homepage. +This is done using the Featured tag. + +We are still deciding on a policy for choosing Featured packages. diff --git a/app/logic/packages.py b/app/logic/packages.py index d478c782..a3a62c5e 100644 --- a/app/logic/packages.py +++ b/app/logic/packages.py @@ -134,7 +134,7 @@ def do_edit_package(user: User, package: Package, was_new: bool, data: dict, rea package.provides.append(m) if "tags" in data: - old_tags = package.tags + old_tags = list(package.tags) package.tags.clear() for tag_id in data["tags"]: if is_int(tag_id): diff --git a/app/scss/custom.scss b/app/scss/custom.scss index 989339bc..1b182652 100644 --- a/app/scss/custom.scss +++ b/app/scss/custom.scss @@ -173,12 +173,33 @@ pre code { } } -.fs-2 { - font-size: calc(1.325rem + .9vw) !important; +#featuredCarousel { + .embed-responsive-item { + filter: brightness(0.85); + object-fit: cover; + } + .carousel-item, .embed-responsive-item { + max-height: 50vh; + } + .carousel-inner { + background-color: #000; + border-radius: 3px; + overflow: hidden; + } + .carousel-indicators { + margin-bottom: 0 !important; + opacity: 0.6; + } +} + +@media (min-width: 768px) { + #featuredCarousel h3 { + font-size: calc(1.325rem + .9vw) !important; + } } .text-shadow { - text-shadow: 3px 3px 3px rgba(10,10,10,0.2); + text-shadow: 0 0 10px rgba(10, 10, 10, 0.2), 3px 3px 3px rgba(10, 10, 10, 0.4); } @import "dracula.scss"; diff --git a/app/templates/base.html b/app/templates/base.html index ed207f7c..7c79db4e 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -6,7 +6,7 @@ {% block title %}title{% endblock %} - {{ config.USER_APP_NAME }} - + diff --git a/app/templates/index.html b/app/templates/index.html index c4a840ea..ea2dc95f 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -21,7 +21,7 @@ {% block content %} {% from "macros/packagegridtile.html" import render_pkggrid %} -