From c6a26786ece0fc03574814e92615351c0abe0dac Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Fri, 21 Dec 2018 16:55:22 +0000 Subject: [PATCH] Improve package page style again --- .../static/bootstrap.css} | 0 app/scss/main.scss | 5 +- app/scss/packages.scss | 28 --- app/templates/base.html | 1 + app/templates/packages/view.html | 211 +++++++++--------- 5 files changed, 115 insertions(+), 130 deletions(-) rename app/{scss/bootstrap.scss => public/static/bootstrap.css} (100%) diff --git a/app/scss/bootstrap.scss b/app/public/static/bootstrap.css similarity index 100% rename from app/scss/bootstrap.scss rename to app/public/static/bootstrap.css diff --git a/app/scss/main.scss b/app/scss/main.scss index 4f9e1ef..c95ebfd 100644 --- a/app/scss/main.scss +++ b/app/scss/main.scss @@ -1,4 +1,3 @@ -@import "bootstrap.scss"; @import "components.scss"; @import "packages.scss"; @import "packagegrid.scss"; @@ -17,3 +16,7 @@ background-repeat: no-repeat; background-position: center; } + +.alert .btn { + text-decoration: none; +} diff --git a/app/scss/packages.scss b/app/scss/packages.scss index f40f037..3ef2abc 100644 --- a/app/scss/packages.scss +++ b/app/scss/packages.scss @@ -37,34 +37,6 @@ left: 15px; } -.sidebar_container { - display: block; - position: relative; - padding: 0; - margin: 0; -} - -.sidebar_container .right, .sidebar_container .left{ - position: absolute; - display: block; - top: 10px; - margin-top: 0; -} - -.sidebar_container .right { - right: 0; - width: 280px; -} - -.sidebar_container .left { - right: 295px; - left: 0; -} - -.sidebar_container .right > *:first-child, .sidebar_container .left > *:first-child { - margin-top: 0; -} - .package-short-large { font-size: 120%; } diff --git a/app/templates/base.html b/app/templates/base.html index 1415146..c80e080 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -6,6 +6,7 @@ {% block title %}title{% endblock %} - {{ config.USER_APP_NAME }} + {% block headextra %}{% endblock %} diff --git a/app/templates/packages/view.html b/app/templates/packages/view.html index ab11917..e214042 100644 --- a/app/templates/packages/view.html +++ b/app/templates/packages/view.html @@ -7,81 +7,6 @@ {% endblock %} {% block container %} - {% if not package.approved %} -
- - {% if package.releases.count() == 0 %} - {% if package.checkPerm(current_user, "MAKE_RELEASE") %} - You need to create a release before this package can be approved. -

- A release is a single downloadable version of your {{ package.type.value | lower }}. - You need to create releases even if you use a rolling release development cycle, - as Minetest needs them to check for updates. -

- Create Release - {% else %} - A release is required before this package can be approved. - {% endif %} - - {% elif (package.type == package.type.GAME or package.type == package.type.TXP) and package.screenshots.count() == 0 %} - You need to add at least one screenshot. - - {% elif topic_error_lvl == "error" %} - Please fix the below topic issue(s). - - {% elif "Other" in package.license.name or "Other" in package.media_license.name %} - Please wait for the license to be added to CDB. - - {% else %} - {% if package.screenshots.count() == 0 %} - You should add at least one screenshot, but this isn't required.
- {% endif %} - - {% if not package.getDownloadRelease() %} - Please wait for the release to be approved. - {% elif package.checkPerm(current_user, "APPROVE_NEW") %} - You can now approve this package if you're ready. -
- - -
- {% else %} - Please wait for the package to be approved. - {% endif %} - {% endif %} -
-
- - {% if topic_error %} -
- - {{ topic_error | safe }} -
-
- {% endif %} - - {% if package.author == current_user or package.checkPerm(current_user, "APPROVE_NEW") %} - {% if review_thread %} -

{% if review_thread.private %}🔒{% endif %} {{ review_thread.title }}

- {% if review_thread.private %} -

- This thread is only visible to the package owner and users of - Editor rank or above. -

- {% endif %} - - {% from "macros/threads.html" import render_thread %} - {{ render_thread(review_thread, current_user) }} - {% else %} -
- Privately ask a question or give feedback - - Open Thread -
- {% endif %} - {% endif %} - {% endif %} -
+ {% if not package.approved %} +
+ + {% if package.releases.count() == 0 %} +

Release Required

+ {% if package.checkPerm(current_user, "MAKE_RELEASE") %} +

You need to create a release before this package can be approved.

+

+ A release is a single downloadable version of your {{ package.type.value | lower }}. + You need to create releases even if you use a rolling release development cycle, + as Minetest needs them to check for updates. +

+ Create Release + {% else %} + A release is required before this package can be approved. + {% endif %} + + {% elif (package.type == package.type.GAME or package.type == package.type.TXP) and package.screenshots.count() == 0 %} + You need to add at least one screenshot. + + {% elif topic_error_lvl == "error" %} + Please fix the below topic issue(s). + + {% elif "Other" in package.license.name or "Other" in package.media_license.name %} + Please wait for the license to be added to CDB. + + {% else %} + {% if package.screenshots.count() == 0 %} + You should add at least one screenshot, but this isn't required.
+ {% endif %} + + {% if not package.getDownloadRelease() %} + Please wait for the release to be approved. + {% elif package.checkPerm(current_user, "APPROVE_NEW") %} +
+ + +
+ You can now approve this package if you're ready. + {% else %} + Please wait for the package to be approved. + {% endif %} + {% endif %} +
+
+ + {% if topic_error %} +
+ + {{ topic_error | safe }} +
+
+ {% endif %} + + {% if similar_topics %} +
+ Please make sure that this package has the right to + the name '{{ package.name }}'. + See the + Inclusion Policy + for more info. +
+ {% endif %} + + {% if package.author == current_user or package.checkPerm(current_user, "APPROVE_NEW") %} + {% if review_thread %} +

{% if review_thread.private %}🔒{% endif %} {{ review_thread.title }}

+ {% if review_thread.private %} +

+ This thread is only visible to the package owner and users of + Editor rank or above. +

+ {% endif %} + + {% from "macros/threads.html" import render_thread %} + {{ render_thread(review_thread, current_user) }} + {% else %} +
+ Open Thread + + Privately ask a question or give feedback +
+
+ {% endif %} + {% endif %} + {% endif %}