Skip to content

Commit

Permalink
更沉浸的18年鉴
Browse files Browse the repository at this point in the history
  • Loading branch information
czy0729 committed May 30, 2019
1 parent b2e9ad4 commit 3098795
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 25 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ node_modules
.expo-shared
example
bangumi.jks
KEYSTORE.MD
33 changes: 19 additions & 14 deletions README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

> 这是一个基于`React-Native``Expo`写的 [Bangumi](https://bangumi.tv) 客户端
>
> 开发上对安卓和 iOS 都写了兼容, 开发环境是 iOS
> 开发上对安卓和 iOS 都做到兼容, 开发环境是 iOS
>
> (安卓实机样式效果会有部分差异, 尽量保持一致, 功能持续开发中...)
#### Features

---

- 暂时没有图标和启动图 (bgm38 求大佬贡献)
- 图标和启动图使用了网站上素材 (bgm38 求大佬贡献)
- 番组进度管理
- 条目详情 (支持 Ep 倒序)
- 时间胶囊
Expand All @@ -21,7 +21,8 @@
- 个人时光机 (完整的收藏记录)
- 每日放送
- 电波提醒
- 热门聚合 (todo)
- 热门聚合
- 18年鉴 (网页更沉浸, 隐藏了不关注内容, 调整条目和人物宽度使各机型铺满一行)
- 每月番组索引 (todo)
- 排行榜 (?)
- 各板块直接回复 (todo)
Expand Down Expand Up @@ -63,40 +64,44 @@ window 用法不详, 可以查阅 [Expo](https://github.com/expo/expo) 官方文

#### 登陆

<img src="./preview/home_1.png" width="220" alt="home_1" /> <img src="./preview/login_1.png" width="220" alt="login_1" /> <img src="./preview/login_2.png" width="220" alt="login_2" />
<img src="./preview/home_1.png" width="200" alt="home_1" /> <img src="./preview/login_1.png" width="200" alt="login_1" /> <img src="./preview/login_2.png" width="200" alt="login_2" />

#### 进度

<img src="./preview/home_2.png" width="220" alt="home_2" /> <img src="./preview/home_3.png" width="220" alt="home_3" /> <img src="./preview/home_4.png" width="220" alt="home_4" />
<img src="./preview/home_2.png" width="200" alt="home_2" /> <img src="./preview/home_3.png" width="200" alt="home_3" /> <img src="./preview/home_4.png" width="200" alt="home_4" />

#### 条目

<img src="./preview/subject_1.png" width="220" alt="subject_1" /> <img src="./preview/subject_2.png" width="220" alt="subject_2" /> <img src="./preview/subject_3.png" width="220" alt="subject_3" />
<img src="./preview/subject_1.png" width="200" alt="subject_1" /> <img src="./preview/subject_2.png" width="200" alt="subject_2" /> <img src="./preview/subject_3.png" width="200" alt="subject_3" /> <img src="./preview/subject_4.png" width="200" alt="subject_4" />

#### 首页聚合 / 更沉浸的年鉴

<img src="./preview/discovery_1.png" width="200" alt="discovery_1" /> <img src="./preview/award_1.png" width="200" alt="award_1" /> <img src="./preview/award_2.png" width="200" alt="award_2" />

#### 搜索

<img src="./preview/search_1.png" width="220" alt="search_1" /> <img src="./preview/search_2.png" width="220" alt="search_2" /> <img src="./preview/search_3.png" width="220" alt="search_3" />
<img src="./preview/search_1.png" width="200" alt="search_1" /> <img src="./preview/search_2.png" width="200" alt="search_2" /> <img src="./preview/search_3.png" width="200" alt="search_3" />

#### 人物

<img src="./preview/mono_1.png" width="220" alt="mono_1" /> <img src="./preview/mono_2.png" width="220" alt="mono_2" />
<img src="./preview/mono_1.png" width="200" alt="mono_1" /> <img src="./preview/mono_2.png" width="200" alt="mono_2" />

#### 时间胶囊

<img src="./preview/timeline_1.png" width="220" alt="timeline_1" /> <img src="./preview/timeline_2.png" width="220" alt="timeline_2" /> <img src="./preview/timeline_3.png" width="220" alt="timeline_3" />
<img src="./preview/timeline_1.png" width="200" alt="timeline_1" /> <img src="./preview/timeline_2.png" width="200" alt="timeline_2" /> <img src="./preview/timeline_3.png" width="200" alt="timeline_3" />

#### 超展开

<img src="./preview/rakuen_1.png" width="220" alt="rakuen_1" /> <img src="./preview/topic_1.png" width="220" alt="topic_1" /> <img src="./preview/topic_2.png" width="220" alt="topic_2" />
<img src="./preview/rakuen_1.png" width="200" alt="rakuen_1" /> <img src="./preview/topic_1.png" width="200" alt="topic_1" /> <img src="./preview/topic_2.png" width="200" alt="topic_2" />

#### 用户空间

<img src="./preview/zone_1.png" width="220" alt="zone_1" /> <img src="./preview/zone_2.png" width="220" alt="zone_2" />
<img src="./preview/zone_1.png" width="200" alt="zone_1" /> <img src="./preview/zone_2.png" width="200" alt="zone_2" />

#### 个人时光机

<img src="./preview/user_1.png" width="220" alt="user_1" /> <img src="./preview/user_2.png" width="220" alt="user_2" />
<img src="./preview/user_1.png" width="200" alt="user_1" /> <img src="./preview/user_2.png" width="200" alt="user_2" />

#### 每日放送, 电波提醒, 设置
#### 每日放送 / 电波提醒 / 设置

<img src="./preview/calendar_1.png" width="220" alt="calendar_1" /> <img src="./preview/notify_1.png" width="220" alt="notify_1" /> <img src="./preview/setting_1.png" width="220" alt="setting_1" />
<img src="./preview/calendar_1.png" width="200" alt="calendar_1" /> <img src="./preview/notify_1.png" width="200" alt="notify_1" /> <img src="./preview/setting_1.png" width="200" alt="setting_1" />
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"ios",
"android"
],
"version": "1.0.1",
"version": "1.0.2",
"orientation": "portrait",
"icon": "./assets/images/icon.png",
"splash": {
Expand Down
Binary file added preview/award_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview/award_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview/discovery_1.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified preview/subject_1.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified preview/subject_3.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview/subject_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 27 additions & 10 deletions screens/award/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/* eslint-disable max-len */
/*
* 更沉浸的Bgm年鉴
* @Author: czy0729
* @Date: 2019-05-29 19:37:12
* @Last Modified by: czy0729
* @Last Modified time: 2019-05-30 05:54:52
* @Last Modified time: 2019-05-30 19:57:21
*/
import React from 'react'
import { StyleSheet, View } from 'react-native'
Expand Down Expand Up @@ -77,20 +78,36 @@ class Award extends React.Component {
const { navigation } = this.props
const uri = navigation.getParam('uri')
const { loading } = this.state
const width = parseInt((_.window.width - 24) / 3)
const widthSubject = parseInt((_.window.width - 24) / 3)
const widthMono = parseInt((_.window.width - 48) / 4)
const heightMono = widthMono * 1.2
const injectedJavaScript = `(function(){
// 注入cookie
document.cookie = '${cookie}';
// 为了美观, 若屏幕宽度小于3个条目的宽度和, 缩小每个条目的大小
if (420 > ${_.window.width}) {
var style = document.createElement("style");
try {
style.appendChild(document.createTextNode(".channelStatsWrapper .columnGrid ul.grid li span.cover,.channelStatsWrapper .columnGrid ul.grid li span.cover span.overlay{width:${width}px !important;height:${width}px !important;}"));
} catch(ex){
}
document.body.append(style);
// 为了美观, 修改条目宽度, 每行达到3个
var styleSubject = document.createElement("style");
try {
styleSubject.appendChild(document.createTextNode(".channelStatsWrapper .columnGrid ul.grid li span.cover,.channelStatsWrapper .columnGrid ul.grid li span.cover span.overlay{width:${widthSubject}px !important;height:${widthSubject}px !important;}"));
} catch(ex){
}
document.body.append(styleSubject);
// 为了美观, 修改人物宽度, 每行达到4个
var styleSubject = document.createElement("style");
try {
styleSubject.appendChild(document.createTextNode(".columnGrid ul.grid li.avatar{width:${widthMono}px !important;height:${heightMono}px !important;}"));
} catch(ex){
}
document.body.append(styleSubject);
// 隐藏部分样式, 使页面更沉浸
var styleDeep = document.createElement("style");
try {
styleDeep.appendChild(document.createTextNode("#headerNeue2, #personalTabStats, .shareBtn, #dock{display:none !important}"));
} catch(ex){
}
document.body.append(styleDeep);
// webview的postMessage不是马上生效的
var __isBridgeOk = false
Expand Down

0 comments on commit 3098795

Please sign in to comment.