mirror of
https://github.com/go-gitea/gitea.git
synced 2026-07-17 04:28:05 +02:00
### Description Fixes the organization page header layout issue where: 1. Long organization descriptions did not wrap and instead stretched the header container out of bounds. 2. The "Follow" button floated dynamically adjacent to the description's right edge depending on the description length, instead of remaining at a fixed position aligned with the right edge of the page container. Fixes https://github.com/go-gitea/gitea/issues/38445 ### Cause The flex container `<div class="flex-relaxed-list">` lacked `tw-flex-1` (to grow to fill the container) and `tw-min-w-0` (to allow it to shrink below its content's size). Consequently, the flex minimum width defaulted to `min-content`, stretching the container for long unwrapped descriptions. ### Solution Added `tw-flex-1 tw-min-w-0` to the `<div class="flex-relaxed-list">` container in `templates/org/header.tmpl`. This restricts the width, enables proper text wrapping, and fixes the "Follow" button to the right edge of the content container. ### Screenshots Before <img width="1300" height="615" alt="image" src="https://github.com/user-attachments/assets/11e6ab99-b847-45ff-8bdb-8622bfeee8aa" /> After <img width="1300" height="615" alt="image" src="https://github.com/user-attachments/assets/84ac0633-b192-4be5-8226-13bfad3ab2ec" /> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
147 lines
4.6 KiB
Handlebars
147 lines
4.6 KiB
Handlebars
{{template "devtest/devtest-header"}}
|
|
<div class="page-content devtest">
|
|
<div class="ui container">
|
|
<h3>Flex Relaxed List</h3>
|
|
<div class="flex-container tw-border">
|
|
<div class="flex-relaxed-list tw-flex-1">
|
|
<div class="flex-left-right">
|
|
<span class="gt-ellipsis">left looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong</span>
|
|
<span>right</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h3>Flex Divided List (standalone)</h3>
|
|
<div class="divider"></div>
|
|
<div class="flex-divided-list items-with-main">
|
|
<div class="item">
|
|
<div class="item-leading">
|
|
{{svg "octicon-info" 32}}
|
|
</div>
|
|
<div class="item-main">
|
|
<div class="item-title">
|
|
Flex Item
|
|
<span class="ui basic label">
|
|
with label
|
|
</span>
|
|
</div>
|
|
<div class="item-body">
|
|
consists of leading/main/trailing part
|
|
</div>
|
|
<div class="item-body">
|
|
main part contains title and (multiple) body lines
|
|
</div>
|
|
</div>
|
|
<div class="item-trailing">
|
|
<button class="ui tiny red button">
|
|
{{svg "octicon-alert" 14}} CJK文本测试
|
|
</button>
|
|
<button class="ui tiny primary button">
|
|
{{svg "octicon-info" 14}} Button
|
|
</button>
|
|
<button class="ui tiny primary button">
|
|
Button with long text
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="item">
|
|
<div class="item-leading">
|
|
{{svg "octicon-info" 32}}
|
|
</div>
|
|
<div class="item-main">
|
|
<div class="item-title">
|
|
Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong title
|
|
</div>
|
|
<div class="item-body">
|
|
consists of leading/main/trailing part
|
|
</div>
|
|
<div class="item-body">
|
|
Very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong content
|
|
<span class="tw-inline-block tw-truncate">Truncate very loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong content</span>
|
|
</div>
|
|
</div>
|
|
<div class="item-trailing">
|
|
<button class="ui tiny red button">
|
|
{{svg "octicon-alert" 12}} CJK文本测试 <!-- single CJK text test, it shouldn't be horizontal -->
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="item">
|
|
<div class="item-leading">
|
|
{{svg "octicon-repo" 32}}
|
|
</div>
|
|
<div class="item-main">
|
|
<div class="item-header">
|
|
<div class="item-title">
|
|
<a class="tw-text-primary" href="{{$.Link}}">
|
|
gitea-org / gitea
|
|
</a>
|
|
<span class="flex-text-inline" data-tooltip-content="{{ctx.Locale.Tr "repo.fork"}}">{{svg "octicon-repo-forked"}}</span>
|
|
</div>
|
|
<div class="item-trailing">
|
|
<a class="muted" href="{{$.Link}}">
|
|
<span class="flex-text-inline"><i class="color-icon tw-bg-blue"></i>Go</span>
|
|
</a>
|
|
<a class="tw-text-text-light flex-text-inline" href="{{$.Link}}">{{svg "octicon-star" 16}}45000</a>
|
|
<a class="tw-text-text-light flex-text-inline" href="{{$.Link}}">{{svg "octicon-git-branch" 16}}1234</a>
|
|
</div>
|
|
</div>
|
|
<div class="item-body">
|
|
when inside header, the trailing part will wrap below the title
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="divider"></div>
|
|
|
|
<h3>Flex Divided List (with "ui segment")</h3>
|
|
<div class="ui attached segment">
|
|
<div class="flex-divided-list">
|
|
<div class="item">item 1</div>
|
|
<div class="item">item 2</div>
|
|
</div>
|
|
</div>
|
|
<div class="ui attached segment">
|
|
<h4>segment header</h4>
|
|
<div class="flex-divided-list">
|
|
<div class="item">item 1</div>
|
|
<div class="item">item 2</div>
|
|
</div>
|
|
</div>
|
|
<h3>Flex Divided List (with "ui segment fitted", items have their own padding)</h3>
|
|
<div class="ui fitted segment">
|
|
<div class="flex-divided-list items-px-default">
|
|
<div class="item">item 1</div>
|
|
<div class="item">item 2</div>
|
|
<div class="item">item 3</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h3>If parent provides padding or items need their own flex and/or padding:</h3>
|
|
<div class="tw-border tw-border-secondary">
|
|
<div class="tw-m-3">before divider</div>
|
|
<div class="divider"></div>
|
|
<div class="flex-divided-list flex-items-block items-px-default">
|
|
<div class="item">item 1</div>
|
|
<div class="item">item 2</div>
|
|
</div>
|
|
<div class="divider"></div>
|
|
<div class="tw-m-3">after divider</div>
|
|
</div>
|
|
<div class="tw-border tw-border-secondary tw-p-4 tw-my-2">
|
|
<div>before divider</div>
|
|
<div class="divider"></div>
|
|
<div class="flex-divided-list">
|
|
<div class="item">item 1</div>
|
|
<div class="item">item 2</div>
|
|
</div>
|
|
<div class="divider"></div>
|
|
<div>after divider</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{{template "devtest/devtest-footer"}}
|