Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Sources/Pages/Examples/ImageExamples.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,19 @@ struct ImageExamples: StaticPage {

Text(markdown: "If you're working with large images, consider using the `lazy()` modifier to have them loaded lazily.")

Text(markdown: """
You can add image variations for things like higher density displays or dark mode with the `@2x` and `~dark` modifiers.
- `rug.jpg` - the base image
- `rug@2x.jpg` - the double sized image
- `rug~dark.jpg` - the version to use in dark mode
- `rug@2x~dark.jpg` - the double sized image for use in dark mode
""")

Alert {
Text(markdown: "The `~dark` image will only be used if the user's system is set to dark mode. If you manually switch to a dark mode Theme the base image will still be used. Likewise, the base image will be used if the user's system is in light mode regardless of what Theme is used.")
}
.role(.info)

Text("Icons")
.font(.title2)
.margin(.top, .xLarge)
Expand Down