Browse Source

Merge pull request '项目代码页适配移动端' (#1411) from mobile2201 into V20220125

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/1411
Reviewed-by: lewis <747342561@qq.com>
tags/v1.22.1.3
lewis 4 years ago
parent
commit
f1d8d42ab5
2 changed files with 105 additions and 3 deletions
  1. +1
    -1
      templates/repo/header.tmpl
  2. +104
    -2
      web_src/less/openi.less

+ 1
- 1
templates/repo/header.tmpl View File

@@ -90,7 +90,7 @@
{{end}}
<div class="ui tabs container">
{{if not .Repository.IsBeingCreated}}
<div class="ui tabular stackable menu navbar">
<div class="ui tabular menu navbar">
{{if .Permission.CanRead $.UnitTypeCode}}
<div class="dropdown-menu">
<a class="{{if or .PageIsViewCode .PageIsReleaseList .PageIsWiki .PageIsActivity .PageIsViewCode}}active{{end}} item hover_active" href="{{.RepoLink}}{{if (ne .BranchName .Repository.DefaultBranch)}}/src/{{.BranchNameSubURL | EscapePound}}{{end}}">


+ 104
- 2
web_src/less/openi.less View File

@@ -15,8 +15,8 @@ a {
}
.following.bar #navbar .brand{
padding-left: 0;
padding-top: 0;
padding-bottom: 0;
padding-top: 0;
padding-bottom: 0;
}
.following.bar .brand .ui.mini.image {
width: auto;
@@ -615,4 +615,106 @@ display: block;
}
.a_margin{
margin: 0px !important;
}
@media only screen and (max-width: 767px) {
.following.bar #navbar .brand{
padding-top: 6px;
}
.secondary.menu + .ui.container{
margin-left:0 !important;
margin-right:0 !important;
}
.repo-title{
position: absolute;
top: 6px;
left: 50px;
right: 70px;
height: 40px;
line-height: 40px !important;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #FFF;
background-color: #363840;
padding-left: 20px;
}
.repo-title a{
color: #FFF !important;
}
.repo-title img + a{
display: none !important;
}
.repository .header-wrapper{
margin-bottom: 36px;
}
.header-wrapper .tabs.divider{
margin-top: 40px !important;
}
.repository .ui.tabs.container{
margin-top: -60px;
}
.repo-title .divider,
.repo-title svg,
.repo-title img,
.ui.tabular.menu .item svg,
.ui.tabular.menu .item i,
.ui.tabular.menu .item .label,
.ui.tabular.menu .dropdown-content,
.repository.file .repository-summary,
.repository-summary + .menu,
.desc-home .edit-icon,
#repo-files-table .message,
#repo-files-table .age,
#repo-files-table .ui.sha.label,
#repo-files-table .commit-button,
.members
{
display: none !important;
}
.header-wrapper{
display: flex;
flex-direction: column-reverse;
}
.ui.tabular.menu .item{
padding: .5em;
}
.ui.tabular.menu .active.item{
border: none;
background: none;
color: #000000;
border-bottom: 2px solid #000;
white-space: nowrap;
}
.repository .repo-header{
margin-bottom: -50px;
}
.repo-header .repo-buttons{
position: absolute;
right: 15px;
margin-bottom: -60px;
}
.repo-buttons .ui.labeled.button>.button{
box-shadow: none !important;
width: 16px;
overflow: hidden;
white-space: nowrap;
}
.repo-buttons .ui.labeled.button>.label{
border: none !important;
}
.repository.file.list #repo-files-table td.name{
max-width: 100%;
}
#repo-files-table tr{
padding-top: 0;
padding-bottom: 0;
}
.ui.attached:not(.message)+.ui.attached.segment:not(.top){
border: none;
}
.markdown:not(code).file-view{
padding: 2em 0!important;
}
}

Loading…
Cancel
Save