Skip to content

Commit

Permalink
add: images alt
Browse files Browse the repository at this point in the history
  • Loading branch information
Valexr committed Apr 15, 2024
1 parent fadc5f9 commit 1cd270f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ body::after {
overflow: hidden;
}

body::before {
content: attr(title);
position: absolute;
inset: 0;
top: 97.5%;
font-size: 0.8em;
font-weight: 300;
}

header,
footer {
display: flex;
Expand Down
3 changes: 2 additions & 1 deletion src/lib/images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function createImages() {
subscribe, set, update, load, prepare,
async back() {
await load();
const [{ src }] = prepare();
const [{ src, alt }] = prepare();
// await addImageProcess(src)
// const img = new Image();
// img.src = src
Expand All @@ -83,6 +83,7 @@ function createImages() {
background: url(${src}) center no-repeat;
background-size: cover;
`;
document.body.title = alt
}
}
}
Expand Down

0 comments on commit 1cd270f

Please sign in to comment.