-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #670 from danskernesdigitalebibliotek/develop
Release 2024.25.0
- Loading branch information
Showing
33 changed files
with
968 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
@import "./src/styles/scss/tools"; | ||
|
||
// CSS sheets that are used to style the admin interface. | ||
@import "./src/stories/Library/opening-hours-editor/opening-hours-editor"; | ||
@import "./src/stories/Library/material-search/material-search"; | ||
@import "./src/stories/Library/cover/cover"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import { FC } from "react"; | ||
|
||
type ImageCreditedProps = { | ||
src: string; | ||
alternativeSrcs?: { name: string; src: string }[]; | ||
alt?: string; | ||
}; | ||
|
||
const ImageCredited: FC<ImageCreditedProps> = ({ | ||
src, | ||
alternativeSrcs, | ||
alt = "", | ||
}) => { | ||
// Card images are displayed in different aspect ratios, based on context. | ||
// This is handled by object-fit centering, but generally speaking, we want | ||
// different cropped images to be served. | ||
// We get around this, by allowing to pass along alternative SRCs, that are | ||
// presented as containers, set to display none and using background images. | ||
// By doing it this way, and letting CSS decide when the display is allowed, | ||
// the browser is smart enough only to load the image when necessary. | ||
return ( | ||
<figure className="image-credited"> | ||
{src ? ( | ||
<div className="image-credited__image"> | ||
{alternativeSrcs && | ||
alternativeSrcs.map((alternativeSrc) => ( | ||
<div | ||
className="card__override-images" | ||
style={{ | ||
display: "none", | ||
backgroundImage: `url(${alternativeSrc.src})`, | ||
}} | ||
data-card-style={alternativeSrc.name} | ||
/> | ||
))} | ||
|
||
<img src={src} alt={alt} loading="lazy" /> | ||
</div> | ||
) : ( | ||
<div className="image-credited__no-image" /> | ||
)} | ||
</figure> | ||
); | ||
}; | ||
|
||
export default ImageCredited; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.