Skip to content

Commit

Permalink
【36kr】使用新版 Service 替换原 Rss
Browse files Browse the repository at this point in the history
  • Loading branch information
Houfeng committed Nov 8, 2015
1 parent 630feca commit f68a1fd
Show file tree
Hide file tree
Showing 13 changed files with 274 additions and 179 deletions.
1 change: 1 addition & 0 deletions 36Kr/.project
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
</buildCommand>
</buildSpec>
<natures>
<nature>com.aptana.projects.webnature</nature>
<nature>com.pandora.projects.ui.MKeyNature</nature>
</natures>
</projectDescription>
136 changes: 100 additions & 36 deletions 36Kr/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,57 +9,121 @@
<link rel="stylesheet" href="css/mui.min.css">
<link rel="stylesheet" href="css/app.css" />
<link rel="stylesheet" href="css/about.css" />
<style>
body,
.mui-content {
background-color: #fff;
/*efeff4*/

margin: 0px;
padding: 15px 0px;
}
.article {
font-size: 14px;
text-indent: 2em;
}
#qrcode {
width: 280px;
margin: 5px auto;
}
.mui-btn,
.mui-btn:hover,
.mui-btn:active {
background-color: #4a82d1;
color: #fff;
border: solid 1px #4a82d1;
width: 165px;
margin-bottom: 10px;
}
.mui-btn-group {
text-align: center;
}
</style>
</head>

<body>
<header class="mui-bar mui-bar-nav" style="position: static;">
<header class="mui-bar mui-bar-nav">
<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
<h1 id="title" class="mui-title kr-title"><span class="kr-logo">36Kr</span></h1>
</header>
<div class="container">
<div class="container mui-content">
<article class="single-post-article">
<div class="content-wrapper-single">
<section class="article">
<h3 id="toc_0">36氪,专注互联网创业。</h3>
<p>应用版本:1.3.6</p>
<p>2010年12月8日,36氪作为科技媒体正式上线,其名字源于元素周期表的第36号元素“氪”,化学符号为 Kr,一个稳定、独立,不易与其他其他物质发生化学作用的元素。传说中的氪星是超人的故乡。</p>

<p>经历四年成长,36氪不仅有备受顶级投资机构关注的高效互联网融资平台(氪加),还有专注于互联网创业项目孵化的氪空间(Kr Space),在全中国首创了“不收费、不占股、全球资本,平台服务”的新型孵化器模式。同时,36氪的科技媒体,已然成为最前沿科技资讯的平台,也是互联网创业者寻求报道,接洽资本的首选入口。由媒体、氪加和氪空间三条产品线,构成了36氪专注互联网创业的生态圈模式。</p>

<p>创始人兼CEO刘成城(Liu CC),1988年出生在江苏盐城。中国科学院硕士,在2013年被《福布斯》评为“中国30岁以下的创业者前30名”之一 。</p>

<p>36氪从4个创始人到现在100人,90%的员工都是85后,平均年龄25岁,我们更了解年轻人,我们更了解创业者,我们更了解创投的生态环境。年轻开放的团队,从早午餐到下午茶,从每周健康按摩到集体出境旅行,让每位员工的付出与福利同步前进。</p>

<h3 id="toc_1">我们的产品</h3>

<ul>
<li>氪加:高效的线上创业融资平台</li>
</ul>

<p>氪加是36氪从创业观察者到践行者的升级,从媒体到平台到延伸。我们认为,只有存在更活跃、透明的投融资对接市场,投资人才能够最有效地发现创业者的优秀价值。氪加团队由资深媒体记者、产品技术开发团队、专业财务顾问、数据库人才组成。同时,在这一平台内也活跃着逾千名国内外专业投资人,以及数以万计的互联网创业者。</p>

<p>氪加的理念在于,创造一个为创业者展示项目,吸引融资的平台,筛选并匹配优秀专业的投资机构和投资人。截止至目前为止,已有83个项目正在平台挂牌融资,其中30+个已经完成融资,同时在后代申请挂牌的项目也已经超过3000家,这个数字每天都在被不断刷新。</p>

<ul>
<li>氪空间</li>
</ul>

<p>专业专注的创业项目线下孵化器。自2014年4月份上线以来,报名申请入驻氪空间的创业项目超过5000个。到2014年10月为止,已有29家团队入驻过氪空间。第一批项目共12个,其中11个完成融资并孵化成功。全部项目总融资额达到 5000 万人民币,最大单笔融资 1000 万,入驻后平均融资周期仅为1个月 。</p>

<ul>
<li>36氪主站 www.36kr.com</li>
</ul>

<p>自2010年年底主站上线至今,36氪媒体获得了高速的成长。目前主站单月UV超过500万,PV达到1000万以上。36氪的科技媒体部门坚持不收车马费,不发软文,自觉做最有原则的科技媒体。</p>
<p>&nbsp;</p>
36氪官网为你提供创业资讯、科技新闻、投融资对接、股权投资等创业服务,致力成为创业者可以依赖的创业服务平台,36氪让创业更简单!
</section>
<img id="qrcode" src="img/qrcode.png" />
<section class="mui-btn-group">
<a id="share" class="mui-btn">分享</a>
<a id="shortcut" class="mui-btn">创建桌面快捷方式</a>
</section>
</div>
</article>

</div>
<script type="text/javascript" charset="UTF-8" src="js/mui.min.js"></script>
<script type="text/javascript" charset="UTF-8" src="js/share.js"></script>
<script>
mui.init();
mui.init({
gestureConfig: {
longtap: true,
}
});
var qrcodeEl = document.getElementById("qrcode");
qrcodeEl.addEventListener('longtap', function() {
plus.nativeUI.actionSheet({
cancel: '取消',
buttons: [{
title: '保存到相册'
}]
}, function(e) {
var index = e.index;
if (e.index === 1) {
plus.gallery.save(qrcodeEl.src, function() {
mui.toast('保存成功');
}, function() {
mui.toast('保存失败,请重试!');
});
}
});
});
if (mui.os.plus && mui.os.android) {
var Intent = null,
main = null;
// H5 plus事件处理
mui.plusReady(function() {
Intent = plus.android.importClass("android.content.Intent");
main = plus.android.runtimeMainActivity();
});
document.getElementById("share").addEventListener('tap', function(event) {
event.stopPropagation();
share.open({
title: '致力成为创业者可以依赖的创业服务平台,36氪让创业更简单!(http://m3w.cn/s/H5EC86117?scene=share&__streamapp)',
content: '致力成为创业者可以依赖的创业服务平台,36氪让创业更简单!(http://m3w.cn/s/H5EC86117?scene=share&__streamapp)',
href: 'http://m3w.cn/s/H5EC86117?scene=share&__streamapp'
});
// var intent = new Intent(Intent.ACTION_SEND);
// intent.setType("text/plain");
// intent.putExtra(Intent.EXTRA_TEXT, '致力成为创业者可以依赖的创业服务平台,36氪让创业更简单!(http://m3w.cn/s/H5EC86117?scene=share&__streamapp)');
// intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// main.startActivity(Intent.createChooser(intent, "系统分享"));
});
if (mui.os.stream) {
var blacklist = ['QiKU', 'smartisan'];
document.getElementById("shortcut").addEventListener('tap', function() {
//创建快捷方式
if (~blacklist.indexOf(plus.device.vendor)) {
mui.toast('此手机上不支持创建桌面快捷方式');
return false;
}
if (mui.isFunction(plus.navigator.createShortcut)) {
plus.navigator.createShortcut({
name: "36氪资讯",
icon: "img/icon.png"
});
}
});
}
}
</script>
</body>

Expand Down
47 changes: 8 additions & 39 deletions 36Kr/appStream.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,23 @@
{
"version": "1.3.6",
"protocol": [
"http",
"https"
],
"version": "1.0",
"protocol": ["http", "https"],
"rooturl": "",
"index": {
"href": "index.html",
"resources": [
"manifest.json",
"js/app.js",
"js/mui.min.js",
"css/app.css",
"img/36kr_2x.png",
"img/icon.png",
"img/bg.png",
"css/mui.min.css",
"fonts/mui.ttf",
"list.html",
"img/blank.jpg",
"js/html5sql.js",
"js/feed.js",
"js/news.js",
"tmpl/news_item.js"
],
"refer": [
"detail_main.html"
],
"resources": ["manifest.json", "js/app.js", "js/mui.min.js", "css/app.css", "img/36kr_2x.png", "img/icon.png", "img/bg.png", "css/mui.min.css", "fonts/mui.ttf", "list.html", "img/blank.jpg", "js/html5sql.js", "js/feed.js", "js/news.js", "tmpl/news_item.js"],
"refer": ["detail_main.html"],
"priority": 0
},
"pages": {
"detail_main.html": {
"href": "detail_main.html",
"resources": [],
"refer": [
"detail.html"
],
"refer": ["detail.html"],
"priority": 0
},
"detail.html": {
"href": "detail.html",
"resources": [
"js/html5sql.js",
"js/news.js",
"img/blank_big.jpg"
],
"resources": ["js/html5sql.js", "js/news.js", "img/blank_big.jpg"],
"priority": 0
},
"browser.html": {
Expand All @@ -59,15 +32,11 @@
},
"about.html": {
"href": "about.html",
"resources": [
"css/about.css"
],
"resources": ["js/share.js", "css/about.css", "img/qrcode.png"],
"priority": 0
}
},
"idle": {
"resources": [
"img/36kr.png"
]
"resources": ["img/36kr.png"]
}
}
4 changes: 2 additions & 2 deletions 36Kr/css/about.css
Original file line number Diff line number Diff line change
Expand Up @@ -1745,7 +1745,7 @@ only screen and (min-resolution: 1.3dppx) {
}
@media screen and (max-width: 48em) {
.container {
margin-top: 30px
margin-top: 15px
}
}
#article-single .container {
Expand Down Expand Up @@ -2237,7 +2237,7 @@ a:visited .new {
.content-wrapper-single {
max-width: 700px;
margin: 0 auto;
padding: 0 30px
padding: 0 20px
}
#article-single .single-post {
margin-top: 30px
Expand Down
Binary file added 36Kr/img/Untitled.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 36Kr/img/qrcode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion 36Kr/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ <h1 id="title" class="mui-title kr-title"><span class="kr-logo">36Kr</span></h1>
var shortcut = plus.storage.getItem("SHORTCUT");
if (!shortcut) {
plus.navigator.createShortcut({
name: "36Kr资讯",
name: "36氪资讯",
icon: "img/icon.png"
});
plus.storage.setItem("SHORTCUT", "true");
Expand Down
64 changes: 15 additions & 49 deletions 36Kr/js/feed.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
(function($) {
//暂时无用
var getNodeValue = function(xmlObj, tagName) {
var value = "";
var nodes = xmlObj.getElementsByTagName(tagName);
if (nodes && nodes.length) {
var childNodes = nodes[0].childNodes;
if (childNodes) {
var childNode = childNodes[0];
if (childNode) {
value = childNode.wholeText || childNode.nodeValue;
}
}
}
return value;
};
var parseFeed = function(xmlObj) {
var parseFeed = function(dstList) {
var feed = {
title: '',
link: '',
Expand All @@ -23,46 +8,27 @@
language: '',
items: []
};
if (xmlObj) {
feed.title = getNodeValue(xmlObj, "title");
feed.link = getNodeValue(xmlObj, "link");
feed.pubDate = getNodeValue(xmlObj, "pubDate");
feed.description = getNodeValue(xmlObj, "description");
feed.language = getNodeValue(xmlObj, "language");
var itemsXml = xmlObj.getElementsByTagName('item');
var items = [];
var itemXml = {};
var item = {};
for (var i = 0, len = itemsXml.length; i < len; i++) {
itemXml = itemsXml[i];
item = {
title: '',
author: '',
pubDate: '',
link: '',
guid: '',
description: ''
};
if (itemXml) {
item.title = getNodeValue(itemXml, "title");
item.author = getNodeValue(itemXml, "author");
item.pubDate = getNodeValue(itemXml, "pubDate");
item.link = getNodeValue(itemXml, "link");
item.guid = getNodeValue(itemXml, "guid");
item.description = getNodeValue(itemXml, "description");
}
items.push(item);
}
feed.items = items;
}
dstList.forEach(function(srcItem) {
feed.items.push({
post_id: srcItem.post_id,
title: srcItem.title,
author: srcItem.author_name,
pubDate: srcItem.published_at,
link: "http://36kr.com/p/" + srcItem.post_id + ".html",
cover: srcItem.cover,
guid: srcItem.id.toString(),
description: srcItem.content
});
});
//feed.items = items;
return feed;
};
$.getFeed = function(url, success, error) {
error = error || $.noop;
$.ajax({
type: "get",
url: url,
dataType: 'xml',
dataType: 'json',
success: function(response) {
if (!response) {
return error();
Expand Down
Loading

0 comments on commit f68a1fd

Please sign in to comment.