├── screenshots ├── pc_1.png ├── pc_2.png ├── mobile_1.png └── mobile_2.png ├── plan.md ├── static ├── images │ ├── logo.png │ ├── favicon.ico │ ├── logo_short.png │ └── friendly │ │ ├── gocn.png │ │ ├── ruby.png │ │ └── cnode.png ├── styles │ ├── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ ├── scss │ │ ├── base │ │ │ ├── _extends.scss │ │ │ ├── _config.scss │ │ │ ├── _reset.scss │ │ │ └── _mixin.scss │ │ ├── override.scss │ │ └── mobile.scss │ ├── override.css.map │ ├── mobile.css.map │ ├── override.css │ └── mobile.css └── scripts │ ├── lib │ ├── editor │ │ └── fonts │ │ │ ├── icomoon.eot │ │ │ ├── icomoon.ttf │ │ │ └── icomoon.woff │ ├── at-who │ │ └── jquery.atwho.min.css │ ├── high-light │ │ └── styles │ │ │ ├── mono-blue.css │ │ │ ├── github-gist.css │ │ │ ├── monokai.css │ │ │ ├── monokai-sublime.css │ │ │ └── github.css │ └── jquery.caret.min.js │ └── app │ ├── login.js │ ├── register.js │ ├── reset-password.js │ ├── bind-user.js │ ├── mount-editor.js │ ├── new-password.js │ ├── comment-editor.js │ ├── user.js │ ├── frame.js │ ├── topic-editor.js │ ├── validator.js │ └── uploader.js ├── src ├── models │ ├── mod.rs │ ├── category.rs │ ├── message.rs │ ├── comment.rs │ ├── topic.rs │ └── user.rs ├── common │ ├── mod.rs │ ├── macros.rs │ ├── config.rs │ ├── middlewares.rs │ ├── lazy_static.rs │ ├── db.rs │ └── http.rs ├── services │ ├── mod.rs │ ├── category.rs │ ├── collection.rs │ ├── message.rs │ ├── topic_vote.rs │ ├── comment_vote.rs │ └── comment.rs ├── controllers │ ├── logout.rs │ ├── mod.rs │ ├── simple_render.rs │ ├── error.rs │ ├── rss.rs │ ├── message.rs │ ├── register.rs │ ├── login.rs │ ├── user.rs │ ├── reset_password.rs │ ├── comment.rs │ ├── topic_list.rs │ └── upload.rs ├── main.rs └── routes.rs ├── .travis.yml ├── .gitignore ├── views ├── common │ ├── crumbs.hbs │ ├── pagination.hbs │ ├── footer.hbs │ ├── header.hbs │ ├── aside.hbs │ └── nav.hbs ├── config │ └── global-config.hbs ├── error.hbs ├── about-site.hbs ├── comment-editor.hbs ├── resource.hbs ├── reset-password.hbs ├── bind-user.hbs ├── message.hbs ├── topic-editor.hbs ├── login.hbs ├── new-password.hbs ├── register.hbs └── topic-list.hbs ├── log4rs.yaml ├── config.toml ├── Cargo.toml ├── LICENSE ├── README.md └── tables.sql /screenshots/pc_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinyanlv/runner/HEAD/screenshots/pc_1.png -------------------------------------------------------------------------------- /screenshots/pc_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinyanlv/runner/HEAD/screenshots/pc_2.png -------------------------------------------------------------------------------- /plan.md: -------------------------------------------------------------------------------- 1 | ## 2018-7-1开始,将着手优化本项目代码并引入ORM框架diesel 2 | ## 由于iron框架已停止维护,因此计划将后端框架替换为actix-web,开始时间待定 -------------------------------------------------------------------------------- /static/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinyanlv/runner/HEAD/static/images/logo.png -------------------------------------------------------------------------------- /screenshots/mobile_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinyanlv/runner/HEAD/screenshots/mobile_1.png -------------------------------------------------------------------------------- /screenshots/mobile_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinyanlv/runner/HEAD/screenshots/mobile_2.png -------------------------------------------------------------------------------- /static/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinyanlv/runner/HEAD/static/images/favicon.ico -------------------------------------------------------------------------------- /static/images/logo_short.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinyanlv/runner/HEAD/static/images/logo_short.png -------------------------------------------------------------------------------- /src/models/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod user; 2 | pub mod topic; 3 | pub mod comment; 4 | pub mod message; 5 | pub mod category; -------------------------------------------------------------------------------- /static/images/friendly/gocn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinyanlv/runner/HEAD/static/images/friendly/gocn.png -------------------------------------------------------------------------------- /static/images/friendly/ruby.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinyanlv/runner/HEAD/static/images/friendly/ruby.png -------------------------------------------------------------------------------- /static/images/friendly/cnode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinyanlv/runner/HEAD/static/images/friendly/cnode.png -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: rust 3 | rust: 4 | - stable 5 | before_script: 6 | script: 7 | - cargo test 8 | -------------------------------------------------------------------------------- /static/styles/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinyanlv/runner/HEAD/static/styles/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /static/scripts/lib/editor/fonts/icomoon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinyanlv/runner/HEAD/static/scripts/lib/editor/fonts/icomoon.eot -------------------------------------------------------------------------------- /static/scripts/lib/editor/fonts/icomoon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinyanlv/runner/HEAD/static/scripts/lib/editor/fonts/icomoon.ttf -------------------------------------------------------------------------------- /static/styles/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinyanlv/runner/HEAD/static/styles/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /static/styles/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinyanlv/runner/HEAD/static/styles/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .DS_Store 3 | .vscode 4 | 5 | target/ 6 | 7 | npm-debug.log 8 | node_modules/ 9 | 10 | upload/ 11 | log/ 12 | -------------------------------------------------------------------------------- /static/scripts/lib/editor/fonts/icomoon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinyanlv/runner/HEAD/static/scripts/lib/editor/fonts/icomoon.woff -------------------------------------------------------------------------------- /static/styles/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinyanlv/runner/HEAD/static/styles/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /static/styles/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yinyanlv/runner/HEAD/static/styles/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /src/models/category.rs: -------------------------------------------------------------------------------- 1 | #[derive(Serialize, Deserialize, Clone, Debug)] 2 | pub struct Category { 3 | pub id: u8, 4 | pub name: String 5 | } 6 | -------------------------------------------------------------------------------- /src/common/mod.rs: -------------------------------------------------------------------------------- 1 | #[macro_use] 2 | pub mod macros; 3 | pub mod config; 4 | pub mod db; 5 | pub mod utils; 6 | pub mod http; 7 | pub mod middlewares; 8 | pub mod lazy_static; -------------------------------------------------------------------------------- /views/common/crumbs.hbs: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /src/services/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod user; 2 | pub mod topic; 3 | pub mod comment; 4 | pub mod message; 5 | pub mod topic_vote; 6 | pub mod comment_vote; 7 | pub mod category; 8 | pub mod collection; -------------------------------------------------------------------------------- /src/controllers/logout.rs: -------------------------------------------------------------------------------- 1 | use iron::prelude::*; 2 | use iron_sessionstorage::traits::SessionRequestExt; 3 | 4 | use common::http::*; 5 | 6 | pub fn logout(req: &mut Request) -> IronResult