- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 6.2k
GitHub like repo home page #32213
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
GitHub like repo home page #32213
Changes from 33 commits
83fe8c9
              e28398b
              ca47b74
              4265297
              f217245
              1bf3f66
              3652576
              4018f54
              69ab709
              c2c9a1e
              c4b2b95
              156fdec
              69f8601
              72d2bbe
              cbb7426
              56dd034
              16bf69c
              0dd7935
              ba6bd51
              176c90d
              2e3c4d3
              4e2480b
              3cc6973
              eb65b87
              1597ba5
              4455935
              d90d552
              3720d0e
              ac44d90
              c562e11
              5c0e899
              536ec4a
              d11bf78
              f651272
              67026e1
              4373ad1
              0a2d81c
              156a195
              db453b5
              be1875e
              8a865de
              a4b0b0e
              5dbb110
              20cf941
              e67c4c1
              15a1600
              16d77d8
              c261174
              b83d4d0
              2aa1b19
              0538c5a
              ca5bfa6
              680aee4
              b9e5dcc
              a6f2570
              6412de6
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <form class="ignore-dirty tw-flex tw-flex-1 tw-mt-1" action="{{.RepoLink}}/search" method="get"> | ||
| <div class="ui small action input tw-flex-1"> | ||
| <input name="q" size="10" placeholder="{{ctx.Locale.Tr "search.code_kind"}}"> | ||
| {{template "shared/search/button"}} | ||
| </div> | ||
| </form> | 
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| <div class="flex-item"> | ||
| <div class="flex-item-main"> | ||
| <div class="flex-item-title"> | ||
| {{ctx.Locale.Tr "repo.repo_desc"}} | ||
| </div> | ||
| {{if and (not .HideRepoInfo) (not .IsBlame)}} | ||
| <div class="flex-item-body repo-description tw-break-anywhere tw-gap-2 tw-mt-2"> | ||
| {{- $description := .Repository.DescriptionHTML ctx -}} | ||
| {{if $description}}{{$description | RenderCodeBlock}}{{else}}{{ctx.Locale.Tr "repo.repo_no_desc"}}{{end}} | ||
| {{if .Repository.Website}}{{svg "octicon-link"}}<a href="{{.Repository.Website}}">{{.Repository.Website}}</a>{{end}} | ||
| </div> | ||
| <div class="tw-flex tw-items-center tw-flex-wrap tw-gap-2 tw-my-2" id="repo-topics"> | ||
| {{/* it should match the code in issue-home.js */}} | ||
| {{range .Topics}}<a class="repo-topic ui large label gt-ellipsis" title={{.Name}} href="{{AppSubUrl}}/explore/repos?q={{.Name}}&topic=1">{{.Name}}</a>{{end}} | ||
| </div> | ||
| {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}<button id="manage_topic" class="btn interact-fg tw-text-12">{{ctx.Locale.Tr "repo.topic.manage_topics"}}</button>{{end}} | ||
| {{end}} | ||
| {{if and .Permission.IsAdmin (not .Repository.IsArchived)}} | ||
| <div class="ui form tw-hidden flex-item-body tw-gap-2 tw-my-2" id="topic_edit"> | ||
| <div class="ui fluid multiple search selection dropdown tw-flex-wrap tw-flex-1"> | ||
| <input type="hidden" name="topics" value="{{range $i, $v := .Topics}}{{.Name}}{{if Eval $i "+" 1 "<" (len $.Topics)}},{{end}}{{end}}"> | ||
| {{range .Topics}} | ||
| {{/* keep the same layout as Fomantic UI generated labels */}} | ||
| <a class="ui label transition visible tw-cursor-default tw-inline-block repo-topic" data-value="{{.Name}}">{{.Name}}{{svg "octicon-x" 16 "delete icon"}}</a> | ||
| {{end}} | ||
| <div class="text"></div> | ||
| </div> | ||
| <div> | ||
| <button class="ui primary button" id="save_topic" data-link="{{.RepoLink}}/topics">{{ctx.Locale.Tr "save"}}</button> | ||
| <button class="ui basic button" id="cancel_topic_edit">{{ctx.Locale.Tr "cancel"}}</button> | ||
| </div> | ||
| </div> | ||
| {{end}} | ||
| {{if .ReadmeExist}} | ||
| <div class="flex-item-body tw-mt-2"> | ||
| <a class="tw-flex tw-items-center tw-gap-2 muted" href="{{.TreeLink}}/{{.FileName}}"> | ||
| {{svg "octicon-book"}}{{ctx.Locale.Tr "readme"}} | ||
| </a> | ||
| </div> | ||
| {{end}} | ||
| {{if .DetectedRepoLicenses}} | ||
| <div class="flex-item-body"> | ||
| <a class="tw-flex tw-items-center tw-gap-2 muted" href="{{.RepoLink}}/src/{{.Repository.DefaultBranch}}/{{PathEscapeSegments .LicenseFileName}}" data-tooltip-placement="top" data-tooltip-content="{{StringUtils.Join .DetectedRepoLicenses ", "}}"> | ||
| {{svg "octicon-law"}}{{if eq (len .DetectedRepoLicenses) 1}}{{index .DetectedRepoLicenses 0}}{{else}}{{ctx.Locale.Tr "repo.multiple_licenses"}}{{end}} | ||
| </a> | ||
| </div> | ||
| {{end}} | ||
| {{if .CitiationExist}} | ||
| <div class="flex-item-body"> | ||
| <a class="tw-flex tw-items-center tw-gap-2 muted" id="cite-repo-button"> | ||
| {{svg "octicon-cross-reference"}}{{ctx.Locale.Tr "repo.cite_this_repo"}} | ||
| </a> | ||
| </div> | ||
| {{end}} | ||
| </div> | ||
| </div> | 
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| <table id="repo-files-table" class="ui single line table tw-mt-0" {{if .HasFilesWithoutLatestCommit}}hx-indicator="tr.notready td.message span" hx-trigger="load" hx-swap="morph" hx-post="{{.LastCommitLoaderURL}}"{{end}}> | ||
| <table id="repo-files-table" class="ui single line fixed table tw-mt-0" {{if .HasFilesWithoutLatestCommit}}hx-indicator="tr.notready td.message span" hx-trigger="load" hx-swap="morph" hx-post="{{.LastCommitLoaderURL}}"{{end}}> | ||
| 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  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. #32759 will fix that and revert the table layout. | ||
| <thead> | ||
| <tr class="commit-list"> | ||
| <th class="tw-overflow-hidden" colspan="2"> | ||
|  | ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -1822,16 +1822,6 @@ td .commit-summary { | |
| background: var(--color-secondary); | ||
| } | ||
|  | ||
| .repository .repository-summary .segment.language-stats { | ||
| display: flex; | ||
| gap: 2px; | ||
| padding: 0; | ||
| height: 10px; | ||
| white-space: nowrap; | ||
| border-radius: 0 0 3px 3px !important; | ||
| overflow: hidden; | ||
| } | ||
|  | ||
| #cite-repo-modal #citation-panel { | ||
| display: flex; | ||
| width: 100%; | ||
|  | @@ -2176,7 +2166,7 @@ td .commit-summary { | |
| flex-grow: 0; | ||
| } | ||
| 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 rule removal caused regression #32753. 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. -> Fix repo home row-right grow #32763 | ||
|  | ||
| @media (max-width: 991px) { | ||
| @media (max-width: 1200px) { | ||
| .repository:not(.wiki) .repo-button-row { | ||
| flex-direction: column; | ||
| align-items: stretch; | ||
|  | @@ -2302,6 +2292,7 @@ tbody.commit-list { | |
| font-weight: var(--font-weight-normal); | ||
| cursor: pointer; | ||
| margin: 0; | ||
| display: inline-block !important; | ||
| } | ||
|  | ||
| #new-dependency-drop-list.ui.selection.dropdown { | ||
|  | @@ -2820,9 +2811,9 @@ tbody.commit-list { | |
| /* FIXME: These media selectors are not ideal (just keep them from old code). | ||
| There are many different pages, some need the max-width while some others don't, | ||
| they should be tested and improved in the future. */ | ||
| @media (min-width: 768px) and (max-width: 991.98px) { | ||
| @media (min-width: 768px) and (max-width: 1235px) { | ||
| .branch-selector-dropdown .branch-dropdown-button { | ||
| max-width: 185px; | ||
| max-width: 301px; | ||
| } | ||
| } | ||
|  | ||
|  | ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| .latest-releases { | ||
| display: -webkit-box; | ||
| -webkit-box-orient: vertical; | ||
| -webkit-line-clamp: 2; | ||
|         
                  wxiaoguang marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| line-clamp: 2; | ||
| overflow: hidden; | ||
| text-overflow: ellipsis; | ||
| } | ||
|  | ||
| .language-stats { | ||
| display: flex; | ||
| gap: 2px; | ||
| padding: 0; | ||
| height: 10px; | ||
| white-space: nowrap; | ||
| border-radius: 0 0 3px 3px !important; | ||
| overflow: hidden; | ||
| width: 100%; | ||
| margin-top: 1rem; | ||
| margin-bottom: 5px; | ||
| } | ||
|  | ||
| .language-stats-details { | ||
| display: flex; | ||
| flex-wrap: wrap; | ||
| } | ||
|  | ||
| .language-stats-details .item { | ||
| height: 30px; | ||
| line-height: var(--line-height-default); | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| gap: 0.25em; | ||
| padding: 0 0.5em; /* make the UI look better for narrow (mobile) view */ | ||
| text-decoration: none; | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.