-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Improve issue card #26561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve issue card #26561
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -73,7 +73,8 @@ | |||||||
} | ||||||||
|
||||||||
.card-attachment-images { | ||||||||
display: inline-block; | ||||||||
display: flex; | ||||||||
flex-wrap: wrap; | ||||||||
white-space: nowrap; | ||||||||
overflow: hidden; | ||||||||
text-align: center; | ||||||||
|
@@ -82,12 +83,18 @@ | |||||||
.card-attachment-images img { | ||||||||
display: inline-block; | ||||||||
max-height: 50px; | ||||||||
max-width: 100%; | ||||||||
border-radius: var(--border-radius); | ||||||||
margin-right: 2px; | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Better to have this just in case, to ensure the image maintains aspect ratio when scaling width/height. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This will fix that overlap, does require max-width: 100%;
max-height: 100%;
aspect-ratio: 1; |
||||||||
} | ||||||||
|
||||||||
.card-attachment-images img:not(:first-child) { | ||||||||
padding-top: 0.25rem; | ||||||||
} | ||||||||
|
||||||||
.card-attachment-images img:only-child { | ||||||||
max-height: 90px; | ||||||||
max-width: 100%; | ||||||||
margin: auto; | ||||||||
} | ||||||||
|
||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{{if $.Page.PageIsProjects}}
should it be{{if .PageIsProjects}}
🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not possible in this case.
Go templates are weird when it comes to
range
:What is happening here is implicitly a
, with
.
being the base variable the Go templates can use.In other words, all previous variables get removed leaving only the properties of a label for a whole iteration.
That's why you need to reference a template global variable by prefixing it with
$
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ps: in other places, the "Page" variable is usually called "root" or "ctxData", which means the root context data of this request (aka:
ctx.Data
in backend code)