Skip to content

Commit 69435d3

Browse files
Revert svg fix to prevent #301 (#304)
* Revert "chore: update bluesky url (#299)" This reverts commit 3f103a1. * Revert "fix: External svgs not rendering in top nav bar (#297)" This reverts commit e1685de.
1 parent 1a313dd commit 69435d3

File tree

3 files changed

+6
-25
lines changed

3 files changed

+6
-25
lines changed

assets/css/main.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,12 @@ img {
179179
display: block;
180180
padding: 0 6px;
181181
}
182-
.nav-link a svg,
182+
.nav-link a svg {
183+
height: 20px;
184+
margin: -3px auto;
185+
stroke-width: 2;
186+
width: 20px;
187+
}
183188
.nav-item a svg {
184189
height: 20px;
185190
margin: -3px auto;

assets/js/main.js

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,24 +38,6 @@ function ready() {
3838
// Do the injection
3939
SVGInjector(svgsToInject);
4040

41-
const observer = new MutationObserver(() => {
42-
normalizeSvgPaths();
43-
});
44-
45-
observer.observe(document.body, { childList: true, subtree: true });
46-
47-
function normalizeSvgPaths() {
48-
document.querySelectorAll('a .svg-inject path').forEach(path => {
49-
const bbox = path.getBBox();
50-
const scaleX = 20 / bbox.width;
51-
const scaleY = 20 / bbox.height;
52-
const scale = Math.min(scaleX, scaleY);
53-
54-
path.setAttribute('transform', `scale(${scale}) translate(${-bbox.x}, ${-bbox.y})`);
55-
path.setAttribute('fill', 'currentColor');
56-
});
57-
}
58-
5941
document.getElementById('hamburger-menu-toggle').addEventListener('click', () => {
6042
const hamburgerMenu = document.getElementsByClassName('nav-hamburger-list')[0]
6143
const hamburgerMenuToggleTarget = document.getElementById("hamburger-menu-toggle-target")

exampleSite/config.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,6 @@ title = "Gokarna"
9292
url = "/index.xml"
9393
weight = 7
9494

95-
[[menu.main]]
96-
identifier = "bluesky"
97-
pre = "<img class='svg-inject' src='https://upload.wikimedia.org/wikipedia/commons/7/7a/Bluesky_Logo.svg' />"
98-
url = "https://www.buymeacoffee.com/avijitgupta"
99-
weight = 8
100-
10195
[markup]
10296
[markup.tableOfContents]
10397
startLevel = 1

0 commit comments

Comments
 (0)