Permalink
Browse files

first commit

  • Loading branch information...
0 parents commit d3052a52bcbe2607c8786bef2ae1711c9d9ab933 @p412726700 committed Jun 24, 2015
Showing with 18,721 additions and 0 deletions.
  1. +4 −0 .gitignore
  2. +65 −0 app.js
  3. +10 −0 bin/www.js
  4. +3 −0 config.js
  5. +123 −0 controllers/index.js
  6. +37 −0 gulpfile.js
  7. +34 −0 package.json
  8. 0 public/css/_footer.css
  9. 0 public/css/_footer.styl
  10. 0 public/css/_main.css
  11. 0 public/css/_main.styl
  12. +3 −0 public/css/_normalize.css
  13. +2 −0 public/css/_normalize.styl
  14. +53 −0 public/css/_sidebar.css
  15. +53 −0 public/css/_sidebar.styl
  16. +274 −0 public/css/_style.css
  17. +251 −0 public/css/_style.styl
  18. +33 −0 public/css/_variables.css
  19. +34 −0 public/css/_variables.styl
  20. +360 −0 public/css/index.css
  21. +13 −0 public/css/index.styl
  22. +9,943 −0 public/css/materialize.min.css
  23. +133 −0 public/css/prism.css
  24. BIN public/font/Material-Design-Icons.eot
  25. BIN public/font/Material-Design-Icons.ttf
  26. BIN public/font/Material-Design-Icons.woff
  27. BIN public/font/Material-Design-Icons.woff2
  28. +164 −0 public/img/materialize.svg
  29. BIN public/img/menu.gif
  30. BIN public/img/office.jpg
  31. BIN public/img/responsive.png
  32. BIN public/img/sample-1.jpg
  33. BIN public/img/style_typography_roboto1.png
  34. BIN public/img/toast.gif
  35. BIN public/img/yuna.jpg
  36. +77 −0 public/js/app.js
  37. +6 −0 public/js/jquery.min.js
  38. +10 −0 public/js/materialize.min.js
  39. +8 −0 public/js/prism.js
  40. +48 −0 routers.js
  41. +38 −0 service/hbshelpers.js
  42. +81 −0 views/components/badges.hbs
  43. +126 −0 views/components/buttons.hbs
  44. +317 −0 views/components/cards.hbs
  45. +205 −0 views/components/collections.hbs
  46. +116 −0 views/components/footer.hbs
  47. +647 −0 views/components/forms.hbs
  48. +884 −0 views/components/icons.hbs
  49. +384 −0 views/components/navbar.hbs
  50. +58 −0 views/components/pagination.hbs
  51. +312 −0 views/components/preloader.hbs
  52. +394 −0 views/css/color.hbs
  53. +456 −0 views/css/grid.hbs
  54. +148 −0 views/css/helpers.hbs
  55. +110 −0 views/css/media.hbs
  56. +65 −0 views/css/shadow.hbs
  57. +306 −0 views/css/table.hbs
  58. +103 −0 views/css/typography.hbs
  59. 0 views/err.hbs
  60. +75 −0 views/index.hbs
  61. +189 −0 views/javascript/collapsible.hbs
  62. +93 −0 views/javascript/dialogs.hbs
  63. +112 −0 views/javascript/dropdown.hbs
  64. +181 −0 views/javascript/media.hbs
  65. +190 −0 views/javascript/modals.hbs
  66. +71 −0 views/javascript/parallax.hbs
  67. +74 −0 views/javascript/pushpin.hbs
  68. +120 −0 views/javascript/scrollfire.hbs
  69. +73 −0 views/javascript/scrollspy.hbs
  70. +165 −0 views/javascript/side-nav.hbs
  71. +106 −0 views/javascript/tabs.hbs
  72. +73 −0 views/javascript/transitions.hbs
  73. +109 −0 views/javascript/waves.hbs
  74. +266 −0 views/layouts/layout.hbs
  75. +46 −0 views/mobile.hbs
  76. +121 −0 views/showcase.hbs
  77. +166 −0 views/start.hbs
@@ -0,0 +1,4 @@
+.idea/
+node_modules/
+bower_components/
+*.log
@@ -0,0 +1,65 @@
+/**
+ * Created by panew on 15-6-14.
+ */
+var config = require('./config');
+var env = process.env.NODE_ENV;
+var express = require('express');
+var path = require('path');
+var logger = require('morgan');
+var cookieParser = require('cookie-parser');
+var bodyParser = require('body-parser');
+var exhbs = require('express-handlebars');
+var hbshelper = require('./service/hbshelpers');
+var routers = require('./routers');
+var app = express();
+
+// view engine setup
+app.engine('hbs', exhbs(hbshelper));
+app.set('views', path.join(__dirname, 'views'));
+app.set('view engine', 'hbs');
+app.use(bodyParser.json());
+app.use(bodyParser.urlencoded({'extended': true}));
+app.use(cookieParser());
+
+if (env === "development") {
+ app.use(logger('dev'));
+}
+
+
+app.use(function (req, res, next) {
+ res.locals.production = env === "production";
+ next();
+});
+
+app.use('/', routers);
+
+/// catch 404 and forward to error handler
+app.use(function (req, res, next) {
+ var err = new Error('Not Found');
+ err.status = 404;
+ res.status(err.status);
+ next(err);
+});
+
+/// error handlers
+
+
+// production error handler
+// no stacktraces leaked to user
+app.use(function (err, req, res, next) {
+ var data = {layout: false};
+ if (env === 'development') {
+ data.message = err.message;
+ data.error = err;
+ }
+ else {
+ data.title = {
+ 404: '木有这个页面,orz',
+ 500: '伍佰来了,次奥'
+ }[res.statusCode];
+ }
+ res.render('err', data);
+});
+
+
+module.exports = app;
@@ -0,0 +1,10 @@
+/**
+ * Created by panew on 15-6-12.
+ */
+var app = require('../app');
+
+app.set('port', process.env.PORT || 3001);
+
+var server = app.listen(app.get('port'), function () {
+ console.log('Express server listening on port ' + server.address().port);
+});
@@ -0,0 +1,3 @@
+/**
+ * Created by panew on 15-6-12.
+ */
@@ -0,0 +1,123 @@
+/**
+ * Created by panew on 15-6-12.
+ */
+exports.index = function (req, res) {
+ return res.render('index');
+};
+
+exports.start = function (req, res) {
+ return res.render('start');
+};
+
+exports.color = function (req, res) {
+ return res.render('css/color');
+};
+
+exports.grid = function (req, res) {
+ return res.render('css/grid');
+};
+
+exports.helpers = function (req, res) {
+ return res.render('css/helpers');
+};
+
+exports.media = function (req, res) {
+ return res.render('css/media');
+};
+
+exports.sass = function (req, res) {
+ return res.render('css/sass');
+};
+
+exports.shadow = function (req, res) {
+ return res.render('css/shadow');
+};
+
+exports.table = function (req, res) {
+ return res.render('css/table');
+};
+
+exports.typography = function (req, res) {
+ return res.render('css/typography');
+};
+
+exports.badges = function (req, res) {
+ return res.render('components/badges');
+};
+
+exports.buttons = function (req, res) {
+ return res.render('components/buttons');
+};
+
+exports.cards = function (req, res) {
+ return res.render('components/cards');
+};
+exports.collections = function (req, res) {
+ return res.render('components/collections');
+};
+exports.footer = function (req, res) {
+ return res.render('components/footer');
+};
+exports.forms = function (req, res) {
+ return res.render('components/forms');
+};
+exports.icons = function (req, res) {
+ return res.render('components/icons');
+};
+exports.navbar = function (req, res) {
+ return res.render('components/navbar');
+};
+exports.pagination = function (req, res) {
+ return res.render('components/pagination');
+};
+exports.preloader = function (req, res) {
+ return res.render('components/preloader');
+};
+
+//javascript
+
+exports.collapsible = function (req, res) {
+ return res.render('javascript/collapsible');
+};
+exports.dialogs = function (req, res) {
+ return res.render('javascript/dialogs');
+};
+exports.dropdown = function (req, res) {
+ return res.render('javascript/dropdown');
+};
+exports.media = function (req, res) {
+ return res.render('javascript/media');
+};
+exports.modals = function (req, res) {
+ return res.render('javascript/modals');
+};
+exports.parallax = function (req, res) {
+ return res.render('javascript/parallax');
+};
+exports.pushpin = function (req, res) {
+ return res.render('javascript/pushpin');
+};
+exports.scrollfire = function (req, res) {
+ return res.render('javascript/scrollfire');
+};
+exports.scrollspy = function (req, res) {
+ return res.render('javascript/scrollspy');
+};
+exports.sidenav = function (req, res) {
+ return res.render('javascript/side-nav');
+};
+exports.tabs = function (req, res) {
+ return res.render('javascript/tabs');
+};
+exports.transitions = function (req, res) {
+ return res.render('javascript/transitions');
+};
+exports.waves = function (req, res) {
+ return res.render('javascript/waves');
+};
+exports.mobile = function (req, res) {
+ return res.render('mobile');
+};
+exports.showcase = function (req, res) {
+ return res.render('showcase');
+};
@@ -0,0 +1,37 @@
+var gulp = require('gulp'),
+ inject = require('gulp-inject'),
+ uglify = require('gulp-uglify'),
+ concat = require('gulp-concat'),
+ minifyCSS = require('gulp-minify-css'),
+ clean = require('gulp-rimraf'),
+ git = require('gulp-git'),
+ runSequence = require('run-sequence'),
+ browserSync = require('browser-sync').create(),
+ shortId = require('shortid'),
+ randomId = '',
+ stylus = require('gulp-stylus');
+
+var resources = {
+ css: ['public/css/app.css'],
+ js : ['public/js/jquery.min.js', 'public/js/pop.js', 'public/js/app.js']
+};
+
+gulp.task('browser-sync', function () {
+ browserSync.init({
+ proxy: "127.0.0.1:8081"
+ });
+ gulp.watch(["views/**/*", 'public/**/*.js', 'public/css/index.css']).on("change", browserSync.reload);
+});
+
+gulp.task('compileStylus',function(){
+ gulp.src('public/css/*.styl')
+ .pipe(stylus())
+ .pipe(gulp.dest('public/css/'));
+
+});
+
+gulp.task('watch',function(){
+ gulp.watch('public/css/*.styl',['compileStylus']);
+});
+
+gulp.task('default',['watch','browser-sync']);
@@ -0,0 +1,34 @@
+{
+ "name": "Materialscss",
+ "version": "1.0.0",
+ "description": "",
+ "main": "gulpfile.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "author": "",
+ "license": "ISC",
+ "devDependencies": {
+ "browser-sync": "^2.7.9",
+ "gulp": "^3.9.0",
+ "gulp-concat": "^2.5.2",
+ "gulp-git": "^1.2.4",
+ "gulp-inject": "^1.3.1",
+ "gulp-minify-css": "^1.1.6",
+ "gulp-nodemon": "^2.0.3",
+ "gulp-rimraf": "^0.1.1",
+ "gulp-stylus": "^2.0.3",
+ "gulp-uglify": "^1.2.0",
+ "run-sequence": "^1.1.0",
+ "shortid": "^2.2.2"
+ },
+ "dependencies": {
+ "body-parser": "^1.12.4",
+ "bootstrap-styl": "^4.0.4",
+ "cookie-parser": "^1.3.5",
+ "express": "^4.12.4",
+ "express-handlebars": "^2.0.1",
+ "moment": "^2.10.3",
+ "morgan": "^1.5.3"
+ }
+}
No changes.
No changes.
No changes.
No changes.
@@ -0,0 +1,3 @@
+html {
+ font-family: 'Open Sans', Helvetica, Tahoma, Arial, "Microsoft YaHei", "微软雅黑", STXihei, "华文细黑", SimSun, "宋体", Heiti, "黑体", sans-serif;
+}
@@ -0,0 +1,2 @@
+html
+ font-family 'Open Sans', Helvetica, Tahoma, Arial, "Microsoft YaHei", "微软雅黑",STXihei, "华文细黑", SimSun, "宋体", Heiti, "黑体", sans-serif
@@ -0,0 +1,53 @@
+.sidebar {
+ width: 240px;
+ position: fixed;
+ box-shadow: 2px 2px 2px #ddd;
+ height: 100%;
+ background-color: #fff;
+}
+.sidebar:hover {
+ overflow-y: auto;
+}
+.sidebar .logo {
+ width: 100%;
+ text-align: center;
+ height: 90px;
+ border-bottom: 1px solid #ddd;
+ margin-top: 30px;
+}
+.sidebar li:hover {
+ background-color: rgba(0,0,0,0.05);
+}
+.sidebar a {
+ line-height: 44px;
+ height: 44px;
+ font-weight: bolder;
+ display: block;
+ color: #444;
+ padding: 0 25px;
+}
+.sidebar .collapsible {
+ border: none;
+ box-shadow: none;
+ margin: 0;
+}
+.sidebar .collapsible-accordion>li.active {
+ background-color: rgba(0,0,0,0.05);
+}
+.sidebar .collapsible-header {
+ border: none;
+ background-color: transparent;
+}
+.sidebar .collapsible-body {
+ background-color: #fff;
+ border: none;
+}
+.sidebar .collapsible-body ul {
+ font-weight: 300;
+}
+.sidebar .collapsible-body a {
+ padding-left: 40px;
+}
+.sidebar-collapsible:hover {
+ background-color: #fff !important;
+}
Oops, something went wrong.

0 comments on commit d3052a5

Please sign in to comment.