├── widget
├── script
│ ├── index.js
│ ├── SHA1.js
│ ├── swipe.js
│ └── api.js
├── image
│ ├── 1-1.png
│ ├── 123.jpg
│ ├── default.png
│ ├── refresh.png
│ ├── 0707144319.jpg
│ ├── 2384454565.jpg
│ ├── 4135021960.jpg
│ ├── 5981351755.jpg
│ ├── 6032166053.jpg
│ ├── 6457261423.jpg
│ ├── Untitled-1.jpg
│ ├── default_bg.png
│ ├── frm-list-me.png
│ ├── ic_tip_pwd.png
│ ├── information.png
│ ├── qq_popover.png
│ ├── url_popover.png
│ ├── frm-list-find.png
│ ├── frm-list-home.png
│ ├── ic_tip_mobile.png
│ ├── loading_more.gif
│ ├── text_popover.png
│ ├── weibo_popover.png
│ ├── frm-list-topic.png
│ ├── hoticon_textpage.png
│ ├── markicon_discuss.png
│ ├── sellicon_profile.png
│ ├── tencent_popover.png
│ ├── weixin_popover.png
│ ├── account_icon_qzone.png
│ ├── account_icon_weibo.png
│ ├── home_tabbar_normal.png
│ ├── mail_popover_night.png
│ ├── mine_tabbar_normal.png
│ ├── nighticon_profile.png
│ ├── account_icon_kaixin.png
│ ├── account_icon_mobile.png
│ ├── account_icon_renren.png
│ ├── account_icon_tencent.png
│ ├── account_icon_weixin.png
│ ├── activityicon_profile.png
│ ├── back_discover_pressed.png
│ ├── downloadicon_profile.png
│ ├── dynamic_tabbar_normal.png
│ ├── favoriteicon_profile.png
│ ├── feedbackicon_profile.png
│ ├── home_tabbar_pressed.png
│ ├── message_popover_night.png
│ ├── messageicon_profile.png
│ ├── mine_tabbar_pressed.png
│ ├── pulltorefresh_arrow.png
│ ├── qzone_popover_night.png
│ ├── renren_popover_night.png
│ ├── repost_popover_night.png
│ ├── spinner_76_inner_holo.png
│ ├── arrow_leftdrawer_night.png
│ ├── discover_tabbar_normal.png
│ ├── discover_tabbar_pressed.png
│ ├── dynamic_tabbar_pressed.png
│ ├── ic_action_write_pressed.png
│ ├── ic_weixin_login_normal.png
│ ├── nighticon_profile_night.png
│ ├── profile_action_set_icon.png
│ ├── sellicon_profile_night.png
│ ├── activityicon_profile_night.png
│ ├── back_move_details_normal.png
│ ├── digupicon_details_pressed.png
│ ├── downloadicon_profile_night.png
│ ├── favoriteicon_profile_night.png
│ ├── feedbackicon_profile_night.png
│ ├── home_tabbar_pressed_night.png
│ ├── ic_action_favor_on_normal.png
│ ├── messageicon_profile_night.png
│ ├── mine_tabbar_pressed_night.png
│ ├── report_tool_details_normal.png
│ ├── show_title_details_normal.png
│ ├── writeicon_review_dynamic.png
│ ├── addicon_repost_pressed_night.png
│ ├── btn_more_title_detail_normal.png
│ ├── digdownicon_details_pressed.png
│ ├── dynamic_tabbar_pressed_night.png
│ ├── ic_action_favor_normal_night.png
│ ├── qqicon_login_profile_normal.png
│ ├── weixinpengyou_popover_night.png
│ ├── addicon_titlebar_topic_normal.png
│ ├── back_move_details_normal_night.png
│ ├── digupicon_details_normal_night.png
│ ├── discover_tabbar_pressed_night.png
│ ├── ic_action_comment_pressed_night.png
│ ├── ic_action_write_pressed_night.png
│ ├── message_titlebar_topic_normal.png
│ ├── sinaicon_login_profile_normal.png
│ ├── writeicon_dynamic_normal_night.png
│ ├── digdownicon_details_normal_night.png
│ ├── digupicon_comment_details_normal.png
│ ├── digupicon_comment_details_pressed.png
│ ├── img201411221610510977_info427X320.jpg
│ ├── refreshing_video_textpage_normal.png
│ ├── report_tool_details_pressed_night.png
│ ├── shareicon_titlebar_dynamic_normal.png
│ ├── cellphoneicon_login_profile_normal.png
│ ├── play_gifinsets_textpage_normal_night.png
│ ├── reviewbule_all_dynamic_normal_night.png
│ ├── play_gifinsets_textpage_pressed_night.png
│ ├── b58f8c5494eef01fbf0123cde2fe9925bc317da4.jpg
│ ├── commenticon_comment_details_normal_night.png
│ └── shareicon_titlebar_dynamic_normal_night.png
├── icon
│ └── icon150x150.png
├── css
│ ├── fonts
│ │ ├── FontAwesome.otf
│ │ ├── fontawesome-webfont.eot
│ │ ├── fontawesome-webfont.ttf
│ │ ├── fontawesome-webfont.woff
│ │ └── fontawesome-webfont.woff2
│ ├── common.css
│ ├── api.css
│ ├── style.css
│ └── font-awesome.min.css
├── launch
│ └── launch1080x1920.png
├── .project
├── config.xml
├── html
│ ├── public
│ │ ├── openWin.html
│ │ ├── login-reg.html
│ │ ├── channel-list.html
│ │ ├── header.html
│ │ └── article.html
│ └── index-list
│ │ ├── find-list.html
│ │ ├── topic-list.html
│ │ └── me-list.html
└── index.html
├── README.md
└── classJson
├── modelClass.json
├── interest.json
├── comment.json
└── channel.json
/widget/script/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/widget/image/1-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/1-1.png
--------------------------------------------------------------------------------
/widget/image/123.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/123.jpg
--------------------------------------------------------------------------------
/widget/image/default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/default.png
--------------------------------------------------------------------------------
/widget/image/refresh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/refresh.png
--------------------------------------------------------------------------------
/widget/icon/icon150x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/icon/icon150x150.png
--------------------------------------------------------------------------------
/widget/image/0707144319.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/0707144319.jpg
--------------------------------------------------------------------------------
/widget/image/2384454565.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/2384454565.jpg
--------------------------------------------------------------------------------
/widget/image/4135021960.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/4135021960.jpg
--------------------------------------------------------------------------------
/widget/image/5981351755.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/5981351755.jpg
--------------------------------------------------------------------------------
/widget/image/6032166053.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/6032166053.jpg
--------------------------------------------------------------------------------
/widget/image/6457261423.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/6457261423.jpg
--------------------------------------------------------------------------------
/widget/image/Untitled-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/Untitled-1.jpg
--------------------------------------------------------------------------------
/widget/image/default_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/default_bg.png
--------------------------------------------------------------------------------
/widget/image/frm-list-me.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/frm-list-me.png
--------------------------------------------------------------------------------
/widget/image/ic_tip_pwd.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/ic_tip_pwd.png
--------------------------------------------------------------------------------
/widget/image/information.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/information.png
--------------------------------------------------------------------------------
/widget/image/qq_popover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/qq_popover.png
--------------------------------------------------------------------------------
/widget/image/url_popover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/url_popover.png
--------------------------------------------------------------------------------
/widget/image/frm-list-find.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/frm-list-find.png
--------------------------------------------------------------------------------
/widget/image/frm-list-home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/frm-list-home.png
--------------------------------------------------------------------------------
/widget/image/ic_tip_mobile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/ic_tip_mobile.png
--------------------------------------------------------------------------------
/widget/image/loading_more.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/loading_more.gif
--------------------------------------------------------------------------------
/widget/image/text_popover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/text_popover.png
--------------------------------------------------------------------------------
/widget/image/weibo_popover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/weibo_popover.png
--------------------------------------------------------------------------------
/widget/css/fonts/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/css/fonts/FontAwesome.otf
--------------------------------------------------------------------------------
/widget/image/frm-list-topic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/frm-list-topic.png
--------------------------------------------------------------------------------
/widget/image/hoticon_textpage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/hoticon_textpage.png
--------------------------------------------------------------------------------
/widget/image/markicon_discuss.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/markicon_discuss.png
--------------------------------------------------------------------------------
/widget/image/sellicon_profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/sellicon_profile.png
--------------------------------------------------------------------------------
/widget/image/tencent_popover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/tencent_popover.png
--------------------------------------------------------------------------------
/widget/image/weixin_popover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/weixin_popover.png
--------------------------------------------------------------------------------
/widget/launch/launch1080x1920.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/launch/launch1080x1920.png
--------------------------------------------------------------------------------
/widget/image/account_icon_qzone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/account_icon_qzone.png
--------------------------------------------------------------------------------
/widget/image/account_icon_weibo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/account_icon_weibo.png
--------------------------------------------------------------------------------
/widget/image/home_tabbar_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/home_tabbar_normal.png
--------------------------------------------------------------------------------
/widget/image/mail_popover_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/mail_popover_night.png
--------------------------------------------------------------------------------
/widget/image/mine_tabbar_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/mine_tabbar_normal.png
--------------------------------------------------------------------------------
/widget/image/nighticon_profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/nighticon_profile.png
--------------------------------------------------------------------------------
/widget/image/account_icon_kaixin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/account_icon_kaixin.png
--------------------------------------------------------------------------------
/widget/image/account_icon_mobile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/account_icon_mobile.png
--------------------------------------------------------------------------------
/widget/image/account_icon_renren.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/account_icon_renren.png
--------------------------------------------------------------------------------
/widget/image/account_icon_tencent.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/account_icon_tencent.png
--------------------------------------------------------------------------------
/widget/image/account_icon_weixin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/account_icon_weixin.png
--------------------------------------------------------------------------------
/widget/image/activityicon_profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/activityicon_profile.png
--------------------------------------------------------------------------------
/widget/image/back_discover_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/back_discover_pressed.png
--------------------------------------------------------------------------------
/widget/image/downloadicon_profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/downloadicon_profile.png
--------------------------------------------------------------------------------
/widget/image/dynamic_tabbar_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/dynamic_tabbar_normal.png
--------------------------------------------------------------------------------
/widget/image/favoriteicon_profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/favoriteicon_profile.png
--------------------------------------------------------------------------------
/widget/image/feedbackicon_profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/feedbackicon_profile.png
--------------------------------------------------------------------------------
/widget/image/home_tabbar_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/home_tabbar_pressed.png
--------------------------------------------------------------------------------
/widget/image/message_popover_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/message_popover_night.png
--------------------------------------------------------------------------------
/widget/image/messageicon_profile.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/messageicon_profile.png
--------------------------------------------------------------------------------
/widget/image/mine_tabbar_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/mine_tabbar_pressed.png
--------------------------------------------------------------------------------
/widget/image/pulltorefresh_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/pulltorefresh_arrow.png
--------------------------------------------------------------------------------
/widget/image/qzone_popover_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/qzone_popover_night.png
--------------------------------------------------------------------------------
/widget/image/renren_popover_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/renren_popover_night.png
--------------------------------------------------------------------------------
/widget/image/repost_popover_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/repost_popover_night.png
--------------------------------------------------------------------------------
/widget/image/spinner_76_inner_holo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/spinner_76_inner_holo.png
--------------------------------------------------------------------------------
/widget/css/fonts/fontawesome-webfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/css/fonts/fontawesome-webfont.eot
--------------------------------------------------------------------------------
/widget/css/fonts/fontawesome-webfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/css/fonts/fontawesome-webfont.ttf
--------------------------------------------------------------------------------
/widget/image/arrow_leftdrawer_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/arrow_leftdrawer_night.png
--------------------------------------------------------------------------------
/widget/image/discover_tabbar_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/discover_tabbar_normal.png
--------------------------------------------------------------------------------
/widget/image/discover_tabbar_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/discover_tabbar_pressed.png
--------------------------------------------------------------------------------
/widget/image/dynamic_tabbar_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/dynamic_tabbar_pressed.png
--------------------------------------------------------------------------------
/widget/image/ic_action_write_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/ic_action_write_pressed.png
--------------------------------------------------------------------------------
/widget/image/ic_weixin_login_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/ic_weixin_login_normal.png
--------------------------------------------------------------------------------
/widget/image/nighticon_profile_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/nighticon_profile_night.png
--------------------------------------------------------------------------------
/widget/image/profile_action_set_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/profile_action_set_icon.png
--------------------------------------------------------------------------------
/widget/image/sellicon_profile_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/sellicon_profile_night.png
--------------------------------------------------------------------------------
/widget/css/fonts/fontawesome-webfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/css/fonts/fontawesome-webfont.woff
--------------------------------------------------------------------------------
/widget/css/fonts/fontawesome-webfont.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/css/fonts/fontawesome-webfont.woff2
--------------------------------------------------------------------------------
/widget/image/activityicon_profile_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/activityicon_profile_night.png
--------------------------------------------------------------------------------
/widget/image/back_move_details_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/back_move_details_normal.png
--------------------------------------------------------------------------------
/widget/image/digupicon_details_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/digupicon_details_pressed.png
--------------------------------------------------------------------------------
/widget/image/downloadicon_profile_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/downloadicon_profile_night.png
--------------------------------------------------------------------------------
/widget/image/favoriteicon_profile_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/favoriteicon_profile_night.png
--------------------------------------------------------------------------------
/widget/image/feedbackicon_profile_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/feedbackicon_profile_night.png
--------------------------------------------------------------------------------
/widget/image/home_tabbar_pressed_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/home_tabbar_pressed_night.png
--------------------------------------------------------------------------------
/widget/image/ic_action_favor_on_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/ic_action_favor_on_normal.png
--------------------------------------------------------------------------------
/widget/image/messageicon_profile_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/messageicon_profile_night.png
--------------------------------------------------------------------------------
/widget/image/mine_tabbar_pressed_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/mine_tabbar_pressed_night.png
--------------------------------------------------------------------------------
/widget/image/report_tool_details_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/report_tool_details_normal.png
--------------------------------------------------------------------------------
/widget/image/show_title_details_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/show_title_details_normal.png
--------------------------------------------------------------------------------
/widget/image/writeicon_review_dynamic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/writeicon_review_dynamic.png
--------------------------------------------------------------------------------
/widget/image/addicon_repost_pressed_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/addicon_repost_pressed_night.png
--------------------------------------------------------------------------------
/widget/image/btn_more_title_detail_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/btn_more_title_detail_normal.png
--------------------------------------------------------------------------------
/widget/image/digdownicon_details_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/digdownicon_details_pressed.png
--------------------------------------------------------------------------------
/widget/image/dynamic_tabbar_pressed_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/dynamic_tabbar_pressed_night.png
--------------------------------------------------------------------------------
/widget/image/ic_action_favor_normal_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/ic_action_favor_normal_night.png
--------------------------------------------------------------------------------
/widget/image/qqicon_login_profile_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/qqicon_login_profile_normal.png
--------------------------------------------------------------------------------
/widget/image/weixinpengyou_popover_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/weixinpengyou_popover_night.png
--------------------------------------------------------------------------------
/widget/image/addicon_titlebar_topic_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/addicon_titlebar_topic_normal.png
--------------------------------------------------------------------------------
/widget/image/back_move_details_normal_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/back_move_details_normal_night.png
--------------------------------------------------------------------------------
/widget/image/digupicon_details_normal_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/digupicon_details_normal_night.png
--------------------------------------------------------------------------------
/widget/image/discover_tabbar_pressed_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/discover_tabbar_pressed_night.png
--------------------------------------------------------------------------------
/widget/image/ic_action_comment_pressed_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/ic_action_comment_pressed_night.png
--------------------------------------------------------------------------------
/widget/image/ic_action_write_pressed_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/ic_action_write_pressed_night.png
--------------------------------------------------------------------------------
/widget/image/message_titlebar_topic_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/message_titlebar_topic_normal.png
--------------------------------------------------------------------------------
/widget/image/sinaicon_login_profile_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/sinaicon_login_profile_normal.png
--------------------------------------------------------------------------------
/widget/image/writeicon_dynamic_normal_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/writeicon_dynamic_normal_night.png
--------------------------------------------------------------------------------
/widget/image/digdownicon_details_normal_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/digdownicon_details_normal_night.png
--------------------------------------------------------------------------------
/widget/image/digupicon_comment_details_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/digupicon_comment_details_normal.png
--------------------------------------------------------------------------------
/widget/image/digupicon_comment_details_pressed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/digupicon_comment_details_pressed.png
--------------------------------------------------------------------------------
/widget/image/img201411221610510977_info427X320.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/img201411221610510977_info427X320.jpg
--------------------------------------------------------------------------------
/widget/image/refreshing_video_textpage_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/refreshing_video_textpage_normal.png
--------------------------------------------------------------------------------
/widget/image/report_tool_details_pressed_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/report_tool_details_pressed_night.png
--------------------------------------------------------------------------------
/widget/image/shareicon_titlebar_dynamic_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/shareicon_titlebar_dynamic_normal.png
--------------------------------------------------------------------------------
/widget/image/cellphoneicon_login_profile_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/cellphoneicon_login_profile_normal.png
--------------------------------------------------------------------------------
/widget/image/play_gifinsets_textpage_normal_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/play_gifinsets_textpage_normal_night.png
--------------------------------------------------------------------------------
/widget/image/reviewbule_all_dynamic_normal_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/reviewbule_all_dynamic_normal_night.png
--------------------------------------------------------------------------------
/widget/image/play_gifinsets_textpage_pressed_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/play_gifinsets_textpage_pressed_night.png
--------------------------------------------------------------------------------
/widget/image/b58f8c5494eef01fbf0123cde2fe9925bc317da4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/b58f8c5494eef01fbf0123cde2fe9925bc317da4.jpg
--------------------------------------------------------------------------------
/widget/image/commenticon_comment_details_normal_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/commenticon_comment_details_normal_night.png
--------------------------------------------------------------------------------
/widget/image/shareicon_titlebar_dynamic_normal_night.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/XM-Right/topLine/HEAD/widget/image/shareicon_titlebar_dynamic_normal_night.png
--------------------------------------------------------------------------------
/widget/.project:
--------------------------------------------------------------------------------
1 |
2 |
3 | 瑞祥
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # topLine
2 | 使用apicloud模仿《今日头条》,数据存储使用平台mcm
3 |
4 | 部署到自己的应用中,首先你必须.
5 |
6 | 1. 将modelClass导入到你的Database中.
7 | 2. 将fs、weibo模块添加到你的应用中.
8 | 3. 将widget包文件->的config文件中的id配置为你自己的应用ID.
9 | 4. 将widget包文件->的config文件中的weibo配置为你自己应用的对应key等信息.
10 |
11 | topLine/
12 | ├── classJson/
13 | │ ├── article.json 文章数据
14 | │ ├── channel.json 频道数据
15 | │ ├── comment.json 评论数据
16 | │ ├── file.json 图片数据
17 | │ ├── interest.json 兴趣爱好数据
18 | │ └── modelClass.json class表结构
19 | └── widget 项目源码包
20 |
--------------------------------------------------------------------------------
/widget/css/common.css:
--------------------------------------------------------------------------------
1 | html,body{
2 | height: 100%;
3 | width:100%;
4 | }
5 | #wrap{
6 | height: 100%;
7 | display: -webkit-box;
8 | display: -webkit-flex;
9 | display: flex;
10 | -webkit-box-orient: vertical;
11 | -webkit-flex-flow: column;
12 | flex-flow: column;
13 | }
14 | #header{
15 | text-align: center; background-color: #81a9c3; color: #fff;
16 | width: 100%;
17 | }
18 | #header h1{
19 | font-size: 20px; height: 44px; line-height: 44px; margin: 0em; color: #fff;
20 | }
21 | #main{
22 | -webkit-box-flex: 1;
23 | -webkit-flex: 1;
24 | flex: 1;
25 | padding: 2em;
26 | }
27 | #footer{
28 | height: 30px; line-height: 30px;
29 | background-color: #81a9c3;
30 | width: 100%;
31 | text-align: center;
32 | }
33 | #footer h5{
34 | color: white;
35 | }
36 | .con{font-size: 28px; text-align: center;}
--------------------------------------------------------------------------------
/widget/config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | topLine
4 |
5 |
6 |
7 | Example For APICloud.
8 |
9 |
10 |
11 |
12 |
13 | Developer
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/widget/css/api.css:
--------------------------------------------------------------------------------
1 | html{
2 | font-family: sans-serif;
3 | }
4 | html,body,header,section,footer,div,ul,ol,li,img,a,span,em,del,legend,center,strong,var,fieldset,form,label,dl,dt,dd,cite,input,hr,time,mark,code,figcaption,figure,textarea,h1,h2,h3,h4,h5,h6,p{
5 | margin:0;
6 | border:0;
7 | padding:0;
8 | font-style:normal;
9 | color:rgb(50,50,50);
10 | }
11 | html,body {
12 | -webkit-touch-callout:none;
13 | -webkit-text-size-adjust:none;
14 | -webkit-tap-highlight-color:rgba(0, 0, 0, 0);
15 | -webkit-user-select:none;
16 | background-color: #fff;
17 | }
18 | nav,article,aside,details,main,header,footer,section,fieldset,figcaption,figure{
19 | display: block;
20 | }
21 | img,a,button,em,del,strong,var,label,cite,small,time,mark,code,textarea{
22 | display:inline-block;
23 | }
24 | header,section,footer {
25 | position:relative;
26 | }
27 | ol,ul{
28 | list-style:none;
29 | }
30 | input,button,textarea {
31 | border:0;
32 | margin:0;
33 | padding:0;
34 | font-size:1em;
35 | line-height:1em;
36 | /*-webkit-appearance:none;*/
37 | background-color:rgba(0, 0, 0, 0);
38 | }
39 | span{
40 | display:inline-block;
41 | }
42 | a:active, a:hover {
43 | outline: 0;
44 | }
45 | a, a:visited{
46 | text-decoration:none;
47 | }
48 |
49 | label, .wordWrap{
50 | word-wrap: break-word;
51 | word-break: break-all;
52 | }
53 | table {
54 | border-collapse: collapse;
55 | border-spacing: 0;
56 | }
57 | td,th {
58 | padding: 0;
59 | }
60 | .clearfix:after{
61 | content: ' ';
62 | display: block;
63 | clear: both;
64 | visibility:hidden;
65 | line-height: 0;
66 | height:0;
67 | }
68 | .loading_more{
69 | display: block;
70 | height: 1.5em;
71 | width: 100%;
72 | }
73 | .loading_more:before {
74 | background-image: url(../image/loading_more.gif) 30% center;
75 | background-repeat: no-repeat;
76 | background-size: contain;
77 | text-align: center;
78 | }
79 | .loading_more:after {
80 | content: '加载更多';
81 | }
--------------------------------------------------------------------------------
/classJson/modelClass.json:
--------------------------------------------------------------------------------
1 | [{"base":"AccessToken","plural":"accessToken"},{"base":"User","plural":"user","properties":{"rela_chan":{"type":"String"},"img":{"type":"String"}},"acls":[{"accessType":"*","principalType":"ROLE","principalId":"$everyone","permission":"DENY"},{"principalType":"ROLE","principalId":"$everyone","permission":"ALLOW","property":"create"},{"principalType":"ROLE","principalId":"$owner","permission":"ALLOW","property":"deleteById"},{"principalType":"ROLE","principalId":"$owner","permission":"ALLOW","property":"removeById"},{"principalType":"ROLE","principalId":"$everyone","permission":"ALLOW","property":"login"},{"principalType":"ROLE","principalId":"$everyone","permission":"ALLOW","property":"logout"},{"principalType":"ROLE","principalId":"$everyone","permission":"ALLOW","property":"findById"},{"principalType":"ROLE","principalId":"$everyone","permission":"ALLOW","property":"updateAttributes"},{"principalType":"ROLE","principalId":"$everyone","permission":"ALLOW","property":"confirm"},{"principalType":"ROLE","principalId":"$everyone","permission":"ALLOW","property":"verifyEmail"},{"principalType":"ROLE","principalId":"$everyone","permission":"ALLOW","property":"resetPasswordRequest"},{"principalType":"ROLE","principalId":"$everyone","permission":"ALLOW","property":"resetPassword"},{"principalType":"ROLE","principalId":"$everyone","permission":"ALLOW","property":"exists"},{"principalType":"ROLE","principalId":"$everyone","permission":"ALLOW","property":"find"},{"principalType":"ROLE","principalId":"$everyone","permission":"ALLOW","property":"count"},{"principalType":"ROLE","principalId":"$everyone","permission":"ALLOW","property":"findOne"}],"relations":{"accessTokens":{"type":"Relation","model":"accessToken","foreignKey":"userId"},"channels":{"type":"Relation","model":"channel","foreignKey":"user(uz*R*id)"}}},{"base":"RoleMapping","plural":"roleMapping"},{"base":"Role","plural":"role","relations":{"principals":{"type":"Relation","model":"roleMapping","foreignKey":"roleId"}}},{"base":"File","plural":"file"},{"plural":"article","properties":{"id":{"type":"String","id":true},"title":{"type":"String"},"content":{"type":"String"},"imgs":{"type":"String"},"rela_chan":{"type":"String"},"is_hot":{"type":"Number"},"is_bot":{"type":"Number"},"type":{"type":"String"},"is_collect":{"type":"Array"}},"relations":{}},{"plural":"channel","properties":{"id":{"type":"String","id":true},"title":{"type":"String"},"imgs":{"type":"String"}},"relations":{}},{"plural":"interest","properties":{"id":{"type":"String","id":true},"title":{"type":"String"},"brief":{"type":"String"},"imgs":{"type":"Object","isFile":true},"isOnlookers":{"type":"Number"}}},{"plural":"comment","properties":{"id":{"type":"String","id":true},"rela_article":{"type":"String"},"content":{"type":"String"},"username":{"type":"String"}}}]
--------------------------------------------------------------------------------
/classJson/interest.json:
--------------------------------------------------------------------------------
1 | { "_id" : { "$oid" : "55a7183aa2504dcc3ba21ba6" }, "title" : "经典台词", "brief" : "每个人心中都有一句经典台词。", "imgs" : [ "http://7xkami.com1.z0.glb.clouddn.com/apicloud/77bfc4c29c128320f8b4b92dede16caf.jpg" ], "createdAt" : { "$date" : "2015-07-16T10:34:34.504+0800" }, "updatedAt" : { "$date" : "2015-07-22T11:25:55.809+0800" }, "isOnlookers" : 0 }
2 | { "_id" : { "$oid" : "55a71c12c4ccfe013a2e2aa2" }, "title" : "周星驰", "brief" : "代表作品功夫、少林足球、喜剧之王、食神、大话西游、国产凌凌漆、唐伯虎点秋香、审死官、逃学威龙、赌圣", "imgs" : [ "http://7xkami.com1.z0.glb.clouddn.com/apicloud/888a1c1df745e4ef234e5cf80f8ef211.jpg" ], "createdAt" : { "$date" : "2015-07-16T10:50:58.569+0800" }, "updatedAt" : { "$date" : "2015-07-23T11:19:52.260+0800" }, "isOnlookers" : 0 }
3 | { "_id" : { "$oid" : "55a71ec62edf64a704478ac4" }, "title" : "大话西游之月光宝盒", "brief" : "《大话西游之月光宝盒》是周星驰彩星电影公司1994年制作和出品的一部经典的无厘头搞笑片", "imgs" : [ "http://7xkami.com1.z0.glb.clouddn.com/apicloud/13dacdc5ffc71683a027dc09ce9ba390.jpg" ], "createdAt" : { "$date" : "2015-07-16T11:02:30.329+0800" }, "updatedAt" : { "$date" : "2015-07-23T11:20:04.484+0800" }, "isOnlookers" : 0 }
4 | { "_id" : { "$oid" : "55a71fbfc4ccfe013a2e2aaf" }, "title" : "功夫2", "brief" : "讲述阿星整顿斧头帮之后在侵华战争中,破坏日本人的阴谋,成为英雄的故事。", "imgs" : [ "http://7xkami.com1.z0.glb.clouddn.com/apicloud/7d0abadc25d94132bc05f26c33a8a649.jpg" ], "createdAt" : { "$date" : "2015-07-16T11:06:39.431+0800" }, "updatedAt" : { "$date" : "2015-07-24T18:17:27.339+0800" }, "isOnlookers" : 1 }
5 | { "_id" : { "$oid" : "55a720732edf64a704478ad0" }, "title" : "酱爆", "brief" : "何文辉,原艺名为酱爆,1981年5月16日生于广州,曾出演《少林足球》、《功夫状元》、《功夫》等电影。", "imgs" : [ "http://7xkami.com1.z0.glb.clouddn.com/apicloud/9b5a96f07893c02ee79d388632e83e92.jpg" ], "createdAt" : { "$date" : "2015-07-16T11:09:39.546+0800" }, "updatedAt" : { "$date" : "2015-07-24T15:34:51.725+0800" }, "isOnlookers" : 1 }
6 | { "_id" : { "$oid" : "55a720cca2504dcc3ba21be3" }, "title" : "徐娇", "brief" : "徐娇,1997年8月5日出生于浙江省宁波市,中国大陆女演员 。2006年出演《长江七号》后,被观众誉为“星女郎”,并凭借此片获得第28届香港电影金像奖最佳新人奖", "imgs" : [ "http://7xkami.com1.z0.glb.clouddn.com/apicloud/e8df8ed56d79b5ec7f7ba57ec0425aa6.jpg" ], "createdAt" : { "$date" : "2015-07-16T11:11:08.396+0800" }, "updatedAt" : { "$date" : "2015-07-24T18:52:04.825+0800" }, "isOnlookers" : 1 }
7 | { "_id" : { "$oid" : "55a7218bfddce8c92e5891bd" }, "title" : "朱茵", "brief" : "1971年10月25日出生于香港,中国影视女演员、歌手,毕业于香港演艺学院戏剧系。", "imgs" : [ "http://7xkami.com1.z0.glb.clouddn.com/apicloud/6c25efb7b276b4bdfad184a2d9362404.jpg" ], "createdAt" : { "$date" : "2015-07-16T11:14:19.148+0800" }, "updatedAt" : { "$date" : "2015-07-23T15:36:40.359+0800" }, "isOnlookers" : 1 }
8 | { "_id" : { "$oid" : "55c02ab94ecfe1257b0562cc" }, "title" : "郑智薰", "brief" : "Rain,本名郑智薰,1982年6月25日出生于韩国首尔,韩国流行男歌手、演员、编舞师、音乐制作人", "imgs" : { "url" : "http://7xkami.com1.z0.glb.clouddn.com/apicloud/16963432aa65dfb0536fc5e47b040b81.jpg", "name" : "faf2b2119313b07e2ae8e48309d7912396dd8ce0.jpg", "id" : "55c02adcb899932d2a822fb0" }, "isOnlookers" : 0, "createdAt" : { "$date" : "2015-08-04T11:00:09.681+0800" }, "updatedAt" : { "$date" : "2015-08-04T11:00:50.539+0800" } }
9 |
--------------------------------------------------------------------------------
/widget/script/SHA1.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by andy on 14-12-25.
3 | */
4 | /**
5 | *
6 | * Secure Hash Algorithm (SHA1)
7 | * http://www.webtoolkit.info/
8 | *
9 | **/
10 |
11 | function SHA1(msg) {
12 |
13 | function rotate_left(n, s) {
14 | var t4 = ( n << s ) | (n >>> (32 - s));
15 | return t4;
16 | };
17 |
18 | function lsb_hex(val) {
19 | var str = "";
20 | var i;
21 | var vh;
22 | var vl;
23 |
24 | for (i = 0; i <= 6; i += 2) {
25 | vh = (val >>> (i * 4 + 4)) & 0x0f;
26 | vl = (val >>> (i * 4)) & 0x0f;
27 | str += vh.toString(16) + vl.toString(16);
28 | }
29 | return str;
30 | };
31 |
32 | function cvt_hex(val) {
33 | var str = "";
34 | var i;
35 | var v;
36 |
37 | for (i = 7; i >= 0; i--) {
38 | v = (val >>> (i * 4)) & 0x0f;
39 | str += v.toString(16);
40 | }
41 | return str;
42 | };
43 |
44 |
45 | function Utf8Encode(string) {
46 | string = string.replace(/\r\n/g, "\n");
47 | var utftext = "";
48 |
49 | for (var n = 0; n < string.length; n++) {
50 |
51 | var c = string.charCodeAt(n);
52 |
53 | if (c < 128) {
54 | utftext += String.fromCharCode(c);
55 | }
56 | else if ((c > 127) && (c < 2048)) {
57 | utftext += String.fromCharCode((c >> 6) | 192);
58 | utftext += String.fromCharCode((c & 63) | 128);
59 | }
60 | else {
61 | utftext += String.fromCharCode((c >> 12) | 224);
62 | utftext += String.fromCharCode(((c >> 6) & 63) | 128);
63 | utftext += String.fromCharCode((c & 63) | 128);
64 | }
65 |
66 | }
67 |
68 | return utftext;
69 | };
70 |
71 | var blockstart;
72 | var i, j;
73 | var W = new Array(80);
74 | var H0 = 0x67452301;
75 | var H1 = 0xEFCDAB89;
76 | var H2 = 0x98BADCFE;
77 | var H3 = 0x10325476;
78 | var H4 = 0xC3D2E1F0;
79 | var A, B, C, D, E;
80 | var temp;
81 |
82 | msg = Utf8Encode(msg);
83 |
84 | var msg_len = msg.length;
85 |
86 | var word_array = new Array();
87 | for (i = 0; i < msg_len - 3; i += 4) {
88 | j = msg.charCodeAt(i) << 24 | msg.charCodeAt(i + 1) << 16 |
89 | msg.charCodeAt(i + 2) << 8 | msg.charCodeAt(i + 3);
90 | word_array.push(j);
91 | }
92 |
93 | switch (msg_len % 4) {
94 | case 0:
95 | i = 0x080000000;
96 | break;
97 | case 1:
98 | i = msg.charCodeAt(msg_len - 1) << 24 | 0x0800000;
99 | break;
100 |
101 | case 2:
102 | i = msg.charCodeAt(msg_len - 2) << 24 | msg.charCodeAt(msg_len - 1) << 16 | 0x08000;
103 | break;
104 |
105 | case 3:
106 | i = msg.charCodeAt(msg_len - 3) << 24 | msg.charCodeAt(msg_len - 2) << 16 | msg.charCodeAt(msg_len - 1) << 8 | 0x80;
107 | break;
108 | }
109 |
110 | word_array.push(i);
111 |
112 | while ((word_array.length % 16) != 14) word_array.push(0);
113 |
114 | word_array.push(msg_len >>> 29);
115 | word_array.push((msg_len << 3) & 0x0ffffffff);
116 |
117 |
118 | for (blockstart = 0; blockstart < word_array.length; blockstart += 16) {
119 |
120 | for (i = 0; i < 16; i++) W[i] = word_array[blockstart + i];
121 | for (i = 16; i <= 79; i++) W[i] = rotate_left(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1);
122 |
123 | A = H0;
124 | B = H1;
125 | C = H2;
126 | D = H3;
127 | E = H4;
128 |
129 | for (i = 0; i <= 19; i++) {
130 | temp = (rotate_left(A, 5) + ((B & C) | (~B & D)) + E + W[i] + 0x5A827999) & 0x0ffffffff;
131 | E = D;
132 | D = C;
133 | C = rotate_left(B, 30);
134 | B = A;
135 | A = temp;
136 | }
137 |
138 | for (i = 20; i <= 39; i++) {
139 | temp = (rotate_left(A, 5) + (B ^ C ^ D) + E + W[i] + 0x6ED9EBA1) & 0x0ffffffff;
140 | E = D;
141 | D = C;
142 | C = rotate_left(B, 30);
143 | B = A;
144 | A = temp;
145 | }
146 |
147 | for (i = 40; i <= 59; i++) {
148 | temp = (rotate_left(A, 5) + ((B & C) | (B & D) | (C & D)) + E + W[i] + 0x8F1BBCDC) & 0x0ffffffff;
149 | E = D;
150 | D = C;
151 | C = rotate_left(B, 30);
152 | B = A;
153 | A = temp;
154 | }
155 |
156 | for (i = 60; i <= 79; i++) {
157 | temp = (rotate_left(A, 5) + (B ^ C ^ D) + E + W[i] + 0xCA62C1D6) & 0x0ffffffff;
158 | E = D;
159 | D = C;
160 | C = rotate_left(B, 30);
161 | B = A;
162 | A = temp;
163 | }
164 |
165 | H0 = (H0 + A) & 0x0ffffffff;
166 | H1 = (H1 + B) & 0x0ffffffff;
167 | H2 = (H2 + C) & 0x0ffffffff;
168 | H3 = (H3 + D) & 0x0ffffffff;
169 | H4 = (H4 + E) & 0x0ffffffff;
170 |
171 | }
172 |
173 | var temp = cvt_hex(H0) + cvt_hex(H1) + cvt_hex(H2) + cvt_hex(H3) + cvt_hex(H4);
174 |
175 | return temp.toLowerCase();
176 |
177 | }
--------------------------------------------------------------------------------
/classJson/comment.json:
--------------------------------------------------------------------------------
1 | { "_id" : { "$oid" : "55bd9bbada36e71565a28f67" }, "rela_article" : "55a4f032f48fcb294fcc4f42", "content" : "情人节快乐", "username" : "18883881016", "createdAt" : { "$date" : "2015-08-02T12:25:30.003+0800" }, "updatedAt" : { "$date" : "2015-08-02T12:25:30.003+0800" } }
2 | { "_id" : { "$oid" : "55bd9dd393bed3f67a244d5a" }, "rela_article" : "55a4f0faf48fcb294fcc4f43", "content" : "哎哟", "username" : "18883881016", "createdAt" : { "$date" : "2015-08-02T12:34:27.771+0800" }, "updatedAt" : { "$date" : "2015-08-02T12:34:27.771+0800" } }
3 | { "_id" : { "$oid" : "55bd9f31ad73116f339e88b4" }, "rela_article" : "55a4f032f48fcb294fcc4f42", "content" : "不可估量", "username" : "18883881016", "createdAt" : { "$date" : "2015-08-02T12:40:17.457+0800" }, "updatedAt" : { "$date" : "2015-08-02T12:40:17.457+0800" } }
4 | { "_id" : { "$oid" : "55bd9f5493bed3f67a244d5d" }, "rela_article" : "55a4f032f48fcb294fcc4f42", "content" : "路路通", "username" : "18883881016", "createdAt" : { "$date" : "2015-08-02T12:40:52.072+0800" }, "updatedAt" : { "$date" : "2015-08-02T12:40:52.072+0800" } }
5 | { "_id" : { "$oid" : "55bd9fe793bed3f67a244d5e" }, "rela_article" : "55a4f032f48fcb294fcc4f42", "content" : "这个", "username" : "18883881016", "createdAt" : { "$date" : "2015-08-02T12:43:19.271+0800" }, "updatedAt" : { "$date" : "2015-08-02T12:43:19.271+0800" } }
6 | { "_id" : { "$oid" : "55becd92c752710a22bd3971" }, "rela_article" : "55a4b63b93ed3a8f40449712", "content" : "对方付出", "username" : "18883881016", "createdAt" : { "$date" : "2015-08-03T10:10:26.647+0800" }, "updatedAt" : { "$date" : "2015-08-03T10:10:26.647+0800" } }
7 | { "_id" : { "$oid" : "55bece28f27868b64ce58a02" }, "rela_article" : "55a4f255bd11ceff4eec41d9", "content" : "反反复复", "username" : "18883881016", "createdAt" : { "$date" : "2015-08-03T10:12:56.041+0800" }, "updatedAt" : { "$date" : "2015-08-03T10:12:56.041+0800" } }
8 | { "_id" : { "$oid" : "55beceae97e9982b0da17a7a" }, "rela_article" : "55a4f1b0f48fcb294fcc4f44", "content" : "而丰富", "username" : "18883881016", "createdAt" : { "$date" : "2015-08-03T10:15:10.470+0800" }, "updatedAt" : { "$date" : "2015-08-03T10:15:10.470+0800" } }
9 | { "_id" : { "$oid" : "55c01d9d4be3dc117ba726e5" }, "rela_article" : "55a4ba2c93ed3a8f40449739", "content" : "发达的", "username" : "18883881016", "createdAt" : { "$date" : "2015-08-04T10:04:13.148+0800" }, "updatedAt" : { "$date" : "2015-08-04T10:04:13.148+0800" } }
10 | { "_id" : { "$oid" : "55c01e014ecfe1257b05628c" }, "rela_article" : "55a4a39a93464d3834f6bdd7", "content" : "丰富的", "username" : "18883881016", "createdAt" : { "$date" : "2015-08-04T10:05:53.726+0800" }, "updatedAt" : { "$date" : "2015-08-04T10:05:53.726+0800" } }
11 | { "_id" : { "$oid" : "55c01e254be3dc117ba726e6" }, "rela_article" : "55a4aa6a98ae6c4523a43d40", "content" : "得到", "username" : "18883881016", "createdAt" : { "$date" : "2015-08-04T10:06:29.148+0800" }, "updatedAt" : { "$date" : "2015-08-04T10:06:29.148+0800" } }
12 | { "_id" : { "$oid" : "55c01e9070d2db2f7bb73b3c" }, "rela_article" : "55a4a39a93464d3834f6bdd7", "content" : "这种", "username" : "18883881016", "createdAt" : { "$date" : "2015-08-04T10:08:16.239+0800" }, "updatedAt" : { "$date" : "2015-08-04T10:08:16.239+0800" } }
13 | { "_id" : { "$oid" : "55c01f744ecfe1257b056294" }, "rela_article" : "55a4a39a93464d3834f6bdd7", "content" : "凤飞飞", "username" : "18883881016", "createdAt" : { "$date" : "2015-08-04T10:12:04.555+0800" }, "updatedAt" : { "$date" : "2015-08-04T10:12:04.555+0800" } }
14 | { "_id" : { "$oid" : "55c020024ecfe1257b056295" }, "rela_article" : "55a4a39a93464d3834f6bdd7", "content" : "大大方方", "username" : "18883881016", "createdAt" : { "$date" : "2015-08-04T10:14:26.021+0800" }, "updatedAt" : { "$date" : "2015-08-04T10:14:26.021+0800" } }
15 | { "_id" : { "$oid" : "55c020334be3dc117ba726f2" }, "rela_article" : "55a4a39a93464d3834f6bdd7", "content" : "耳朵", "username" : "18883881016", "createdAt" : { "$date" : "2015-08-04T10:15:15.462+0800" }, "updatedAt" : { "$date" : "2015-08-04T10:15:15.462+0800" } }
16 | { "_id" : { "$oid" : "55c0205270d2db2f7bb73b42" }, "rela_article" : "55a4a39a93464d3834f6bdd7", "content" : "的地方", "username" : "18883881016", "createdAt" : { "$date" : "2015-08-04T10:15:46.269+0800" }, "updatedAt" : { "$date" : "2015-08-04T10:15:46.269+0800" } }
17 | { "_id" : { "$oid" : "55c08786798ff54a66c734e1" }, "rela_article" : "55a4b6ec93464d3834f6be3b", "content" : "层次丰富", "username" : "18883881016", "createdAt" : { "$date" : "2015-08-04T17:36:06.236+0800" }, "updatedAt" : { "$date" : "2015-08-04T17:36:06.236+0800" } }
18 | { "_id" : { "$oid" : "55c099c4207f5667710b1163" }, "rela_article" : "55a71fbfc4ccfe013a2e2aaf", "content" : "测SSSS店", "username" : "18883881016", "createdAt" : { "$date" : "2015-08-04T18:53:56.311+0800" }, "updatedAt" : { "$date" : "2015-08-04T18:53:56.311+0800" } }
19 | { "_id" : { "$oid" : "55c09b93207f5667710b1169" }, "rela_article" : "55a720732edf64a704478ad0", "content" : "free DD", "username" : "18883881016", "createdAt" : { "$date" : "2015-08-04T19:01:39.069+0800" }, "updatedAt" : { "$date" : "2015-08-04T19:01:39.069+0800" } }
20 | { "_id" : { "$oid" : "55c09caf207f5667710b116b" }, "rela_article" : "55a71ec62edf64a704478ac4", "content" : "广泛的方法", "username" : "18883881016", "createdAt" : { "$date" : "2015-08-04T19:06:23.021+0800" }, "updatedAt" : { "$date" : "2015-08-04T19:06:23.021+0800" } }
21 | { "_id" : { "$oid" : "55c09cf0207f5667710b116c" }, "rela_article" : "55a71c12c4ccfe013a2e2aa2", "content" : "多大的", "username" : "18883881016", "createdAt" : { "$date" : "2015-08-04T19:07:28.123+0800" }, "updatedAt" : { "$date" : "2015-08-04T19:07:28.123+0800" } }
22 | { "_id" : { "$oid" : "55c09d13ee2ba28d096561a9" }, "rela_article" : "55a71ec62edf64a704478ac4", "content" : "tree", "username" : "18883881016", "createdAt" : { "$date" : "2015-08-04T19:08:03.987+0800" }, "updatedAt" : { "$date" : "2015-08-04T19:08:03.987+0800" } }
23 |
--------------------------------------------------------------------------------
/classJson/channel.json:
--------------------------------------------------------------------------------
1 | { "_id" : { "$oid" : "55a463bdd406c8cc508bbfdf" }, "title" : "精选", "createdAt" : { "$date" : "2015-07-14T09:19:57.142+0800" }, "updatedAt" : { "$date" : "2015-07-17T14:35:50.589+0800" }, "imgs" : "http://img4.imgtn.bdimg.com/it/u=3766071980,2507566374&fm=21&gp=0.jpg" }
2 | { "_id" : { "$oid" : "55a463c94229ac9608d26251" }, "title" : "奇葩", "createdAt" : { "$date" : "2015-07-14T09:20:09.159+0800" }, "updatedAt" : { "$date" : "2015-07-17T14:35:28.594+0800" }, "imgs" : "http://img4.imgtn.bdimg.com/it/u=711195358,382123176&fm=21&gp=0.jpg" }
3 | { "_id" : { "$oid" : "55a463d37ed33bf87948b6bb" }, "title" : "视频", "createdAt" : { "$date" : "2015-07-14T09:20:19.548+0800" }, "updatedAt" : { "$date" : "2015-07-17T14:35:00.894+0800" }, "imgs" : "http://img3.imgtn.bdimg.com/it/u=2635056842,3795079085&fm=21&gp=0.jpg" }
4 | { "_id" : { "$oid" : "55a463e11bd1c923759dd53c" }, "title" : "故事", "createdAt" : { "$date" : "2015-07-14T09:20:33.346+0800" }, "updatedAt" : { "$date" : "2015-07-17T14:34:33.918+0800" }, "imgs" : "http://img1.imgtn.bdimg.com/it/u=2334459695,235302086&fm=21&gp=0.jpg" }
5 | { "_id" : { "$oid" : "55a463ec01c5737f69a5c2a9" }, "title" : "毕业生", "createdAt" : { "$date" : "2015-07-14T09:20:44.041+0800" }, "updatedAt" : { "$date" : "2015-07-17T14:34:09.710+0800" }, "imgs" : "http://img2.imgtn.bdimg.com/it/u=1426772519,3347481025&fm=11&gp=0.jpg" }
6 | { "_id" : { "$oid" : "55a463f86282777d5a79d10c" }, "title" : "美女", "createdAt" : { "$date" : "2015-07-14T09:20:56.308+0800" }, "updatedAt" : { "$date" : "2015-07-17T14:33:46.357+0800" }, "imgs" : "http://img4.imgtn.bdimg.com/it/u=1389926935,4005691555&fm=21&gp=0.jpg" }
7 | { "_id" : { "$oid" : "55a46406390e622a7547fc23" }, "title" : "育儿", "createdAt" : { "$date" : "2015-07-14T09:21:10.013+0800" }, "updatedAt" : { "$date" : "2015-07-17T14:33:08.192+0800" }, "imgs" : "http://img4.imgtn.bdimg.com/it/u=1389926935,4005691555&fm=21&gp=0.jpg" }
8 | { "_id" : { "$oid" : "55a4640e6282777d5a79d10d" }, "title" : "家居", "createdAt" : { "$date" : "2015-07-14T09:21:18.617+0800" }, "updatedAt" : { "$date" : "2015-07-17T14:32:55.948+0800" }, "imgs" : "http://img5.imgtn.bdimg.com/it/u=1302766810,2830902187&fm=21&gp=0.jpg" }
9 | { "_id" : { "$oid" : "55a46417390e622a7547fc24" }, "title" : "特卖", "createdAt" : { "$date" : "2015-07-14T09:21:27.939+0800" }, "updatedAt" : { "$date" : "2015-07-17T14:32:25.298+0800" }, "imgs" : "http://img4.imgtn.bdimg.com/it/u=2176594938,3580351124&fm=21&gp=0.jpg" }
10 | { "_id" : { "$oid" : "55a4642401c5737f69a5c2aa" }, "title" : "文化", "createdAt" : { "$date" : "2015-07-14T09:21:40.870+0800" }, "updatedAt" : { "$date" : "2015-07-17T14:31:52.333+0800" }, "imgs" : "http://img2.imgtn.bdimg.com/it/u=2014087184,241055058&fm=21&gp=0.jpg" }
11 | { "_id" : { "$oid" : "55a464363de63b9d57a545cb" }, "title" : "美食", "createdAt" : { "$date" : "2015-07-14T09:21:58.155+0800" }, "updatedAt" : { "$date" : "2015-07-17T14:31:33.345+0800" }, "imgs" : "http://img4.imgtn.bdimg.com/it/u=1516802001,136721947&fm=21&gp=0.jpg" }
12 | { "_id" : { "$oid" : "55a464417ed33bf87948b6bc" }, "title" : "教育", "createdAt" : { "$date" : "2015-07-14T09:22:09.323+0800" }, "updatedAt" : { "$date" : "2015-07-17T14:31:16.508+0800" }, "imgs" : "http://img1.imgtn.bdimg.com/it/u=796911735,379950928&fm=21&gp=0.jpg" }
13 | { "_id" : { "$oid" : "55a4644a3de63b9d57a545cc" }, "title" : "财经", "createdAt" : { "$date" : "2015-07-14T09:22:18.050+0800" }, "updatedAt" : { "$date" : "2015-07-17T14:30:59.051+0800" }, "imgs" : "http://img4.imgtn.bdimg.com/it/u=2176168647,4294092443&fm=21&gp=0.jpg" }
14 | { "_id" : { "$oid" : "55a464547ed33bf87948b6bd" }, "title" : "电影", "createdAt" : { "$date" : "2015-07-14T09:22:28.574+0800" }, "updatedAt" : { "$date" : "2015-07-17T14:30:41.997+0800" }, "imgs" : "http://img3.imgtn.bdimg.com/it/u=3441579762,607921545&fm=21&gp=0.jpg" }
15 | { "_id" : { "$oid" : "55a4645b4229ac9608d26252" }, "title" : "数码", "createdAt" : { "$date" : "2015-07-14T09:22:35.056+0800" }, "updatedAt" : { "$date" : "2015-07-17T14:30:04.624+0800" }, "imgs" : "http://img1.imgtn.bdimg.com/it/u=1511598376,1284908631&fm=21&gp=0.jpg" }
16 | { "_id" : { "$oid" : "55a4646501c5737f69a5c2b1" }, "title" : "情感", "createdAt" : { "$date" : "2015-07-14T09:22:45.195+0800" }, "updatedAt" : { "$date" : "2015-07-17T14:29:42.051+0800" }, "imgs" : "http://img0.imgtn.bdimg.com/it/u=639685062,3559597386&fm=21&gp=0.jpg" }
17 | { "_id" : { "$oid" : "55a464714229ac9608d26253" }, "title" : "段子", "createdAt" : { "$date" : "2015-07-14T09:22:57.304+0800" }, "updatedAt" : { "$date" : "2015-07-17T14:29:26.493+0800" }, "imgs" : "http://img0.imgtn.bdimg.com/it/u=3276310761,169384365&fm=21&gp=0.jpg" }
18 | { "_id" : { "$oid" : "55a4648401c5737f69a5c2b2" }, "title" : "搞笑", "createdAt" : { "$date" : "2015-07-14T09:23:16.262+0800" }, "updatedAt" : { "$date" : "2015-07-17T14:28:08.016+0800" }, "imgs" : "http://img4.imgtn.bdimg.com/it/u=2285827377,2426739803&fm=21&gp=0.jpg" }
19 | { "_id" : { "$oid" : "55a4648c01c5737f69a5c2b3" }, "title" : "正能量", "createdAt" : { "$date" : "2015-07-14T09:23:24.556+0800" }, "updatedAt" : { "$date" : "2015-07-17T14:27:42.946+0800" }, "imgs" : "http://img5.imgtn.bdimg.com/it/u=1177555942,4208001083&fm=21&gp=0.jpg" }
20 | { "_id" : { "$oid" : "55a464946282777d5a79d110" }, "title" : "历史", "createdAt" : { "$date" : "2015-07-14T09:23:32.357+0800" }, "updatedAt" : { "$date" : "2015-07-17T14:27:21.486+0800" }, "imgs" : "http://img3.imgtn.bdimg.com/it/u=3061724263,4213237614&fm=21&gp=0.jpg" }
21 | { "_id" : { "$oid" : "55a4649d7ed33bf87948b6be" }, "title" : "美图", "createdAt" : { "$date" : "2015-07-14T09:23:41.108+0800" }, "updatedAt" : { "$date" : "2015-07-17T14:27:08.193+0800" }, "imgs" : "http://img1.imgtn.bdimg.com/it/u=2734754182,3708152263&fm=21&gp=0.jpg" }
22 | { "_id" : { "$oid" : "55a47b3293ed3a8f404495d8" }, "title" : "推荐", "createdAt" : { "$date" : "2015-07-14T11:00:02.853+0800" }, "updatedAt" : { "$date" : "2015-07-17T14:26:43.975+0800" }, "user(uz*R*id)" : "null", "imgs" : "http://img5.imgtn.bdimg.com/it/u=1926566633,1690841856&fm=21&gp=0.jpg" }
23 | { "_id" : { "$oid" : "55a4891501673f3574c95fe9" }, "title" : "气温", "createdAt" : { "$date" : "2015-07-14T11:59:17.713+0800" }, "updatedAt" : { "$date" : "2015-07-17T14:25:52.103+0800" }, "user(uz*R*id)" : "null", "article(uz*R*id)" : "55a332f7390e622a7547f8ab", "imgs" : "http://img.soufun.com/news/2014_08/07/news/1407374509822_000.jpg" }
24 |
--------------------------------------------------------------------------------
/widget/html/public/openWin.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 今日头条
7 |
8 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | 发布
44 | 分享到:
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
72 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/widget/html/index-list/find-list.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 今日头条
7 |
8 |
43 |
44 |
45 |
46 |
49 |
50 |
59 |
60 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/widget/css/style.css:
--------------------------------------------------------------------------------
1 | body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td,nav,header { margin:0; padding:0; font-weight:normal; }
2 | nav{ display:block; }
3 | nav:after{ content:''; display:block; clear:both; }
4 | h1,h2,h3,h4,h5,h6{ font-size: 100%; }
5 | html,body { font-size:14px; height:100%; }
6 | td,th,caption { }
7 | img { border:none; }
8 | ol,ul,li { list-style:none; }
9 | table { border-collapse:collapse; }
10 | samll{ font-size:30%; }
11 |
12 | body.default-bg{ background: url(../image/default_bg.png) no-repeat center; }
13 |
14 | .none{ display: none !important; }
15 |
16 | .opacity{ opacity: 1 !important; }
17 |
18 | .row-nowrap{ overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
19 | .flex-wrap{ display: -webkit-box; display: -webkit-flex; display: flex; }
20 | .flex-con{ -webkit-box-flex: 1; -webkit-flex: 1; flex: 1;}
21 |
22 | .arrows{ position:relative; }
23 | .arrows:before,
24 | .arrows:after{ content:''; display:inline-block; width:30%; height:2px; background-color:white; position:absolute; left:50%; top:50%; margin-left:-20%; -webkit-transform: rotate(45deg); }
25 | .arrows:after{ -webkit-transform: rotate(-45deg); margin-left:0; }
26 |
27 | .border-t,
28 | .border-b{ position:relative; }
29 | .border-t:before,
30 | .border-b:after{ content: ''; position: absolute; left: 0; top:0; background: #ddd; right:0; height: 1px; -webkit-transform: scaleY(0.5); transform: scaleY(0.5); -webkit-transform-origin: 0 0; transform-origin: 0 0; }
31 | .border-b:after{ top:auto; bottom:0; }
32 | body.black .border-t:before,
33 | body.black .border-b:after{ background-color: #363636; }
34 |
35 |
36 |
37 |
38 | .switch{width: 46px;height: 26px;position: relative; box-sizing : border-box; border: 1px solid #ccc; background-color: #ddd; box-shadow: #ff6262 0 0 0 0 inset; border-radius: 13px; background-clip: content-box; display: inline-block; -webkit-appearance: none; user-select: none; outline: none; transition:all .4s; }
39 | .switch:before {width: 24px; height: 24px; position: absolute; top: 0px; transition:all 1s; left: 0px; border-radius: 13px; background-color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4); content: ''; transition: left 0.3s; }
40 | .switch:checked {border-color: #67778b;box-shadow: #67778b 0 0 0 26px inset;background-color: #67778b;transition: border ease 0.4s,box-shadow ease 0.4s,background-color ease 1.2s; }
41 | .switch:checked:before {left: 20px; background-color: #252525; }
42 |
43 |
44 | .ic-pulltorefresh{ position: absolute; right:10px; top: 0; width: 20px; height: 40px; background-color: rgba(0, 0, 0, .2); border-radius: 0 0 50px 50px; }
45 | .ic-pulltorefresh:after{ content: ''; display: block; background-repeat:no-repeat; background-image:url(../image/pulltorefresh_arrow.png); background-position: center; background-size: auto 80%; width: 100%; height: 100%; }
46 |
47 |
48 | /* 底部浮动 添加频道 */
49 | .add-channel{ background-color: rgba(0,0,0,.8); line-height: 42px; color: #e5e5e5; padding: 0 15px; position: fixed; left: 0; bottom: 0; right: 0; z-index: 2; }
50 | .add-channel span{ background-color: #d43d3d; color: #efc6c6; line-height: 30px; display: block; padding: 0 6px; float: right; margin-top: 6px; border-radius: 6px; }
51 |
52 |
53 | /* 头部浮动 引擎更新提示 */
54 | .add-update{ background-color: rgba(23, 116, 182,.8); text-align: center; border-radius: 4px; line-height: 26px; color: white; padding: 0 15px; position: fixed; left: 10px; top: 10px; right: 10px; z-index: 2; }
55 | body.black .add-update{ background-color: rgba(50, 88, 112,.8); color: #b1b1b1; }
56 |
57 |
58 | /* 提示弹窗 */
59 | .pra-open{ position: fixed; left:50%; top:50%; z-index: 100; background-color: rgba(0,0,0,.6); color: white; padding: 20px; border-radius: 6px; }
60 |
61 |
62 | /* 透明遮罩曾 */
63 | .showdown{ position: fixed; left:0; top: 0; right: 0; bottom: 0; background-color: rgba(0,0,0,.6); }
64 |
65 |
66 | .ic-home{ background-image:url(../image/home_tabbar_normal.png); }
67 | .ic-search{ background-image:url(../image/discover_tabbar_normal.png); }
68 | .ic-topic{ background-image:url(../image/dynamic_tabbar_normal.png); }
69 | .ic-me{ background-image:url(../image/mine_tabbar_normal.png); }
70 | .ic-home.active{ background-image:url(../image/home_tabbar_pressed.png); }
71 | .ic-search.active{ background-image:url(../image/discover_tabbar_pressed.png); }
72 | .ic-topic.active{ background-image:url(../image/dynamic_tabbar_pressed.png); }
73 | .ic-me.active{ background-image:url(../image/mine_tabbar_pressed.png); }
74 | body.black .ic-home.active{ background-image:url(../image/home_tabbar_pressed_night.png); }
75 | body.black .ic-search.active{ background-image:url(../image/discover_tabbar_pressed_night.png); }
76 | body.black .ic-topic.active{ background-image:url(../image/dynamic_tabbar_pressed_night.png); }
77 | body.black .ic-me.active{ background-image:url(../image/mine_tabbar_pressed_night.png); }
78 |
79 | .ic-reload{ background-image:url(../image/refreshing_video_textpage_normal.png); }
80 | .ic-message{ background-image:url(../image/message_titlebar_topic_normal.png); }
81 | .ic-back{ background-image:url(../image/back_move_details_normal_night.png); }
82 | .ic-font-family{ background-image:url(../image/show_title_details_normal.png); }
83 | .ic-add{ background-image:url(../image/addicon_titlebar_topic_normal.png); }
84 |
85 |
86 | .ic-collect{ background-image:url(../image/favoriteicon_profile.png); }
87 | .ic-inform{ background-image:url(../image/messageicon_profile.png); }
88 | .ic-store{ background-image:url(../image/sellicon_profile.png); }
89 | .ic-activity{ background-image:url(../image/activityicon_profile.png); }
90 | .ic-download{ background-image:url(../image/downloadicon_profile.png); }
91 | .ic-night{ background-image:url(../image/nighticon_profile.png); }
92 | .ic-feedback{ background-image:url(../image/feedbackicon_profile.png); }
93 | body.black .ic-collect{ background-image:url(../image/favoriteicon_profile_night.png); }
94 | body.black .ic-inform{ background-image:url(../image/messageicon_profile_night.png); }
95 | body.black .ic-store{ background-image:url(../image/sellicon_profile_night.png); }
96 | body.black .ic-activity{ background-image:url(../image/activityicon_profile_night.png); }
97 | body.black .ic-download{ background-image:url(../image/downloadicon_profile_night.png); }
98 | body.black .ic-night{ background-image:url(../image/nighticon_profile_night.png); }
99 | body.black .ic-feedback{ background-image:url(../image/feedbackicon_profile_night.png); }
100 |
101 |
102 | .ic-praise{ background-image:url(../image/digupicon_details_normal_night.png); }
103 | .ic-praise.active{ background-image:url(../image/digupicon_details_pressed.png); }
104 | .ic-trample{ background-image:url(../image/digdownicon_details_normal_night.png); }
105 | .ic-trample.active{ background-image:url(../image/digdownicon_details_pressed.png); }
106 | .ic-comment{ background-image:url(../image/ic_action_comment_pressed_night.png); }
107 | .ic-edit{ background-image:url(../image/ic_action_write_pressed_night.png); }
108 | .ic-favor{ background-image:url(../image/ic_action_favor_normal_night.png); }
109 | .ic-favor.active{ background-image:url(../image/ic_action_favor_on_normal.png); }
110 | .ic-share{ background-image:url(../image/shareicon_titlebar_dynamic_normal.png); }
111 | .ic-shares{ background-image:url(../image/repost_popover_night.png); }
112 | .ic-report{ background-image:url(../image/report_tool_details_pressed_night.png); }
113 | .ic-more{ background-image:url(../image/btn_more_title_detail_normal.png); }
114 | .ic-dynamic{ background-image:url(../image/writeicon_dynamic_normal_night.png); }
115 |
116 | .ic-move:after{ background-image:url(../image/play_gifinsets_textpage_pressed_night.png); }
117 |
118 |
119 |
120 | /* body.black { background-color: #252525; } */
121 |
122 |
123 | @-webkit-keyframes fa-spin{
124 | 0%{
125 | -webkit-transform:rotate(0deg);transform:rotate(0deg)
126 | }
127 | 100%{
128 | -webkit-transform:rotate(359deg);transform:rotate(359deg)
129 | }
130 | }
131 | keyframes fa-spin{
132 | 0%{
133 | -webkit-transform:rotate(0deg);transform:rotate(0deg)
134 | }
135 | 100%{
136 | -webkit-transform:rotate(359deg);transform:rotate(359deg)
137 | }
138 | }
--------------------------------------------------------------------------------
/widget/html/public/login-reg.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | DEMO
6 |
7 |
8 |
9 |
10 |
50 |
51 |
52 |
53 |
57 |
61 |
62 | 忘记密码
63 | 注册账号
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
76 |
80 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |

93 |
94 |
95 |
104 |
105 |
106 |
107 | 订阅
108 | 0 |
109 | 关注
110 | 0 |
111 | 粉丝
112 | 0
113 |
114 | 刚开始你的旅途
115 |
116 |
点击加载更多
117 |
118 |
119 |
120 |
121 |
122 |
--------------------------------------------------------------------------------
/widget/html/index-list/topic-list.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 今日头条
7 |
8 |
53 |
54 |
55 |
56 |
61 |
62 |
63 |
74 |
75 |
96 |
97 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
--------------------------------------------------------------------------------
/widget/html/public/channel-list.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 今日头条
7 |
8 |
41 |
42 |
43 |
44 |
49 |
50 |
51 |
52 |
55 |
56 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/widget/html/public/header.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 今日头条
7 |
8 |
31 |
32 |
33 |
34 |
38 |
39 | 手机号注册
40 |
41 | 登陆
42 |
43 |
44 | 个人主页
45 |
46 | 登出
47 |
48 |
52 |
57 |
61 |
62 | 举报文章问题
63 |
64 | 提交
65 |
66 |
71 |
72 | 我的收藏
73 |
74 | 编辑
75 |
76 |
77 | 离线下载
78 |
79 | 下载
80 |
81 |
85 |
89 |
94 |
95 |
96 |
103 |
107 |
108 |
109 |
110 |
111 |
--------------------------------------------------------------------------------
/widget/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 今日头条
7 |
8 |
36 |
37 |
38 |
46 |
47 |
53 |
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/widget/html/index-list/me-list.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 今日头条
7 |
8 |
52 |
53 |
54 |
55 |
59 |
60 |
61 |
67 |
68 | 更多登陆方式
69 |
70 |
71 |
84 |
85 |
86 | -
87 |
88 |
92 |
93 | -
94 |
95 |
99 |
100 |
101 |
102 |
103 | -
104 |
105 |
106 |
107 |
商城特卖,电影
108 |
109 |
110 | -
111 |
112 |
116 |
117 |
118 |
119 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
--------------------------------------------------------------------------------
/widget/script/swipe.js:
--------------------------------------------------------------------------------
1 | /*
2 | * Swipe 2.0
3 | *
4 | * Brad Birdsall
5 | * Copyright 2013, MIT License
6 | *
7 | */
8 |
9 | function Swipe(container, options) {
10 |
11 | "use strict";
12 |
13 | // utilities
14 | var noop = function() {}; // simple no operation function
15 | var offloadFn = function(fn) { setTimeout(fn || noop, 0) }; // offload a functions execution
16 |
17 | // check browser capabilities
18 | var browser = {
19 | addEventListener: !!window.addEventListener,
20 | touch: ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch,
21 | transitions: (function(temp) {
22 | var props = ['transitionProperty', 'WebkitTransition', 'MozTransition', 'OTransition', 'msTransition'];
23 | for ( var i in props ) if (temp.style[ props[i] ] !== undefined) return true;
24 | return false;
25 | })(document.createElement('swipe'))
26 | };
27 |
28 | // quit if no root element
29 | if (!container) return;
30 | var element = container.children[0];
31 | var slides, slidePos, width, length;
32 | options = options || {};
33 | var index = parseInt(options.startSlide, 10) || 0;
34 | var speed = options.speed || 300;
35 | options.continuous = options.continuous !== undefined ? options.continuous : true;
36 |
37 | function setup() {
38 |
39 | // cache slides
40 | slides = element.children;
41 | length = slides.length;
42 |
43 | // set continuous to false if only one slide
44 | if (slides.length < 2) options.continuous = false;
45 |
46 | //special case if two slides
47 | if (browser.transitions && options.continuous && slides.length < 3) {
48 | element.appendChild(slides[0].cloneNode(true));
49 | element.appendChild(element.children[1].cloneNode(true));
50 | slides = element.children;
51 | }
52 |
53 | // create an array to store current positions of each slide
54 | slidePos = new Array(slides.length);
55 |
56 | // determine width of each slide
57 | width = container.getBoundingClientRect().width || container.offsetWidth;
58 |
59 | element.style.width = (slides.length * width) + 'px';
60 |
61 | // stack elements
62 | var pos = slides.length;
63 | while(pos--) {
64 |
65 | var slide = slides[pos];
66 |
67 | slide.style.width = width + 'px';
68 | slide.setAttribute('data-index', pos);
69 |
70 | if (browser.transitions) {
71 | slide.style.left = (pos * -width) + 'px';
72 | move(pos, index > pos ? -width : (index < pos ? width : 0), 0);
73 | }
74 |
75 | }
76 |
77 | // reposition elements before and after index
78 | if (options.continuous && browser.transitions) {
79 | move(circle(index-1), -width, 0);
80 | move(circle(index+1), width, 0);
81 | }
82 |
83 | if (!browser.transitions) element.style.left = (index * -width) + 'px';
84 |
85 | container.style.visibility = 'visible';
86 |
87 | }
88 |
89 | function prev() {
90 |
91 | if (options.continuous) slide(index-1);
92 | else if (index) slide(index-1);
93 |
94 | }
95 |
96 | function next() {
97 | if (options.continuous) slide(index+1);
98 | else if (index < slides.length - 1) slide(index+1);
99 |
100 | }
101 |
102 | function circle(index) {
103 |
104 | // a simple positive modulo using slides.length
105 | return (slides.length + (index % slides.length)) % slides.length;
106 |
107 | }
108 |
109 | function slide(to, slideSpeed) {
110 |
111 | // do nothing if already on requested slide
112 | if (index == to) return;
113 |
114 | if (browser.transitions) {
115 |
116 | var direction = Math.abs(index-to) / (index-to); // 1: backward, -1: forward
117 |
118 | // get the actual position of the slide
119 | if (options.continuous) {
120 | var natural_direction = direction;
121 | direction = -slidePos[circle(to)] / width;
122 |
123 | // if going forward but to < index, use to = slides.length + to
124 | // if going backward but to > index, use to = -slides.length + to
125 | if (direction !== natural_direction) to = -direction * slides.length + to;
126 |
127 | }
128 |
129 | var diff = Math.abs(index-to) - 1;
130 |
131 | // move all the slides between index and to in the right direction
132 | while (diff--) move( circle((to > index ? to : index) - diff - 1), width * direction, 0);
133 |
134 | to = circle(to);
135 |
136 | move(index, width * direction, slideSpeed || speed);
137 | move(to, 0, slideSpeed || speed);
138 |
139 | if (options.continuous) move(circle(to - direction), -(width * direction), 0); // we need to get the next in place
140 |
141 | } else {
142 |
143 | to = circle(to);
144 | animate(index * -width, to * -width, slideSpeed || speed);
145 | //no fallback for a circular continuous if the browser does not accept transitions
146 | }
147 |
148 | index = to;
149 | offloadFn(options.callback && options.callback(index, slides[index]));
150 | }
151 |
152 | function move(index, dist, speed) {
153 |
154 | translate(index, dist, speed);
155 | slidePos[index] = dist;
156 |
157 | }
158 |
159 | function translate(index, dist, speed) {
160 |
161 | var slide = slides[index];
162 | var style = slide && slide.style;
163 |
164 | if (!style) return;
165 |
166 | style.webkitTransitionDuration =
167 | style.MozTransitionDuration =
168 | style.msTransitionDuration =
169 | style.OTransitionDuration =
170 | style.transitionDuration = speed + 'ms';
171 |
172 | style.webkitTransform = 'translate(' + dist + 'px,0)' + 'translateZ(0)';
173 | style.msTransform =
174 | style.MozTransform =
175 | style.OTransform = 'translateX(' + dist + 'px)';
176 |
177 | }
178 |
179 | function animate(from, to, speed) {
180 |
181 | // if not an animation, just reposition
182 | if (!speed) {
183 |
184 | element.style.left = to + 'px';
185 | return;
186 |
187 | }
188 |
189 | var start = +new Date;
190 |
191 | var timer = setInterval(function() {
192 |
193 | var timeElap = +new Date - start;
194 |
195 | if (timeElap > speed) {
196 |
197 | element.style.left = to + 'px';
198 |
199 | if (delay) begin();
200 |
201 | options.transitionEnd && options.transitionEnd.call(event, index, slides[index]);
202 |
203 | clearInterval(timer);
204 | return;
205 |
206 | }
207 |
208 | element.style.left = (( (to - from) * (Math.floor((timeElap / speed) * 100) / 100) ) + from) + 'px';
209 |
210 | }, 4);
211 |
212 | }
213 |
214 | // setup auto slideshow
215 | var delay = options.auto || 0;
216 | var interval;
217 |
218 | function begin() {
219 |
220 | interval = setTimeout(next, delay);
221 |
222 | }
223 |
224 | function stop() {
225 |
226 | delay = 0;
227 | clearTimeout(interval);
228 |
229 | }
230 |
231 |
232 | // setup initial vars
233 | var start = {};
234 | var delta = {};
235 | var isScrolling;
236 |
237 | // setup event capturing
238 | var events = {
239 |
240 | handleEvent: function(event) {
241 |
242 | switch (event.type) {
243 | case 'touchstart': this.start(event); break;
244 | case 'touchmove': this.move(event); break;
245 | // case 'touchend': this.end(event); break; //modify by Alon Zhang
246 | case 'touchend': offloadFn(this.end(event)); break;
247 | case 'webkitTransitionEnd':
248 | case 'msTransitionEnd':
249 | case 'oTransitionEnd':
250 | case 'otransitionend':
251 | case 'transitionend': offloadFn(this.transitionEnd(event)); break;
252 | case 'resize': offloadFn(setup); break;
253 | }
254 |
255 | if (options.stopPropagation) event.stopPropagation();
256 |
257 | },
258 | start: function(event) {
259 | //adapt APICloud, add by Alon Zhang
260 | //lock slidlayout
261 | api.lockSlidPane();
262 | //lock framegroup
263 | api.setFrameGroupAttr({
264 | scrollEnabled: false
265 | });
266 |
267 | var touches = event.touches[0];
268 |
269 | // measure start values
270 | start = {
271 |
272 | // get initial touch coords
273 | x: touches.pageX,
274 | y: touches.pageY,
275 |
276 | // store time to determine touch duration
277 | time: +new Date
278 |
279 | };
280 |
281 | // used for testing first move event
282 | isScrolling = undefined;
283 |
284 | // reset delta and end measurements
285 | delta = {};
286 |
287 | // attach touchmove and touchend listeners
288 | element.addEventListener('touchmove', this, false);
289 | element.addEventListener('touchend', this, false);
290 |
291 | },
292 | move: function(event) {
293 |
294 | // ensure swiping with one touch and not pinching
295 | if ( event.touches.length > 1 || event.scale && event.scale !== 1) return
296 |
297 | if (options.disableScroll) event.preventDefault();
298 |
299 | var touches = event.touches[0];
300 |
301 | // measure change in x and y
302 | delta = {
303 | x: touches.pageX - start.x,
304 | y: touches.pageY - start.y
305 | }
306 |
307 | // determine if scrolling test has run - one time test
308 | if ( typeof isScrolling == 'undefined') {
309 | isScrolling = !!( isScrolling || Math.abs(delta.x) < Math.abs(delta.y) );
310 | }
311 |
312 | // if user is not trying to scroll vertically
313 | if (!isScrolling) {
314 |
315 | // prevent native scrolling
316 | event.preventDefault();
317 |
318 | // stop slideshow
319 | stop();
320 |
321 | // increase resistance if first or last slide
322 | if (options.continuous) { // we don't add resistance at the end
323 |
324 | translate(circle(index-1), delta.x + slidePos[circle(index-1)], 0);
325 | translate(index, delta.x + slidePos[index], 0);
326 | translate(circle(index+1), delta.x + slidePos[circle(index+1)], 0);
327 |
328 | } else {
329 |
330 | delta.x =
331 | delta.x /
332 | ( (!index && delta.x > 0 // if first slide and sliding left
333 | || index == slides.length - 1 // or if last slide and sliding right
334 | && delta.x < 0 // and if sliding at all
335 | ) ?
336 | ( Math.abs(delta.x) / width + 1 ) // determine resistance level
337 | : 1 ); // no resistance if false
338 |
339 | // translate 1:1
340 | translate(index-1, delta.x + slidePos[index-1], 0);
341 | translate(index, delta.x + slidePos[index], 0);
342 | translate(index+1, delta.x + slidePos[index+1], 0);
343 | }
344 |
345 | }
346 |
347 | },
348 | end: function(event) {
349 | //adapt APICloud, add by Alon Zhang
350 | //unlock slidlayout
351 | api.unlockSlidPane();
352 | //unlock framegroup
353 | api.setFrameGroupAttr({
354 | scrollEnabled: true
355 | });
356 |
357 | // measure duration
358 | var duration = +new Date - start.time;
359 |
360 | // determine if slide attempt triggers next/prev slide
361 | var isValidSlide =
362 | Number(duration) < 250 // if slide duration is less than 250ms
363 | && Math.abs(delta.x) > 20 // and if slide amt is greater than 20px
364 | || Math.abs(delta.x) > width/2; // or if slide amt is greater than half the width
365 |
366 | // determine if slide attempt is past start and end
367 | var isPastBounds =
368 | !index && delta.x > 0 // if first slide and slide amt is greater than 0
369 | || index == slides.length - 1 && delta.x < 0; // or if last slide and slide amt is less than 0
370 |
371 | if (options.continuous) isPastBounds = false;
372 |
373 | // determine direction of swipe (true:right, false:left)
374 | var direction = delta.x < 0;
375 |
376 | // if not scrolling vertically
377 | if (!isScrolling) {
378 |
379 | if (isValidSlide && !isPastBounds) {
380 |
381 | if (direction) {
382 |
383 | if (options.continuous) { // we need to get the next in this direction in place
384 |
385 | move(circle(index-1), -width, 0);
386 | move(circle(index+2), width, 0);
387 |
388 | } else {
389 | move(index-1, -width, 0);
390 | }
391 |
392 | move(index, slidePos[index]-width, speed);
393 | move(circle(index+1), slidePos[circle(index+1)]-width, speed);
394 | index = circle(index+1);
395 |
396 | } else {
397 | if (options.continuous) { // we need to get the next in this direction in place
398 |
399 | move(circle(index+1), width, 0);
400 | move(circle(index-2), -width, 0);
401 |
402 | } else {
403 | move(index+1, width, 0);
404 | }
405 |
406 | move(index, slidePos[index]+width, speed);
407 | move(circle(index-1), slidePos[circle(index-1)]+width, speed);
408 | index = circle(index-1);
409 |
410 | }
411 |
412 | options.callback && options.callback(index, slides[index]);
413 |
414 | } else {
415 |
416 | if (options.continuous) {
417 |
418 | move(circle(index-1), -width, speed);
419 | move(index, 0, speed);
420 | move(circle(index+1), width, speed);
421 |
422 | } else {
423 |
424 | move(index-1, -width, speed);
425 | move(index, 0, speed);
426 | move(index+1, width, speed);
427 | }
428 |
429 | }
430 |
431 | }
432 |
433 | // kill touchmove and touchend event listeners until touchstart called again
434 | element.removeEventListener('touchmove', events, false);
435 | element.removeEventListener('touchend', events, false);
436 |
437 | //add by Alon Zhang
438 | //resume slide
439 | delay = options.auto;
440 |
441 | },
442 | transitionEnd: function(event) {
443 |
444 | if (parseInt(event.target.getAttribute('data-index'), 10) == index) {
445 |
446 | if (delay) begin();
447 |
448 | options.transitionEnd && options.transitionEnd.call(event, index, slides[index]);
449 |
450 | }
451 |
452 | }
453 |
454 | }
455 |
456 | // trigger setup
457 | setup();
458 |
459 | // start auto slideshow if applicable
460 | if (delay) begin();
461 |
462 |
463 | // add event listeners
464 | if (browser.addEventListener) {
465 |
466 | // set touchstart event on element
467 | if (browser.touch) element.addEventListener('touchstart', events, false);
468 |
469 | if (browser.transitions) {
470 | element.addEventListener('webkitTransitionEnd', events, false);
471 | element.addEventListener('msTransitionEnd', events, false);
472 | element.addEventListener('oTransitionEnd', events, false);
473 | element.addEventListener('otransitionend', events, false);
474 | element.addEventListener('transitionend', events, false);
475 | }
476 |
477 | // set resize event on window
478 | window.addEventListener('resize', events, false);
479 |
480 | } else {
481 |
482 | window.onresize = function () { setup()}; // to play nice with old IE
483 |
484 | }
485 |
486 | // expose the Swipe API
487 | return {
488 | setup: function() {
489 |
490 | setup();
491 |
492 | },
493 | slide: function(to, speed) {
494 |
495 | // cancel slideshow
496 | stop();
497 |
498 | slide(to, speed);
499 |
500 | },
501 | prev: function() {
502 |
503 | // cancel slideshow
504 | stop();
505 |
506 | prev();
507 |
508 | },
509 | next: function() {
510 |
511 | // cancel slideshow
512 | stop();
513 |
514 | next();
515 |
516 | },
517 | stop: function() {
518 |
519 | // cancel slideshow
520 | stop();
521 |
522 | },
523 | getPos: function() {
524 |
525 | // return current index position
526 | return index;
527 |
528 | },
529 | getNumSlides: function() {
530 |
531 | // return total number of slides
532 | return length;
533 | },
534 | kill: function() {
535 |
536 | // cancel slideshow
537 | stop();
538 |
539 | // reset element
540 | element.style.width = '';
541 | element.style.left = '';
542 |
543 | // reset slides
544 | var pos = slides.length;
545 | while(pos--) {
546 |
547 | var slide = slides[pos];
548 | slide.style.width = '';
549 | slide.style.left = '';
550 |
551 | if (browser.transitions) translate(pos, 0, 0);
552 |
553 | }
554 |
555 | // removed event listeners
556 | if (browser.addEventListener) {
557 |
558 | // remove current event listeners
559 | element.removeEventListener('touchstart', events, false);
560 | element.removeEventListener('webkitTransitionEnd', events, false);
561 | element.removeEventListener('msTransitionEnd', events, false);
562 | element.removeEventListener('oTransitionEnd', events, false);
563 | element.removeEventListener('otransitionend', events, false);
564 | element.removeEventListener('transitionend', events, false);
565 | window.removeEventListener('resize', events, false);
566 |
567 | }
568 | else {
569 |
570 | window.onresize = null;
571 |
572 | }
573 |
574 | }
575 | }
576 |
577 | }
578 |
579 |
580 | if ( window.jQuery || window.Zepto ) {
581 | (function($) {
582 | $.fn.Swipe = function(params) {
583 | return this.each(function() {
584 | $(this).data('Swipe', new Swipe($(this)[0], params));
585 | });
586 | }
587 | })( window.jQuery || window.Zepto )
588 | }
589 |
--------------------------------------------------------------------------------
/widget/css/font-awesome.min.css:
--------------------------------------------------------------------------------
1 | @font-face{font-family:'FontAwesome';src:url('./fonts/fontawesome-webfont.eot?v=4.3.0');src:url('./fonts/fontawesome-webfont.eot?#iefix&v=4.3.0') format('embedded-opentype'),url('./fonts/fontawesome-webfont.woff2?v=4.3.0') format('woff2'),url('./fonts/fontawesome-webfont.woff?v=4.3.0') format('woff'),url('./fonts/fontawesome-webfont.ttf?v=4.3.0') format('truetype'),url('./fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;transform:translate(0, 0)}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-genderless:before,.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}
--------------------------------------------------------------------------------
/widget/html/public/article.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | DEMO
6 |
7 |
8 |
9 |
10 |
106 |
107 |
108 |
109 |
110 |
118 |
119 |
142 |
发新帖
143 |
144 |
145 |
149 |
150 |
162 |
163 |
164 |
165 |
科技之窗
166 |
聚焦最新科技资讯和产品,提供深入
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
相关阅读
175 |
176 | 数码
177 | 小米科技
178 | Google Nexus
179 | 智能手机
180 |
181 |
182 | - 山寨机严重的摇钱树:三星和小米系列榜首
183 | - 山寨机严重的摇钱树:三星和小米系列榜首
184 | - 山寨机严重的摇钱树:三星和小米系列榜首
185 | - 山寨机严重的摇钱树:三星和小米系列榜首
186 |
187 |
点击进入[ 手机 ]频道 >
188 |
189 |
190 |
194 |
米粉看过来 >> 进入话题
195 |
热门评论
196 |
215 |
216 |
217 |
218 |
219 |
220 | 已赞
221 |
222 |
223 |
224 |
--------------------------------------------------------------------------------
/widget/script/api.js:
--------------------------------------------------------------------------------
1 | /*
2 | * APP3C JavaScript Library
3 | * Copyright (c) 2014 apicloud.com
4 | */
5 | (function(window){
6 | var u = {};
7 | var isAndroid = (/android/gi).test(navigator.appVersion);
8 | var uzStorage = function(){
9 | var ls = window.localStorage;
10 | if(isAndroid){
11 | ls = os.localStorage();
12 | }
13 | return ls;
14 | };
15 | function parseArguments(url, data, fnSuc, dataType) {
16 | if (typeof(data) == 'function') {
17 | dataType = fnSuc;
18 | fnSuc = data;
19 | data = undefined;
20 | }
21 | if (typeof(fnSuc) != 'function') {
22 | dataType = fnSuc;
23 | fnSuc = undefined;
24 | }
25 | return {
26 | url: url,
27 | data: data,
28 | fnSuc: fnSuc,
29 | dataType: dataType
30 | };
31 | }
32 | u.trim = function(str){
33 | if(String.prototype.trim){
34 | return str == null ? "" : String.prototype.trim.call(str);
35 | }else{
36 | return str.replace(/(^\s*)|(\s*$)/g, "");
37 | }
38 | };
39 | u.trimAll = function(str){
40 | return str.replace(/\s*/g,'');
41 | };
42 | u.isElement = function(obj){
43 | return !!(obj && obj.nodeType == 1);
44 | };
45 | u.isArray = function(obj){
46 | if(Array.isArray){
47 | return Array.isArray(obj);
48 | }else{
49 | return obj instanceof Array;
50 | }
51 | };
52 | u.isEmptyObject = function(obj){
53 | if(JSON.stringify(obj) === '{}'){
54 | return true;
55 | }
56 | return false;
57 | };
58 | u.addEvt = function(el, name, fn, useCapture){
59 | if(!u.isElement(el)){
60 | console.warn('$api.addEvt Function need el param, el param must be DOM Element');
61 | return;
62 | }
63 | useCapture = useCapture || false;
64 | if(el.addEventListener) {
65 | el.addEventListener(name, fn, useCapture);
66 | }
67 | };
68 | u.rmEvt = function(el, name, fn, useCapture){
69 | if(!u.isElement(el)){
70 | console.warn('$api.rmEvt Function need el param, el param must be DOM Element');
71 | return;
72 | }
73 | useCapture = useCapture || false;
74 | if (el.removeEventListener) {
75 | el.removeEventListener(name, fn, useCapture);
76 | }
77 | };
78 | u.one = function(el, name, fn, useCapture){
79 | if(!u.isElement(el)){
80 | console.warn('$api.one Function need el param, el param must be DOM Element');
81 | return;
82 | }
83 | useCapture = useCapture || false;
84 | var that = this;
85 | var cb = function(){
86 | fn && fn();
87 | that.rmEvt(el, name, cb, useCapture);
88 | };
89 | that.addEvt(el, name, cb, useCapture);
90 | };
91 | u.dom = function(el, selector){
92 | if(arguments.length === 1 && typeof arguments[0] == 'string'){
93 | if(document.querySelector){
94 | return document.querySelector(arguments[0]);
95 | }
96 | }else if(arguments.length === 2){
97 | if(el.querySelector){
98 | return el.querySelector(selector);
99 | }
100 | }
101 | };
102 | u.domAll = function(el, selector){
103 | if(arguments.length === 1 && typeof arguments[0] == 'string'){
104 | if(document.querySelectorAll){
105 | return document.querySelectorAll(arguments[0]);
106 | }
107 | }else if(arguments.length === 2){
108 | if(el.querySelectorAll){
109 | return el.querySelectorAll(selector);
110 | }
111 | }
112 | };
113 | u.byId = function(id){
114 | return document.getElementById(id);
115 | };
116 | u.first = function(el, selector){
117 | if(arguments.length === 1){
118 | if(!u.isElement(el)){
119 | console.warn('$api.first Function need el param, el param must be DOM Element');
120 | return;
121 | }
122 | return el.children[0];
123 | }
124 | if(arguments.length === 2){
125 | return this.dom(el, selector+':first-child');
126 | }
127 | };
128 | u.last = function(el, selector){
129 | if(arguments.length === 1){
130 | if(!u.isElement(el)){
131 | console.warn('$api.last Function need el param, el param must be DOM Element');
132 | return;
133 | }
134 | var children = el.children;
135 | return children[children.length - 1];
136 | }
137 | if(arguments.length === 2){
138 | return this.dom(el, selector+':last-child');
139 | }
140 | };
141 | u.eq = function(el, index){
142 | return this.dom(el, ':nth-child('+ index +')');
143 | };
144 | u.not = function(el, selector){
145 | return this.domAll(el, ':not('+ selector +')');
146 | };
147 | u.prev = function(el){
148 | if(!u.isElement(el)){
149 | console.warn('$api.prev Function need el param, el param must be DOM Element');
150 | return;
151 | }
152 | var node = el.previousSibling;
153 | if(node.nodeType && node.nodeType === 3){
154 | node = node.previousSibling;
155 | return node;
156 | }
157 | };
158 | u.next = function(el){
159 | if(!u.isElement(el)){
160 | console.warn('$api.next Function need el param, el param must be DOM Element');
161 | return;
162 | }
163 | var node = el.nextSibling;
164 | if(node.nodeType && node.nodeType === 3){
165 | node = node.nextSibling;
166 | return node;
167 | }
168 | };
169 | u.closest = function(el, selector){
170 | if(!u.isElement(el)){
171 | console.warn('$api.closest Function need el param, el param must be DOM Element');
172 | return;
173 | }
174 | var doms, targetDom;
175 | var isSame = function(doms, el){
176 | var i = 0, len = doms.length;
177 | for(i; i -1){
250 | return true;
251 | }else{
252 | return false;
253 | }
254 | };
255 | u.addCls = function(el, cls){
256 | if(!u.isElement(el)){
257 | console.warn('$api.addCls Function need el param, el param must be DOM Element');
258 | return;
259 | }
260 | if('classList' in el){
261 | el.classList.add(cls);
262 | }else{
263 | var preCls = el.className;
264 | var newCls = preCls +' '+ cls;
265 | el.className = newCls;
266 | }
267 | return el;
268 | };
269 | u.removeCls = function(el, cls){
270 | if(!u.isElement(el)){
271 | console.warn('$api.removeCls Function need el param, el param must be DOM Element');
272 | return;
273 | }
274 | if('classList' in el){
275 | el.classList.remove(cls);
276 | }else{
277 | var preCls = el.className;
278 | var newCls = preCls.replace(cls, '');
279 | el.className = newCls;
280 | }
281 | return el;
282 | };
283 | u.toggleCls = function(el, cls){
284 | if(!u.isElement(el)){
285 | console.warn('$api.toggleCls Function need el param, el param must be DOM Element');
286 | return;
287 | }
288 | if('classList' in el){
289 | el.classList.toggle(cls);
290 | }else{
291 | if(u.hasCls(el, cls)){
292 | u.addCls(el, cls);
293 | }else{
294 | u.removeCls(el, cls);
295 | }
296 | }
297 | return el;
298 | };
299 | u.val = function(el, val){
300 | if(!u.isElement(el)){
301 | console.warn('$api.val Function need el param, el param must be DOM Element');
302 | return;
303 | }
304 | if(arguments.length === 1){
305 | switch(el.tagName){
306 | case 'SELECT':
307 | var value = el.options[el.selectedIndex].value;
308 | return value;
309 | break;
310 | case 'INPUT':
311 | return el.value;
312 | break;
313 | case 'TEXTAREA':
314 | return el.value;
315 | break;
316 | }
317 | }
318 | if(arguments.length === 2){
319 | switch(el.tagName){
320 | case 'SELECT':
321 | el.options[el.selectedIndex].value = val;
322 | return el;
323 | break;
324 | case 'INPUT':
325 | el.value = val;
326 | return el;
327 | break;
328 | case 'TEXTAREA':
329 | el.value = val;
330 | return el;
331 | break;
332 | }
333 | }
334 |
335 | };
336 | u.prepend = function(el, html){
337 | if(!u.isElement(el)){
338 | console.warn('$api.prepend Function need el param, el param must be DOM Element');
339 | return;
340 | }
341 | el.insertAdjacentHTML('afterbegin', html);
342 | return el;
343 | };
344 | u.append = function(el, html){
345 | if(!u.isElement(el)){
346 | console.warn('$api.append Function need el param, el param must be DOM Element');
347 | return;
348 | }
349 | el.insertAdjacentHTML('beforeend', html);
350 | return el;
351 | };
352 | u.before = function(el, html){
353 | if(!u.isElement(el)){
354 | console.warn('$api.before Function need el param, el param must be DOM Element');
355 | return;
356 | }
357 | el.insertAdjacentHTML('beforebegin', html);
358 | return el;
359 | };
360 | u.after = function(el, html){
361 | if(!u.isElement(el)){
362 | console.warn('$api.after Function need el param, el param must be DOM Element');
363 | return;
364 | }
365 | el.insertAdjacentHTML('afterend', html);
366 | return el;
367 | };
368 | u.html = function(el, html){
369 | if(!u.isElement(el)){
370 | console.warn('$api.html Function need el param, el param must be DOM Element');
371 | return;
372 | }
373 | if(arguments.length === 1){
374 | return el.innerHTML;
375 | }else if(arguments.length === 2){
376 | el.innerHTML = html;
377 | return el;
378 | }
379 | };
380 | u.text = function(el, txt){
381 | if(!u.isElement(el)){
382 | console.warn('$api.text Function need el param, el param must be DOM Element');
383 | return;
384 | }
385 | if(arguments.length === 1){
386 | return el.textContent;
387 | }else if(arguments.length === 2){
388 | el.textContent = txt;
389 | return el;
390 | }
391 | };
392 | u.offset = function(el){
393 | if(!u.isElement(el)){
394 | console.warn('$api.offset Function need el param, el param must be DOM Element');
395 | return;
396 | }
397 | var sl = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft);
398 | var st = Math.max(document.documentElement.scrollTop, document.body.scrollTop);
399 |
400 | var rect = el.getBoundingClientRect();
401 | return {
402 | l: rect.left + sl,
403 | t: rect.top + st,
404 | w: el.offsetWidth,
405 | h: el.offsetHeight
406 | };
407 | };
408 | u.css = function(el, css){
409 | if(!u.isElement(el)){
410 | console.warn('$api.css Function need el param, el param must be DOM Element');
411 | return;
412 | }
413 | if(typeof css == 'string' && css.indexOf(':') > 0){
414 | el.style && (el.style.cssText += ';' + css);
415 | }
416 | };
417 | u.cssVal = function(el, prop){
418 | if(!u.isElement(el)){
419 | console.warn('$api.cssVal Function need el param, el param must be DOM Element');
420 | return;
421 | }
422 | if(arguments.length === 2){
423 | var computedStyle = window.getComputedStyle(el, null);
424 | return computedStyle.getPropertyValue(prop);
425 | }
426 | };
427 | u.jsonToStr = function(json){
428 | if(typeof json === 'object'){
429 | return JSON && JSON.stringify(json);
430 | }
431 | };
432 | u.strToJson = function(str){
433 | if(typeof str === 'string'){
434 | return JSON && JSON.parse(str);
435 | }
436 | };
437 | u.setStorage = function(key, value){
438 | if(arguments.length === 2){
439 | var v = value;
440 | if(typeof v == 'object'){
441 | v = JSON.stringify(v);
442 | v = 'obj-'+ v;
443 | }else{
444 | v = 'str-'+ v;
445 | }
446 | var ls = uzStorage();
447 | if(ls){
448 | ls.setItem(key, v);
449 | }
450 | }
451 | };
452 | u.getStorage = function(key){
453 | var ls = uzStorage();
454 | if(ls){
455 | var v = ls.getItem(key);
456 | if(!v){return;}
457 | if(v.indexOf('obj-') === 0){
458 | v = v.slice(4);
459 | return JSON.parse(v);
460 | }else if(v.indexOf('str-') === 0){
461 | return v.slice(4);
462 | }
463 | }
464 | };
465 | u.rmStorage = function(key){
466 | var ls = uzStorage();
467 | if(ls && key){
468 | ls.removeItem(key);
469 | }
470 | };
471 | u.clearStorage = function(){
472 | var ls = uzStorage();
473 | if(ls){
474 | ls.clear();
475 | }
476 | };
477 |
478 |
479 | /*by king*/
480 | u.fixIos7Bar = function(el){
481 | if(!u.isElement(el)){
482 | console.warn('$api.fixIos7Bar Function need el param, el param must be DOM Element');
483 | return;
484 | }
485 | var strDM = api.systemType;
486 | if (strDM == 'ios') {
487 | var strSV = api.systemVersion;
488 | var numSV = parseInt(strSV,10);
489 | var fullScreen = api.fullScreen;
490 | var iOS7StatusBarAppearance = api.iOS7StatusBarAppearance;
491 | if (numSV >= 7 && !fullScreen && iOS7StatusBarAppearance) {
492 | el.style.paddingTop = '30px';
493 | }
494 | }
495 | };
496 | u.toast = function(title, text, time){
497 | var opts = {};
498 | var show = function(opts, time){
499 | api.showProgress(opts);
500 | setTimeout(function(){
501 | api.hideProgress();
502 | },time);
503 | };
504 | if(arguments.length === 1){
505 | var time = time || 500;
506 | if(typeof title === 'number'){
507 | time = title;
508 | }else{
509 | opts.title = title+'';
510 | }
511 | show(opts, time);
512 | }else if(arguments.length === 2){
513 | var time = time || 500;
514 | var text = text;
515 | if(typeof text === "number"){
516 | var tmp = text;
517 | time = tmp;
518 | text = null;
519 | }
520 | if(title){
521 | opts.title = title;
522 | }
523 | if(text){
524 | opts.text = text;
525 | }
526 | show(opts, time);
527 | }
528 | if(title){
529 | opts.title = title;
530 | }
531 | if(text){
532 | opts.text = text;
533 | }
534 | time = time || 500;
535 | show(opts, time);
536 | };
537 | u.post = function(/*url,data,fnSuc,dataType*/){
538 | var argsToJson = parseArguments.apply(null, arguments);
539 | var json = {};
540 | var fnSuc = argsToJson.fnSuc;
541 | argsToJson.url && (json.url = argsToJson.url);
542 | argsToJson.data && (json.data = argsToJson.data);
543 | if(argsToJson.dataType){
544 | var type = argsToJson.dataType.toLowerCase();
545 | if (type == 'text'||type == 'json') {
546 | json.dataType = type;
547 | }
548 | }else{
549 | json.dataType = 'json';
550 | }
551 | json.method = 'post';
552 | api.ajax(json,
553 | function(ret,err){
554 | if (ret) {
555 | fnSuc && fnSuc(ret);
556 | }
557 | }
558 | );
559 | };
560 | u.get = function(/*url,fnSuc,dataType*/){
561 | var argsToJson = parseArguments.apply(null, arguments);
562 | var json = {};
563 | var fnSuc = argsToJson.fnSuc;
564 | argsToJson.url && (json.url = argsToJson.url);
565 | //argsToJson.data && (json.data = argsToJson.data);
566 | if(argsToJson.dataType){
567 | var type = argsToJson.dataType.toLowerCase();
568 | if (type == 'text'||type == 'json') {
569 | json.dataType = type;
570 | }
571 | }else{
572 | json.dataType = 'text';
573 | }
574 | json.method = 'get';
575 | api.ajax(json,
576 | function(ret,err){
577 | if (ret) {
578 | fnSuc && fnSuc(ret);
579 | }
580 | }
581 | );
582 | };
583 | u.thisActive = function( tag ){
584 | var eP = tag.parentNode.querySelectorAll( tag.tagName ),
585 | index ;
586 | for( var x in eP ){
587 | if( eP[x].nodeType ){
588 | if( eP[x] === tag ){
589 | $api.addCls( eP[x], 'active' );
590 | index = x;
591 | }else{
592 | $api.removeCls( eP[x], 'active' );
593 | };
594 | };
595 | };
596 | return index;
597 | };
598 |
599 | u.ajax = function( url, method, bodyParam, callBack ){
600 | var appId="A6981075723139";
601 | var key="F2775A7D-18E5-E6E7-F766-2B793DBDB153";
602 | var timec=new Date().getTime();
603 | var appKey=SHA1(appId+"UZ"+key+"UZ"+timec)+"."+timec;
604 | if( url.indexOf( 'logout' ) != -1 || url == '/user' ){
605 | var headers = {
606 | "Content-type": "application/json;charset=UTF-8",
607 | "X-APICloud-AppId": appId,
608 | "X-APICloud-AppKey": appKey,
609 | "authorization": $api.getStorage('accessToken')
610 | }
611 | }else{
612 | var headers = {
613 | "Content-type": "application/json;charset=UTF-8",
614 | "X-APICloud-AppId": appId,
615 | "X-APICloud-AppKey": appKey
616 | }
617 | }
618 | api.ajax({
619 | url: 'https://d.apicloud.com/mcm/api' + url,
620 | method: method,
621 | cache: false,
622 | timeout: 20,
623 | headers: headers,
624 | data: {
625 | body: bodyParam
626 | }
627 | }, function (ret, err) {
628 | callBack(ret, err);
629 | });
630 | };
631 |
632 | u.toast = function( msg, delay ){
633 | api.toast({
634 | msg: msg,
635 | duration: delay || 2000,
636 | location: 'bottom'
637 | });
638 | };
639 |
640 | u.empty = function(){
641 | this.toast('此功能正在开发…');
642 | }
643 |
644 | u.skin = function(){
645 |
646 | /*
647 |
648 | api.addEventListener({
649 | name: 'skin'
650 | }, function(ret, err){
651 | if ( ret.value.skin ){
652 | document.querySelector('body').classList.add( 'black');
653 | api.setWinAttr({
654 | bgColor: '#252525'
655 | });
656 | api.setFrameAttr({
657 | bgColor: '#252525'
658 | });
659 | }else{
660 | document.querySelector('body').classList.remove( 'black' );
661 | api.setWinAttr({
662 | bgColor: 'grba(0,0,0,0)'
663 | });
664 | api.setFrameAttr({
665 | bgColor: 'grba(0,0,0,0)'
666 | });
667 | }
668 | });
669 | api.getPrefs({
670 | key: 'skin'
671 | }, function(ret, err){
672 | if ( ret.value ){
673 | document.querySelector('body').classList.add( 'black' );
674 | api.setWinAttr({
675 | bgColor: '#252525'
676 | });
677 | api.setFrameAttr({
678 | bgColor: '#252525'
679 | });
680 | if( document.querySelector('.skin-bth') ) document.querySelector('.skin-bth').checked = true;
681 | }else{
682 | document.querySelector('body').classList.remove( 'black' );
683 | api.setWinAttr({
684 | bgColor: 'grba(0,0,0,0)'
685 | });
686 | api.setFrameAttr({
687 | bgColor: 'grba(0,0,0,0)'
688 | });
689 | }
690 | });
691 | */
692 | };
693 | /*end*/
694 |
695 |
696 | window.$api = u;
697 |
698 | })(window);
699 |
700 |
701 |
--------------------------------------------------------------------------------