Skip to content

Commit

Permalink
Plugin list improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
Xpirix committed Sep 26, 2024
1 parent 801bf48 commit 6fff449
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 84 deletions.
27 changes: 15 additions & 12 deletions qgis-app/plugins/templates/plugins/list_pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,23 @@
{% endif %}
</ul>
</nav>


<div>
{% if show_more_items_number <= page_obj.paginator.count %}
<button class="button" onclick="set_per_page({{show_more_items_number}})">
{% trans "Show more" %}
</button>
{% else %}
<button class="button" disabled>
{% trans "Show more" %}
</button>
{% endif %}
<div class="is-flex is-justify-content-space-between is-flex-wrap-wrap">
<div class="mt-3 mb-3">
{% if show_more_items_number <= page_obj.paginator.count %}
<button class="button" onclick="set_per_page({{show_more_items_number}})">
{% trans "Show more" %}
</button>
{% else %}
<button class="button" disabled>
{% trans "Show more" %}
</button>
{% endif %}
</div>
<div class="is-flex is-align-items-center">
<span>
{% trans "Elements per page:" %}&nbsp;
{% trans "Items per page:" %}&nbsp;
</span>
<div class="select">
<select id="items_per_page">
Expand All @@ -58,9 +60,10 @@
<option value="{{ p }}" {% if p == paginator.per_page%} selected {% endif %}>{{ p }}</option>
{% endfor %}
</select>

</div>
</div>
</div>

<script type="text/javascript">
function set_per_page(n){
Expand Down
2 changes: 1 addition & 1 deletion qgis-app/plugins/templates/plugins/plugin_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ <h2>
<div id="plugin-manage">
<form method="post" action="{% url "plugin_manage" object.package_name %}">
{% csrf_token %}
<div class="field is-grouped">
<div class="field is-grouped is-flex-wrap-wrap" style="gap: 10px;">
<p class="control">
<a class="button" href="{% url "plugin_update" object.package_name %}">
<span class="icon">
Expand Down
4 changes: 2 additions & 2 deletions qgis-app/plugins/templates/plugins/plugin_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ <h2>{% if title %}{{title}}{% else %}{% trans "All plugins" %}{% endif %}</h2>
<div class="pagination">
{#% include 'sortable_listview/sort_links.html' %#}
</div>
<div class="schedule-container">
<div class="schedule-container box-content">
<table class="table plugins-list-table">
<thead>
<tr>
Expand Down Expand Up @@ -146,7 +146,7 @@ <h2>{% if title %}{{title}}{% else %}{% trans "All plugins" %}{% endif %}</h2>
</tbody>
</table>
</div>
<div class="is-flex is-justify-content-space-between is-align-items-center mt-3 mb-3">
<div class="mt-3 mb-3">
{% include 'plugins/list_pagination.html' %}
</div>
<div class="notification is-danger is-light is-light">
Expand Down
72 changes: 38 additions & 34 deletions qgis-app/static/style/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ mark {
padding: 0.05rem 0.25em;
}


.content p {
color: $text-primary2;
}
Expand Down Expand Up @@ -60,12 +59,13 @@ p {
color: $text-primary2;
}

.input, .textarea, .select select {
.input,
.textarea,
.select select {
color: $text-primary2;
border-color: $grey-light;
}


// @media screen and (max-width: 768px) {
// .hero-body {
// height: unset;
Expand All @@ -76,8 +76,9 @@ p {
background-color: unset;
min-height: 3em;
}
.navbar-brand, .navbar-tabs {
min-height:unset;
.navbar-brand,
.navbar-tabs {
min-height: unset;
a:hover {
color: $primary1-invert;
}
Expand Down Expand Up @@ -167,7 +168,7 @@ p {
color: $primary1-invert;
margin-left: unset;
width: 3em;
height: 3em ;
height: 3em;
}

@media screen and (max-width: 1023px) {
Expand All @@ -188,40 +189,43 @@ p {
}
}
@keyframes slideInFromLeft {
from {
transform: translateX(-100%);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
from {
transform: translateX(-100%);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}

@keyframes slideOutToLeft {
from {
transform: translateX(0);
opacity: 1;
}
to {
transform: translateX(-100%);
opacity: 0;
}
from {
transform: translateX(0);
opacity: 1;
}
to {
transform: translateX(-100%);
opacity: 0;
}
}
.context-container .navbar-start a.navbar-item.is-active:hover,
.context-container .navbar-start .navbar-link.is-active:hover,
.context-container .navbar-start a.navbar-item.is-active:hover,
.context-container .navbar-start .navbar-link.is-active:hover,
.context-container .navbar-start .navbar-item:hover {
background-color: unset !important;
color: white !important;
}
.content > .columns .content {
width: 100%;
}
}

@media screen and (min-width: 1024px) {
.navbar-start {
padding: 10px;
.navbar-dropdown {
background-color: #002033;
border: none;
background-color: #002033;
border: none;
}
}
}
Expand Down Expand Up @@ -249,7 +253,6 @@ a.is-active > span {
border-radius: 10px;
}


.is-semi-transparent {
opacity: 0.9;
}
Expand All @@ -260,14 +263,14 @@ a.is-active > span {
font-weight: 500;
}

.gradient-row{
.gradient-row {
background: #002033;
height: 3em;
display: flex;
align-items: center;
justify-content: flex-end;
}
.context-container{
.context-container {
@extend .gradient-row;
position: fixed;
width: 100%;
Expand All @@ -280,8 +283,10 @@ a.is-active > span {
color: white;
border-radius: 5px;
}

a.navbar-item.is-active, .navbar-link.is-active, .navbar-item {

a.navbar-item.is-active,
.navbar-link.is-active,
.navbar-item {
color: white;
background-color: unset;
&:hover {
Expand All @@ -294,16 +299,15 @@ a.is-active > span {
border-radius: 5px;
}
}

}

@media screen and (min-width: 1024px) {
:root {
--qg-nav-max-width: 960px;
--qg-nav-max-width: 960px;
}
}
@media screen and (min-width: 1408px) {
:root {
--qg-nav-max-width: 1344px;
--qg-nav-max-width: 1344px;
}
}
36 changes: 1 addition & 35 deletions qgis-app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,36 +44,7 @@
location-prefix="https://qgis.org"
></qg-top-nav>
{% include 'layouts/header.html' %}

<section class="hero is-dark is-medium has-bg-img" style="background: url({% static "images/hegobg1.webp" %});
background-position: 50%;
background-size: cover;">
<div class="hero-body">
<div class="columns container">
<div class="column is-8 is-flex hero-text has-text-left">
<div class="hero-container">
<div class="label">Free and Open Source</div>
<h1 class="title hero-title pr-3">
{{title}}
</h1>
<p class="subtitle hero-subtitle">QGIS plugins add additional functionality to the QGIS application.</p>
</div>
<div class="is-vcentered">
<a class="button is-primary1 is-size-5" href="/plugins/">
Explore
</a>
<!-- <p class="subtitle hero-subtitle">Available on Windows, Mac, Linux</p> -->
</div>

</div>
<div class="logo">
<figure class="image logo column is-justify-content-center">
<img src="{% static "images/large-logo.svg" %}">
</figure>
</div>
</div>
</div>
</section>
{% block pagetitle %}{% endblock %}
<section class="section">
<div class="container content">
<div class="columns is-multiline is-centered">
Expand All @@ -83,9 +54,6 @@ <h1 class="title hero-title pr-3">
{% endblock %}
</div>
<div class="content column is-9">
<section class="info">

</section>
{% if messages %}
<div class="notification is-light">
<button class="delete"></button>
Expand All @@ -94,10 +62,8 @@ <h1 class="title hero-title pr-3">
{% endfor %}
</div>
{% endif %}
<div class="responsive-content">
{% block content %}
{% endblock %}
</div>

</div>
</div>
Expand Down
30 changes: 30 additions & 0 deletions qgis-app/templates/flatpages/home_title.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{% load static %}
<section class="hero is-dark is-medium has-bg-img" style="background: url({% static "images/hegobg1.webp" %});
background-position: 50%;
background-size: cover;">
<div class="hero-body">
<div class="columns container">
<div class="column is-8 is-flex hero-text has-text-left">
<div class="hero-container">
<div class="label">Free and Open Source</div>
<h1 class="title hero-title pr-3">
{{title}}
</h1>
<p class="subtitle hero-subtitle">QGIS plugins add additional functionality to the QGIS application.</p>
</div>
<div class="is-vcentered">
<a class="button is-primary1 is-size-5" href="/plugins/">
Explore
</a>
<!-- <p class="subtitle hero-subtitle">Available on Windows, Mac, Linux</p> -->
</div>

</div>
<div class="logo">
<figure class="image logo column is-justify-content-center">
<img src="{% static "images/large-logo.svg" %}">
</figure>
</div>
</div>
</div>
</section>
3 changes: 3 additions & 0 deletions qgis-app/templates/flatpages/homepage.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{% extends BASE_TEMPLATE %}

{% block pagetitle %}
{% include "flatpages/home_title.html" %}
{% endblock %}
{% block extratitle %}Plugins{% endblock %}
{% block content %}
{% include "flatpages/home_content.html" %}
Expand Down

0 comments on commit 6fff449

Please sign in to comment.