From 54464ce3951a3acdeac6a0a5f973399501ca0123 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=9F=E9=85=8C=20=E9=B5=AC=E5=85=84?= Date: Mon, 21 Sep 2015 02:04:53 +0800 Subject: [PATCH] minor bugfixes --- .../src/Astro/Blog/AstroEdit/SiteLibrary.js | 9 +++++++-- .../Blog/AstroEdit/Visualizer/Snippet/Code.js | 19 ++++++++++++++----- botanjs/src/Astro/Blog/Element/Header.css | 6 +++--- botanjs/src/Astro/Blog/Layout/MainFrame.css | 2 ++ .../Astro/Build/Components/BuildReport.css | 6 ++++++ 5 files changed, 32 insertions(+), 10 deletions(-) diff --git a/botanjs/src/Astro/Blog/AstroEdit/SiteLibrary.js b/botanjs/src/Astro/Blog/AstroEdit/SiteLibrary.js index 22db0f3..8949ce5 100644 --- a/botanjs/src/Astro/Blog/AstroEdit/SiteLibrary.js +++ b/botanjs/src/Astro/Blog/AstroEdit/SiteLibrary.js @@ -23,6 +23,8 @@ var IDOMObject = __import( "Dandelion.IDOMObject" ); /** @type {Dandelion.IDOMElement} */ var IDOMElement = __import( "Dandelion.IDOMElement" ); + /** @type {Astro.Blog.Config} */ + var Conf = __import( "Astro.Blog.Config" ); var postData = __import( "System.Net.postData" ); var prettyDate = __import( "Astro.utils.Date.pretty" ); @@ -38,6 +40,9 @@ , holdingCtrl = false , holdingShift = false + /** @type {_AstConf_.SiteFile} */ + , config = Conf.get( "SiteFile" ) + , contentPanel = Dand.id("asl_viewer") , canvasView , contextMenu @@ -301,13 +306,13 @@ )).show(); } - , copyItemLink = function () { return "http://file.astropenguin.net/blog/site-library/" + canvasView.idata.href; } + , copyItemLink = function () { return config.f_host + canvasView.idata.href; } , copyHash = function () { return canvasView.idata.hash; } , openAction = function () { if(canvasView.idata.isCollection) openCollection(IDOMElement(canvasView.idata.stage).getDAttribute("id")); - else window.open("http://file.astropenguin.net/blog/site-library/" + canvasView.idata.href); + else window.open( config.f_host + canvasView.idata.href); } //// ContextMenu Handlers: Selections diff --git a/botanjs/src/Astro/Blog/AstroEdit/Visualizer/Snippet/Code.js b/botanjs/src/Astro/Blog/AstroEdit/Visualizer/Snippet/Code.js index db78df1..205ca1b 100644 --- a/botanjs/src/Astro/Blog/AstroEdit/Visualizer/Snippet/Code.js +++ b/botanjs/src/Astro/Blog/AstroEdit/Visualizer/Snippet/Code.js @@ -22,7 +22,7 @@ "Plain text" , "plain" , "AS3" , "as3" , "bash" , "bash" - , "C#" , "c#" + , "C#" , "csharp" , "C/C++" , "c" , "CSS" , "css" , "php" , "php" @@ -111,8 +111,17 @@ lang = this.lang[this.pSnippeCodeChoice = this.lang.selectedIndex].value; code = this.code.value; } - - + + var langName; + for( var i in codeLangs ) + { + if( codeLangs[i].keyValue == lang ) + { + langName = codeLangs[i].keyName; + break; + } + } + if ( submitted && code ) { if (!stage) @@ -122,7 +131,7 @@ "v_box" , [ Dand.wrapne( "pre", code ) - , Dand.wrapc( "v_description", "Script language: " + lang ) + , Dand.wrapc( "v_description", "Script language: " + langName ) ] , [ new DataKey( "value", code ) @@ -146,7 +155,7 @@ temp = stage.lastChild; temp.removeChild( temp.firstChild ); - temp.appendChild( Dand.textNode( "Script language: " + lang ) ); + temp.appendChild( Dand.textNode( "Script language: " + langName ) ); temp = stage; diff --git a/botanjs/src/Astro/Blog/Element/Header.css b/botanjs/src/Astro/Blog/Element/Header.css index 4bb9637..12b5282 100644 --- a/botanjs/src/Astro/Blog/Element/Header.css +++ b/botanjs/src/Astro/Blog/Element/Header.css @@ -55,7 +55,7 @@ header { box-shadow: inset 0 0 10px 0 black; background-image: url(http://file.astropenguin.net/blog/layout-images/home.png); - background-position: 50% 0; + background-position: 50% 90%; position: absolute; overflow: hidden; @@ -71,7 +71,7 @@ header { left: 0; background-color: rgba( 255, 255, 255, 0.6 ); } - +/* .begin-wrapper:before { content: ""; position: absolute; @@ -86,7 +86,7 @@ header { opacity: 0.6; } - +*/ .contact-wrapper { text-align: center; position: relative; diff --git a/botanjs/src/Astro/Blog/Layout/MainFrame.css b/botanjs/src/Astro/Blog/Layout/MainFrame.css index 919a8e9..bf4d9bc 100644 --- a/botanjs/src/Astro/Blog/Layout/MainFrame.css +++ b/botanjs/src/Astro/Blog/Layout/MainFrame.css @@ -25,6 +25,8 @@ a { text-decoration: none; } +sup { vertical-align: super; } + a:hover { text-decoration: underline; } h1, h2, h3, h4, .h1, .h2, .h3, .h4 { font-family: custom-serif; } diff --git a/botanjs/src/Astro/Build/Components/BuildReport.css b/botanjs/src/Astro/Build/Components/BuildReport.css index 18db73b..f79e31b 100644 --- a/botanjs/src/Astro/Build/Components/BuildReport.css +++ b/botanjs/src/Astro/Build/Components/BuildReport.css @@ -7,6 +7,7 @@ background-color: #0C121B; word-wrap: break-word; + white-space: pre-wrap; } @@ -27,6 +28,11 @@ padding: 0.2em 0; } +#commit-message { + padding: 1em; + background-color: #EEE; +} + #commit-sha { color: #666; } #commit-sha.ok { color: royalblue; } #commit-sha.failed { color: orangered; }