Commit 6715d3a8 authored by Jakob Moser's avatar Jakob Moser
Browse files

Fix header to top of page

parent 56db86ee
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ GitLab provides [a list of the differences between "fscoli next" and "Fachschaft

### Differently licensed content

* `style.css` includes a CSS snippet adapted from the Stack Overflow answer https://stackoverflow.com/a/52226523/ by [binaryfunt][binaryfunt] which is licensed under [**CC BY-SA 4.0**][cc-by-sa-4.0]. More details can be found in the respective file.
* The [icon this repository uses](https://gitlab.cl.uni-heidelberg.de/uploads/-/system/project/avatar/720/web-design-padded.png) was made by [monkik][monkik] from [www.flaticon.com][flaticon] and is licensed under the **Flaticon License**.

[original]:https://gitlab.cl.uni-heidelberg.de/fachschaft/wp-theme/-/tags/original
@@ -39,3 +40,5 @@ GitLab provides [a list of the differences between "fscoli next" and "Fachschaft
[diff]:https://gitlab.cl.uni-heidelberg.de/fachschaft/wp-theme/-/compare/original...master
[flaticon]:https://www.flaticon.com/
[monkik]:https://www.flaticon.com/authors/monkik
[binaryfunt]:https://stackoverflow.com/users/3217306/binaryfunt
[cc-by-sa-4.0]:https://creativecommons.org/licenses/by-sa/4.0/
+21 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
 * Author: personads :: Maximilian Müller-Eberstein (ursprüngliche Version und Design); Jakob Moser (Code-Rewrite)
 * Author URI: https://personads.me/
 *
 * Version: 1.00-snapshot-44
 * Version: 1.00-snapshot-45
 * 
 * License: GNU General Public License v3.0
 * License URI: https://www.gnu.org/licenses/gpl-3.0.html
@@ -18,6 +18,11 @@
 *
 * The "fscoli next" WordPress theme contains modifications made by Jakob Moser (2020--2021), which are listed in more detail in
 * the README.md provided with this theme. "fscoli next" is distributed under the terms of the GNU GPL.
 *
 * This file contains CSS rules adapted from the Stack Overflow answer https://stackoverflow.com/a/52226523/ 
 * (question title: "Fixed header in CSS Grid") by binaryfunt (https://stackoverflow.com/users/3217306/binaryfunt), 
 * licensed under CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/). The adapted section is marked in the
 * code below with @@@, where an explanation of the changes can also be found.
 */

* {
@@ -100,6 +105,21 @@ body > header {
    background-color: var(--background-color);
}

/* @@@ The following lines of code are adapted from https://stackoverflow.com/a/52226523/ (license details above). @@@
 *
 * We modified the CSS selector for the header and included another CSS rule in case the
 * admin bar is shown before the header.
 */
body > header {
    position: sticky;
    top: 0;
}

body.has-admin-bar > header {
    top: 32px;
}
/* @@@ End of adapted code @@@ */

body > header::before {
    content: "";
    position: relative;