commit c0ab22eaeecdd64576d38931a1abd21f75194a94
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2016-02-06T21:20:41Z |
| subject | Minor adjustments |
commit c0ab22eaeecdd64576d38931a1abd21f75194a94
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2016-02-06T21:20:41Z
Minor adjustments
---
botanjs/src/Astro/Blog/AstroEdit/Article.js | 6 +++++
.../Blog/AstroEdit/Visualizer/Snippet/Video.js | 4 +--
botanjs/src/Astro/Blog/Components/Entry/Blog.css | 9 +++++++
botanjs/src/Astro/Blog/Components/Entry/Blog.js | 29 +++++++++++++++++++++-
botanjs/src/Astro/Blog/Components/VerticalNote.css | 2 +-
botanjs/src/Astro/Blog/Components/Video.js | 4 +--
6 files changed, 48 insertions(+), 6 deletions(-)
diff --git a/botanjs/src/Astro/Blog/AstroEdit/Article.js b/botanjs/src/Astro/Blog/AstroEdit/Article.js
index a25955b..6aea58a 100644
--- a/botanjs/src/Astro/Blog/AstroEdit/Article.js
+++ b/botanjs/src/Astro/Blog/AstroEdit/Article.js
@@ -144,6 +144,12 @@
{
var t = ae_stitles[i];
var p = ae_panel_section[i];
+ // If they are snippets or sections
+ if( i == 2 || i == 3 )
+ {
+ p.style.height = "auto";
+ continue;
+ }
t.addEventListener( "Click", function( e )
{
var p = this.p;
diff --git a/botanjs/src/Astro/Blog/AstroEdit/Visualizer/Snippet/Video.js b/botanjs/src/Astro/Blog/AstroEdit/Visualizer/Snippet/Video.js
index ea7437c..f14fcbb 100644
--- a/botanjs/src/Astro/Blog/AstroEdit/Visualizer/Snippet/Video.js
+++ b/botanjs/src/Astro/Blog/AstroEdit/Visualizer/Snippet/Video.js
@@ -19,7 +19,7 @@
, getVimeoThumbnail = function (vtag)
{
- getData("http://vimeo.com/api/oembed.json?url=http%3A//vimeo.com/" + vtag.getAttribute("data-value"), setThumbnail.bind(vtag), noThumb.bind(vtag));
+ getData("https://vimeo.com/api/oembed.json?url=https%3A//vimeo.com/" + vtag.getAttribute("data-value"), setThumbnail.bind(vtag), noThumb.bind(vtag));
}
, noThumb = function ()
@@ -92,7 +92,7 @@
, new DataKey("type", i)
, new IKey("style"
, "width: 640px; height: 390px;"
- + ( (i[0] == "v") ? "" : ("background: black url(http://img.youtube.com/vi/" + v + "/hqdefault.jpg) no-repeat center center;") )
+ + ( (i[0] == "v") ? "" : ("background: black url(https://img.youtube.com/vi/" + v + "/hqdefault.jpg) no-repeat center center;") )
)
]
);
diff --git a/botanjs/src/Astro/Blog/Components/Entry/Blog.css b/botanjs/src/Astro/Blog/Components/Entry/Blog.css
index fe7e3fd..addcd5b 100644
--- a/botanjs/src/Astro/Blog/Components/Entry/Blog.css
+++ b/botanjs/src/Astro/Blog/Components/Entry/Blog.css
@@ -64,6 +64,15 @@
text-align: right;
}
+.b_entry .top-date {
+ float: right;
+ opacity: 0.35;
+}
+
+.b_entry .top-date:hover {
+ opacity: 0.6;
+}
+
.b_date, .b_mdate {
text-align: right;
}
diff --git a/botanjs/src/Astro/Blog/Components/Entry/Blog.js b/botanjs/src/Astro/Blog/Components/Entry/Blog.js
index 8f10fbc..d211410 100644
--- a/botanjs/src/Astro/Blog/Components/Entry/Blog.js
+++ b/botanjs/src/Astro/Blog/Components/Entry/Blog.js
@@ -1 +1,28 @@
-// __namespace( "Astro.Blog.Components.Entry.Blog" );
+(function(){
+ var ns = __namespace( "Astro.Blog.Components.Entry.Blog" );
+
+ /** @type {Dandelion} */
+ var Dand = __import( "Dandelion" );
+ /** @type {Astro.Bootstrap} */
+ var Bootstrap = __import( "Astro.Bootstrap" );
+ /** @type {Astro.utils.Date} */
+ var XDate = __import( "Astro.utils.Date" );
+ /** @type {System.Debug} */
+ var debug = __import( "System.Debug" );
+
+ var init = function()
+ {
+ var entry = Dand.id( "b_entry", true );
+
+ var time = new Date( entry.getDAttribute( "time" ) );
+ entry.element.insertBefore(
+ Dand.wrapc(
+ "top-date"
+ , Dand.textNode( XDate.chinese( time ) )
+ )
+ , entry.first( 1 )
+ );
+ };
+
+ Bootstrap.regInit( init );
+})();
diff --git a/botanjs/src/Astro/Blog/Components/VerticalNote.css b/botanjs/src/Astro/Blog/Components/VerticalNote.css
index 9961c1f..88318c9 100644
--- a/botanjs/src/Astro/Blog/Components/VerticalNote.css
+++ b/botanjs/src/Astro/Blog/Components/VerticalNote.css
@@ -75,7 +75,7 @@
}
.vertical-text.source {
- height: 400px;
+ height: 360px;
border: 0;
padding: 0;
visibility: hidden;
diff --git a/botanjs/src/Astro/Blog/Components/Video.js b/botanjs/src/Astro/Blog/Components/Video.js
index fd4530c..4d6196c 100644
--- a/botanjs/src/Astro/Blog/Components/Video.js
+++ b/botanjs/src/Astro/Blog/Components/Video.js
@@ -30,7 +30,7 @@
type = type.split( "_" )[0];
// showVimeoPlayer / showYoutubePlayer
- var cfunc = function( e ) { createPlayer( this.vid, "http://www.youtube.com/embed/" ); };
+ var cfunc = function( e ) { createPlayer( this.vid, "https://www.youtube.com/embed/" ); };
if( type[0] == "v" )
{
@@ -83,7 +83,7 @@
var getVimeoThumbnail = function ( vtag )
{
getData(
- "http://vimeo.com/api/oembed.json?url=http%3A//vimeo.com/" + vtag.getAttribute( "value" )
+ "https://vimeo.com/api/oembed.json?url=https%3A//vimeo.com/" + vtag.getAttribute( "value" )
, parseObj.bind( vtag )
, noThumb.bind( vtag )
);