aboutsummaryrefslogtreecommitdiffstats
path: root/public
diff options
context:
space:
mode:
authorslene <vslene@gmail.com>2014-03-20 21:02:52 +0800
committerslene <vslene@gmail.com>2014-03-20 21:02:52 +0800
commitc6bd723ce17ae3c0495f84e46a9296b30db5aee1 (patch)
treea2153db027aa03db50f2e7f841bd2545fa65a2bd /public
parent21379e30a18fed473ae2bbeb41332919ff80497d (diff)
parentc7b6fbfd46fe465b5103ecc0b743ea009eb1e586 (diff)
downloadgitea-c6bd723ce17ae3c0495f84e46a9296b30db5aee1.tar.gz
gitea-c6bd723ce17ae3c0495f84e46a9296b30db5aee1.zip
Merge branch 'master' of github.com:gogits/gogs
Conflicts: public/js/app.js
Diffstat (limited to 'public')
-rwxr-xr-xpublic/css/gogs.css32
-rw-r--r--public/js/app.js30
2 files changed, 56 insertions, 6 deletions
diff --git a/public/css/gogs.css b/public/css/gogs.css
index 83d1b96fe2..eb5f7ad2a5 100755
--- a/public/css/gogs.css
+++ b/public/css/gogs.css
@@ -644,7 +644,19 @@ html, body {
}
.file-content .file-body {
- padding: 30px 30px 50px;
+ padding: 0;
+ border: none;
+ background-color: #FFF;
+}
+
+.file-content .file-body pre {
+ background-color: #FFF;
+ border: none;
+}
+
+.file-content .markdown > pre > ol.linenums > li:first-child {
+ padding-top: 0;
+ margin-top: 0;
}
.file-content .file-body.file-code {
@@ -732,6 +744,24 @@ html, body {
background-color: #FFF;
}
+.commit-list .date {
+ width: 120px;
+}
+
+.guide-box pre, .guide-box .input-group {
+ margin-top: 20px;
+ margin-bottom: 30px;
+ line-height: 24px;
+}
+
+.guide-box input[readonly] {
+ background-color: #FFF;
+}
+
+.guide-box {
+ margin-top: 20px;
+}
+
/* wrapper and footer */
#wrapper {
diff --git a/public/js/app.js b/public/js/app.js
index f3e8d6d1d2..12f9e7f359 100644
--- a/public/js/app.js
+++ b/public/js/app.js
@@ -41,15 +41,15 @@ var Gogits = {
});
};
Gogits.initPopovers = function () {
- var hideAllPopovers = function() {
- $('[data-toggle=popover]').each(function() {
+ var hideAllPopovers = function () {
+ $('[data-toggle=popover]').each(function () {
$(this).popover('hide');
- });
+ });
};
- $(document).on('click', function(e) {
+ $(document).on('click', function (e) {
var $e = $(e.target);
- if($e.data('toggle') == 'popover'||$e.parents("[data-toggle=popover], .popover").length > 0){
+ if ($e.data('toggle') == 'popover' || $e.parents("[data-toggle=popover], .popover").length > 0) {
return;
}
hideAllPopovers();
@@ -161,6 +161,23 @@ function initUserSetting() {
});
}
+function initRepository() {
+ var $guide = $('.guide-box');
+ if ($guide.length) {
+ var $url = $('#guide-clone-url');
+ $guide.find('button[data-url]').on("click",function () {
+ var $this = $(this);
+ if (!$this.hasClass('btn-primary')) {
+ $guide.find('.btn-primary').removeClass('btn-primary').addClass("btn-default");
+ $(this).addClass('btn-primary').removeClass('btn-default');
+ $url.val($this.data("url"));
+ $guide.find('span.clone-url').text($this.data('url'));
+ }
+ }).eq(0).trigger("click");
+ // todo copy to clipboard
+ }
+}
+
(function ($) {
$(function () {
initCore();
@@ -171,5 +188,8 @@ function initUserSetting() {
if (body.data("page") == "user") {
initUserSetting();
}
+ if ($('.gogs-repo-nav').length) {
+ initRepository();
+ }
});
})(jQuery);