Finish new UI for release page
This commit is contained in:
parent
01ba771783
commit
bc8721fb6c
16 changed files with 520 additions and 239 deletions
|
@ -1072,7 +1072,8 @@ The register and sign-in page style
|
|||
text-overflow: clip;
|
||||
}
|
||||
#repo-content {
|
||||
padding: 18px 0;
|
||||
padding-top: 18px;
|
||||
padding-bottom: 18px;
|
||||
}
|
||||
.repo-wide-wrapper {
|
||||
padding: 18px;
|
||||
|
@ -1353,31 +1354,54 @@ The register and sign-in page style
|
|||
#repo-create-cancel {
|
||||
margin-left: 4em;
|
||||
}
|
||||
#release-new-target-branch-list,
|
||||
#repo-create-owner-list {
|
||||
top: 30px;
|
||||
left: 0;
|
||||
width: auto;
|
||||
max-width: 300px;
|
||||
}
|
||||
#release-new-target-branch-list .octicon,
|
||||
#repo-create-owner-list .octicon {
|
||||
margin-right: 12px;
|
||||
opacity: 0;
|
||||
}
|
||||
#release-new-target-branch-list .avatar,
|
||||
#repo-create-owner-list .avatar {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
#release-new-target-branch-list li,
|
||||
#repo-create-owner-list li {
|
||||
white-space: nowrap;
|
||||
}
|
||||
#release-new-target-branch-list li.checked .octicon,
|
||||
#repo-create-owner-list li.checked .octicon {
|
||||
opacity: 1;
|
||||
}
|
||||
#release-new-target-branch-list li a,
|
||||
#repo-create-owner-list li a {
|
||||
text-overflow: ellipsis;
|
||||
-o-text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
#release-new-target-branch-list {
|
||||
margin-top: -1px;
|
||||
min-width: 150px;
|
||||
}
|
||||
#release-new-title {
|
||||
margin-top: 10px;
|
||||
}
|
||||
#release-new-content {
|
||||
width: 100%;
|
||||
}
|
||||
#release-preview-btn .btn {
|
||||
border-left: 0;
|
||||
}
|
||||
#release-preview.markdown {
|
||||
margin-top: 5px;
|
||||
background-color: transparent;
|
||||
}
|
||||
.file-name {
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
@ -1622,6 +1646,87 @@ The register and sign-in page style
|
|||
margin-left: 44px;
|
||||
margin-top: -15px;
|
||||
}
|
||||
#release h4 {
|
||||
font-size: 18px;
|
||||
}
|
||||
#release h4 small {
|
||||
font-weight: 400;
|
||||
line-height: 1;
|
||||
color: #999;
|
||||
}
|
||||
#release #release-head {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 20px;
|
||||
border-bottom: 1px solid #DDD;
|
||||
}
|
||||
#release #release-head .btn {
|
||||
margin-left: 10px;
|
||||
}
|
||||
#release .release-item > div {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
#release .release-item .label-green:hover {
|
||||
background-color: #65ad4e;
|
||||
}
|
||||
#release .release-item .release-meta {
|
||||
position: relative;
|
||||
float: left;
|
||||
padding-right: 15px;
|
||||
}
|
||||
#release .release-item .tag,
|
||||
#release .release-item .commit {
|
||||
display: block;
|
||||
margin-top: 12px;
|
||||
line-height: 20px;
|
||||
}
|
||||
#release .release-item .release-detail {
|
||||
margin-top: -1px;
|
||||
border-left: 1px solid #DDD;
|
||||
position: relative;
|
||||
float: left;
|
||||
padding-left: 15px;
|
||||
}
|
||||
#release .release-item .title {
|
||||
line-height: 25px;
|
||||
margin-top: 0;
|
||||
}
|
||||
#release .release-item p.info {
|
||||
line-height: 20px;
|
||||
color: #666;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
#release .release-item p.info > * {
|
||||
margin-right: 10px;
|
||||
}
|
||||
#release .release-item .author img {
|
||||
margin-top: -3px;
|
||||
}
|
||||
#release .release-item div.desc {
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
#release .release-item div.desc.markdown {
|
||||
background-color: transparent;
|
||||
}
|
||||
#release .release-item .download a {
|
||||
margin-right: 10px;
|
||||
}
|
||||
#release .release-item .dot {
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
background-color: #ccc;
|
||||
z-index: 999;
|
||||
position: absolute;
|
||||
display: block;
|
||||
left: -6px;
|
||||
top: 27px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #FFF;
|
||||
}
|
||||
#release #release-new-form {
|
||||
padding-top: 15px;
|
||||
}
|
||||
#admin-wrapper,
|
||||
#setting-wrapper {
|
||||
padding-bottom: 100px;
|
||||
|
|
|
@ -379,6 +379,7 @@ dt {
|
|||
}
|
||||
.btn-large {
|
||||
font-size: 14.4px;
|
||||
padding: .4em .9em;
|
||||
}
|
||||
.btn-green {
|
||||
background-color: #65ad4e;
|
||||
|
|
|
@ -403,6 +403,16 @@ function initRepo() {
|
|||
$clone_btn.tipsy({
|
||||
fade: true
|
||||
});
|
||||
|
||||
// Markdown preview.
|
||||
$('.markdown-preview').click(function() {
|
||||
var $this = $(this);
|
||||
$this.toggleAjax(function (resp) {
|
||||
$($this.data("preview")).html(resp);
|
||||
}, function () {
|
||||
$($this.data("preview")).html("no content");
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
// when user changes hook type, hide/show proper divs
|
||||
|
@ -423,6 +433,13 @@ function initHookTypeChange() {
|
|||
});
|
||||
}
|
||||
|
||||
function initRepoRelease() {
|
||||
$('#release-new-target-branch-list li').click(function() {
|
||||
$('#repo-branch-current').text($(this).text());
|
||||
$('#tag-target').val($(this).text());
|
||||
})
|
||||
}
|
||||
|
||||
function initRepoSetting() {
|
||||
// Options.
|
||||
// Confirmation of changing repository name.
|
||||
|
@ -753,8 +770,12 @@ $(document).ready(function () {
|
|||
initRepoCreate();
|
||||
}
|
||||
if ($('#repo-header').length) {
|
||||
initTimeSwitch();
|
||||
initRepo();
|
||||
}
|
||||
if ($('#release').length) {
|
||||
initRepoRelease();
|
||||
}
|
||||
if ($('#repo-setting').length) {
|
||||
initRepoSetting();
|
||||
}
|
||||
|
@ -819,3 +840,7 @@ function homepage() {
|
|||
$('#promo-form').attr('action', Gogs.AppSubUrl + '/user/sign_up');
|
||||
});
|
||||
}
|
||||
|
||||
String.prototype.endsWith = function (suffix) {
|
||||
return this.indexOf(suffix, this.length - suffix.length) !== -1;
|
||||
};
|
||||
|
|
8
public/ng/js/min/gogs-min.js
vendored
8
public/ng/js/min/gogs-min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -90,7 +90,8 @@
|
|||
}
|
||||
}
|
||||
#repo-content {
|
||||
padding: 18px 0;
|
||||
padding-top: 18px;
|
||||
padding-bottom: 18px;
|
||||
}
|
||||
.repo-wide-wrapper {
|
||||
padding: 18px;
|
||||
|
@ -383,6 +384,7 @@
|
|||
#repo-create-cancel {
|
||||
margin-left: 4em;
|
||||
}
|
||||
#release-new-target-branch-list,
|
||||
#repo-create-owner-list {
|
||||
top: 30px;
|
||||
left: 0;
|
||||
|
@ -410,6 +412,23 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
#release-new-target-branch-list {
|
||||
margin-top: -1px;
|
||||
min-width: 150px;
|
||||
}
|
||||
#release-new-title {
|
||||
margin-top: 10px;
|
||||
}
|
||||
#release-new-content {
|
||||
width: 100%;
|
||||
}
|
||||
#release-preview-btn .btn {
|
||||
border-left: 0;
|
||||
}
|
||||
#release-preview.markdown {
|
||||
margin-top: 5px;
|
||||
background-color: transparent;
|
||||
}
|
||||
.file-name {
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
@ -666,3 +685,90 @@
|
|||
margin-left: 44px;
|
||||
margin-top: -15px;
|
||||
}
|
||||
#release {
|
||||
h4 {
|
||||
font-size: 18px;
|
||||
small {
|
||||
font-weight: 400;
|
||||
line-height: 1;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
#release-head {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 20px;
|
||||
border-bottom: 1px solid #DDD;
|
||||
.btn {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
.release-item {
|
||||
&>div {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.label-green:hover {
|
||||
background-color: @labelGreenColor;
|
||||
}
|
||||
.release-meta {
|
||||
position: relative;
|
||||
float: left;
|
||||
padding-right: 15px;
|
||||
}
|
||||
.tag,
|
||||
.commit {
|
||||
display: block;
|
||||
margin-top: 12px;
|
||||
line-height: 20px;
|
||||
}
|
||||
.release-detail {
|
||||
margin-top: -1px;
|
||||
border-left: 1px solid #DDD;
|
||||
position: relative;
|
||||
float: left;
|
||||
padding-left: 15px;
|
||||
}
|
||||
.title {
|
||||
line-height: 25px;
|
||||
margin-top: 0;
|
||||
}
|
||||
p.info {
|
||||
line-height: 20px;
|
||||
color: #666;
|
||||
margin-bottom: 15px;
|
||||
>* {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.author {
|
||||
img {
|
||||
margin-top: -3px;
|
||||
}
|
||||
}
|
||||
div.desc {
|
||||
margin-bottom: 25px;
|
||||
&.markdown {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
.download a {
|
||||
margin-right: 10px;
|
||||
}
|
||||
.dot {
|
||||
width: 9px;
|
||||
height: 9px;
|
||||
background-color: #ccc;
|
||||
z-index: 999;
|
||||
position: absolute;
|
||||
display: block;
|
||||
left: -6px;
|
||||
top: 27px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #FFF;
|
||||
}
|
||||
}
|
||||
#release-new-form {
|
||||
padding-top: 15px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
}
|
||||
.btn-large {
|
||||
font-size: 1.2*@baseFontSize;
|
||||
padding: .4em .9em;
|
||||
}
|
||||
|
||||
.btn-green {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue