diff --git a/scipost/static/scipost/assets/config/preconfig.scss b/scipost/static/scipost/assets/config/preconfig.scss index 411c2f2a1a041a6ad3b4fd42058d06a1e3caecf1..76ee64bc04ec7947408e9cb5f63c06609fec4578 100644 --- a/scipost/static/scipost/assets/config/preconfig.scss +++ b/scipost/static/scipost/assets/config/preconfig.scss @@ -22,6 +22,8 @@ $badge-border-radius: $border-radius; // Grid // $grid-gutter-width: 20px; +$container-large-desktop: 1500px; +$container-lg: 1500px; // Colors // @@ -146,6 +148,7 @@ $navbar-padding-x: 0.3rem; $navbar-padding-y: 0.2rem; $nav-tabs-border-color: $scipost-darkblue; $nav-tabs-link-active-border-color: $scipost-darkblue $scipost-darkblue $nav-tabs-link-active-bg; +$nav-link-padding: 0 0.75rem; $input-border-radius: $border-radius-base; $input-border-radius-large: $border-radius-large; diff --git a/scipost/static/scipost/assets/css/_general.scss b/scipost/static/scipost/assets/css/_general.scss index bbd1c458dccb781c1f39edc97bbb885b7e7c3c6c..9157ce5322a090ea0b5f796b55002d2fa4645fce 100644 --- a/scipost/static/scipost/assets/css/_general.scss +++ b/scipost/static/scipost/assets/css/_general.scss @@ -13,7 +13,7 @@ body #MathJax_Message { background-color: #f9f9f9; border: 1px solid #f4f4f4; border-radius: $card-border-radius; - color: #002b49; + color: $scipost-darkblue; opacity: 0.9; } @@ -23,9 +23,18 @@ body #MathJax_Message { } footer { + .row, + ul { + margin-bottom: 0; + } + background-color: $scipost-darkblue; color: $white; + li { + padding: .1rem; + } + a, a:hover { color: $white; @@ -119,3 +128,17 @@ header { background-color: #f9f9f9 !important; } } + +@media screen and (min-width: 992px) { + .backdrop { + position: absolute; + left: 0; + top: 0; + width: 100%; + height: 100%; + background-color: #000; + opacity: 0.5; + display: none; + cursor: pointer; + } +} diff --git a/scipost/static/scipost/assets/css/_grid.scss b/scipost/static/scipost/assets/css/_grid.scss index f2ba8cedd5b482820c6e8c82d8b88d55cae1e72e..457310334816eb66cdb91fb1d38ebe29e4755e2d 100644 --- a/scipost/static/scipost/assets/css/_grid.scss +++ b/scipost/static/scipost/assets/css/_grid.scss @@ -56,11 +56,25 @@ footer.secondary { } } +@media screen and (max-width: 993px) { + .container { + max-width: 993px; + } +} + +@media screen and (min-width: 1300px) { + .container { + max-width: 1240px; + } +} -.container { - max-width: 1500px; +@media screen and (min-width: 1400px) { + .container { + max-width: 1340px; + } } + @media screen and (min-width: 768px) { .container { padding-left: $grid-gutter-width; diff --git a/scipost/static/scipost/assets/css/_navbar.scss b/scipost/static/scipost/assets/css/_navbar.scss index c1a996ca54964d158b12f887445608053d899a23..ffc6a1480936743bdf76ae21785c8d7a55a98ddc 100644 --- a/scipost/static/scipost/assets/css/_navbar.scss +++ b/scipost/static/scipost/assets/css/_navbar.scss @@ -13,8 +13,20 @@ } } +@media (min-width: 992px) { + .navbar .nav-link { + padding-left: 0.75rem !important; + padding-right: 0.75rem !important; + } +} + .main-nav { background-color: $scipost-lightblue; + letter-spacing: 0.3px; + + .container { + position: relative; + } .separator { color: $white; @@ -30,37 +42,67 @@ } } - .dropdown-menu { - background-color: $scipost-lightblue; - font-size: 100%; - -webkit-border-radius: 5px 5px 5px 5px; - -moz-border-radius: 5px 5px 5px 5px; - border-radius: 5px 5px 5px 5px; - - a { - &:hover { - color: $scipost-lightblue; - } - } - - h2, h3 { - color: $scipost-orange; - margin: 0.8rem 0rem 0.3rem 0.8rem; - } + .nav-item:hover .dropdown-toggle::after { + transition-duration: 0.3s; + transform: rotate(-180deg); } - .nav-item.active a { - font-weight: 700; - text-decoration: underline; - } + .dropdown-menu { + min-width: 255px; + padding: 0.45rem 0.75rem; + background: $white; + color: $scipost-darkblue; + border-color: #e0e0e0; + top: 36px; + box-shadow: 0px 1px 2px 0px #e0e0e0; + + .fa { + display: none; + } + + a:hover + .fa { + display: inline; + } + + .dropdown-item { + background-color: transparent; + padding: 0.5rem 0.625rem; + line-height: 1.5; + color: $scipost-darkblue; + + a { + color: $scipost-lightblue; + transition: 0.08s; + + &:hover { + color: $scipost-darkblue; + } + } + } + + .dropdown-divider { + // margin: 0; + } + - .navbar-nav { - z-index: 99; - background-color: $scipost-lightblue; - white-space: nowrap; } @media (min-width: 992px) { + .dropdown-menu { + &.mega-menu { + &.mega-menu-2 { + width: 600px; + } + &.mega-menu-4 { + width: 1200px; + } + + .row { + margin-bottom: 0; + } + + } + } .full-height-bar { z-index: 1; position: absolute; @@ -87,6 +129,53 @@ } } + @media (max-width: 991px) { + text-align: center; + + .dropdown-headline { + display: none; + } + + .dropdown-menu { + background: #7a94c5; + border: 0; + box-shadow: none; + padding: 0.75rem 0 !important; + margin: 0; + text-align: center; + + &.mega-menu .row { + margin-bottom: 0; + } + + &.mega-menu .col-md-6 { + flex: auto; + max-width: 100%; + } + + .dropdown-item { + padding-top: 0.75rem 0.625rem; + } + + .dropdown-item a, + .dropdown-item a:hover, + .dropdown-item a:hover i { + color: $white; + } + + .dropdown-divider { + display: none; + } + } + + .nav-item { + padding-top: 0.25rem; + padding-bottom: 0.25rem; + text-transform: uppercase; + letter-spacing: 1px; + } + } + .search-form { position: relative; @@ -207,8 +296,8 @@ header .nav-item { right: 0; top: 0; height: 100%; - padding: 0.25rem 1.0rem 0.25rem 1.25rem; - width: 140px; + padding: 0.25rem 0.25rem 0.25rem 1.25rem; + width: 90px; } .btn { diff --git a/scipost/static/scipost/assets/js/scripts.js b/scipost/static/scipost/assets/js/scripts.js index e99273c054ee76ad1e79d702f05e95a93b92acb6..e67b3aecdde12d71e15231093b12ff8a3d6936ec 100644 --- a/scipost/static/scipost/assets/js/scripts.js +++ b/scipost/static/scipost/assets/js/scripts.js @@ -144,4 +144,13 @@ $(function(){ dynamic_load_tab( e.target ) }) $('[data-toggle="tab"][sp-autoload="true"]').tab('show'); + + // Backdrop for main nav dropdowns. + $('#main-navbar .dropdown').on('shown.bs.dropdown', function () { + $('.backdrop').show(); + }) + $('#main-navbar .dropdown').on('hide.bs.dropdown hidden.bs.dropdown ', function () { + $('#backdrop').hide(); + }) + }); diff --git a/scipost/templates/scipost/FAQ.html b/scipost/templates/scipost/FAQ.html index 588c9ac75651558cc56579ec588b94b1693a0754..aaf64ddc3c8fb5bad7ddfa79ea9afdd98e432ca2 100644 --- a/scipost/templates/scipost/FAQ.html +++ b/scipost/templates/scipost/FAQ.html @@ -1,21 +1,15 @@ -{% extends 'scipost/base.html' %} +{% extends 'scipost/base_about.html' %} {% load staticfiles %} {% block pagetitle %}: Frequently asked questions{% endblock pagetitle %} - -{% block breadcrumb %} - <div class="container-outside header"> - <div class="container"> - <nav class="breadcrumb hidden-sm-down"> - <a href="{% url 'scipost:about' %}" class="breadcrumb-item">About SciPost</a> - <span class="breadcrumb-item">Frequently asked questions</span> - </nav> - </div> - </div> +{% block breadcrumb_items %} + {{ block.super }} + <span class="breadcrumb-item">Frequently asked questions</span> {% endblock %} + {% block content %} <h1 class="highlight-x">Frequently asked questions</h1> diff --git a/scipost/templates/scipost/about.html b/scipost/templates/scipost/about.html index e2e31cb5842f72d149f3b15fcfa89eade818429e..f8983abba297d4833c5b24a13adffff66b8dbd99 100644 --- a/scipost/templates/scipost/about.html +++ b/scipost/templates/scipost/about.html @@ -1,10 +1,16 @@ -{% extends 'scipost/base.html' %} +{% extends 'scipost/base_about.html' %} {% block pagetitle %}: About{% endblock pagetitle %} {% load staticfiles %} {% load scipost_extras %} + +{% block breadcrumb_items %} + <span class="breadcrumb-item">About SciPost</span> +{% endblock %} + + {% block content %} diff --git a/scipost/templates/scipost/bare_base.html b/scipost/templates/scipost/bare_base.html index 065eeea771258b69a3a7b9795d88a712f68ae0b6..417fbcf34c0e32e27248bb2b5439a850482390ec 100644 --- a/scipost/templates/scipost/bare_base.html +++ b/scipost/templates/scipost/bare_base.html @@ -39,6 +39,8 @@ {% include 'partials/scipost/notification_center_modal.html' %} + + <div class="backdrop" id="backdrop"></div> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { diff --git a/scipost/templates/scipost/base_about.html b/scipost/templates/scipost/base_about.html new file mode 100644 index 0000000000000000000000000000000000000000..d90227241bd1524f68b4378961eca677781463f3 --- /dev/null +++ b/scipost/templates/scipost/base_about.html @@ -0,0 +1,15 @@ +{% extends 'scipost/base.html' %} + +{% block body_class %}{{ block.super }} pool{% endblock %} + +{% block breadcrumb %} + <div class="breadcrumb-container"> + <div class="container"> + <nav class="breadcrumb hidden-sm-down"> + {% block breadcrumb_items %} + <a href="{% url 'scipost:about' %}" class="breadcrumb-item">About SciPost</a> + {% endblock %} + </nav> + </div> + </div> +{% endblock %} diff --git a/scipost/templates/scipost/footer.html b/scipost/templates/scipost/footer.html index 6cd0ab77ae9504660c97c01b61dafc702e08da0f..e08ee1196fe974ce7ff8bedd9d1da85ef937c06d 100644 --- a/scipost/templates/scipost/footer.html +++ b/scipost/templates/scipost/footer.html @@ -1,13 +1,14 @@ {% load staticfiles %} <footer class="footer"> - <div class="container py-4"> - <div class="row mb-0"> - <div class="col-md-4 mb-3 mb-md-0"> - Copyright © <a href="{% url 'scipost:foundation' %}" target="_">SciPost Foundation</a> - <br/> - <a href="{% url 'scipost:terms_and_conditions' %}">Terms and conditions</a> + <div class="container py-4"> + <div class="row"> + <div class="col-md-3 mb-3 mb-md-0"> + <ul class="list-unstyled"> + <li>Copyright © <a href="{% url 'scipost:foundation' %}" target="_">SciPost Foundation</a></li> + <li><a href="{% url 'scipost:terms_and_conditions' %}">Terms and conditions</a></li> + <li> <table class="mt-2 social-media"> <tr> <td> @@ -22,17 +23,60 @@ </td> </tr> </table> + </li> + </ul> + </div> + + <div class="col-md-3 mb-3 mb-md-0"> + <ul class="list-unstyled"> + <li><a href="mailto:admin@scipost.org">Contact the administrators</a></li> + <li><a href="mailto:techsupport@scipost.org">Write to tech support</a></li> + <li><a href="https://code.scipost.org" target="_blank">code.scipost.org</a></li> + <ul> </div> - <div class="col-md-5 mb-3 mb-md-0"> - <a rel="license" href="//creativecommons.org/licenses/by/4.0/" target="_blank"><img alt="Creative Commons License" style="border-width:0" src="//licensebuttons.net/l/by/4.0/80x15.png" /></a><br />Except where otherwise noted, all content on SciPost is licensed under a <a rel="license" href="//creativecommons.org/licenses/by/4.0/" target="_blank">Creative Commons Attribution 4.0 International License</a>. + + <div class="col-md-3 mb-3 mb-md-0"> + <ul class="list-unstyled"> + <li><a href="{% url 'organizations:organizations' %}">Organizations benefiting from our activities</a></li> + <li><a href="{% url 'sponsors:sponsors' %}">Sponsors</a></li> + <li><a href="{% url 'finances:finances' %}" target="_blank">Finances</a></li> + <ul> </div> <div class="col-md-3 mb-3 mb-md-0 text-md-right"> - <ul class="list-unstyled"> - <li>Contact the <a href="mailto:admin@scipost.org">administrators</a></li> - <li>Write to <a href="mailto:techsupport@scipost.org">tech support</a></li> - <li><a href="https://code.scipost.org" target="_blank">code.scipost.org</a></li> - </ul> + <ul class="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 'news:news' %}">News</a></li> + <li><a href="{% url 'scipost:feeds' %}">Feeds</a></li> + </ul> + + </div> + </div> + <div class="row"> + <div class="col-12"> + <br> + <a rel="license" href="//creativecommons.org/licenses/by/4.0/" target="_blank" class="m-2"> + <img alt="Creative Commons License" style="border-width:0" src="//licensebuttons.net/l/by/4.0/80x15.png" /> + </a> + Except where otherwise noted, all content on SciPost is licensed under a <a rel="license" href="//creativecommons.org/licenses/by/4.0/" target="_blank">Creative Commons Attribution 4.0 International License</a>. + </div> + </div> + </div> +</footer> +<!--<footer class="footer"> + + <div class="container"> + <div class="row"> + <div class="col-12 pb-3"> + <img src="{% static 'scipost/images/logo_scipost_with_bgd_small.png' %}" class="mb-2"> + <br> + <a rel="license" href="//creativecommons.org/licenses/by/4.0/" target="_blank" class="m-2"> + <img alt="Creative Commons License" style="border-width:0" src="//licensebuttons.net/l/by/4.0/80x15.png" /> + </a> + Except where otherwise noted, all content on SciPost is licensed under a <a rel="license" href="//creativecommons.org/licenses/by/4.0/" target="_blank">Creative Commons Attribution 4.0 International License</a>. </div> </div> </div> </footer> +--> diff --git a/scipost/templates/scipost/foundation.html b/scipost/templates/scipost/foundation.html index 3c460109760ddab690e13652b04846b8ee01bb3e..abb90d9d6dcc29261518b9238e8287aa8db58d43 100644 --- a/scipost/templates/scipost/foundation.html +++ b/scipost/templates/scipost/foundation.html @@ -1,18 +1,12 @@ -{% extends 'scipost/base.html' %} - -{% block pagetitle %}: Foundation {% endblock pagetitle %} +{% extends 'scipost/base_about.html' %} {% load staticfiles %} -{% block breadcrumb %} - <div class="container-outside header"> - <div class="container"> - <nav class="breadcrumb hidden-sm-down"> - <a href="{% url 'scipost:about' %}" class="breadcrumb-item">About SciPost</a> - <span class="breadcrumb-item">Foundation</span> - </nav> - </div> - </div> +{% block pagetitle %}: Foundation {% endblock pagetitle %} + +{% block breadcrumb_items %} + {{ block.super }} + <span class="breadcrumb-item">Foundation</span> {% endblock %} {% block content %} diff --git a/scipost/templates/scipost/index_sidebar_2.html b/scipost/templates/scipost/index_sidebar_2.html index 1e93aac45b2d8e19fe9e0cde86a7bc561bc2dfe2..b8c7b1a489e33f198d9c494c4ac80757bf625df7 100644 --- a/scipost/templates/scipost/index_sidebar_2.html +++ b/scipost/templates/scipost/index_sidebar_2.html @@ -61,42 +61,4 @@ We invite <a href="{% url 'organizations:organizations' %}">organizations benefi <p> <span style="color: red;">Scientists, please help us out:</span> 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@scipost.org">template</a>. </p> - <p>Do you or somebody you know have the means to make a difference?</p> - <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top"> - <input type="hidden" name="cmd" value="_s-xclick"> - <input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHVwYJKoZIhvcNAQcEoIIHSDCCB0QCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1U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kiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTE4MDUyMjE5NDEyMVowIwYJKoZIhvcNAQkEMRYEFEI2dgukf4ETaBLq9x5NYHcI5dFzMA0GCSqGSIb3DQEBAQUABIGABwHfWvsxLKsNb31K8K6b4XPFYBFJ7aGFmx826Jp7kIs3vsf/EtSMT9lB0UHQoA2h9J9AUisJft9QlJqmnCTo6WhvSpSCzNberZXR5kMhARKGd0zufTLqxCd15QgizG8Iz7Zouo5gqetvHH8dsmBbbnkRc+zitLGGFoL9Q+AkmPI=-----END PKCS7----- - "> - <input type="image" src="//www.paypalobjects.com/en_GB/i/btn/btn_donate_LG.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online!"> - <img alt="" border="0" src="//www.paypalobjects.com/nl_NL/i/scr/pixel.gif" width="1" height="1"> - </form> </div><!-- End Sponsors --> - -<hr class="lg"> - -<!-- Summarized --> -<div id="summarized"> - <h2 class="title"><a href="{% url 'journals:journals' %}" class="text-black">Journals</a></h2> - <p> - SciPost publishes a portfolio of high-quality two-way open access scientific journals. - </p> - <p> - All SciPost Journals implement the stringent <a href="{% url 'scipost:FAQ' %}#pwr">peer-witnessed refereeing</a> principle. - <br> - All Journals are fully managed by professional scientists. - </p> - <p> - <a href="{% url 'scipost:about' %}#editorial_college_physics">Editorial College (Physics)</a> - <br> - <a href="{% url 'submissions:author_guidelines' %}">Author guidelines</a> - <br> - <a href="{% url 'submissions:referee_guidelines' %}">Referee guidelines</a> - <br> - <a href="{% url 'submissions:sub_and_ref_procedure' %}">Submission and refereeing procedure</a> - </p> - - <h2><a href="{% url 'commentaries:commentaries' %}" class="text-black">Commentaries</a></h2> - <p>SciPost Commentaries allow Contributors to comment and build on all existing literature.</p> - - <h2><a href="{% url 'theses:theses' %}" class="text-black">Theses</a></h2> - <p>SciPost Theses allow Contributors to find Master's, Ph.D. and Habilitation theses relevant to their work.</p> -</div> diff --git a/scipost/templates/scipost/navbar.html b/scipost/templates/scipost/navbar.html index a4ede07bcb4b3c89bf4df3cc206cd11e78a610ca..d592ef79b5bb54a4ae0dc785ecccd236d3b34fbc 100644 --- a/scipost/templates/scipost/navbar.html +++ b/scipost/templates/scipost/navbar.html @@ -6,8 +6,9 @@ {% is_editorial_college request.user as is_editorial_college %} + + <nav class="navbar navbar-expand-lg main-nav"> - <!-- <a class="navbar-brand mr-auto mr-lg-0" href="#">Offcanvas navbar</a> --> <div class="container"> <button class="navbar-toggler p-0 border-0" type="button" data-toggle="collapse" data-target="#main-navbar"> <div class="navbar-toggler-icon" onclick="navbarIconToggle(this)"> @@ -16,54 +17,158 @@ <div class="bar3"></div> </div> </button> - - <div class="collapse navbar-collapse" id="main-navbar"> + <div class="collapse navbar-collapse mt-lg-0 mt-3" id="main-navbar"> <ul class="navbar-nav mr-auto"> <li class="nav-item{% if request.path == '/' %} active{% endif %}"> - <a href="{% url 'scipost:index' %}" class="nav-link">Home</a> + <a href="{% url 'scipost:index' %}" class="nav-link"> + <i class="fa fa-home d-none d-lg-inline-block" aria-hidden="true" style="min-width: 16px;"></i> + <span class="d-lg-none d-inline-block">Home</span> + </a> </li> <li class="nav-item dropdown"> <a class="nav-link dropdown-toggle" href="#" id="JournalsDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Journals</a> - <div class="dropdown-menu" aria-labelledby="JournalsDropdown"> - <a href="{% url 'journals:journals' %}" class="dropdown-item">Journals homepage</a> - <a href="{% url 'journals:publications' %}" class="dropdown-item">View all publications</a> - <div class="dropdown-divider"></div> - <h3 class="dropdown-headline"><strong>Physics</strong></h3> - {% for journal in journals %} + <div class="dropdown-menu mega-menu mega-menu-2" aria-labelledby="JournalsDropdown"> + <div class="row"> + <div class="col-md-6"> + <div class="dropdown-item"><a href="{% url 'journals:journals' %}">Journals homepage</a> <i class="fa fa-angle-right" aria-hidden="true"></i></div> + </div> + <div class="col-md-6"> + <div class="dropdown-item"><a href="{% url 'journals:publications' %}">View all publications</a> <i class="fa fa-angle-right" aria-hidden="true"></i></div> + </div> + </div> + <div class="dropdown-divider"></div> + <span class="dropdown-item dropdown-headline"><strong>Physics</strong></span> + {% for journal in journals %} {% if journal.active %} - <a href="{{ journal.get_absolute_url }}" class="dropdown-item">{{ journal }}</a> + <div class="dropdown-item"> + <a href="{{ journal.get_absolute_url }}">{{ journal.get_name_display }}</a> + <i class="fa fa-angle-right" aria-hidden="true"></i> + </div> {% elif perms.scipost.can_view_pool %} - <a href="{% url 'journal:about' journal.name %}" class="dropdown-item">{{ journal }}</a> + <div class="dropdown-item"> + <a href="{% url 'journal:about' journal.name %}">{{ journal.get_name_display }}</a> + <i class="fa fa-angle-right" aria-hidden="true"></i> + </div> {% endif %} - {% endfor %} + {% endfor %} </div> </li> - <li class="nav-item{% if '/journals/publications' in request.path %} active{% endif %}"> - </li> - <li class="nav-item{% if '/submissions/' in request.path %} active{% endif %}"> - <a class="nav-link" href="{% url 'submissions:submissions' %}">Submissions</a> - </li> - <li class="nav-item{% if '/commentaries/' in request.path %} active{% endif %}"> - <a class="nav-link" href="{% url 'commentaries:commentaries' %}">Commentaries</a> + <li class="nav-item{% if '/submissions/' in request.path %} active{% endif %} dropdown"> + <!-- <a class="nav-link" href="{% url 'submissions:submissions' %}">Submissions</a> --> + <a class="nav-link dropdown-toggle" href="#" id="SubmissionsDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-trigger="hover">Submissions</a> + <div class="dropdown-menu mega-menu mega-menu-2" aria-labelledby="SubmissionsDropdown"> + <div class="row"> + <div class="col-md-6"> + <div class="dropdown-item"><a href="{% url 'submissions:submissions' %}">View all Submissions</a> <i class="fa fa-angle-right" aria-hidden="true"></i></div> + </div> + <div class="col-md-6"> + <div class="dropdown-item"><a href="#">Submit a manuscript</a> <i class="fa fa-angle-right" aria-hidden="true"></i></div> + </div> + </div> + <div class="dropdown-divider"></div> + <span class="dropdown-item dropdown-headline"><strong>Physics</strong></span> + <div class="row"> + <div class="col-md-6"> + <div class="dropdown-item"><a href="{% url 'submissions:submissions' %}?subject_area=Phys:AE">Atomic, Molecular and Opt... - Experiment</a> <i class="fa fa-angle-right" aria-hidden="true"></i></div> + + <div class="dropdown-item"><a href="{% url 'submissions:submissions' %}?subject_area=Phys:AT">Atomic, Molecular and Opt... - Theory</a> <i class="fa fa-angle-right" aria-hidden="true"></i></div> + + <div class="dropdown-item"><a href="{% url 'submissions:submissions' %}?subject_area=Phys:BI">Biophysics</a> <i class="fa fa-angle-right" aria-hidden="true"></i></div> + + <div class="dropdown-item"><a href="{% url 'submissions:submissions' %}?subject_area=Phys:CE">Condensed Matter Physics - Experiment</a> <i class="fa fa-angle-right" aria-hidden="true"></i></div> + + <div class="dropdown-item"><a href="{% url 'submissions:submissions' %}?subject_area=Phys:CT">Condensed Matter Physics - Theory</a> <i class="fa fa-angle-right" aria-hidden="true"></i></div> + + <div class="dropdown-item"><a href="{% url 'submissions:submissions' %}?subject_area=Phys:CC">Condensed Matter Physics - Computational</a> <i class="fa fa-angle-right" aria-hidden="true"></i></div> + + <div class="dropdown-item"><a href="{% url 'submissions:submissions' %}?subject_area=Phys:FD">Fluid Dynamics</a> <i class="fa fa-angle-right" aria-hidden="true"></i></div> + + <div class="dropdown-item"><a href="{% url 'submissions:submissions' %}?subject_area=Phys:GR">Gravitation, Cosmology and Astro...</a> <i class="fa fa-angle-right" aria-hidden="true"></i></div> + </div> + <div class="col-md-6"> + <div class="dropdown-item"><a href="{% url 'submissions:submissions' %}?subject_area=Phys:HE">High-Energy Physics - Experiment</a> <i class="fa fa-angle-right" aria-hidden="true"></i></div> + + <div class="dropdown-item"><a href="{% url 'submissions:submissions' %}?subject_area=Phys:HT">High-Energy Physics - Theory</a> <i class="fa fa-angle-right" aria-hidden="true"></i></div> + + <div class="dropdown-item"><a href="{% url 'submissions:submissions' %}?subject_area=Phys:HP">High-Energy Physics - Phenomenology</a> <i class="fa fa-angle-right" aria-hidden="true"></i></div> + + <div class="dropdown-item"><a href="{% url 'submissions:submissions' %}?subject_area=Phys:MP">Mathematical Physics</a> <i class="fa fa-angle-right" aria-hidden="true"></i></div> + + <div class="dropdown-item"><a href="{% url 'submissions:submissions' %}?subject_area=Phys:NE">Nuclear Physics - Experiment</a> <i class="fa fa-angle-right" aria-hidden="true"></i></div> + + <div class="dropdown-item"><a href="{% url 'submissions:submissions' %}?subject_area=Phys:NT">Nuclear Physics - Theory</a> <i class="fa fa-angle-right" aria-hidden="true"></i></div> + + <div class="dropdown-item"><a href="{% url 'submissions:submissions' %}?subject_area=Phys:QP">Quantum Physics</a> <i class="fa fa-angle-right" aria-hidden="true"></i></div> + + <div class="dropdown-item"><a href="{% url 'submissions:submissions' %}?subject_area=Phys:SM">Statistical and Soft Matter Physics</a> <i class="fa fa-angle-right" aria-hidden="true"></i></div> + </div> + + </div> </li> - <li class="nav-item{% if '/theses/' in request.path %} active{% endif %}"> - <a class="nav-link" href="{% url 'theses:theses' %}">Theses</a> + + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="MoreDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-trigger="hover">More</a> + <div class="dropdown-menu" aria-labelledby="MoreDropdown"> + <div class="dropdown-item"> + <a href="{% url 'commentaries:commentaries' %}">Commentaries</a> + <i class="fa fa-angle-right" aria-hidden="true"></i> + </div> + <div class="dropdown-item"> + <a href="{% url 'theses:theses' %}">Theses</a> + <i class="fa fa-angle-right" aria-hidden="true"></i> + </div> + </div> </li> + <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" href="#" id="MoreDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">More</a> - <div class="dropdown-menu" aria-labelledby="MoreDropdown"> - <a class="dropdown-item" href="{% url 'scipost:about' %}">About SciPost</a> - <a class="dropdown-item" href="{% url 'scipost:foundation' %}">The Foundation</a> - <a class="dropdown-item" href="{% url 'scipost:FAQ' %}">FAQ</a> - <a class="dropdown-item" href="{% url 'news:news' %}">News</a> - <a class="dropdown-item" href="{% url 'scipost:feeds' %}">Feeds</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="{% url 'organizations:organizations' %}">Organizations<br/><span class="small">benefitting from our activities</span></a> - <a class="dropdown-item" href="{% url 'sponsors:sponsors' %}">Sponsors</a> - <a class="dropdown-item" href="{% url 'finances:finances' %}">Finances</a> - </div> + <a class="nav-link dropdown-toggle" href="#" id="AboutDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-trigger="hover">About SciPost</a> + <div class="dropdown-menu" aria-labelledby="AboutDropdown"> + <div class="dropdown-item"> + <a href="{% url 'scipost:about' %}">About SciPost</a> + <i class="fa fa-angle-right" aria-hidden="true"></i> + </div> + + <div class="dropdown-item"> + <a href="{% url 'scipost:foundation' %}">The Foundation</a> + <i class="fa fa-angle-right" aria-hidden="true"></i> + </div> + + <div class="dropdown-item"> + <a href="{% url 'scipost:FAQ' %}">FAQ</a> + <i class="fa fa-angle-right" aria-hidden="true"></i> + </div> + + <div class="dropdown-item"> + <a href="{% url 'news:news' %}">News</a> + <i class="fa fa-angle-right" aria-hidden="true"></i> + </div> + + <div class="dropdown-item"> + <a href="{% url 'scipost:feeds' %}">Feeds</a> + <i class="fa fa-angle-right" aria-hidden="true"></i> + </div> + + <div class="dropdown-divider"></div> + + <div class="dropdown-item"> + <a href="{% url 'organizations:organizations' %}">Organizations<br/><span class="small">benefitting from our activities</span></a> + <i class="fa fa-angle-right" aria-hidden="true"></i> + </div> + + <div class="dropdown-item"> + <a href="{% url 'sponsors:sponsors' %}">Sponsors</a> + <i class="fa fa-angle-right" aria-hidden="true"></i> + </div> + + <div class="dropdown-item"> + <a href="{% url 'finances:finances' %}">Finances</a> + <i class="fa fa-angle-right" aria-hidden="true"></i> + </div> + + </div> </li> + </ul> <hr class="lg d-lg-none"> @@ -71,27 +176,45 @@ <ul class="navbar-nav mr-0"> {% if user.is_authenticated %} <li class="nav-item dropdown"> - <a class="nav-link dropdown-toggle" href="#" id="PersonalDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Logged in as {% if user.last_name %}{% if user.contributor %}{{ user.contributor.get_title_display }} {% endif %}{{ user.first_name }} {{ user.last_name }}{% else %}{{ user.username }}{% endif %} - {% if request.user.contributor and not request.user.contributor.is_currently_available %} + <a class="nav-link dropdown-toggle" href="#" id="PersonalDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-trigger="hover"> + Logged in as {% if user.last_name %}{% if user.contributor %}{{ user.contributor.get_title_display }} {% endif %}{{ user.first_name }} {{ user.last_name }}{% else %}{{ user.username }}{% endif %} + </a> + + {% if request.user.contributor and not request.user.contributor.is_currently_available %} <a href="javascript:;" class="text-warning" data-toggle="tooltip" data-title="You are currently unavailable.<br>Check your availability on your Personal Page if this should not be the case." data-html="true"><i class="fa fa-warning"></i></a> - {% endif %} - </a> - <div class="dropdown-menu" aria-labelledby="PersonalDropdown"> - - {% if user.contributor %} - <a class="dropdown-item" href="{% url 'scipost:personal_page' %}">Personal Page</a> - {% if is_editorial_college %} - <a class="dropdown-item" href="{% url 'submissions:pool' %}">Submissions Pool</a> - {% endif %} - {% if perms.scipost.can_view_production %} - <a class="dropdown-item" href="{% url 'production:production' %}">Production</a> - {% endif %} - {% if perms.scipost.can_manage_organizations or user.org_contact %} - <a class="dropdown-item" href="{% url 'organizations:dashboard' %}">Orgs dashboard</a> - {% endif %} - {% endif %} - <a class="dropdown-item" href="{% url 'scipost:logout' %}?next={{ request.path }}">Logout</a> + + {% endif %} + <div class="dropdown-menu dropdown-menu-right" aria-labelledby="PersonalDropdown"> + {% if user.contributor %} + <div class="dropdown-item"> + <a href="{% url 'scipost:personal_page' %}">Personal Page</a> + <i class="fa fa-angle-right" aria-hidden="true"></i> + </div> + {% if is_editorial_college %} + <div class="dropdown-item"> + <a href="{% url 'submissions:pool' %}">Submissions Pool</a> + <i class="fa fa-angle-right" aria-hidden="true"></i> + </div> + {% endif %} + {% endif %} + {% if perms.scipost.can_view_production %} + <div class="dropdown-item"> + <a href="{% url 'production:production' %}">Production</a> + <i class="fa fa-angle-right" aria-hidden="true"></i> + </div> + {% endif %} + {% if perms.scipost.can_manage_organizations or user.org_contact %} + <div class="dropdown-item"> + <a href="{% url 'organizations:dashboard' %}">Orgs dashboard</a> + <i class="fa fa-angle-right" aria-hidden="true"></i> + </div> + {% endif %} + <div class="dropdown-divider"></div> + <div class="dropdown-item"> + <a href="{% url 'scipost:logout' %}?next={{ request.path }}">Logout</a> + <i class="fa fa-angle-right" aria-hidden="true"></i> + </div> + </div> </li> <li class="nav-item navbar-counter"> @@ -118,4 +241,5 @@ function navbarIconToggle(x) { x.classList.toggle("change"); } + </script>