Skip to content

Commit

Permalink
Make news banner global (#234)
Browse files Browse the repository at this point in the history
Co-authored-by: Gerasimos Chourdakis <chourdak@in.tum.de>
  • Loading branch information
fsimonis and MakisH authored Dec 15, 2022
1 parent d7d8f93 commit 4b18e4f
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 16 deletions.
25 changes: 25 additions & 0 deletions _includes/news_banner.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{% comment %}{% raw %}

For landing-only news use:
{% if include.onlanding %}

For news visible on all pages use:
{% if true %}.

{% endraw %}{% endcomment %}

{% if true %}

<div class="background-light banner-container">
<div class="container">
<div class="row no-margin">
<div class="col-lg-12 banner">
<p class="no-margin">
Submit your talk abstract to the <a href="precice-workshop-2023.html">preCICE Workshop 2023</a> till December 16. Join us in Munich in February 13-16 for user & dev talks, preCICE courses, and more.
</p>
</div>
</div>
</div>
</div>

{% endif %}
2 changes: 2 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@
{% include topnav.html %}
</header>
<main>
<!-- News banner -->
{% include news_banner.html onlanding=false %}
<!-- Page Content -->
<div class="container">
<div id="main">
Expand Down
3 changes: 3 additions & 0 deletions _layouts/landing_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
</header>

<main>
<!-- News banner -->
{% include news_banner.html onlanding=true %}

<!-- Page Content -->
{{content}}
</main>
Expand Down
3 changes: 3 additions & 0 deletions css/customstyles-precice.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ body {
main {
/*margin-top:-20px;*/
}
.banner-container {
margin-top:-20px;
}
a.navbar-brand {
padding-top: 12px;
}
Expand Down
5 changes: 5 additions & 0 deletions css/customstyles.css
Original file line number Diff line number Diff line change
Expand Up @@ -1209,3 +1209,8 @@ h4.panel-title {
display:block !important;
}
}

/* News banner on pages other than the landing page */
.banner {
padding: 15px 0;
}
2 changes: 1 addition & 1 deletion css/landing-page.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* idea is to not touch the docs part of the website, but start from a clear state */

main { /* fixed topnav takes up 50 + 20 px */
margin-top: -20px;
/* margin-top: -20px; */
}
h1[id], h2[id], h3[id], h4[id], h5[id], h6[id],
dt[id] {
Expand Down
15 changes: 0 additions & 15 deletions pages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,6 @@
layout: landing_page
---

<!-- Jumbotron for news -->
<!-- Comment out whole block when no news -->

<div class="background-light">
<div class="container">
<div class="row no-margin">
<div class="col-lg-12 banner">
<p class="no-margin">
Submit your talk abstract to the <a href="precice-workshop-2023.html">preCICE Workshop 2023</a> till December 16. Join us in Munich in February 13-16 for user & dev talks, preCICE courses, and more.
</p>
</div>
</div>
</div>
</div>

<!-- Lead stage -->

<div class="container">
Expand Down

0 comments on commit 4b18e4f

Please sign in to comment.