Skip to content

Commit

Permalink
Add class to make avatar responsive
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilafian committed Jul 27, 2024
1 parent f1494aa commit b4f7080
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
"hljs-enhance": "~2.0"
},
"devDependencies": {
"@eslint/js": "~9.7",
"@eslint/js": "~9.8",
"@fortawesome/fontawesome-free": "~6.6",
"@types/node": "~20.14",
"add-dist-header": "~1.4",
Expand All @@ -114,12 +114,12 @@
"esm-to-plain-js": "~1.1",
"jshint": "~2.13",
"less": "~4.2",
"mocha": "~10.6",
"mocha": "~10.7",
"replacer-util": "~1.3",
"rimraf": "~6.0",
"run-scripts-util": "~1.3",
"typescript": "~5.5",
"typescript-eslint": "~7.16",
"typescript-eslint": "~7.17",
"uglify-js": "~3.19",
"w3c-html-validator": "~1.8"
}
Expand Down
18 changes: 10 additions & 8 deletions src/css/layouts/zebra-sections.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Usage:
<style>
body >header nav a { color: white; text-shadow: 0px 0px 0.6em black; }
body >header nav a.current, body >header nav a:hover { color: white; border-color: gold; }
body >header { background-image: url(bkgnd.jpg); }
body >header { background-image: url(background-banner.jpg); }
body main >section[data-background=cat] { background-image: url(cat.jpg); }
</style>
HTML (<body>):
header
header.responsive-avatar
nav
a.current
h1, h2, h4, img[alt=avatar]
Expand Down Expand Up @@ -224,12 +224,14 @@ body >footer i[data-brand] {

/* Mobile devices */
@media (max-width: 667px) { /* selects iPhone 6/6s/7/8/SE2/SE3 landscape and anything narrower */
body >header img {
bottom: -50px;
width: 100px;
}
main >section:first-child {
padding-top: 80px;
body >header.responsive-avatar {
img {
bottom: -50px;
width: 100px;
}
&+main >section:first-child {
padding-top: 80px;
}
}
}
/******************************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion src/css/layouts/zebra-sections.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
</head>
<body>

<header>
<header class=responsive-avatar>
<nav id=link-menu>
<a href=. class=current>Home</a>
<a href=tutorial>Tutorial</a>
Expand Down

0 comments on commit b4f7080

Please sign in to comment.