Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
hpc-compendium
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ZIH
hpcsupport
hpc-compendium
Commits
56504418
Commit
56504418
authored
5 months ago
by
Martin Schroschk
Browse files
Options
Downloads
Patches
Plain Diff
WIP Add documentation on how to scale and align graphics
parent
983237f1
No related branches found
No related tags found
2 merge requests
!1164
Automated merge from preview to main
,
!1149
Add documentation on how to scale and align graphics
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc.zih.tu-dresden.de/docs/contrib/content_rules.md
+49
-0
49 additions, 0 deletions
doc.zih.tu-dresden.de/docs/contrib/content_rules.md
doc.zih.tu-dresden.de/docs/contrib/misc/barnard.jpeg
+0
-0
0 additions, 0 deletions
doc.zih.tu-dresden.de/docs/contrib/misc/barnard.jpeg
with
49 additions
and
0 deletions
doc.zih.tu-dresden.de/docs/contrib/content_rules.md
+
49
−
0
View file @
56504418
...
...
@@ -164,6 +164,55 @@ The `summary` and `align` parameters can be combined as well:
Do not add large binary files or high-resolution images to the repository. See this valuable
document for [image optimization](https://web.dev/fast/#optimize-your-images).
#### Alignment and Sizing of Graphics
!!! note "Scale graphics once"
Graphics and images should be added to the repository with the desired size. If you add a file
If you add a graphic that is too large, it is implicitly converted to a suitable size. This
conversion happens every time the documentation is built, i.e., every time the CI/CD pipeline is
run. Over the project's lifetime, this will happen many thousands of times.
While MkDocs scales images to fit the content width, it doesn’t compress images or reduce file
sizes automatically. Therefore, it’s still essential to optimize image sizes and resolutions
before uploading to ensure good performance.
!!! example "Scale image to 150px width"
The following Markdown syntax will scale the image of the beautiful
[cluster `Barnard`](../jobs_and_resources/hardware_overview.md#barnard) to a width of 150
pixels and height of 150 pixels.
=== "Scale"
```markdown
{: style="height:150px;width:150px"}
```
{: style="height:150px;width:150px"}
=== "Align=center"
Now let's scale the very same image to 150 pixel width keeping aspect ratio and center align it.
```markdown
{: style="height:150px;width:150px"}
{: align="center"}
```
{: style="width:150px"}
{: align="center"}
=== "Align=right"
Now let's scale the very same image to 150 pixel width keeping aspect ratio and center align it.
```markdown
{: style="width:150px"}
{: align="right"}
```
{: style="width:150px"}
{: align="right"}
#### Special Feature: Admonitions
[
Admonitions
](
https://squidfunk.github.io/mkdocs-material/reference/admonitions/
)
, also known as
...
...
This diff is collapsed.
Click to expand it.
doc.zih.tu-dresden.de/docs/contrib/misc/barnard.jpeg
0 → 100644
+
0
−
0
View file @
56504418
185 KiB
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment