Skip to content

Commit

Permalink
Merge pull request #130 from whitep4nth3r/fix-cls-on-layout
Browse files Browse the repository at this point in the history
Add background logo as image and not content
  • Loading branch information
whitep4nth3r authored Mar 7, 2024
2 parents 8724d71 + 570e381 commit d0703f1
Show file tree
Hide file tree
Showing 6 changed files with 144 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mk2-p4nth3rblog",
"version": "1.0.5",
"version": "1.0.7",
"description": "My website and blog.",
"scripts": {
"watch:sass": "sass --watch ./src/_sass:src/_css",
Expand Down
134 changes: 132 additions & 2 deletions src/_css/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/_css/main.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/_public/img/whitep4nth3r-darkmode.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/_public/img/whitep4nth3r-lightmode.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions src/_sass/_reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,17 @@ main {
}

&:after {
content: var(--whitep4nth3r-bg-svg);
content: "";
background-image: var(--whitep4nth3r-bg-svg);
background-repeat: no-repeat;
background-size: cover;
height: 0;
width: 100%;
/* https://css-tricks.com/scale-svg/#aa-option-2-use-css-background-images-and-the-padding-bottom-hack */
padding-bottom: calc(100% * 201 / 1280); /* aspect ratio of image */
position: fixed;
bottom: 0;
left: 0;
width: 100%;
z-index: -1;
}
}
Expand Down

0 comments on commit d0703f1

Please sign in to comment.