From f0120841236ca7608bb9f312e904144157261e5a Mon Sep 17 00:00:00 2001 From: Dean Attali Date: Tue, 28 Apr 2020 20:16:59 +0000 Subject: [PATCH] when linking to an intra-document point, don't scroll too much --- CHANGELOG.md | 2 ++ assets/css/main.css | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 68c8c3e..132568e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ This file lists all non-trivial changes to Beautiful Jekyll. I often make small changes to documentation, to the demo site, or to the general look-and-feel. These and other minor changes will not be listed here. +**2020-04-28** Fix issue: linking to a specific part of a page resulted in scrolling too far (#69) + **2020-04-28** Add YAML option `nav-short` to have navbar permanently collapsed **2020-04-28** Add social network link: Calendly diff --git a/assets/css/main.css b/assets/css/main.css index d1005af..3a77f9b 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -47,6 +47,14 @@ hr.small { border-radius: 3px; } +/* fix in-page anchors to not be behind fixed header */ +:target:before { + content: ""; + display: block; + height: 50px; /* navbar height */ + margin: -50px 0 0; +} + .main-content { padding-top: 80px; }