You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by ah...@apache.org on 2017/03/22 02:05:57 UTC
svn commit: r1788047 - in /zeppelin/site:
assets/themes/zeppelin/css/style.css
assets/themes/zeppelin/js/medium.controller.js medium.md
Author: ahyoungryu
Date: Wed Mar 22 02:05:57 2017
New Revision: 1788047
URL: http://svn.apache.org/viewvc?rev=1788047&view=rev
Log: (empty)
Modified:
zeppelin/site/assets/themes/zeppelin/css/style.css
zeppelin/site/assets/themes/zeppelin/js/medium.controller.js
zeppelin/site/medium.md
Modified: zeppelin/site/assets/themes/zeppelin/css/style.css
URL: http://svn.apache.org/viewvc/zeppelin/site/assets/themes/zeppelin/css/style.css?rev=1788047&r1=1788046&r2=1788047&view=diff
==============================================================================
--- zeppelin/site/assets/themes/zeppelin/css/style.css (original)
+++ zeppelin/site/assets/themes/zeppelin/css/style.css Wed Mar 22 02:05:57 2017
@@ -845,14 +845,24 @@ a.anchorjs-link:hover { text-decoration:
margin-bottom: 14px;
letter-spacing: -.02em;
font-weight: 200;
- font-size: 15px;
+ font-size: 16px;
line-height: 1.3;
- color: rgba(0,0,0,.5);
+ color: #000;
}
-.blogList .blogPublished {
+.blogList .blogAuthor {
font-weight: 200;
color: #00ab6b;
+ float: left;
+}
+
+.blogList .blogPublishDate::before {
+ content: '\00B7';
+}
+
+.blogList .blogPublishDate {
+ font-weight: 200;
+ color: rgba(0,0,0,.44);
}
/* Demo img thumbnail */
Modified: zeppelin/site/assets/themes/zeppelin/js/medium.controller.js
URL: http://svn.apache.org/viewvc/zeppelin/site/assets/themes/zeppelin/js/medium.controller.js?rev=1788047&r1=1788046&r2=1788047&view=diff
==============================================================================
--- zeppelin/site/assets/themes/zeppelin/js/medium.controller.js (original)
+++ zeppelin/site/assets/themes/zeppelin/js/medium.controller.js Wed Mar 22 02:05:57 2017
@@ -4,30 +4,44 @@ angular.module("app").controller("Medium
var postInfo = $scope.mediumPost[0].items
var postInfoArray = []
- function unicodeToChar(text) {
- return text.replace(/\&#x[\dA-F]{4}/gi,
- function (match) {
- return String.fromCharCode(parseInt(match.replace(/\\u/g, ''), 16));
- })
+ var init = function () {
+ createPostInfoArray()
+ }
+
+ var unicodeToChar = function (text) {
+ return text.replace(/\&#x[\dA-F]{4}/gi,
+ function (match) {
+ return String.fromCharCode(parseInt(match.replace(/\\u/g, ''), 16));
+ })
+ }
+
+ var truncateString = function (string) {
+ return string.length > 150 ? string.substring(0, 150) + '...' : string
}
- for (var idx in postInfo) {
- var eachPosts = postInfo[idx]
+ var createPostInfoArray = function () {
+ for (var idx in postInfo) {
+ var post = postInfo[idx]
+
+ // 1. remove HTML tag from description value
+ var regExString = /(<([^>]+)>)/ig
+ post.description = post.description.replace(regExString, '')
+ // 2. remove 'Continue reading on Apache Zeppelin Stories »'
+ post.description = post.description.replace(/Continue reading on Apache Zeppelin Stories »/g, '')
+ // 3. replace unicode char -> string
+ post.description = unicodeToChar(post.description)
+ // 4. truncate description string & attach '...'
+ post.description = truncateString(post.description)
+
+ // parse strigified date to 'MMMM Do, YYYY' format (e.g October 4th, 2016)
+ post.created = new Date(post.created)
+ post.created = moment(post.created).format("MMMM Do, YYYY")
+
+ postInfoArray.push(post)
+ }
- // 1. remove HTML tag from description value
- var regExString = /(<([^>]+)>)/ig
- postInfo[idx].description = postInfo[idx].description.replace(regExString, '')
- // 2. remove 'Continue reading on Apache Zeppelin Stories »'
- postInfo[idx].description = postInfo[idx].description.replace(/Continue reading on Apache Zeppelin Stories »/g, '')
- // 3. replace unicode char -> string
- postInfo[idx].description = unicodeToChar(postInfo[idx].description)
-
- // parse strigified date to 'MMMM Do, YYYY' format (e.g October 4th, 2016)
- postInfo[idx].created = new Date(postInfo[idx].created)
- postInfo[idx].created = moment(postInfo[idx].created).format("MMMM Do, YYYY")
-
- postInfoArray.push(postInfo[idx])
+ $scope.postInfoArray = postInfoArray
}
- $scope.postInfoArray = postInfoArray
-});
\ No newline at end of file
+ init()
+})
\ No newline at end of file
Modified: zeppelin/site/medium.md
URL: http://svn.apache.org/viewvc/zeppelin/site/medium.md?rev=1788047&r1=1788046&r2=1788047&view=diff
==============================================================================
--- zeppelin/site/medium.md (original)
+++ zeppelin/site/medium.md Wed Mar 22 02:05:57 2017
@@ -33,9 +33,11 @@ limitations under the License.
<div class="blogDescription">
{% raw %}{{post.description}}{% endraw %}
</div>
- <div class="blogPublished">
- <i class="fa fa-calendar" aria-hidden="true"></i>
- {% raw %}{{post.created}}{% endraw %}
+ <div class="blogAuthor">
+ {% raw %}{{post.author}} {% endraw %}
+ </div>
+ <div class="blogPublishDate">
+ Published on {% raw %}{{post.created}}{% endraw %}
</div>
</div>
</div>