Skip to content

Commit

Permalink
Use a responsive image for bootstrap-logo-shadow.png (#351)
Browse files Browse the repository at this point in the history
* Use a responsive image for bootstrap-logo-shadow.png

* Ignore `imagesrcset` is not recognized in `link rel=preload` vnu-jar error for now; should be removed later when fixed in vnu-jar
  • Loading branch information
XhmikosR authored Mar 24, 2023
1 parent 3ce4b59 commit 5adb8e2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
7 changes: 4 additions & 3 deletions build/vnu-jar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

/*!
* Script to run vnu-jar if Java is available.
* Copyright 2017-2022 The Bootstrap Authors
* Copyright 2017-2022 Twitter, Inc.
* Copyright 2017-2023 The Bootstrap Authors
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/

Expand All @@ -26,7 +25,9 @@ execFile('java', ['-version'], (error, stdout, stderr) => {
// TODO report the issue upstream in Hugo
'Duplicate ID.*',
'The first occurrence of ID.*',
'Self-closing tag syntax in text/html documents is widely discouraged.*'
'Self-closing tag syntax in text/html documents is widely discouraged.*',
// TODO remove this when fixed in vnu-jar
'Attribute “imagesrcset” not allowed on element “link” at this point.*'
].join('|')

const args = [
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<link rel="preconnect" href="https://github.com">
<link rel="preconnect" href="https://avatars.githubusercontent.com">
<link rel="preload" href="/assets/brand/bootstrap-logo-shadow.png" as="image">
<link rel="preload" href="/assets/brand/bootstrap-logo-shadow.png" imagesrcset="/assets/brand/bootstrap-logo-shadow.png, /assets/brand/[email protected] 2x" as="image">

<link rel="profile" href="https://gmpg.org/xfn/11">
<link rel="canonical" href="{{ .Permalink }}">
Expand Down
5 changes: 4 additions & 1 deletion src/layouts/partials/hero.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<div class="masthead py-5">
<div class="mb-4 text-center text-lg-start">
<a class="flex-shrink-0 mb-lg-3 link-dark text-decoration-none" href="/" aria-label="Bootstrap">
<img src="/assets/brand/bootstrap-logo-shadow.png" width="200" height="165" alt="Bootstrap" class="bd-booticon d-block mx-auto mb-3 mx-lg-0">
<img srcset="/assets/brand/bootstrap-logo-shadow.png, /assets/brand/[email protected] 2x"
src="/assets/brand/bootstrap-logo-shadow.png"
width="200" height="165" alt="Bootstrap"
class="bd-booticon d-block mx-auto mb-3 mx-lg-0">
</a>
<div class="ms-3 ms-lg-0">
<h1 class="mb-1 mb-lg-2 f1 fw-600">The Bootstrap Blog</h1>
Expand Down
Binary file modified src/static/assets/brand/bootstrap-logo-shadow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/static/assets/brand/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5adb8e2

Please sign in to comment.