diff --git a/scipost_django/scipost/static/scipost/assets/css/_grid.scss b/scipost_django/scipost/static/scipost/assets/css/_grid.scss index f1a5c0aa84085f319bb8e5bc9137ebb6723aceeb..832fa5d7e236e270f458c1393a8b49beeacdc6e8 100644 --- a/scipost_django/scipost/static/scipost/assets/css/_grid.scss +++ b/scipost_django/scipost/static/scipost/assets/css/_grid.scss @@ -5,7 +5,6 @@ main { margin-top: 0; - margin-bottom: 5rem; padding-top: 0.5rem; background-color: $white; box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, .05); @@ -14,8 +13,8 @@ main { margin-top: -1px; padding-top: $grid-gutter-width; padding-bottom: $grid-gutter-width; - padding-left: 2*$grid-gutter-width; - padding-right: 2*$grid-gutter-width; + padding-left: $grid-gutter-width; + padding-right: $grid-gutter-width; border-left: 1px solid; border-right: 1px solid; border-top: 1px solid; diff --git a/scipost_django/scipost/static/scipost/assets/css/_homepage.scss b/scipost_django/scipost/static/scipost/assets/css/_homepage.scss index e3a8740b86b8072c2438f48855fed516eb789cd0..ee141e4830b73a0a755fae7d79ee522aeefd1abc 100644 --- a/scipost_django/scipost/static/scipost/assets/css/_homepage.scss +++ b/scipost_django/scipost/static/scipost/assets/css/_homepage.scss @@ -35,7 +35,6 @@ .container { box-shadow: none; border: 0; - max-width: 1440px; } h2, .h2 { font-size: 1.1rem; } diff --git a/scipost_django/scipost/templates/scipost/_hx_participates_in.html b/scipost_django/scipost/templates/scipost/_hx_participates_in.html index 6fbab02aa2f1fd1f5d95233da6a839e931e3a59f..d8f7f4e3726629d3be54a9179fa4fd5ed29fff35 100644 --- a/scipost_django/scipost/templates/scipost/_hx_participates_in.html +++ b/scipost_django/scipost/templates/scipost/_hx_participates_in.html @@ -1,36 +1,59 @@ {% load static %} -<div class="card mb-2"> - <div class="card-header"> - <h2 class="my-2">SciPost participates in</h2> - </div> - <div class="card-body logos"> - <a href="https://www.crossref.org" target="_blank" rel="noopener"> - <img src="https://assets.crossref.org/logo/crossref-logo-200.svg" width="100" height="65" alt="Crossref logo"> - </a> - <a href="https://www.doaj.org" target="_blank" rel="noopener"> - <picture> - <source type="image/webp" srcset="{% static 'scipost/images/doaj_logo_200.webp' %} 90w"> - <img src="{% static 'scipost/images/doaj_logo_200.jpg' %}" width="90" height="90" alt="DOAJ logo"> - </picture> - </a> - <a href="https://www.clockss.org" target="_blank" rel="noopener"> - <picture> - <source type="image/webp" srcset="{% static 'scipost/images/clockss-boxed-logo-90w.webp' %} 80w"> - <img src="{% static 'scipost/images/clockss-boxed-logo-90w.png' %}" width="90" height="90" alt="Clockss logo"> - </picture> - </a> - <a href="https://i4oc.org/" target="_blank" rel="noopener"> - <picture> - <source type="image/webp" srcset="{% static 'scipost/images/I4OC.webp' %} 100w"> - <img src="{% static 'scipost/images/I4OC.png' %}" width="100" height="37" alt="I4OC logo"> - </picture> - </a> - <a href="https://freejournals.org" target="_blank" rel="noopener"> - <picture> - <source type="image/webp" srcset="{% static 'scipost/images/FJN-logo-long_w200.webp' %} 100w"> - <img src="{% static 'scipost/images/FJN-logo-long_w200.png' %}" width="100" height="46" alt="FJN logo"> - </picture> - </a> - </div> +<h2 class="highlight my-2">SciPost participates in</h2> +<div class="px-3 logos"> + <a href="https://www.crossref.org" target="_blank" rel="noopener"> + <img src="https://assets.crossref.org/logo/crossref-logo-200.svg" + width="100" + height="65" + alt="Crossref logo" /> + </a> + <a href="https://www.doaj.org" target="_blank" rel="noopener"> + <picture> + + <source type="image/webp" + srcset="{% static 'scipost/images/doaj_logo_200.webp' %} 90w" /> + + <img src="{% static 'scipost/images/doaj_logo_200.jpg' %}" + width="90" + height="90" + alt="DOAJ logo" /> + </picture> + </a> + <a href="https://www.clockss.org" target="_blank" rel="noopener"> + <picture> + + <source type="image/webp" + srcset="{% static 'scipost/images/clockss-boxed-logo-90w.webp' %} 80w" /> + + <img src="{% static 'scipost/images/clockss-boxed-logo-90w.png' %}" + width="90" + height="90" + alt="Clockss logo" /> + </picture> + </a> + <a href="https://i4oc.org/" target="_blank" rel="noopener"> + <picture> + + <source type="image/webp" + srcset="{% static 'scipost/images/I4OC.webp' %} 100w" /> + + <img src="{% static 'scipost/images/I4OC.png' %}" + width="100" + height="37" + alt="I4OC logo" /> + </picture> + </a> + <a href="https://freejournals.org" target="_blank" rel="noopener"> + <picture> + + <source type="image/webp" + srcset="{% static 'scipost/images/FJN-logo-long_w200.webp' %} 100w" /> + + <img src="{% static 'scipost/images/FJN-logo-long_w200.png' %}" + width="100" + height="46" + alt="FJN logo" /> + </picture> + </a> </div> diff --git a/scipost_django/scipost/templates/scipost/portal/_home_register_prompt.html b/scipost_django/scipost/templates/scipost/portal/_home_register_prompt.html new file mode 100644 index 0000000000000000000000000000000000000000..33a20be305477ee0f75300567d41640d94d5fd9c --- /dev/null +++ b/scipost_django/scipost/templates/scipost/portal/_home_register_prompt.html @@ -0,0 +1,14 @@ +{% if not user.is_authenticated %} + <!-- Register --> + <div class="card border border-danger mb-3"> + <div class="card-header"> + <h3>Register</h3> + </div> + <div class="card-body"> + <p class="mb-1"> + Professional scientists (PhD students and above) can become Contributors to SciPost by filling the <a href="{% url 'scipost:register' %}">registration form</a>. + </p> + </div> + </div> + <!-- End Register --> +{% endif %} diff --git a/scipost_django/scipost/templates/scipost/portal/_home_scipost_intro.html b/scipost_django/scipost/templates/scipost/portal/_home_scipost_intro.html new file mode 100644 index 0000000000000000000000000000000000000000..ff8d8bb529b2ccd0f91e994a40c4b99c755bcc1a --- /dev/null +++ b/scipost_django/scipost/templates/scipost/portal/_home_scipost_intro.html @@ -0,0 +1,24 @@ +<section class="text-center px-4" aria-label="SciPost Description"> + + <h1 style="font-size: 2rem;">The Home of Genuine Open Publishing</h1> + <div class="text-primary fs-1 my-2"> + SciPost is a complete publishing infrastructure + <br class="d-none d-lg-block" /> + serving professional scientists worldwide. + </div> + <div class="text-start d-flex flex-row my-2 gap-4 justify-content-center "> + <ul class="mx-2 d-flex flex-column gap-1 list-unstyled"> + <li>Two-Way Open Access</li> + <li>Copyright to Authors</li> + <li>Non Profit</li> + <li>Fee Free</li> + </ul> + <ul class="mx-2 d-flex flex-column gap-1 list-unstyled"> + <li>Open Infrasturcture</li> + <li>Community Ownership</li> + <li>Peer-Witnessed Refereeing</li> + <li>Collegial decisionmaking</li> + </ul> + </div> + +</section> diff --git a/scipost_django/scipost/templates/scipost/portal/_hx_home.html b/scipost_django/scipost/templates/scipost/portal/_hx_home.html index 37ae427d6285d99253d9b66ecc1406e8c2c5ac77..45f842ce7fb22fe86d7a9c2d4e88e41eee61b723 100644 --- a/scipost_django/scipost/templates/scipost/portal/_hx_home.html +++ b/scipost_django/scipost/templates/scipost/portal/_hx_home.html @@ -1,150 +1,142 @@ {% load static %} -<div class="row"> +<div class="row g-4"> <div class="col-md-8"> - <h1 class="highlight mt-0">The Home of Genuine Open Publishing</h1> - <h2 class="ms-4 mb-4">SciPost is a complete publishing infrastructure - <br> - serving professional scientists worldwide.</h2> + {% include 'scipost/portal/_home_scipost_intro.html' %} + + <div class="d-block d-md-none">{% include 'scipost/portal/_home_register_prompt.html' %}</div> <div hx-trigger="load once" hx-swap="outerHTML" - hx-get="{% url "scipost:portal_hx_recent_publications" %}"></div> + hx-get="{% url "scipost:portal_hx_recent_publications" %}"> + <h2 class="highlight mt-0">Recent Publications</h2> + <div class="placeholder-glow d-flex flex-column gap-4"> + + {% for i_repeat in '12345' %} + <div class="d-flex flex-column gap-2"> + <div class="placeholder w-25"></div> + <div class="placeholder w-100"></div> + <div class="placeholder w-75"></div> + <div class="placeholder w-25"></div> + </div> + {% endfor %} + + </div> + </div> </div> <div class="col-md-4"> - {% if not user.is_authenticated %} - <!-- Register --> - <div class="card border border-danger mb-3"> - <div class="card-header"> - <h3>Register</h3> - </div> - <div class="card-body"> - <p class="mb-1">Professional scientists (PhD students and above) can become Contributors to SciPost by filling the <a href="{% url 'scipost:register' %}">registration form</a>.</p> - </div><!-- End Register --> - </div> - {% endif %} + <div class="d-none d-md-block">{% include 'scipost/portal/_home_register_prompt.html' %}</div> <!-- News --> <div class="news"> - <h2 class="highlight mt-0">News - <a class="btn btn-link btn-sm" href="{% url 'scipost:feeds' %}" aria-label="RSS feeds">{% include 'bi/rss-fill.html' %}</a> + <h2 class="highlight mt-0"> + <a href="{% url "news:news" %}" class="text-body">News</a> </h2> <ul> - {% for news in news_items %} - <li> - <div class="date">{{ news.date|date:'d' }}<span class="month">{{ news.date|date:'M' }}</span></div> - <div> - <h3><a href="{% url 'news:news' %}#news_{{ news.id }}">{{ news.headline }}</a></h3> - {% if news.image %} - <div class="p-2"> - <img class="mb-3 mb-sm-0 {{ news.image.css_class }}" - style="max-height: 80%; max-width: 80%;" - src="{{ news.image.url }}" alt="image"/> - </div> - {% endif %} + + {% for news in news_items %} + <li> + <div class="date"> + {{ news.date|date:'d' }}<span class="month">{{ news.date|date:'M' }}</span> + </div> + <div> + <h3> + <a href="{% url 'news:news' %}#news_{{ news.id }}">{{ news.headline }}</a> + </h3> + + {% if news.image %} + <div class="p-2"> + <img class="mb-3 mb-sm-0 {{ news.image.css_class }}" + style="max-height: 80%; + max-width: 80%" + src="{{ news.image.url }}" + alt="image" /> + </div> + {% endif %} + <p>{{ news.blurb_short|safe|linebreaksbr }}</p> - </div> - </li> - {% endfor %} - </ul> + </div> + </li> + {% endfor %} - </div><!-- End news --> + </ul> + </div> + <!-- End news --> </div> - </div> - -<div class="row"> - <div class="col-md-4 mb-4"> - <div class="card"> - <div class="card-header"> - <h2 class="my-2">Our purpose: <a href="{% url 'scipost:about' %}#GOA">Genuine Open Access</a></h2> +<div class="row g-4"> + <div class="col-md-8"> + <h2 class="highlight my-2"> + <a href="{% url "sponsors:sponsors" %}" class="text-body">Sponsors</a> + </h2> + <div class="row px-3"> + <div class="col-md-6"> + <p> + We invite <a href="{% url 'organizations:organizations' %}">organizations benefitting from SciPost's activities</a> to join our growing <a href="{% url 'sponsors:sponsors' %}">list of Sponsors</a>. Look at our <a href="{% static 'sponsors/SciPost_Sponsors_Board_Prospectus.pdf' %}">one-page Prospectus</a> and at our full <a href="{% static 'sponsors/SciPost_Sponsorship_Agreement.pdf' %}">Sponsorship Agreement template</a>. + </p> + <p> + <strong>Scientists, please help us out:</strong> Please petition your local librarian/director/... to consider sponsoring us. You can use this email <a href="mailto:?subject=Petition to support SciPost&body={% autoescape on %}{% include 'sponsors/sponsor_petition_email.html' %}{% endautoescape %}&cc=sponsors@{{ request.get_host }}">template</a>. + </p> + <a href="{% url 'sponsors:sponsors' %}">See all sponsors</a> </div> - <div class="card-body"> - <div class="row"> - <div class="col"> - <ul class="list list-unstyled"> - <li>{% include 'bi/check-square.html' %} Community Ownership</li> - <li>{% include 'bi/check-square.html' %} Open Infrastructure</li> - <li>{% include 'bi/check-square.html' %} Copyright to Authors</li> - <li>{% include 'bi/check-square.html' %} Open Access</li> - <li>{% include 'bi/check-square.html' %} Open Citations</li> - </ul> - </div> - <div class="col"> - <ul class="list list-unstyled"> - <li>{% include 'bi/check-square.html' %} Fee Free</li> - <li>{% include 'bi/check-square.html' %} Non Profit</li> - <li>{% include 'bi/check-square.html' %} Open Finances</li> - <li>{% include 'bi/check-square.html' %} Academic Editing</li> - </ul> - </div> - </div> + <div class="col-md-6"> + <div id="sponsor-logos" + class="sp-swap" + hx-get="{% url 'scipost:_hx_sponsors' %}" + hx-push-url="false" + hx-trigger="load" + hx-swap="outerHTML swap:1s"></div> </div> </div> </div> - <div class="col-md-8 mb-4"> - <div class="card"> - <div class="card-header"> - <h2 class="my-2">Sponsors</h2> - </div> - <div class="card-body"> - <div class="row"> - <div class="col-md-6"> - <p> - We invite <a href="{% url 'organizations:organizations' %}">organizations benefitting from SciPost's activities</a> to join our growing <a href="{% url 'sponsors:sponsors' %}">list of Sponsors</a>. Look at our <a href="{% static 'sponsors/SciPost_Sponsors_Board_Prospectus.pdf' %}">one-page Prospectus</a> and at our full <a href="{% static 'sponsors/SciPost_Sponsorship_Agreement.pdf' %}">Sponsorship Agreement template</a>. - </p> - <p> - <strong>Scientists, please help us out:</strong> Please petition your local librarian/director/... to consider sponsoring us. You can use this email <a href="mailto:?subject=Petition to support SciPost&body={% autoescape on %}{% include 'sponsors/sponsor_petition_email.html' %}{% endautoescape %}&cc=sponsors@{{ request.get_host }}">template</a>. - </p> - </div> - <div class="col-md-6"> - <a href="{% url 'sponsors:sponsors' %}">See all sponsors</a> - <br> - <div id="sponsor-logos" class="sp-swap" - hx-get="{% url 'scipost:_hx_sponsors' %}" - hx-push-url="false" - hx-trigger="load" - hx-swap="outerHTML swap:1s" - > - </div> - </div> - </div> + {% if latest_blogpost %} + <div class="col-md-4"> + <div class="news"> + <h2 class="highlight my-2"> + <a href="{% url "blog:blog_index" %}" class="text-body">Blog</a> + </h2> + <ul class="px-3"> + <li> + <div class="date"> + {{ latest_blogpost.date_posted|date:'d' }}<span class="month">{{ latest_blogpost.date_posted|date:'M' }}</span> + </div> + <div> + <h3> + <a href="{{ latest_blogpost.get_absolute_url }}">{{ latest_blogpost.title }}</a> + </h3> + <p>{{ latest_blogpost.blurb }}</p> + </div> + </li> + </ul> </div> </div> - </div> + {% endif %} - <div class="col-md-4"> - <div class="card mb-2"> - <div class="card-header"> - <h2 class="my-2">Further info</h2> - </div> - <div class="card-body"> - <div class="row"> - <div class="col"> - <ul class="list list-unstyled"> - <li><a href="{% url 'scipost:about' %}">About SciPost</a></li> - <li><a href="{% url 'scipost:foundation' %}">The Foundation</a></li> - <li><a href="{% url 'scipost:FAQ' %}">FAQ</a></li> - <li><a href="{% url 'scipost:contact' %}">Contact us</a></li> - <li><a href="{% url 'careers:job_openings' %}">Careers@SciPost</a></li> - <li><a href="{% url 'blog:blog_index' %}">Blog</a></li> - </ul> - </div> - <div class="col"> - <ul class="list list-unstyled"> - <li><a href="https://disc.{{ request.get_host }}" target="_blank" rel="noopener">{% include 'bi/chat-right-text.html' %} Community</a></li> - <li><a href="https://git.{{ request.get_host }}" target="_blank" rel="noopener">{% include 'bi/code-square.html' %} git.{{ request.get_host }}</a></li> - <li class="mt-2"> <a href="{% url 'finances:business_model' %}">Our Business Model</a></li> - <li><a href="{% url 'organizations:organizations' %}">Organizations <span class="small">benefitting from our activities</span></a></li> - </ul> - </div> - </div> + <div class="col-md-8"> + <h2 class="highlight my-2"> + <a href="{% url "finances:business_model" %}" class="text-body">Business Model</a> + </h2> + <div class="row px-3"> + <div class="col"> + <img src="{% static 'finances/SciPost_Business_Model_Sketch.jpg' %}" + alt="SciPost business model sketch" + style="max-width: 15rem" + height="auto" + width="auto" + class="float-end ms-3 mb-3" /> + <p> + We don't charge authors, we don't charge readers, and we don't make any profit; we are an <strong>academic community service</strong> surviving on support from Organizations which benefit from our activities. + </p> + <p> + Regarding our operations, we run them in the most efficient way possible, with <strong>complete transparency</strong>, for the benefit not only of scientists worldwide, but also of their supporting Organizations (and anybody else interested in science). + </p> + <p>More information about our business model can be found <a href="{% url "finances:business_model" %}">here</a>.</p> </div> </div> @@ -152,34 +144,6 @@ <div class="col-md-4" hx-get="{% url 'scipost:_hx_participates_in' %}" - hx-push-url="false" - hx-trigger="load" - > - </div> - - {% if latest_blogpost %} - <div class="col-md-4"> - <div class="card news"> - <div class="card-header"> - <h2 class="my-2">Blog</h2> - </div> - <div class="card-body"> - <ul> - <li> - <div class="date">{{ latest_blogpost.date_posted|date:'d' }}<span class="month">{{ latest_blogpost.date_posted|date:'M' }}</span></div> - <div> - <h3> - <a href="{{ latest_blogpost.get_absolute_url }}"> - {{ latest_blogpost.title }} - </a> - </h3> - <p>{{ latest_blogpost.blurb }}</p> - </div> - </li> - </ul> - </div> - </div> - </div> - {% endif %} + hx-trigger="load once"></div> </div> diff --git a/scipost_django/scipost/views.py b/scipost_django/scipost/views.py index fca3f7b8f94ebe8232fb20eede4b8b604168b462..f7d59b9e750da947ae2b8abff420f9236480aa58 100644 --- a/scipost_django/scipost/views.py +++ b/scipost_django/scipost/views.py @@ -210,12 +210,6 @@ def portal_hx_home(request): context = { "news_items": news_items, "latest_blogpost": latest_blogpost, - "publications": Publication.objects.published() - .exclude(doi_label__contains="Proc") - .order_by("-publication_date", "-paper_nr") - .prefetch_related("in_issue__in_journal", "specialties", "collections__series")[ - :5 - ], } return render(request, "scipost/portal/_hx_home.html", context)