diff --git a/journals/templates/journals/_publication_single_short_summary.html b/journals/templates/journals/_publication_single_short_summary.html index cce9e6bb3e29bb9791b05f10e01810bd247b2800..7ca8c2165167f03f4664ae6631e2b138643922cc 100644 --- a/journals/templates/journals/_publication_single_short_summary.html +++ b/journals/templates/journals/_publication_single_short_summary.html @@ -1,3 +1,3 @@ <h3 class="pb-0"><a href="{{publication.get_absolute_url}}">{{ publication.title }}</a></h3> +<div class="text-muted mb-1"><span class="d-inline-block">published {{ publication.publication_date }}</span> <span class="d-inline-block">as {{ publication.doi_string }}</span></div> <div>by {{ publication.author_list|truncatechars:30 }}</div> -<div class="text-muted">published {{ publication.publication_date }}</div> diff --git a/news/templates/news/news_card_content.html b/news/templates/news/news_card_content.html index c308bb5f3e63d65cc2ea00f99fe18a66aa49f4aa..c034d9e95700453c0e1f6b47e330bf0541ba2b1a 100644 --- a/news/templates/news/news_card_content.html +++ b/news/templates/news/news_card_content.html @@ -1,11 +1,11 @@ -<div class="card-header p-2 border-0"> +<div class="card-block px-0 pt-1 news-item"> <h3 class="card-title mb-0">{{news.headline}}</h3> -</div> -<div class="card-block px-2 pt-1"> - <h4 class="text-muted font-weight-bold">{{news.date|date:'Y-n-j'}}</h4> - <div>{{news.blurb|linebreaks}}</div> + <div class="px-1 mt-1"> + <h4 class="text-muted font-weight-bold">{{news.date|date:'Y-n-j'}}</h4> + <div>{{news.blurb|linebreaks}}</div> - {% if news.followup_link %} - <a href="{{news.followup_link}}">{{news.followup_link_text}}</a> - {% endif %} + {% if news.followup_link %} + <a href="{{news.followup_link}}">{{news.followup_link_text}}</a> + {% endif %} + </div> </div> diff --git a/scipost/static/scipost/assets/css/_cards.scss b/scipost/static/scipost/assets/css/_cards.scss index ad4e4c7d5a163a758cd4f4afaa2a735d06c68841..a276ee0cce180697b019963054b6cbea7eb81002 100644 --- a/scipost/static/scipost/assets/css/_cards.scss +++ b/scipost/static/scipost/assets/css/_cards.scss @@ -30,10 +30,12 @@ line-height: 1.5; } -.card.card-news { - .card-header { +.card-news { + .news-item .card-title { background-color: $scipost-darkblue; color: $scipost-light; + padding: 0.5rem; + border-radius: 1.4px; } } diff --git a/scipost/templates/scipost/index.html b/scipost/templates/scipost/index.html index 1c43a0a99ad538b5a1eadced63d2c39974155a03..696aff8f4f84a389bb1032b836ccb30793721c4c 100644 --- a/scipost/templates/scipost/index.html +++ b/scipost/templates/scipost/index.html @@ -5,129 +5,162 @@ {% block content %} <div class="row"> - {% if latest_newsitems %} - <div class="col-md-6 {% if user.is_authenticated %}col-lg-4{% else %}col-lg-3{% endif %}"> - <div class="card card-grey"> - <div class="card-block"> - <h1 class="card-title mb-0"><a href="{% url 'news:news' %}">News</a><a style="float: right;" href="{% url 'scipost:feeds' %}"><img src="{% static 'scipost/images/feed-icon-14x14.png' %}" alt="Feed logo" width="14"></a></h1> - <h4 class="card-subtitle mb-0 pb-0 text-muted">Latest news and announcements.</h4> - </div> - {% for item in latest_newsitems %} - <div class="card card-news bg-transparent m-2"> - {% include 'news/news_card_content.html' with news=item %} + <div class="col-12"> + <div class="card-deck mb-2"> + <!-- News --> + <div class="card card-grey card-news"> + <div class="card-block"> + <h1 class="card-title mb-0"><a href="{% url 'news:news' %}">News</a><a style="float: right;" href="{% url 'scipost:feeds' %}"><img src="{% static 'scipost/images/feed-icon-14x14.png' %}" alt="Feed logo" width="14"></a></h1> + <h4 class="card-subtitle mb-0 pb-0 text-muted">Latest news and announcements.</h4> + <ul class="list-group list-group-flush"> + {% for item in latest_newsitems %} + <li class="list-group-item"> + {% include 'news/news_card_content.html' with news=item %} + </li> + {% empty %} + <li class="list-group-item"> + No current newsitems found. + </li> + {% endfor %} + <ul> </div> - {% endfor %} - </div> - </div> - {% endif %} - - <div class="col-md-6 {% if user.is_authenticated %}col-lg-4{% else %}col-lg-3{% endif %}"> - <div class="card card-grey"> - <div class="card-block"> - <h1 class="card-title mb-0"><a href="{% url 'scipost:about' %}">About SciPost</a></h1> - <h4 class="card-subtitle mb-2 text-muted">SciPost is a complete scientific publication portal managed by active professional scientists.</h4> - <p>It is purely online-based and offers openly, globally and perpetually accessible science.</p> - <h3><a href="{% url 'scipost:about' %}#advisory_board">Advisory Board</a></h3> - <h3><a href="{% url 'scipost:call' %}">A call for openness</a></h3> - <h3><a href="{% url 'scipost:quick_tour' %}">Quick Tour</a></h3> - <h3><a href="{% url 'scipost:FAQ' %}">Frequently asked questions</a></h3> - <h3><a href="{% url 'scipost:about' %}">Read more</a></h3> - <h4><em>In the press:</em></h4> - <ul> - <li><a href="{% static 'scipost/press/SciPost_in_FOM_expres_mei_2016.pdf' %}">FOM expres 5/2016</a> (<a href="{% static 'scipost/press/SciPost_in_FOM_expres_mei_2016_eng.pdf' %}">English vn</a>)</li> - <li><a href="http://www.uva.nl/en/news-events/news/uva-news/content/news/2016/10/open-access-platform-scipost-launches-inaugural-edition-of-first-journal.html">Inaugural issue 10/2016</a></li> - </ul> - </div> - </div> - </div> + </div><!-- End news --> - {% if not user.is_authenticated %} - <div class="col-md-6 col-lg-3"> - <div class="card card-grey"> - <div class="card-block"> - <h1 class="card-title mb-0"><a href="{% url 'scipost:register' %}">Register</a></h1> - <p>Professional scientists (PhD students and above) can become Contributors to SciPost by filling the - <a href="{% url 'scipost:register' %}">registration form</a>.</p> - <h4>Registered contributors can among others:</h4> - <ul> - <li>Submit manuscripts to SciPost Journals</li> - <li>Post reports and comments</li> - <li>Express opinions on contributions</li> - <li>Subscribe to feeds</li> - <li>Use productivity tools</li> - </ul> - </div> - </div> - </div> - {% endif %} - - <div class="col-md-6 {% if user.is_authenticated %}col-lg-4{% else %}col-lg-3{% endif %}"> - <div class="card card-grey"> - <div class="card-block"> - <h1 class="card-title"><a href="{% url 'journals:journals' %}">Latest Publications</a></h1> - <h2 class="banner"> - <a href="{% url 'scipost:landing_page' 'SciPostPhys' %}">SciPost Physics</a> - </h2> - {% if issue and publications %} - <h4 class="card-text text-center mt-2">A selection from the {% if issue.is_current %}current{% else %}last{% endif %} issue:</h4> - {% if issue %} - <div class="text-muted text-center mt-2">Vol. {{ issue.in_volume.number }} issue {{ issue.number }} {{issue.period_as_string}}</div> - {% endif %} - </div> - <div class="card-block"> + + + {% if not user.is_authenticated %} + <!-- Register --> + <div class="card card-grey"> + <div class="card-block"> + <h1 class="card-title mb-0"><a href="{% url 'scipost:register' %}">Register</a></h1> + <p>Professional scientists (PhD students and above) can become Contributors to SciPost by filling the + <a href="{% url 'scipost:register' %}">registration form</a>.</p> + <h4>Registered contributors can among others:</h4> + <ul> + <li>Submit manuscripts to SciPost Journals</li> + <li>Post reports and comments</li> + <li>Express opinions on contributions</li> + <li>Subscribe to feeds</li> + <li>Use productivity tools</li> + </ul> + </div> + </div><!-- End register --> + {% else %} + <!-- About --> + <div class="card card-grey"> + <div class="card-block"> + <h1 class="card-title mb-0"><a href="{% url 'scipost:about' %}">About SciPost</a></h1> + <h4 class="card-subtitle mb-2 text-muted">SciPost is a complete scientific publication portal managed by active professional scientists.</h4> + <p>It is purely online-based and offers openly, globally and perpetually accessible science.</p> + <h3><a href="{% url 'scipost:about' %}#advisory_board">Advisory Board</a></h3> + <h3><a href="{% url 'scipost:call' %}">A call for openness</a></h3> + <h3><a href="{% url 'scipost:quick_tour' %}">Quick Tour</a></h3> + <h3><a href="{% url 'scipost:FAQ' %}">Frequently asked questions</a></h3> + <h3><a href="{% url 'scipost:about' %}">Read more</a></h3> + <h4><em>In the press:</em></h4> + <ul> + <li><a href="{% static 'scipost/press/SciPost_in_FOM_expres_mei_2016.pdf' %}">FOM expres 5/2016</a> (<a href="{% static 'scipost/press/SciPost_in_FOM_expres_mei_2016_eng.pdf' %}">English vn</a>)</li> + <li><a href="http://www.uva.nl/en/news-events/news/uva-news/content/news/2016/10/open-access-platform-scipost-launches-inaugural-edition-of-first-journal.html">Inaugural issue 10/2016</a></li> + </ul> + </div> + </div><!-- End about --> + {% endif %} + + <!-- Latest submissions --> + <div class="card card-grey"> + <div class="card-block"> + <h1 class="card-title mb-0"><a href="{% url 'journals:journals' %}">Latest Submissions</a></h1> + <h4 class="card-subtitle text-muted">A selection of the last submissions</h4> + <ul class="list-group list-group-flush"> + {% for submission in submissions %} + <li class="list-group-item"> + {% include 'submissions/_submission_card_content_sparse.html' with submission=submission %} + </li> + {% endfor %} + </ul> + </div> + </div><!-- End latest submissions --> + + <!-- Latest publications --> + <div class="card card-grey"> + <div class="card-block"> + <h1 class="card-title mb-0"><a href="{% url 'journals:journals' %}">Latest Publications</a></h1> + <h4 class="card-subtitle text-muted">A selection of the last publications</h4> <ul class="list-group list-group-flush"> {% for publication in publications %} <li class="list-group-item"> - <div class="card-block"> + <div class="card-block px-0"> {% include 'journals/_publication_single_short_summary.html' with publication=publication %} </div> </li> {% endfor %} </ul> - {% endif %} <p class="text-center mt-3" style="color: red;"><em>If you support and believe in our mission, <br/>be a pioneer and submit a manuscript!</em></p> - </div> - </div> - </div> - </div> + </div> + </div><!-- End latest publications --> + </div><!-- End deck --> - <div class="row"> - <div class="col-md-6 {% if user.is_authenticated %}col-lg-4{% else %}col-lg-3{% endif %}"> - <div class="card card-grey"> - <div class="card-block"> - <h1 class="card-title"><a href="{% url 'journals:journals' %}">Journals</a></h1> - <h4 class="card-subtitle m text-muted">SciPost publishes a portfolio of high-quality two-way open access scientific journals.</h4> - <p>All SciPost Journals implement the stringent <a href="/FAQ#pwr">peer-witnessed refereeing</a> principle.</p> - <p>All Journals are fully managed by professional scientists.</p> - <h3><a href="{% url 'scipost:about' %}#editorial_college_physics">Editorial College (Physics)</a></h3> - <h3><a href="{% url 'submissions:sub_and_ref_procedure' %}">Submission and refereeing procedure</a></h3> - - <br/> - - <p>View and comment on (login required) recent <a href="{% url 'submissions:submissions' %}">Submissions</a></p> - </div> - </div> - </div> - <div class="col-md-6 {% if user.is_authenticated %}col-lg-4{% else %}col-lg-3{% endif %}"> - <div class="card card-grey"> - <div class="card-block"> - <h1 class="card-title"><a href="{% url 'commentaries:commentaries' %}">Commentaries</a></h1> - <p>SciPost Commentaries allow Contributors to comment and build on all existing literature.</p> - <br/> - <h3><a href="{% url 'commentaries:howto' %}">SciPost Commentaries how-to</a></h3> - <h3><a href="{% url 'commentaries:request_commentary' %}">Request a new Commentary Page</a></h3> - </div> - </div> - </div> - <div class="col-md-6 {% if user.is_authenticated %}col-lg-4{% else %}col-lg-3{% endif %}"> - <div class="card card-grey"> - <div class="card-block"> - <h1 class="card-title"><a href="{% url 'theses:theses' %}">Theses</a></h1> - <p>SciPost Theses allow Contributors to find Master's, Ph.D. and Habilitation theses relevant to their work.</p> - <br/> - <h3><a href="{% url 'theses:request_thesislink' %}">Request a new Thesis Link</a></h3> - </div> - </div> + <div class="card-deck"> + + <!-- Journals --> + <div class="card card-grey"> + <div class="card-block"> + <h1 class="card-title"><a href="{% url 'journals:journals' %}">Journals</a></h1> + <h4 class="card-subtitle m text-muted">SciPost publishes a portfolio of high-quality two-way open access scientific journals.</h4> + <p>All SciPost Journals implement the stringent <a href="/FAQ#pwr">peer-witnessed refereeing</a> principle.</p> + <p>All Journals are fully managed by professional scientists.</p> + <h3><a href="{% url 'scipost:about' %}#editorial_college_physics">Editorial College (Physics)</a></h3> + <h3><a href="{% url 'submissions:sub_and_ref_procedure' %}">Submission and refereeing procedure</a></h3> + + <br/> + + <p>View and comment on (login required) recent <a href="{% url 'submissions:submissions' %}">Submissions</a></p> + </div> + </div><!-- End journals --> + + + <div class="card card-grey"> + <div class="card-block"> + <h1 class="card-title"><a href="{% url 'commentaries:commentaries' %}">Commentaries</a></h1> + <p>SciPost Commentaries allow Contributors to comment and build on all existing literature.</p> + <br/> + <h3><a href="{% url 'commentaries:howto' %}">SciPost Commentaries how-to</a></h3> + <h3><a href="{% url 'commentaries:request_commentary' %}">Request a new Commentary Page</a></h3> + </div> + </div><!-- End commentaries --> + + <!-- Theses --> + <div class="card card-grey"> + <div class="card-block"> + <h1 class="card-title"><a href="{% url 'theses:theses' %}">Theses</a></h1> + <p>SciPost Theses allow Contributors to find Master's, Ph.D. and Habilitation theses relevant to their work.</p> + <br/> + <h3><a href="{% url 'theses:request_thesislink' %}">Request a new Thesis Link</a></h3> + </div> + </div><!-- End theses --> + + {% if not user.is_authenticated %} + <!-- About --> + <div class="card card-grey"> + <div class="card-block"> + <h1 class="card-title mb-0"><a href="{% url 'scipost:about' %}">About SciPost</a></h1> + <h4 class="card-subtitle mb-2 text-muted">SciPost is a complete scientific publication portal managed by active professional scientists.</h4> + <p>It is purely online-based and offers openly, globally and perpetually accessible science.</p> + <h3><a href="{% url 'scipost:about' %}#advisory_board">Advisory Board</a></h3> + <h3><a href="{% url 'scipost:call' %}">A call for openness</a></h3> + <h3><a href="{% url 'scipost:quick_tour' %}">Quick Tour</a></h3> + <h3><a href="{% url 'scipost:FAQ' %}">Frequently asked questions</a></h3> + <h3><a href="{% url 'scipost:about' %}">Read more</a></h3> + <h4><em>In the press:</em></h4> + <ul> + <li><a href="{% static 'scipost/press/SciPost_in_FOM_expres_mei_2016.pdf' %}">FOM expres 5/2016</a> (<a href="{% static 'scipost/press/SciPost_in_FOM_expres_mei_2016_eng.pdf' %}">English vn</a>)</li> + <li><a href="http://www.uva.nl/en/news-events/news/uva-news/content/news/2016/10/open-access-platform-scipost-launches-inaugural-edition-of-first-journal.html">Inaugural issue 10/2016</a></li> + </ul> + </div> + </div><!-- End about --> + {% endif %} + + </div><!-- End deck --> </div> </div> diff --git a/scipost/views.py b/scipost/views.py index 0e2fd0e176ed61e8a2ec1e840eb3e44724b726f1..12bb3a579eca6cc9eb479226cade630f7e0ff9e3 100644 --- a/scipost/views.py +++ b/scipost/views.py @@ -41,9 +41,8 @@ from .utils import Utils, EMAIL_FOOTER, SCIPOST_SUMMARY_FOOTER, SCIPOST_SUMMARY_ from commentaries.models import Commentary from comments.models import Comment -from journals.models import Publication, Issue +from journals.models import Publication from news.models import NewsItem -from submissions.constants import SUBMISSION_STATUS_PUBLICLY_UNLISTED from submissions.models import Submission, EditorialAssignment, RefereeInvitation,\ Report, EICRecommendation from theses.models import ThesisLink @@ -203,10 +202,8 @@ def index(request): """ Main page """ context = {} context['latest_newsitems'] = NewsItem.objects.all().order_by('-date')[:2] - context['issue'] = Issue.objects.get_last_filled_issue(in_volume__in_journal__name='SciPostPhys') - if context['issue']: - context['publications'] = context['issue'].publication_set.filter(doi_string__isnull=False - ).order_by('-publication_date')[:4] + context['submissions'] = Submission.objects.public().order_by('-submission_date')[:4] + context['publications'] = Publication.objects.published().order_by('-publication_date')[:4] return render(request, 'scipost/index.html', context) diff --git a/submissions/templates/submissions/_submission_card_base.html b/submissions/templates/submissions/_submission_card_base.html index 355d2f2e137b96c0c708c7b9b25def988627f611..c1c516251ddf66dce7924472050f3d45c4dc1582 100644 --- a/submissions/templates/submissions/_submission_card_base.html +++ b/submissions/templates/submissions/_submission_card_base.html @@ -1,5 +1,5 @@ -<div class="card-block"> - <h3 class="card-title"> +<div class="card-block {% block cardblock_class_block %}{% endblock %}"> + <h3 class="card-title {% block title_class_block %}{% endblock %}"> <a href="{% url 'submissions:submission' submission.arxiv_identifier_w_vn_nr %}">{{submission.title}}</a> </h3> diff --git a/submissions/templates/submissions/_submission_card_content_sparse.html b/submissions/templates/submissions/_submission_card_content_sparse.html new file mode 100644 index 0000000000000000000000000000000000000000..906b925abf41d3c1e98390859516711c5f665232 --- /dev/null +++ b/submissions/templates/submissions/_submission_card_content_sparse.html @@ -0,0 +1,14 @@ +{% extends 'submissions/_submission_card_base.html' %} + +{% block cardblock_class_block %}px-0{% endblock %} +{% block title_class_block %}pb-0 mb-0{% endblock %} + +{% block card_block_footer %} + {{block.super}} + + <div class="text-muted mb-1"> + <span class="d-inline-block">Submitted {{submission.submission_date}}</span> + <span class="d-inline-block">to {{submission.get_submitted_to_journal_display}}</span> + </div> + <div>by {{submission.author_list}}</div> +{% endblock %}