From 6bf4cfcab9783d6ba5c687debe800fc26fe84a7e Mon Sep 17 00:00:00 2001
From: Jorran de Wit <jorrandewit@scipost.org>
Date: Thu, 4 Nov 2021 21:24:50 +0100
Subject: [PATCH] Made final adjustments for new index

---
 .../scipost/static/scipost/assets/css/_homepage.scss  |  7 ++++++-
 scipost_django/scipost/templates/scipost/index3.html  | 11 +++--------
 scipost_django/scipost/views.py                       |  2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/scipost_django/scipost/static/scipost/assets/css/_homepage.scss b/scipost_django/scipost/static/scipost/assets/css/_homepage.scss
index 1cb9d69fe..b19b21b69 100644
--- a/scipost_django/scipost/static/scipost/assets/css/_homepage.scss
+++ b/scipost_django/scipost/static/scipost/assets/css/_homepage.scss
@@ -238,7 +238,7 @@
     }
   }
 
-  .link-cloud {
+  .news .link-cloud {
     list-style: none;
     padding: 0;
     text-align: center;
@@ -260,6 +260,11 @@
     }
   }
 
+  .news {
+    position: sticky;
+    top: 0;
+  }
+
   .news h3 > a { color: initial; }
   .news ul {
     list-style: none;
diff --git a/scipost_django/scipost/templates/scipost/index3.html b/scipost_django/scipost/templates/scipost/index3.html
index cdb933107..602776d06 100644
--- a/scipost_django/scipost/templates/scipost/index3.html
+++ b/scipost_django/scipost/templates/scipost/index3.html
@@ -14,10 +14,6 @@
 {% block meta_description %}{{ block.super }} homepage{% endblock meta_description %}
 {% block pagetitle %}Homepage{% endblock pagetitle %}
 
-{% block navbar %}
-  {% include 'scipost/navbar2.html' %}
-{% endblock %}
-
 {% block content %}
   <div class="row">
     <div class="col-12">
@@ -71,10 +67,7 @@
       	    </li>
       	  {% endfor %}
       	</ul>
-      </div><!-- End news -->
-
 
-      <div>
         <ul class="link-cloud">
           <li>About</li>
           <li>Contact Us</li>
@@ -88,7 +81,9 @@
           <li>Sponsors</li>
           <li>Finances</li>
         </ul>
-      </div>
+      </div><!-- End news -->
+
+
     </div>
 
   </div>
diff --git a/scipost_django/scipost/views.py b/scipost_django/scipost/views.py
index 29ad453cf..a106d7683 100644
--- a/scipost_django/scipost/views.py
+++ b/scipost_django/scipost/views.py
@@ -415,7 +415,7 @@ def index3(request):
         'news_items': NewsItem.objects.homepage().order_by('-date')[:4],
         'publications': Publication.objects.published().order_by('-publication_date',
                                                                  '-paper_nr')[:10],
-        'submissions': Submission.objects.public().order_by('-submission_date')[:10],
+        # 'submissions': Submission.objects.public().order_by('-submission_date')[:10],
         'current_sponsors': Organization.objects.current_sponsors().order_by('?')[:2]
     }
     return render(request, 'scipost/index3.html', context)
-- 
GitLab