xingstarx / changkun-blog-clients

Changkun's Blog Desktop&Mobile Client

Home Page:https://changkun.us/clients/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

logo

Changkun's Blog Clients

Changkun's Blog Desktop&Mobile Clients, powered by Electron & React Native.

Desktop Version

Desktop clients support macOS/Windows/Linux(Ubuntu) platform. If you would like to only build desktop version, the following instractions help you to build desktop clients.

To install dependencies:

npm install
# or
yarn install

To build all platform:

npm run build
# or
yarn run build

To build specific platform:

npm run build-mac       # for macOS x64
npm run build-win       # for windows x64
npm run build-linux     # for linux ubuntu x64
# or
yarn run build-mac
yarn run build-win
yarn run build-linux 

TO build release version to Github, you need provide your Github token, and change the provider and repository info in the package.json, then:

export GH_TOKEN="YOUR_TOKEN" npm run build-release

Please note that 32-bit version is not recommended, I will never support that.

Preview

Mobile Version

Mobile Version is currently in development. You could check the mobile folder for details.

Go to ./mobile/Blog, then

To install dependencies:

npm install react-native-cli -g
npm install
# or
yarn install react-native-cli -g
yarn install

To run for iOS:

react-native run-ios

To run for Android:

react-native run-android

Preview

TODO

Server Side API Design

At present, mobile version requires the API generate from hexo-generator-restful, which gives bad API design, we need reimplement it.

  • posts.json, posts.data contains post object array, the post object contains:
    • title: article title
    • excerpt: article excerpt, if exists
    • cover: article image cover, if exists
    • date: article publish date, format: YYYY-MM-DD
    • tags: tag array, maximum to 3
    • path: path to access article itself
  • tags.json, contains tag objects array, tag object contains:
    • name: tag name
    • path: article with the tag
    • count: article statistic
    • api/tags/.json
      • tag.postlist contains post objects as an array
  • about.json
    • this improves hexo-generator-restful

Client Side Design

  • Pull-down & pull-up refresh for ListView component
  • Markdown Post page component
  • Post cell navigator
  • Local data persistent --> local cache
  • Tags Cloud page
  • Tags Cloud page navigator
  • Local data fuzzy search
  • About page component
  • Comments enable
  • Dark Mode
  • Internationalization
  • Android Support

License

Copyright © 2016 Changkun Ou. All rights reserved.

The code is distributed under the MIT license. See LICENSE in this directory for more details.

About

Changkun's Blog Desktop&Mobile Client

https://changkun.us/clients/

License:MIT License


Languages

Language:JavaScript 76.0%Language:Objective-C 9.6%Language:Shell 5.5%Language:Python 3.7%Language:Java 2.8%Language:HTML 2.4%