diff --git a/app/app/views.py b/app/app/views.py index da58000f..8285f7ce 100644 --- a/app/app/views.py +++ b/app/app/views.py @@ -61,7 +61,7 @@ def projects(request): projects = ( Project.objects.select_related("institution") .prefetch_related("subjects", "languages") - .all() + .order_by("name") ) if subject_id: @@ -71,9 +71,9 @@ def projects(request): if institution_id: projects = projects.filter(institution__id=institution_id) - subjects = Subject.objects.all() - languages = Language.objects.all() - institutions = Institution.objects.all() + subjects = Subject.objects.order_by("name") + languages = Language.objects.order_by("name") + institutions = Institution.objects.order_by("name") project_data = [] for project in projects: diff --git a/app/static/css/styles.css b/app/static/css/styles.css index 059f1586..07a53dc4 100755 --- a/app/static/css/styles.css +++ b/app/static/css/styles.css @@ -33,104 +33,81 @@ html { position: absolute; bottom: 0; } - .header-container { display: inline-block; } - .nav-menu { float: left; padding: 5px; margin: 10px 10px 10px 10px; } - .nav-logo { margin: 3px 10px 10px 10px; float: left; } - .nav { background: var(--primary-fg); width: 100%; } - .nav > li > a{ margin-top: 15px; color: var(--text-color); } - .nav > li > .active{ margin-top: 15px; background-color: var(--primary) !important; color: var(--primary-fg); } - .nav > li > a:hover{ margin-top: 15px; background-color: var(--body-quiet-color); color: var(--primary-fg); } - .nav > li > a:active{ margin-top: 15px; background-color: var(--primary); color: var(--primary-fg); } - .btn-primary{ margin-top:20px; outline-color: var(--primary); background-color: var(--primary); border-color: var(--primary); } - .btn-outline-primary{ margin-top:20px; background: #2D4481; outline-color: var(--primary); } - .btn-primary:hover{ margin-top:20px; background: var(--body-quiet-color); outline-color: var(--primary); } - .app-footer .footer-title { color: var(--primary); } - .footer > a { color: var(--primary-fg); } - .section{ margin-left: 10px; margin-right: 10px; margin-bottom: 10px; } - .main-logo { width: 140px; height: 75px; margin: 20px 10px 10px 10px; } - .page-link { background-color: var(--primary) !important; color: var(--primary-fg) !important; } - .page-link:hover{ background-color: var(--body-quiet-color) !important; color: var(--primary-fg) !important; } - -.row { - margin: 10px; - padding: 10px; -} - .footer-class { display: flex; justify-content: center; @@ -138,22 +115,18 @@ html { position: relative; flex-direction: column; } - .language-toggle { margin-top: 1rem; } - .language-toggle form { display: flex; flex-direction: column; align-items: center; } - .language-toggle select, .language-toggle .btn-language { margin-top: 0.5rem; } - .btn-language{ color: var(--text-color); outline-color: var(--primary-fg); @@ -172,17 +145,33 @@ html { border-color: var(--primary-red); margin: 0 10px 0 10px; } - .uni-logo { width: auto; height: 75px; margin: 10px 0 10px 0; padding: 0 10px 10px 0; } +.institution-row { + margin: 10px; + padding: 10px; + display: flex; + justify-content: space-between; + align-items: flex-start; + flex-wrap: wrap; +} +.left-col, .right-col { + flex: 1; + min-width: 200px; + display: flex; + flex-direction: column; + justify-content: center; +} /*Projects page*/ +.filter-class label { + font-size: 1.15rem; +} .filter-form { - display: flex; margin: 30px; font-size: 0.875rem; } @@ -199,12 +188,21 @@ html { padding: 0 10px; width: 230px; } +.form-group-name { + margin-bottom: 15px; +} +.button-group { + display: flex; + align-items: center; +} .btn-apply, .btn-reset{ color: var(--primary-fg); outline-color: var(--primary); background-color: var(--primary); border-color: var(--primary); + padding: 10px 20px; margin-right: 10px; + white-space: nowrap; } .btn-apply:hover, .btn-reset:hover{ color: var(--primary-fg); @@ -242,15 +240,6 @@ html { padding: 0 5px 0 0; word-wrap: break-word; } -.project-left-col { - width: 70%; -} -.project-right-col { - width: 30%; - flex: 0 0 auto; - display: flex; - justify-content: flex-end; -} .project-header { display: flex; justify-content: space-between; @@ -269,8 +258,6 @@ html { margin: 3px 0 3px 0; } .project-row { - display: flex; - justify-content: space-between; width: 100%; } .project-text { @@ -280,7 +267,7 @@ html { font-size: 0.95rem; } -/*Project & Institution detail*/ +/*Projects & Institution detail pages*/ .detail { width: 80%; margin: 0 auto; @@ -304,8 +291,7 @@ html { } .detail-row { - display: flex; - justify-content: space-between; + flex-wrap: wrap; margin-bottom: 20px; } @@ -321,7 +307,6 @@ html { } .detail-col { - flex: 1; border-radius: 5px; } @@ -343,19 +328,7 @@ html { text-decoration: none; color: var(--link-text); } - -.detail-left-col { - width: 50%; -} - -.detail-right-col { - width: 50%; - flex: 0 0 auto; - display: flex; - justify-content: left; -} .project-date-row { - display: flex; font-size: 0.875rem; } @@ -396,9 +369,14 @@ html { width: 98%; padding-right: 30px; } - .col-sm-6 { - width: 50%; + .institution-row { + flex-direction: column; + align-items: flex-start; } + .left-col, .right-col { + width: 100%; + } + /*Home page*/ .content-card { font-size: smaller; @@ -409,7 +387,13 @@ html { /*Projects page*/ .filter-form select { padding: 0 10px; - width: 100px; + width: 250px; + } + .project-row { + justify-content: space-between; + } + .form-group { + margin-bottom: 20px } } @@ -448,7 +432,13 @@ html { /*Projects page*/ .filter-form select { padding: 0 10px; - width: 150px; + width: 400px; + } + .project-row { + justify-content: space-between; + } + .form-group { + margin-bottom: 20px } } @@ -507,6 +497,32 @@ html { padding: 0 10px; width: 200px; } + .project-row { + display: flex; + justify-content: space-between; + } + .project-left-col { + width: 70%; + } + .project-right-col { + width: 30%; + flex: 0 0 auto; + display: flex; + justify-content: flex-end; + } + + /*Projects & Institution detail pages*/ + .detail-left-col, .detail-right-col { + flex: 1; + padding: 10px; + } + .project-date-row { + display: flex; + font-size: 0.875rem; + } + .filter-form { + display: flex; + } } /*Larger screens (desktops, 1001px and up)*/ @@ -565,4 +581,31 @@ html { padding: 0 10px; width: 230px; } + .project-row { + display: flex; + justify-content: space-between; + } + .project-left-col { + width: 70%; + } + .project-right-col { + width: 30%; + flex: 0 0 auto; + display: flex; + justify-content: flex-end; + } + + /*Projects & Institution detail pages*/ + .detail-right-col { + flex: 0 0 auto; + display: flex; + justify-content: left; + } + .project-date-row { + display: flex; + font-size: 0.875rem; + } + .filter-form { + display: flex; + } } diff --git a/app/templates/app/institution_detail.html b/app/templates/app/institution_detail.html index 08d8131c..23fab35b 100644 --- a/app/templates/app/institution_detail.html +++ b/app/templates/app/institution_detail.html @@ -7,9 +7,8 @@
{% trans "Institutions" %} > {{ institution.name }}
-{% trans "No projects available for this institution." %}
{% endif %}{% trans "Profile completion:" %}