From a851b77ac9e5d95f71fb0e98cd134cd0e692f782 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Tue, 6 Jun 2017 15:41:27 -0400 Subject: [PATCH] markup: able to display image from IPython notebook (#4366) --- gogs.go | 2 +- public/config.codekit | 4 ++-- public/css/gogs.css | 3 +++ public/less/_repository.less | 6 +++++- templates/.VERSION | 2 +- templates/repo/view_file.tmpl | 9 +++++++-- 6 files changed, 19 insertions(+), 7 deletions(-) diff --git a/gogs.go b/gogs.go index 42add9799..c720dce38 100644 --- a/gogs.go +++ b/gogs.go @@ -16,7 +16,7 @@ import ( "github.com/gogits/gogs/pkg/setting" ) -const APP_VER = "0.11.16.0605" +const APP_VER = "0.11.17.0606" func init() { setting.AppVer = APP_VER diff --git a/public/config.codekit b/public/config.codekit index 245159c5a..60412298c 100644 --- a/public/config.codekit +++ b/public/config.codekit @@ -1,6 +1,6 @@ { "CodeKitInfo": "This is a CodeKit 2.x project configuration file. It is designed to sync project settings across multiple machines. MODIFYING THE CONTENTS OF THIS FILE IS A POOR LIFE DECISION. If you do so, you will likely cause CodeKit to crash. This file is not useful unless accompanied by the project that created it in CodeKit 2. This file is not backwards-compatible with CodeKit 1.x. For more information, see: http:\/\/incident57.com\/codekit", -"creatorBuild": "19127", +"creatorBuild": "19115", "files": { "\/css\/github.min.css": { "fileType": 16, @@ -66,7 +66,7 @@ "fileType": 32768, "ignore": 0, "ignoreWasSetByUser": 0, - "initialSize": 514087, + "initialSize": 4048, "inputAbbreviatedPath": "\/img\/avatar_default.png", "outputAbbreviatedPath": "\/img\/avatar_default.png", "outputPathIsOutsideProject": 0, diff --git a/public/css/gogs.css b/public/css/gogs.css index 48c3d4052..1f023210d 100644 --- a/public/css/gogs.css +++ b/public/css/gogs.css @@ -1402,6 +1402,9 @@ footer .ui.language .menu { .repository.file.list #file-content #ipython-notebook .nb-cell.nb-heading-cell { margin-top: 0.5em; } +.repository.file.list #file-content #ipython-notebook .nb-cell img { + max-width: 100%; +} .repository.file.list #file-content #ipython-notebook .nb-raw-cell { white-space: pre-wrap; background-color: #f5f2f0; diff --git a/public/less/_repository.less b/public/less/_repository.less index 5260af618..fd48fd397 100644 --- a/public/less/_repository.less +++ b/public/less/_repository.less @@ -324,6 +324,10 @@ &.nb-heading-cell { margin-top: 0.5em; } + + img { + max-width: 100%; + } } .nb-raw-cell { @@ -370,7 +374,7 @@ font-size: 14px; } img { - max-width: 100%; + max-width: 100%; } table { border: 1px solid #000; diff --git a/templates/.VERSION b/templates/.VERSION index 250a50408..08cfb8f7b 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.11.16.0605 \ No newline at end of file +0.11.17.0606 \ No newline at end of file diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl index b8d6c1e48..dea9493e4 100644 --- a/templates/repo/view_file.tmpl +++ b/templates/repo/view_file.tmpl @@ -42,7 +42,6 @@ {{else if .IsIPythonNotebook}}