Skip to content

Fix migrate page layout on mobile #25507

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

Merged
merged 2 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions templates/repo/migrate/migrate.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<div class="ui middle very relaxed page grid">
<div class="column">
{{template "repo/migrate/helper" .}}
<div class="ui three stackable cards">
<div class="ui cards migrate-entries">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that most styles are provided by migrate-entries and migrate-entry now? Is "ui cards" still necessary?

Copy link
Member Author

@silverwind silverwind Jun 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.ui.card at least is necessary for styling aspecs like border and background and more. .ui.cards might be removable.

{{range .Services}}
<a class="ui card gt-df gt-ac" href="{{AppSubUrl}}/repo/migrate?service_type={{.}}&org={{$.Org}}&mirror={{$.Mirror}}">
<a class="ui card migrate-entry gt-df gt-ac" href="{{AppSubUrl}}/repo/migrate?service_type={{.}}&org={{$.Org}}&mirror={{$.Mirror}}">
{{if eq .Name "github"}}
{{svg "octicon-mark-github" 184 "gt-p-4"}}
{{else if eq .Name "gitlab"}}
Expand Down
25 changes: 22 additions & 3 deletions web_src/css/repo.css
Original file line number Diff line number Diff line change
Expand Up @@ -3100,18 +3100,37 @@ tbody.commit-list {
}
}

.repository.migrate .card {
.migrate-entries {
display: grid !important;
grid-template-columns: repeat(3, 1fr);
gap: 25px;
margin: 0 !important;
}

@media (max-width: 767.98px) {
.migrate-entries {
grid-template-columns: repeat(1, 1fr);
}
}

.migrate-entry {
transition: all 0.1s ease-in-out;
box-shadow: none !important;
border: 1px solid var(--color-secondary);
color: var(--color-text);
color: var(--color-text) !important;
width: auto !important;
margin: 0 !important;
}

.repository.migrate .card:hover {
.migrate-entry:hover {
transform: scale(105%);
box-shadow: 0 0.5rem 1rem var(--color-shadow) !important;
}

.migrate-entry .description {
text-wrap: balance;
}

@media (max-width: 767.98px) {
.repository.file.list #repo-files-table .entry,
.repository.file.list #repo-files-table .commit-list {
Expand Down