commit ac7889e754d21db77215acecba1cde969641085d
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2015-09-27T19:26:22Z |
| subject | Chinese font fix |
commit ac7889e754d21db77215acecba1cde969641085d
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2015-09-27T19:26:22Z
Chinese font fix
---
botanjs/src/Astro/Blog/AstroEdit/Flag.js | 17 ++++++++++-------
botanjs/src/Astro/Blog/Components/Entry/Blog.css | 3 ++-
botanjs/src/Astro/Blog/Components/Section.css | 1 +
botanjs/src/Astro/Blog/Components/SiteFile.css | 1 +
botanjs/src/Astro/Blog/Layout/MainFrame.css | 2 +-
botanjs/src/Astro/Build/Components/BuildReport.css | 18 +++++++++++++-----
botanjs/src/Astro/Build/Components/BuildReport.js | 4 ++--
7 files changed, 30 insertions(+), 16 deletions(-)
diff --git a/botanjs/src/Astro/Blog/AstroEdit/Flag.js b/botanjs/src/Astro/Blog/AstroEdit/Flag.js
index 87baaf4..3dc1917 100644
--- a/botanjs/src/Astro/Blog/AstroEdit/Flag.js
+++ b/botanjs/src/Astro/Blog/AstroEdit/Flag.js
@@ -51,9 +51,11 @@
var deleteFlag = function (e)
{
- var p = { flag: this.nodeValue, sflage: this.parentNode };
- postData( flagConf.URICount, p, confirmDelete.bind( p ), serverFailed );
e.stopPropagation();
+ var p = { stage: this.parentNode };
+ p[ id ] = this.nodeValue;
+ p[ "id" ] = id;
+ postData( flagConf.URICount, p, confirmDelete.bind( p ), serverFailed );
};
var confirmDelete = function (obj)
@@ -64,7 +66,7 @@
Dand.wrapc("ae_blockswitch",
[
Dand.textNode( "Are you sure you want to delete " )
- , Dand.wrap( "span", null, "flag_active", Dand.textNode( this.flag ) )
+ , Dand.wrap( "span", null, "flag_active", Dand.textNode( this[ id ] ) )
, Dand.textNode( " ?." )
]
)
@@ -79,7 +81,7 @@
: null
]
, "Delete", "No"
- , doDelete.bind(this)
+ , doDelete.bind( this )
).show();
};
@@ -87,9 +89,10 @@
{
if ( confirmed )
{
+ this[ "del" ] = 1;
postData(
flagConf.URISet
- , { flag: this.flag, del: 1 }
+ , this
, deleteSuccess.bind( this )
, serverFailed
);
@@ -99,9 +102,9 @@
var deleteSuccess = function(obj)
{
// Remove element
- this.sflage.parentNode.removeChild(this.sflage);
+ this.stage.parentNode.removeChild( this.stage );
// Delete reference
- delete flags[this.flag];
+ delete flags[ this[ id ] ];
};
var parseFlags = function ()
diff --git a/botanjs/src/Astro/Blog/Components/Entry/Blog.css b/botanjs/src/Astro/Blog/Components/Entry/Blog.css
index 3adedbd..31e1fe5 100644
--- a/botanjs/src/Astro/Blog/Components/Entry/Blog.css
+++ b/botanjs/src/Astro/Blog/Components/Entry/Blog.css
@@ -36,12 +36,13 @@
}
.b_bodyWrapper {
- font-family: custom-sans;
color: #555;
text-align: justify;
min-height: 155px;
}
+.b_bodyWrapper a { color: #f15a24; }
+
.b_notify { background-color: slategrey; }
.b_notify:before { content: 'Follow'; }
.b_notify:after { content: 'Unfollow'; }
diff --git a/botanjs/src/Astro/Blog/Components/Section.css b/botanjs/src/Astro/Blog/Components/Section.css
index 099fbe8..ace4998 100644
--- a/botanjs/src/Astro/Blog/Components/Section.css
+++ b/botanjs/src/Astro/Blog/Components/Section.css
@@ -1,6 +1,7 @@
.section-buttons > a {
display: inline-block;
color: white;
+ margin: 0.5em 0.2em;
background-color: darkslategray;
padding: 0.75em 0;
opacity: 0.5;
diff --git a/botanjs/src/Astro/Blog/Components/SiteFile.css b/botanjs/src/Astro/Blog/Components/SiteFile.css
index 15ba366..149ec0f 100644
--- a/botanjs/src/Astro/Blog/Components/SiteFile.css
+++ b/botanjs/src/Astro/Blog/Components/SiteFile.css
@@ -1,6 +1,7 @@
.site_file {
margin: 0.5em 0;
}
+.sf_regular sup { vertical-align: baseline; }
.sf_regular {
padding: 1em;
diff --git a/botanjs/src/Astro/Blog/Layout/MainFrame.css b/botanjs/src/Astro/Blog/Layout/MainFrame.css
index bf4d9bc..a71b426 100644
--- a/botanjs/src/Astro/Blog/Layout/MainFrame.css
+++ b/botanjs/src/Astro/Blog/Layout/MainFrame.css
@@ -4,7 +4,7 @@ html { background-color: #222; }
body {
background-color: #F0F0F0;
- font-family: custom-sans;
+ font-family: custom-sans,Helvetica,Arial,STHeiti,"Microsoft JhengHei","微軟正黑體";
}
pre { font-family: monospace; }
diff --git a/botanjs/src/Astro/Build/Components/BuildReport.css b/botanjs/src/Astro/Build/Components/BuildReport.css
index f79e31b..c615839 100644
--- a/botanjs/src/Astro/Build/Components/BuildReport.css
+++ b/botanjs/src/Astro/Build/Components/BuildReport.css
@@ -3,11 +3,8 @@
border-width: 1px;
- color: #C2C5C9;
- background-color: #0C121B;
-
- word-wrap: break-word;
- white-space: pre-wrap;
+ color: #C2C5C9;
+ background-color: #0C121B;
}
@@ -64,6 +61,17 @@
position: absolute;
}
+.section > div {
+ margin-bottom: -100px;
+ overflow-y: hidden;
+}
+
+.section > div > p {
+ padding-bottom: 100px;
+ overflow-x: scroll;
+}
+
+
.section:hover:before {
color: #909396;
}
diff --git a/botanjs/src/Astro/Build/Components/BuildReport.js b/botanjs/src/Astro/Build/Components/BuildReport.js
index d84a1d9..5aa0bb9 100644
--- a/botanjs/src/Astro/Build/Components/BuildReport.js
+++ b/botanjs/src/Astro/Build/Components/BuildReport.js
@@ -44,8 +44,8 @@
}
buildMessage.innerHTML = message
- .replace( sRegEx, "<pre class=\"section\" data-name=\"$1\">" )
- .replace( eRegEx, "</pre>" )
+ .replace( sRegEx, "<pre class=\"section\" data-name=\"$1\"><div><p>" )
+ .replace( eRegEx, "</p></div></pre>" )
.replace( /: (failed|ok)\n/g, ": <span class=\"status $1\">$1</span>\n" )
;