├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── blog-dev.db ├── build.gradle ├── gradlew ├── gradlew.bat └── src ├── main ├── java │ └── com │ │ └── windhc │ │ ├── BlogApplication.java │ │ ├── config │ │ ├── Constants.java │ │ ├── ShiroConfiguration.java │ │ └── ShiroRealmImpl.java │ │ ├── domain │ │ ├── Article.java │ │ ├── BaseEntity.java │ │ ├── Category.java │ │ ├── Comment.java │ │ ├── Role.java │ │ └── User.java │ │ ├── exception │ │ └── ServiceException.java │ │ ├── mapper │ │ ├── ArticleMapper.java │ │ ├── CategoryMapper.java │ │ ├── CommentMapper.java │ │ ├── RoleMapper.java │ │ └── UserMapper.java │ │ ├── service │ │ ├── ArticleService.java │ │ ├── CategoryService.java │ │ ├── CommentService.java │ │ ├── UserService.java │ │ └── impl │ │ │ ├── ArticleServiceImpl.java │ │ │ ├── CategoryServiceImpl.java │ │ │ ├── CommentServiceImpl.java │ │ │ └── UserServiceImpl.java │ │ ├── utils │ │ ├── BaseUtils.java │ │ ├── ChangePasswordRequest.java │ │ ├── JsonView.java │ │ └── PageRequest.java │ │ └── web │ │ ├── ArticleController.java │ │ ├── CategoryController.java │ │ ├── HomeController.java │ │ ├── UserController.java │ │ └── front │ │ └── IndexController.java └── resources │ ├── application.properties │ ├── ehcache-shiro.xml │ ├── init.sql │ ├── mapper │ ├── ArticleMapper.xml │ ├── CategoryMapper.xml │ ├── CommentMapper.xml │ ├── RoleMapper.xml │ └── UserMapper.xml │ ├── mybatis-config.xml │ ├── static │ ├── admin │ │ ├── article │ │ │ ├── add.html │ │ │ ├── article.info.js │ │ │ ├── article.js │ │ │ ├── detail.html │ │ │ ├── edit.html │ │ │ ├── form.html │ │ │ └── index.html │ │ ├── category │ │ │ ├── article.category.js │ │ │ └── index.html │ │ ├── common │ │ │ ├── footer.html │ │ │ ├── ibox_tools.html │ │ │ ├── navigation.html │ │ │ └── topnavbar.html │ │ ├── login.html │ │ ├── main.html │ │ └── user │ │ │ ├── change-pwd.html │ │ │ ├── user.info.js │ │ │ └── user.js │ ├── css │ │ ├── animate.css │ │ ├── patterns │ │ │ ├── 1.png │ │ │ ├── 2.png │ │ │ ├── 3.png │ │ │ ├── 4.png │ │ │ ├── 5.png │ │ │ ├── 6.png │ │ │ ├── 7.png │ │ │ ├── congruent_pentagon.png │ │ │ ├── header-profile-skin-1.png │ │ │ ├── header-profile-skin-2.png │ │ │ ├── header-profile-skin-3.png │ │ │ ├── header-profile.png │ │ │ ├── otis_redding.png │ │ │ ├── shattered.png │ │ │ └── triangular.png │ │ ├── signin.css │ │ └── style.css │ ├── front │ │ ├── app.js │ │ ├── css │ │ │ └── style.css │ │ ├── fund │ │ │ ├── chart-fund.js │ │ │ └── chart.js │ │ ├── gulpfile.js │ │ ├── images │ │ │ └── dasheng.jpg │ │ ├── index.html │ │ ├── js │ │ │ ├── basicShare.0.2.min.js │ │ │ ├── comment-reply.min.js │ │ │ ├── front.js │ │ │ ├── jquery-3.1.0 │ │ │ │ ├── .eslintrc │ │ │ │ ├── jquery.js │ │ │ │ ├── jquery.min.js │ │ │ │ ├── jquery.min.map │ │ │ │ ├── jquery.slim.js │ │ │ │ ├── jquery.slim.min.js │ │ │ │ └── jquery.slim.min.map │ │ │ └── marked.min.js │ │ ├── package.json │ │ ├── src │ │ │ ├── App.vue │ │ │ ├── assets │ │ │ │ └── logo.png │ │ │ ├── components │ │ │ │ ├── article │ │ │ │ │ ├── archives.vue │ │ │ │ │ ├── detail.vue │ │ │ │ │ └── index.vue │ │ │ │ ├── category │ │ │ │ │ └── index.vue │ │ │ │ └── common │ │ │ │ │ ├── about.vue │ │ │ │ │ ├── footer.vue │ │ │ │ │ └── header.vue │ │ │ ├── main.js │ │ │ └── routers.js │ │ └── webpack.config.js │ ├── gulpfile.js │ ├── js │ │ ├── admin │ │ │ ├── app.js │ │ │ ├── common.js │ │ │ ├── directives.js │ │ │ └── main.js │ │ └── plugins │ │ │ ├── angular-1.6.4 │ │ │ ├── angular-animate.js │ │ │ ├── angular-animate.min.js │ │ │ ├── angular-animate.min.js.map │ │ │ ├── angular-aria.js │ │ │ ├── angular-aria.min.js │ │ │ ├── angular-aria.min.js.map │ │ │ ├── angular-cookies.js │ │ │ ├── angular-cookies.min.js │ │ │ ├── angular-cookies.min.js.map │ │ │ ├── angular-csp.css │ │ │ ├── angular-loader.js │ │ │ ├── angular-loader.min.js │ │ │ ├── angular-loader.min.js.map │ │ │ ├── angular-message-format.js │ │ │ ├── angular-message-format.min.js │ │ │ ├── angular-message-format.min.js.map │ │ │ ├── angular-messages.js │ │ │ ├── angular-messages.min.js │ │ │ ├── angular-messages.min.js.map │ │ │ ├── angular-mocks.js │ │ │ ├── angular-parse-ext.js │ │ │ ├── angular-parse-ext.min.js │ │ │ ├── angular-parse-ext.min.js.map │ │ │ ├── angular-resource.js │ │ │ ├── angular-resource.min.js │ │ │ ├── angular-resource.min.js.map │ │ │ ├── angular-route.js │ │ │ ├── angular-route.min.js │ │ │ ├── angular-route.min.js.map │ │ │ ├── angular-sanitize.js │ │ │ ├── angular-sanitize.min.js │ │ │ ├── angular-sanitize.min.js.map │ │ │ ├── angular-scenario.js │ │ │ ├── angular-touch.js │ │ │ ├── angular-touch.min.js │ │ │ ├── angular-touch.min.js.map │ │ │ ├── angular.js │ │ │ ├── angular.min.js │ │ │ ├── angular.min.js.map │ │ │ ├── errors.json │ │ │ ├── i18n │ │ │ │ ├── angular-locale_af-na.js │ │ │ │ ├── angular-locale_af-za.js │ │ │ │ ├── angular-locale_af.js │ │ │ │ ├── angular-locale_agq-cm.js │ │ │ │ ├── angular-locale_agq.js │ │ │ │ ├── angular-locale_ak-gh.js │ │ │ │ ├── angular-locale_ak.js │ │ │ │ ├── angular-locale_am-et.js │ │ │ │ ├── angular-locale_am.js │ │ │ │ ├── angular-locale_ar-001.js │ │ │ │ ├── angular-locale_ar-ae.js │ │ │ │ ├── angular-locale_ar-bh.js │ │ │ │ ├── angular-locale_ar-dj.js │ │ │ │ ├── angular-locale_ar-dz.js │ │ │ │ ├── angular-locale_ar-eg.js │ │ │ │ ├── angular-locale_ar-eh.js │ │ │ │ ├── angular-locale_ar-er.js │ │ │ │ ├── angular-locale_ar-il.js │ │ │ │ ├── angular-locale_ar-iq.js │ │ │ │ ├── angular-locale_ar-jo.js │ │ │ │ ├── angular-locale_ar-km.js │ │ │ │ ├── angular-locale_ar-kw.js │ │ │ │ ├── angular-locale_ar-lb.js │ │ │ │ ├── angular-locale_ar-ly.js │ │ │ │ ├── angular-locale_ar-ma.js │ │ │ │ ├── angular-locale_ar-mr.js │ │ │ │ ├── angular-locale_ar-om.js │ │ │ │ ├── angular-locale_ar-ps.js │ │ │ │ ├── angular-locale_ar-qa.js │ │ │ │ ├── angular-locale_ar-sa.js │ │ │ │ ├── angular-locale_ar-sd.js │ │ │ │ ├── angular-locale_ar-so.js │ │ │ │ ├── angular-locale_ar-ss.js │ │ │ │ ├── angular-locale_ar-sy.js │ │ │ │ ├── angular-locale_ar-td.js │ │ │ │ ├── angular-locale_ar-tn.js │ │ │ │ ├── angular-locale_ar-xb.js │ │ │ │ ├── angular-locale_ar-ye.js │ │ │ │ ├── angular-locale_ar.js │ │ │ │ ├── angular-locale_as-in.js │ │ │ │ ├── angular-locale_as.js │ │ │ │ ├── angular-locale_asa-tz.js │ │ │ │ ├── angular-locale_asa.js │ │ │ │ ├── angular-locale_ast-es.js │ │ │ │ ├── angular-locale_ast.js │ │ │ │ ├── angular-locale_az-cyrl-az.js │ │ │ │ ├── angular-locale_az-cyrl.js │ │ │ │ ├── angular-locale_az-latn-az.js │ │ │ │ ├── angular-locale_az-latn.js │ │ │ │ ├── angular-locale_az.js │ │ │ │ ├── angular-locale_bas-cm.js │ │ │ │ ├── angular-locale_bas.js │ │ │ │ ├── angular-locale_be-by.js │ │ │ │ ├── angular-locale_be.js │ │ │ │ ├── angular-locale_bem-zm.js │ │ │ │ ├── angular-locale_bem.js │ │ │ │ ├── angular-locale_bez-tz.js │ │ │ │ ├── angular-locale_bez.js │ │ │ │ ├── angular-locale_bg-bg.js │ │ │ │ ├── angular-locale_bg.js │ │ │ │ ├── angular-locale_bm-ml.js │ │ │ │ ├── angular-locale_bm.js │ │ │ │ ├── angular-locale_bn-bd.js │ │ │ │ ├── angular-locale_bn-in.js │ │ │ │ ├── angular-locale_bn.js │ │ │ │ ├── angular-locale_bo-cn.js │ │ │ │ ├── angular-locale_bo-in.js │ │ │ │ ├── angular-locale_bo.js │ │ │ │ ├── angular-locale_br-fr.js │ │ │ │ ├── angular-locale_br.js │ │ │ │ ├── angular-locale_brx-in.js │ │ │ │ ├── angular-locale_brx.js │ │ │ │ ├── angular-locale_bs-cyrl-ba.js │ │ │ │ ├── angular-locale_bs-cyrl.js │ │ │ │ ├── angular-locale_bs-latn-ba.js │ │ │ │ ├── angular-locale_bs-latn.js │ │ │ │ ├── angular-locale_bs.js │ │ │ │ ├── angular-locale_ca-ad.js │ │ │ │ ├── angular-locale_ca-es-valencia.js │ │ │ │ ├── angular-locale_ca-es.js │ │ │ │ ├── angular-locale_ca-fr.js │ │ │ │ ├── angular-locale_ca-it.js │ │ │ │ ├── angular-locale_ca.js │ │ │ │ ├── angular-locale_ce-ru.js │ │ │ │ ├── angular-locale_ce.js │ │ │ │ ├── angular-locale_cgg-ug.js │ │ │ │ ├── angular-locale_cgg.js │ │ │ │ ├── angular-locale_chr-us.js │ │ │ │ ├── angular-locale_chr.js │ │ │ │ ├── angular-locale_ckb-arab-iq.js │ │ │ │ ├── angular-locale_ckb-arab-ir.js │ │ │ │ ├── angular-locale_ckb-arab.js │ │ │ │ ├── angular-locale_ckb-iq.js │ │ │ │ ├── angular-locale_ckb-ir.js │ │ │ │ ├── angular-locale_ckb-latn-iq.js │ │ │ │ ├── angular-locale_ckb-latn.js │ │ │ │ ├── angular-locale_ckb.js │ │ │ │ ├── angular-locale_cs-cz.js │ │ │ │ ├── angular-locale_cs.js │ │ │ │ ├── angular-locale_cu-ru.js │ │ │ │ ├── angular-locale_cu.js │ │ │ │ ├── angular-locale_cy-gb.js │ │ │ │ ├── angular-locale_cy.js │ │ │ │ ├── angular-locale_da-dk.js │ │ │ │ ├── angular-locale_da-gl.js │ │ │ │ ├── angular-locale_da.js │ │ │ │ ├── angular-locale_dav-ke.js │ │ │ │ ├── angular-locale_dav.js │ │ │ │ ├── angular-locale_de-at.js │ │ │ │ ├── angular-locale_de-be.js │ │ │ │ ├── angular-locale_de-ch.js │ │ │ │ ├── angular-locale_de-de.js │ │ │ │ ├── angular-locale_de-li.js │ │ │ │ ├── angular-locale_de-lu.js │ │ │ │ ├── angular-locale_de.js │ │ │ │ ├── angular-locale_dje-ne.js │ │ │ │ ├── angular-locale_dje.js │ │ │ │ ├── angular-locale_dsb-de.js │ │ │ │ ├── angular-locale_dsb.js │ │ │ │ ├── angular-locale_dua-cm.js │ │ │ │ ├── angular-locale_dua.js │ │ │ │ ├── angular-locale_dyo-sn.js │ │ │ │ ├── angular-locale_dyo.js │ │ │ │ ├── angular-locale_dz-bt.js │ │ │ │ ├── angular-locale_dz.js │ │ │ │ ├── angular-locale_ebu-ke.js │ │ │ │ ├── angular-locale_ebu.js │ │ │ │ ├── angular-locale_ee-gh.js │ │ │ │ ├── angular-locale_ee-tg.js │ │ │ │ ├── angular-locale_ee.js │ │ │ │ ├── angular-locale_el-cy.js │ │ │ │ ├── angular-locale_el-gr.js │ │ │ │ ├── angular-locale_el.js │ │ │ │ ├── angular-locale_en-001.js │ │ │ │ ├── angular-locale_en-150.js │ │ │ │ ├── angular-locale_en-ag.js │ │ │ │ ├── angular-locale_en-ai.js │ │ │ │ ├── angular-locale_en-as.js │ │ │ │ ├── angular-locale_en-at.js │ │ │ │ ├── angular-locale_en-au.js │ │ │ │ ├── angular-locale_en-bb.js │ │ │ │ ├── angular-locale_en-be.js │ │ │ │ ├── angular-locale_en-bi.js │ │ │ │ ├── angular-locale_en-bm.js │ │ │ │ ├── angular-locale_en-bs.js │ │ │ │ ├── angular-locale_en-bw.js │ │ │ │ ├── angular-locale_en-bz.js │ │ │ │ ├── angular-locale_en-ca.js │ │ │ │ ├── angular-locale_en-cc.js │ │ │ │ ├── angular-locale_en-ch.js │ │ │ │ ├── angular-locale_en-ck.js │ │ │ │ ├── angular-locale_en-cm.js │ │ │ │ ├── angular-locale_en-cx.js │ │ │ │ ├── angular-locale_en-cy.js │ │ │ │ ├── angular-locale_en-de.js │ │ │ │ ├── angular-locale_en-dg.js │ │ │ │ ├── angular-locale_en-dk.js │ │ │ │ ├── angular-locale_en-dm.js │ │ │ │ ├── angular-locale_en-er.js │ │ │ │ ├── angular-locale_en-fi.js │ │ │ │ ├── angular-locale_en-fj.js │ │ │ │ ├── angular-locale_en-fk.js │ │ │ │ ├── angular-locale_en-fm.js │ │ │ │ ├── angular-locale_en-gb.js │ │ │ │ ├── angular-locale_en-gd.js │ │ │ │ ├── angular-locale_en-gg.js │ │ │ │ ├── angular-locale_en-gh.js │ │ │ │ ├── angular-locale_en-gi.js │ │ │ │ ├── angular-locale_en-gm.js │ │ │ │ ├── angular-locale_en-gu.js │ │ │ │ ├── angular-locale_en-gy.js │ │ │ │ ├── angular-locale_en-hk.js │ │ │ │ ├── angular-locale_en-ie.js │ │ │ │ ├── angular-locale_en-il.js │ │ │ │ ├── angular-locale_en-im.js │ │ │ │ ├── angular-locale_en-in.js │ │ │ │ ├── angular-locale_en-io.js │ │ │ │ ├── angular-locale_en-iso.js │ │ │ │ ├── angular-locale_en-je.js │ │ │ │ ├── angular-locale_en-jm.js │ │ │ │ ├── angular-locale_en-ke.js │ │ │ │ ├── angular-locale_en-ki.js │ │ │ │ ├── angular-locale_en-kn.js │ │ │ │ ├── angular-locale_en-ky.js │ │ │ │ ├── angular-locale_en-lc.js │ │ │ │ ├── angular-locale_en-lr.js │ │ │ │ ├── angular-locale_en-ls.js │ │ │ │ ├── angular-locale_en-mg.js │ │ │ │ ├── angular-locale_en-mh.js │ │ │ │ ├── angular-locale_en-mo.js │ │ │ │ ├── angular-locale_en-mp.js │ │ │ │ ├── angular-locale_en-ms.js │ │ │ │ ├── angular-locale_en-mt.js │ │ │ │ ├── angular-locale_en-mu.js │ │ │ │ ├── angular-locale_en-mw.js │ │ │ │ ├── angular-locale_en-my.js │ │ │ │ ├── angular-locale_en-na.js │ │ │ │ ├── angular-locale_en-nf.js │ │ │ │ ├── angular-locale_en-ng.js │ │ │ │ ├── angular-locale_en-nl.js │ │ │ │ ├── angular-locale_en-nr.js │ │ │ │ ├── angular-locale_en-nu.js │ │ │ │ ├── angular-locale_en-nz.js │ │ │ │ ├── angular-locale_en-pg.js │ │ │ │ ├── angular-locale_en-ph.js │ │ │ │ ├── angular-locale_en-pk.js │ │ │ │ ├── angular-locale_en-pn.js │ │ │ │ ├── angular-locale_en-pr.js │ │ │ │ ├── angular-locale_en-pw.js │ │ │ │ ├── angular-locale_en-rw.js │ │ │ │ ├── angular-locale_en-sb.js │ │ │ │ ├── angular-locale_en-sc.js │ │ │ │ ├── angular-locale_en-sd.js │ │ │ │ ├── angular-locale_en-se.js │ │ │ │ ├── angular-locale_en-sg.js │ │ │ │ ├── angular-locale_en-sh.js │ │ │ │ ├── angular-locale_en-si.js │ │ │ │ ├── angular-locale_en-sl.js │ │ │ │ ├── angular-locale_en-ss.js │ │ │ │ ├── angular-locale_en-sx.js │ │ │ │ ├── angular-locale_en-sz.js │ │ │ │ ├── angular-locale_en-tc.js │ │ │ │ ├── angular-locale_en-tk.js │ │ │ │ ├── angular-locale_en-to.js │ │ │ │ ├── angular-locale_en-tt.js │ │ │ │ ├── angular-locale_en-tv.js │ │ │ │ ├── angular-locale_en-tz.js │ │ │ │ ├── angular-locale_en-ug.js │ │ │ │ ├── angular-locale_en-um.js │ │ │ │ ├── angular-locale_en-us.js │ │ │ │ ├── angular-locale_en-vc.js │ │ │ │ ├── angular-locale_en-vg.js │ │ │ │ ├── angular-locale_en-vi.js │ │ │ │ ├── angular-locale_en-vu.js │ │ │ │ ├── angular-locale_en-ws.js │ │ │ │ ├── angular-locale_en-xa.js │ │ │ │ ├── angular-locale_en-za.js │ │ │ │ ├── angular-locale_en-zm.js │ │ │ │ ├── angular-locale_en-zw.js │ │ │ │ ├── angular-locale_en.js │ │ │ │ ├── angular-locale_eo-001.js │ │ │ │ ├── angular-locale_eo.js │ │ │ │ ├── angular-locale_es-419.js │ │ │ │ ├── angular-locale_es-ar.js │ │ │ │ ├── angular-locale_es-bo.js │ │ │ │ ├── angular-locale_es-br.js │ │ │ │ ├── angular-locale_es-cl.js │ │ │ │ ├── angular-locale_es-co.js │ │ │ │ ├── angular-locale_es-cr.js │ │ │ │ ├── angular-locale_es-cu.js │ │ │ │ ├── angular-locale_es-do.js │ │ │ │ ├── angular-locale_es-ea.js │ │ │ │ ├── angular-locale_es-ec.js │ │ │ │ ├── angular-locale_es-es.js │ │ │ │ ├── angular-locale_es-gq.js │ │ │ │ ├── angular-locale_es-gt.js │ │ │ │ ├── angular-locale_es-hn.js │ │ │ │ ├── angular-locale_es-ic.js │ │ │ │ ├── angular-locale_es-mx.js │ │ │ │ ├── angular-locale_es-ni.js │ │ │ │ ├── angular-locale_es-pa.js │ │ │ │ ├── angular-locale_es-pe.js │ │ │ │ ├── angular-locale_es-ph.js │ │ │ │ ├── angular-locale_es-pr.js │ │ │ │ ├── angular-locale_es-py.js │ │ │ │ ├── angular-locale_es-sv.js │ │ │ │ ├── angular-locale_es-us.js │ │ │ │ ├── angular-locale_es-uy.js │ │ │ │ ├── angular-locale_es-ve.js │ │ │ │ ├── angular-locale_es.js │ │ │ │ ├── angular-locale_et-ee.js │ │ │ │ ├── angular-locale_et.js │ │ │ │ ├── angular-locale_eu-es.js │ │ │ │ ├── angular-locale_eu.js │ │ │ │ ├── angular-locale_ewo-cm.js │ │ │ │ ├── angular-locale_ewo.js │ │ │ │ ├── angular-locale_fa-af.js │ │ │ │ ├── angular-locale_fa-ir.js │ │ │ │ ├── angular-locale_fa.js │ │ │ │ ├── angular-locale_ff-cm.js │ │ │ │ ├── angular-locale_ff-gn.js │ │ │ │ ├── angular-locale_ff-mr.js │ │ │ │ ├── angular-locale_ff-sn.js │ │ │ │ ├── angular-locale_ff.js │ │ │ │ ├── angular-locale_fi-fi.js │ │ │ │ ├── angular-locale_fi.js │ │ │ │ ├── angular-locale_fil-ph.js │ │ │ │ ├── angular-locale_fil.js │ │ │ │ ├── angular-locale_fo-dk.js │ │ │ │ ├── angular-locale_fo-fo.js │ │ │ │ ├── angular-locale_fo.js │ │ │ │ ├── angular-locale_fr-be.js │ │ │ │ ├── angular-locale_fr-bf.js │ │ │ │ ├── angular-locale_fr-bi.js │ │ │ │ ├── angular-locale_fr-bj.js │ │ │ │ ├── angular-locale_fr-bl.js │ │ │ │ ├── angular-locale_fr-ca.js │ │ │ │ ├── angular-locale_fr.js │ │ │ │ ├── angular-locale_yue-hk.js │ │ │ │ ├── angular-locale_zgh-ma.js │ │ │ │ ├── angular-locale_zgh.js │ │ │ │ ├── angular-locale_zh-cn.js │ │ │ │ ├── angular-locale_zh-hans-cn.js │ │ │ │ ├── angular-locale_zh-hans-hk.js │ │ │ │ ├── angular-locale_zh-hans-mo.js │ │ │ │ ├── angular-locale_zh-hans-sg.js │ │ │ │ ├── angular-locale_zh-hans.js │ │ │ │ ├── angular-locale_zh-hant-hk.js │ │ │ │ ├── angular-locale_zh-hant-mo.js │ │ │ │ ├── angular-locale_zh-hant-tw.js │ │ │ │ ├── angular-locale_zh-hant.js │ │ │ │ ├── angular-locale_zh-hk.js │ │ │ │ ├── angular-locale_zh-tw.js │ │ │ │ ├── angular-locale_zh.js │ │ │ │ ├── angular-locale_zu-za.js │ │ │ │ └── angular-locale_zu.js │ │ │ ├── version.json │ │ │ └── version.txt │ │ │ ├── angular-marked-1.2.2 │ │ │ ├── README.md │ │ │ ├── bower.json │ │ │ ├── dist │ │ │ │ ├── angular-marked.js │ │ │ │ └── angular-marked.min.js │ │ │ ├── gruntfile.js │ │ │ ├── karma.conf.js │ │ │ ├── lib │ │ │ │ ├── angular-marked.js │ │ │ │ └── strip-indent.js │ │ │ ├── package.json │ │ │ ├── test │ │ │ │ └── angular-marked.js │ │ │ └── todo.md │ │ │ ├── bootstrap-3.3.6-dist │ │ │ ├── css │ │ │ │ ├── bootstrap-theme.css │ │ │ │ ├── bootstrap-theme.css.map │ │ │ │ ├── bootstrap-theme.min.css │ │ │ │ ├── bootstrap-theme.min.css.map │ │ │ │ ├── bootstrap.css │ │ │ │ ├── bootstrap.css.map │ │ │ │ ├── bootstrap.min.css │ │ │ │ └── bootstrap.min.css.map │ │ │ ├── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ └── js │ │ │ │ ├── bootstrap.js │ │ │ │ ├── bootstrap.min.js │ │ │ │ └── npm.js │ │ │ ├── font-awesome │ │ │ ├── css │ │ │ │ ├── font-awesome.css │ │ │ │ └── font-awesome.min.css │ │ │ ├── fonts │ │ │ │ ├── FontAwesome.otf │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ └── fontawesome-webfont.woff2 │ │ │ ├── less │ │ │ │ ├── animated.less │ │ │ │ ├── bordered-pulled.less │ │ │ │ ├── core.less │ │ │ │ ├── fixed-width.less │ │ │ │ ├── font-awesome.less │ │ │ │ ├── icons.less │ │ │ │ ├── larger.less │ │ │ │ ├── list.less │ │ │ │ ├── mixins.less │ │ │ │ ├── path.less │ │ │ │ ├── rotated-flipped.less │ │ │ │ ├── stacked.less │ │ │ │ └── variables.less │ │ │ └── scss │ │ │ │ ├── _animated.scss │ │ │ │ ├── _bordered-pulled.scss │ │ │ │ ├── _core.scss │ │ │ │ ├── _fixed-width.scss │ │ │ │ ├── _icons.scss │ │ │ │ ├── _larger.scss │ │ │ │ ├── _list.scss │ │ │ │ ├── _mixins.scss │ │ │ │ ├── _path.scss │ │ │ │ ├── _rotated-flipped.scss │ │ │ │ ├── _stacked.scss │ │ │ │ ├── _variables.scss │ │ │ │ └── font-awesome.scss │ │ │ ├── highcharts-ng-0.0.11 │ │ │ ├── dist │ │ │ │ ├── highcharts-ng.js │ │ │ │ └── highcharts-ng.min.js │ │ │ ├── example │ │ │ │ ├── charts │ │ │ │ │ ├── app.js │ │ │ │ │ ├── general-example.html │ │ │ │ │ ├── highstocks-app.js │ │ │ │ │ └── highstocks-example.html │ │ │ │ ├── lazyload │ │ │ │ │ ├── app.js │ │ │ │ │ └── example.html │ │ │ │ └── maps │ │ │ │ │ ├── app.js │ │ │ │ │ └── example.html │ │ │ └── src │ │ │ │ └── highcharts-ng.js │ │ │ ├── highcharts.js │ │ │ ├── inspinia.js │ │ │ ├── jquery.min.js │ │ │ ├── marked.js │ │ │ ├── metisMenu │ │ │ └── jquery.metisMenu.js │ │ │ ├── pace │ │ │ └── pace.min.js │ │ │ ├── slimscroll │ │ │ ├── jquery.slimscroll.js │ │ │ └── jquery.slimscroll.min.js │ │ │ ├── sweetalert │ │ │ ├── sweetalert-dev.js │ │ │ ├── sweetalert.css │ │ │ └── sweetalert.min.js │ │ │ ├── toastr │ │ │ ├── toastr.css │ │ │ ├── toastr.js.map │ │ │ ├── toastr.min.css │ │ │ └── toastr.min.js │ │ │ └── ui-bootstrap-custom-tpls-2.5.0.min.js │ ├── package.json │ ├── robots.txt │ └── webpack.config.js │ └── templates │ ├── about.ftl │ ├── archive.ftl │ ├── category-article.ftl │ ├── category.ftl │ ├── common │ ├── footer.html │ └── header.html │ ├── detail.ftl │ └── index.ftl └── test └── java └── com └── windhc └── BlogApplicationTests.java /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | ### Java template 3 | *.class 4 | 5 | # Mobile Tools for Java (J2ME) 6 | .mtj.tmp/ 7 | 8 | # Package Files # 9 | *.jar 10 | *.war 11 | *.ear 12 | 13 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 14 | hs_err_pid* 15 | ### Example user template template 16 | ### Example user template 17 | 18 | # IntelliJ project files 19 | .idea 20 | *.iml 21 | out 22 | gen 23 | gradle/ 24 | .gradle/ 25 | build/ 26 | classes/ 27 | node_modules/ 28 | 29 | **/front/config/ 30 | **/front/dist/ 31 | **/js/build/ 32 | 33 | keystore.p12 34 | application-dev.properties 35 | blog.db 36 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | 3 | jdk: 4 | - oraclejdk8 5 | 6 | script: 7 | gradle assemble 8 | 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # blog 2 | personal blog 3 | 4 | # 技术 5 | - SpringBoot 6 | - Mybatis 7 | - Shiro 8 | - 后台管理页面使用AngularJS搭建,前台页面使用Freemarker 9 | - 数据库使用的Sqlite 10 | 11 | # 使用 12 | 首先需安装nodejs 13 | 14 | 全局安装gulp 15 | ``` 16 | npm install -g gulp 17 | ``` 18 | 19 | 20 | 进入src/main/resources/static目录,执行 21 | ``` 22 | npm install 23 | gulp js 24 | ``` 25 | 安装依赖和生成后台管理页面的JS。 26 | 27 | 后台管理登陆页面:http://localhost/login 28 | 29 | # 示例 30 | [我的博客](http://www.windhc.com/) -------------------------------------------------------------------------------- /blog-dev.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/blog-dev.db -------------------------------------------------------------------------------- /build.gradle: -------------------------------------------------------------------------------- 1 | plugins { 2 | id "java" 3 | id "org.springframework.boot" version "2.1.1.RELEASE" 4 | id "io.spring.dependency-management" version "1.0.6.RELEASE" 5 | } 6 | 7 | jar { 8 | exclude('**/node_modules') 9 | baseName = 'blog' 10 | version = '1.1.0-SNAPSHOT' 11 | } 12 | processResources { 13 | exclude '**/node_modules' 14 | } 15 | sourceCompatibility = 1.8 16 | targetCompatibility = 1.8 17 | 18 | repositories { 19 | maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } 20 | mavenCentral() 21 | } 22 | 23 | dependencies { 24 | compile('org.springframework.boot:spring-boot-starter-web') 25 | compile('org.springframework.boot:spring-boot-starter-cache') 26 | compile("org.springframework.boot:spring-boot-starter-freemarker") 27 | compile("org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.2") 28 | compile("com.github.pagehelper:pagehelper-spring-boot-starter:1.2.5") 29 | compile("com.piaoniu:pndao:0.2.1") 30 | compile("org.apache.shiro:shiro-core:1.3.2") 31 | compile("org.apache.shiro:shiro-web:1.3.2") 32 | compile("org.apache.shiro:shiro-spring:1.3.2") 33 | compile("org.apache.shiro:shiro-ehcache:1.3.2") 34 | // compile("mysql:mysql-connector-java") 35 | compile("org.xerial:sqlite-jdbc:3.8.7") 36 | 37 | testCompile('org.springframework.boot:spring-boot-starter-test') 38 | } 39 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | if "%@eval[2+2]" == "4" goto 4NT_args 53 | 54 | :win9xME_args 55 | @rem Slurp the command line arguments. 56 | set CMD_LINE_ARGS= 57 | set _SKIP=2 58 | 59 | :win9xME_args_slurp 60 | if "x%~1" == "x" goto execute 61 | 62 | set CMD_LINE_ARGS=%* 63 | goto execute 64 | 65 | :4NT_args 66 | @rem Get arguments from the 4NT Shell from JP Software 67 | set CMD_LINE_ARGS=%$ 68 | 69 | :execute 70 | @rem Setup the command line 71 | 72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if "%ERRORLEVEL%"=="0" goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 85 | exit /b 1 86 | 87 | :mainEnd 88 | if "%OS%"=="Windows_NT" endlocal 89 | 90 | :omega 91 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/BlogApplication.java: -------------------------------------------------------------------------------- 1 | package com.windhc; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class BlogApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(BlogApplication.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/config/Constants.java: -------------------------------------------------------------------------------- 1 | package com.windhc.config; 2 | 3 | /** 4 | * Created by HC on 2016/6/19. 5 | */ 6 | public class Constants { 7 | 8 | public enum ArticleStatus { 9 | Draft("草稿"), Publish("发布"); 10 | 11 | private String name; 12 | 13 | ArticleStatus(String name) { 14 | this.name = name; 15 | } 16 | 17 | public String toString() { 18 | return name; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/config/ShiroRealmImpl.java: -------------------------------------------------------------------------------- 1 | package com.windhc.config; 2 | 3 | import com.windhc.domain.User; 4 | import com.windhc.service.UserService; 5 | import org.apache.shiro.authc.*; 6 | import org.apache.shiro.authz.AuthorizationInfo; 7 | import org.apache.shiro.realm.AuthorizingRealm; 8 | import org.apache.shiro.subject.PrincipalCollection; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | 11 | /** 12 | * Shrio授权验证自定义Realm 13 | * Created by HC on 2016/6/28. 14 | */ 15 | public class ShiroRealmImpl extends AuthorizingRealm { 16 | 17 | @Autowired 18 | private UserService userService; 19 | 20 | // 用于授权 21 | @Override 22 | protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) { 23 | System.out.println("doGetAuthorizationInfo(PrincipalCollection principals)"); 24 | principals.getRealmNames().forEach(str -> System.out.println(str)); 25 | return null; 26 | } 27 | 28 | // 用于认证 29 | @Override 30 | protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken token) throws AuthenticationException { 31 | String username = (String) token.getPrincipal(); 32 | User user = userService.findByUsername(username); 33 | 34 | if (user == null) { 35 | throw new UnknownAccountException(); //没找到帐号 36 | } 37 | //交给AuthenticatingRealm使用CredentialsMatcher进行密码匹配,如果觉得人家的不好可以自定义实现 38 | return new SimpleAuthenticationInfo( 39 | user, 40 | user.getPassword(), //密码 41 | // ByteSource.Util.bytes(user.getSalt()),//salt 加密使用的盐 42 | getName() //realm name 43 | ); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/domain/Article.java: -------------------------------------------------------------------------------- 1 | package com.windhc.domain; 2 | 3 | import java.util.List; 4 | import com.windhc.config.Constants; 5 | 6 | /** 7 | * Created by HC on 2016/6/18. 8 | */ 9 | public class Article extends BaseEntity { 10 | 11 | private String title; 12 | 13 | private String summary; 14 | 15 | private String content; 16 | 17 | private Constants.ArticleStatus status; 18 | 19 | private Long categoryId; 20 | 21 | private Long userId; 22 | 23 | private boolean deleted = false; 24 | 25 | private Category category; 26 | private User user; 27 | private List comments; 28 | 29 | public Constants.ArticleStatus getStatus() { 30 | return status; 31 | } 32 | 33 | public void setStatus(Constants.ArticleStatus status) { 34 | this.status = status; 35 | } 36 | 37 | public String getTitle() { 38 | return title; 39 | } 40 | 41 | public void setTitle(String title) { 42 | this.title = title; 43 | } 44 | 45 | public String getSummary() { 46 | return summary; 47 | } 48 | 49 | public void setSummary(String summary) { 50 | this.summary = summary; 51 | } 52 | 53 | public String getContent() { 54 | return content; 55 | } 56 | 57 | public void setContent(String content) { 58 | this.content = content; 59 | } 60 | 61 | public Long getCategoryId() { 62 | return categoryId; 63 | } 64 | 65 | public void setCategoryId(Long categoryId) { 66 | this.categoryId = categoryId; 67 | } 68 | 69 | public Long getUserId() { 70 | return userId; 71 | } 72 | 73 | public void setUserId(Long userId) { 74 | this.userId = userId; 75 | } 76 | 77 | public boolean isDeleted() { 78 | return deleted; 79 | } 80 | 81 | public void setDeleted(boolean deleted) { 82 | this.deleted = deleted; 83 | } 84 | 85 | public Category getCategory() { 86 | return category; 87 | } 88 | 89 | public void setCategory(Category category) { 90 | this.category = category; 91 | } 92 | 93 | public User getUser() { 94 | return user; 95 | } 96 | 97 | public void setUser(User user) { 98 | this.user = user; 99 | } 100 | 101 | public List getComments() { 102 | return comments; 103 | } 104 | 105 | public void setComments(List comments) { 106 | this.comments = comments; 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/domain/BaseEntity.java: -------------------------------------------------------------------------------- 1 | package com.windhc.domain; 2 | 3 | import java.time.Instant; 4 | 5 | /** 6 | * Created by wind on 2017/4/24. 7 | */ 8 | public abstract class BaseEntity { 9 | 10 | private Long id; 11 | 12 | private long createTime = Instant.now().toEpochMilli(); 13 | 14 | public Long getId() { 15 | return id; 16 | } 17 | 18 | public void setId(Long id) { 19 | this.id = id; 20 | } 21 | 22 | public long getCreateTime() { 23 | return createTime; 24 | } 25 | 26 | public void setCreateTime(long createTime) { 27 | this.createTime = createTime; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/domain/Category.java: -------------------------------------------------------------------------------- 1 | package com.windhc.domain; 2 | 3 | /** 4 | * Created by HC on 2016/6/19. 5 | */ 6 | public class Category extends BaseEntity { 7 | 8 | private String categoryName; 9 | 10 | public String getCategoryName() { 11 | return categoryName; 12 | } 13 | 14 | public void setCategoryName(String categoryName) { 15 | this.categoryName = categoryName; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/domain/Comment.java: -------------------------------------------------------------------------------- 1 | package com.windhc.domain; 2 | 3 | /** 4 | * 评论 5 | * Created by HC on 2016/6/18. 6 | */ 7 | public class Comment extends BaseEntity { 8 | 9 | private String content; 10 | private String ip; 11 | private String username; 12 | private String email; 13 | private boolean deleted = false; 14 | 15 | private Article article; 16 | 17 | public String getContent() { 18 | return content; 19 | } 20 | 21 | public void setContent(String content) { 22 | this.content = content; 23 | } 24 | 25 | public boolean isDeleted() { 26 | return deleted; 27 | } 28 | 29 | public void setDeleted(boolean deleted) { 30 | this.deleted = deleted; 31 | } 32 | 33 | public Article getArticle() { 34 | return article; 35 | } 36 | 37 | public void setArticle(Article article) { 38 | this.article = article; 39 | } 40 | 41 | public String getIp() { 42 | return ip; 43 | } 44 | 45 | public void setIp(String ip) { 46 | this.ip = ip; 47 | } 48 | 49 | public String getUsername() { 50 | return username; 51 | } 52 | 53 | public void setUsername(String username) { 54 | this.username = username; 55 | } 56 | 57 | public String getEmail() { 58 | return email; 59 | } 60 | 61 | public void setEmail(String email) { 62 | this.email = email; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/domain/Role.java: -------------------------------------------------------------------------------- 1 | package com.windhc.domain; 2 | 3 | /** 4 | * Created by HC on 2016/6/19. 5 | */ 6 | public class Role extends BaseEntity { 7 | 8 | private String name; 9 | 10 | public String getName() { 11 | return name; 12 | } 13 | 14 | public void setName(String name) { 15 | this.name = name; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/domain/User.java: -------------------------------------------------------------------------------- 1 | package com.windhc.domain; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; 4 | 5 | import java.io.Serializable; 6 | 7 | /** 8 | * Created by HC on 2016/6/17. 9 | */ 10 | public class User extends BaseEntity implements Serializable { 11 | 12 | private static final long serialVersionUID = 1L; 13 | 14 | private String username; 15 | 16 | @JsonIgnore 17 | private String password; 18 | 19 | private String email; 20 | 21 | private Role role; 22 | 23 | public String getUsername() { 24 | return username; 25 | } 26 | 27 | public void setUsername(String username) { 28 | this.username = username; 29 | } 30 | 31 | public String getEmail() { 32 | return email; 33 | } 34 | 35 | public void setEmail(String email) { 36 | this.email = email; 37 | } 38 | 39 | public String getPassword() { 40 | return password; 41 | } 42 | 43 | public void setPassword(String password) { 44 | this.password = password; 45 | } 46 | 47 | public Role getRole() { 48 | return role; 49 | } 50 | 51 | public void setRole(Role role) { 52 | this.role = role; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/exception/ServiceException.java: -------------------------------------------------------------------------------- 1 | package com.windhc.exception; 2 | 3 | /** 4 | * Created by HC on 2016/6/27. 5 | */ 6 | public class ServiceException extends RuntimeException { 7 | 8 | public ServiceException() { 9 | super(); 10 | } 11 | 12 | public ServiceException(String message) { 13 | super(message); 14 | } 15 | 16 | public ServiceException(String message, Throwable cause) { 17 | super(message, cause); 18 | } 19 | 20 | public ServiceException(Throwable cause) { 21 | super(cause); 22 | } 23 | 24 | protected ServiceException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { 25 | super(message, cause, enableSuppression, writableStackTrace); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/mapper/ArticleMapper.java: -------------------------------------------------------------------------------- 1 | package com.windhc.mapper; 2 | 3 | import com.piaoniu.pndao.annotations.DaoGen; 4 | import com.windhc.domain.Article; 5 | import org.apache.ibatis.annotations.Mapper; 6 | import org.apache.ibatis.annotations.Param; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * Created by HC on 2016/6/18. 12 | */ 13 | @Mapper 14 | public interface ArticleMapper { 15 | 16 | int insert(Article record); 17 | 18 | int insertSelective(Article record); 19 | 20 | int deleteById(long articleid); 21 | 22 | int updateByIdSelective(Article record); 23 | 24 | int updateByIdWithBLOBs(Article record); 25 | 26 | int updateById(Article record); 27 | 28 | Article selectById(long id); 29 | 30 | List
selectAllByDeleted(boolean deleted); 31 | 32 | List
selectAllByCategoryAndDeleted(@Param(value = "categoryId") long categoryId, @Param(value = "deleted") boolean deleted); 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/mapper/CategoryMapper.java: -------------------------------------------------------------------------------- 1 | package com.windhc.mapper; 2 | 3 | import com.piaoniu.pndao.annotations.DaoGen; 4 | import com.windhc.domain.Category; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Created by HC on 2016/6/20. 11 | */ 12 | @Mapper 13 | public interface CategoryMapper { 14 | 15 | int insert(Category record); 16 | 17 | int insertSelective(Category record); 18 | 19 | int deleteById(long categoryid); 20 | 21 | int updateByIdSelective(Category record); 22 | 23 | int updateById(Category record); 24 | 25 | Category selectById(long categoryid); 26 | 27 | List selectAll(); 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/mapper/CommentMapper.java: -------------------------------------------------------------------------------- 1 | package com.windhc.mapper; 2 | 3 | import com.piaoniu.pndao.annotations.DaoGen; 4 | import com.windhc.domain.Comment; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * Created by HC on 2016/6/20. 9 | */ 10 | @Mapper 11 | public interface CommentMapper { 12 | 13 | int deleteById(long commentid); 14 | 15 | int insert(Comment record); 16 | 17 | int insertSelective(Comment record); 18 | 19 | Comment selectById(long commentid); 20 | 21 | int updateByIdSelective(Comment record); 22 | 23 | int updateByIdWithBLOBs(Comment record); 24 | 25 | int updateById(Comment record); 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/mapper/RoleMapper.java: -------------------------------------------------------------------------------- 1 | package com.windhc.mapper; 2 | 3 | import org.apache.ibatis.annotations.Mapper; 4 | 5 | /** 6 | * Created by HC on 2016/6/19. 7 | */ 8 | @Mapper 9 | public interface RoleMapper { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/mapper/UserMapper.java: -------------------------------------------------------------------------------- 1 | package com.windhc.mapper; 2 | 3 | import com.piaoniu.pndao.annotations.DaoGen; 4 | import com.windhc.domain.User; 5 | import org.apache.ibatis.annotations.Mapper; 6 | 7 | /** 8 | * Created by HC on 2016/6/17. 9 | */ 10 | @Mapper 11 | public interface UserMapper { 12 | 13 | int deleteById(Integer userid); 14 | 15 | int insert(User record); 16 | 17 | int insertSelective(User record); 18 | 19 | User selectById(Integer userid); 20 | 21 | int updateByIdSelective(User record); 22 | 23 | int updateById(User record); 24 | 25 | User findUserAndRole(long id); 26 | 27 | User findByUsername(String username); 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/service/ArticleService.java: -------------------------------------------------------------------------------- 1 | package com.windhc.service; 2 | 3 | import com.github.pagehelper.PageInfo; 4 | import com.windhc.domain.Article; 5 | import com.windhc.utils.PageRequest; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Created by HC on 2016/6/19. 11 | */ 12 | public interface ArticleService { 13 | 14 | Article findById(long id); 15 | 16 | PageInfo findAll(PageRequest pageRequest); 17 | 18 | int save(Article article); 19 | 20 | int updateToDeleted(long id); 21 | 22 | int update(Article article); 23 | 24 | List
findAllByCategoryId(long categoryId); 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/service/CategoryService.java: -------------------------------------------------------------------------------- 1 | package com.windhc.service; 2 | 3 | import com.github.pagehelper.PageInfo; 4 | import com.windhc.domain.Category; 5 | import com.windhc.utils.PageRequest; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * Created by HC on 2016/6/20. 11 | */ 12 | public interface CategoryService { 13 | 14 | Category findById(long id); 15 | 16 | PageInfo findAll(PageRequest pageRequest); 17 | 18 | List findAll(); 19 | 20 | int save(Category category); 21 | 22 | int delete(long id); 23 | 24 | int update(Category category); 25 | 26 | Category getOne(long id); 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/service/CommentService.java: -------------------------------------------------------------------------------- 1 | package com.windhc.service; 2 | 3 | /** 4 | * Created by HC on 2016/6/20. 5 | */ 6 | public interface CommentService { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.windhc.service; 2 | 3 | import com.windhc.domain.User; 4 | 5 | /** 6 | * Created by HC on 2016/6/17. 7 | */ 8 | public interface UserService { 9 | 10 | User findOne(long id); 11 | 12 | User findByUsername(String username); 13 | 14 | int save(User user); 15 | 16 | int update(User user); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/service/impl/ArticleServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.windhc.service.impl; 2 | 3 | import com.github.pagehelper.Page; 4 | import com.github.pagehelper.PageHelper; 5 | import com.github.pagehelper.PageInfo; 6 | import com.windhc.config.Constants; 7 | import com.windhc.domain.Article; 8 | import com.windhc.mapper.ArticleMapper; 9 | import com.windhc.service.ArticleService; 10 | import com.windhc.utils.BaseUtils; 11 | import com.windhc.utils.PageRequest; 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.stereotype.Service; 14 | 15 | import java.util.List; 16 | 17 | /** 18 | * Created by HC on 2016/6/19. 19 | */ 20 | @Service 21 | public class ArticleServiceImpl implements ArticleService { 22 | 23 | @Autowired 24 | ArticleMapper articleMapper; 25 | 26 | @Override 27 | public Article findById(long id) { 28 | return articleMapper.selectById(id); 29 | } 30 | 31 | @Override 32 | public PageInfo findAll(PageRequest pageRequest) { 33 | Page
page = PageHelper.startPage(pageRequest.getPageNum(), pageRequest.getPageSize()) 34 | .doSelectPage(()-> articleMapper.selectAllByDeleted(false)); 35 | 36 | //用PageInfo对结果进行包装 37 | return page.toPageInfo(); 38 | } 39 | 40 | @Override 41 | public int save(Article article) { 42 | int length = article.getContent().length() > 200 ? 200 : article.getContent().length(); 43 | article.setSummary(article.getContent().substring(0, length)); 44 | article.setStatus(Constants.ArticleStatus.Publish); 45 | article.setUser(BaseUtils.currentUser()); 46 | return articleMapper.insert(article); 47 | } 48 | 49 | @Override 50 | public int updateToDeleted(long id) { 51 | Article article = articleMapper.selectById(id); 52 | article.setDeleted(true); 53 | return articleMapper.updateById(article); 54 | } 55 | 56 | @Override 57 | public int update(Article article) { 58 | int length = article.getContent().length() > 200 ? 200 : article.getContent().length(); 59 | article.setSummary(article.getContent().substring(0, length)); 60 | return articleMapper.updateByIdSelective(article); 61 | } 62 | 63 | @Override 64 | public List
findAllByCategoryId(long categoryId) { 65 | return articleMapper.selectAllByCategoryAndDeleted(categoryId, false); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/service/impl/CategoryServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.windhc.service.impl; 2 | 3 | import com.github.pagehelper.PageHelper; 4 | import com.github.pagehelper.PageInfo; 5 | import com.windhc.domain.Category; 6 | import com.windhc.mapper.CategoryMapper; 7 | import com.windhc.service.CategoryService; 8 | import com.windhc.utils.PageRequest; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Service; 11 | 12 | import java.util.List; 13 | 14 | /** 15 | * Created by HC on 2016/6/20. 16 | */ 17 | @Service 18 | public class CategoryServiceImpl implements CategoryService { 19 | 20 | @Autowired 21 | private CategoryMapper categoryMapper; 22 | 23 | @Override 24 | public Category findById(long id) { 25 | return categoryMapper.selectById(id); 26 | } 27 | 28 | @Override 29 | public PageInfo findAll(PageRequest pageRequest) { 30 | PageHelper.startPage(pageRequest.getPageNum(), pageRequest.getPageSize()); 31 | List articles = categoryMapper.selectAll(); 32 | return new PageInfo(articles); 33 | } 34 | 35 | @Override 36 | public List findAll() { 37 | return categoryMapper.selectAll(); 38 | } 39 | 40 | @Override 41 | public int save(Category category) { 42 | return categoryMapper.insert(category); 43 | } 44 | 45 | @Override 46 | public int delete(long id) { 47 | return categoryMapper.deleteById(id); 48 | } 49 | 50 | @Override 51 | public int update(Category category) { 52 | return categoryMapper.updateByIdSelective(category); 53 | } 54 | 55 | @Override 56 | public Category getOne(long id) { 57 | return categoryMapper.selectById(id); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/service/impl/CommentServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.windhc.service.impl; 2 | 3 | import org.springframework.stereotype.Service; 4 | 5 | /** 6 | * Created by HC on 2016/6/20. 7 | */ 8 | @Service 9 | public class CommentServiceImpl { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/service/impl/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.windhc.service.impl; 2 | 3 | import com.windhc.domain.User; 4 | import com.windhc.mapper.UserMapper; 5 | import com.windhc.service.UserService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | /** 10 | * Created by HC on 2016/6/17. 11 | */ 12 | @Service 13 | public class UserServiceImpl implements UserService { 14 | 15 | @Autowired 16 | UserMapper userMapper; 17 | 18 | @Override 19 | public User findOne(long id) { 20 | return userMapper.findUserAndRole(id); 21 | } 22 | 23 | @Override 24 | public User findByUsername(String username) { 25 | return userMapper.findByUsername(username); 26 | } 27 | 28 | @Override 29 | public int save(User user) { 30 | return userMapper.insertSelective(user); 31 | } 32 | 33 | @Override 34 | public int update(User user) { 35 | return userMapper.updateByIdSelective(user); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/utils/BaseUtils.java: -------------------------------------------------------------------------------- 1 | package com.windhc.utils; 2 | 3 | import com.windhc.domain.User; 4 | import org.apache.shiro.SecurityUtils; 5 | 6 | /** 7 | * Created by HC on 2016/7/4. 8 | */ 9 | public class BaseUtils { 10 | 11 | public static User currentUser() { 12 | return (User) SecurityUtils.getSubject().getPrincipal(); 13 | } 14 | 15 | public static String md5(String str) { 16 | try { 17 | java.security.MessageDigest md = java.security.MessageDigest.getInstance("MD5"); 18 | byte[] array = md.digest(str.getBytes()); 19 | StringBuilder sb = new StringBuilder(); 20 | for (byte anArray : array) { 21 | sb.append(Integer.toHexString((anArray & 0xFF) | 0x100).substring(1, 3)); 22 | } 23 | return sb.toString(); 24 | } catch (java.security.NoSuchAlgorithmException e) { 25 | } 26 | return null; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/utils/ChangePasswordRequest.java: -------------------------------------------------------------------------------- 1 | package com.windhc.utils; 2 | 3 | /** 4 | * Created by HC on 2016/7/28. 5 | */ 6 | public class ChangePasswordRequest { 7 | private String userName; 8 | private String oldPwd; 9 | private String newPwd; 10 | 11 | public String getUserName() { 12 | return userName; 13 | } 14 | 15 | public void setUserName(String userName) { 16 | this.userName = userName; 17 | } 18 | 19 | public String getOldPwd() { 20 | return oldPwd; 21 | } 22 | 23 | public void setOldPwd(String oldPwd) { 24 | this.oldPwd = oldPwd; 25 | } 26 | 27 | public String getNewPwd() { 28 | return newPwd; 29 | } 30 | 31 | public void setNewPwd(String newPwd) { 32 | this.newPwd = newPwd; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/utils/JsonView.java: -------------------------------------------------------------------------------- 1 | package com.windhc.utils; 2 | 3 | /** 4 | * Created by Weihua on 16/1/21. 5 | */ 6 | public class JsonView { 7 | 8 | public static final int SUCCESS = 0; 9 | public static final int ERROR = 1; 10 | public static final int EXPIRED = 2; 11 | public static final String DEFAULT_SUCCESS_MESSAGE = "访问成功"; 12 | public static final String DEFAULT_FAIL_MESSAGE = "访问失败"; 13 | 14 | private int code = SUCCESS; 15 | private String message = DEFAULT_SUCCESS_MESSAGE; 16 | private Object data; 17 | 18 | 19 | public int getCode() { 20 | return code; 21 | } 22 | 23 | public void setCode(int code) { 24 | this.code = code; 25 | } 26 | 27 | public String getMessage() { 28 | return message; 29 | } 30 | 31 | public void setMessage(String message) { 32 | this.message = message; 33 | } 34 | 35 | public Object getData() { 36 | return data; 37 | } 38 | 39 | public void setData(Object data) { 40 | this.data = data; 41 | } 42 | 43 | public static JsonView success() { 44 | JsonView view = new JsonView(); 45 | view.setMessage(DEFAULT_SUCCESS_MESSAGE); 46 | return view; 47 | } 48 | 49 | public static JsonView success(Object data) { 50 | JsonView view = new JsonView(); 51 | view.setData(data); 52 | return view; 53 | } 54 | 55 | public static JsonView success(String message) { 56 | JsonView view = new JsonView(); 57 | view.setMessage(message); 58 | return view; 59 | } 60 | 61 | public static JsonView fail() { 62 | return fail(ERROR, DEFAULT_FAIL_MESSAGE); 63 | } 64 | 65 | public static JsonView fail(String message) { 66 | return fail(ERROR, message); 67 | } 68 | 69 | public static JsonView fail(int code, String message) { 70 | JsonView view = new JsonView(); 71 | view.setCode(code); 72 | view.setMessage(message); 73 | return view; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/utils/PageRequest.java: -------------------------------------------------------------------------------- 1 | package com.windhc.utils; 2 | 3 | /** 4 | * Created by HC on 2016/7/2. 5 | */ 6 | public class PageRequest { 7 | 8 | private Integer pageNum; 9 | 10 | private Integer pageSize; 11 | 12 | private String orderBy; 13 | 14 | public PageRequest(Integer pageNum, Integer pageSize, String orderBy) { 15 | this.pageNum = pageNum; 16 | this.pageSize = pageSize; 17 | this.orderBy = orderBy; 18 | } 19 | 20 | public PageRequest(Integer pageNum, Integer pageSize) { 21 | this.pageNum = pageNum; 22 | this.pageSize = pageSize; 23 | } 24 | 25 | public PageRequest() { 26 | } 27 | 28 | public Integer getPageNum() { 29 | return pageNum; 30 | } 31 | 32 | public void setPageNum(Integer pageNum) { 33 | this.pageNum = pageNum; 34 | } 35 | 36 | public Integer getPageSize() { 37 | return pageSize; 38 | } 39 | 40 | public void setPageSize(Integer pageSize) { 41 | this.pageSize = pageSize; 42 | } 43 | 44 | public String getOrderBy() { 45 | return orderBy; 46 | } 47 | 48 | public void setOrderBy(String orderBy) { 49 | this.orderBy = orderBy; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/web/ArticleController.java: -------------------------------------------------------------------------------- 1 | package com.windhc.web; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.web.bind.annotation.PathVariable; 5 | import org.springframework.web.bind.annotation.RequestBody; 6 | import org.springframework.web.bind.annotation.RequestMapping; 7 | import org.springframework.web.bind.annotation.RequestMethod; 8 | import org.springframework.web.bind.annotation.RestController; 9 | import com.github.pagehelper.PageInfo; 10 | import com.windhc.domain.Article; 11 | import com.windhc.service.ArticleService; 12 | import com.windhc.utils.JsonView; 13 | import com.windhc.utils.PageRequest; 14 | 15 | /** 16 | * Created by HC on 2016/6/19. 17 | */ 18 | @RestController 19 | @RequestMapping(value = "/article") 20 | public class ArticleController { 21 | 22 | @Autowired 23 | private ArticleService articleService; 24 | 25 | @RequestMapping(method = RequestMethod.GET, value = {"/{id}", "/front/{id}"}) 26 | public JsonView getById(@PathVariable long id) { 27 | Article article = articleService.findById(id); 28 | return JsonView.success(article); 29 | } 30 | 31 | @RequestMapping(method = RequestMethod.GET, value = {"", "/front"}) 32 | public JsonView getAll(PageRequest pageRequest) { 33 | PageInfo pageInfo = articleService.findAll(pageRequest); 34 | return JsonView.success(pageInfo); 35 | } 36 | 37 | @RequestMapping(method = RequestMethod.DELETE, value = "/{id}") 38 | public JsonView delete(@PathVariable long id) { 39 | articleService.updateToDeleted(id); 40 | return JsonView.success(); 41 | } 42 | 43 | @RequestMapping(method = RequestMethod.POST, value = "") 44 | public JsonView save(@RequestBody Article article) { 45 | article.setCategoryId(article.getCategory().getId()); 46 | articleService.save(article); 47 | return JsonView.success(); 48 | } 49 | 50 | @RequestMapping(method = RequestMethod.PUT, value = "") 51 | public JsonView update(@RequestBody Article article) { 52 | articleService.update(article); 53 | return JsonView.success(); 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/web/CategoryController.java: -------------------------------------------------------------------------------- 1 | package com.windhc.web; 2 | 3 | import com.github.pagehelper.PageInfo; 4 | import com.windhc.domain.Category; 5 | import com.windhc.service.CategoryService; 6 | import com.windhc.utils.JsonView; 7 | import com.windhc.utils.PageRequest; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.web.bind.annotation.*; 10 | 11 | import java.util.List; 12 | 13 | /** 14 | * Created by HC on 2016/7/3. 15 | */ 16 | @RestController 17 | @RequestMapping("/category") 18 | public class CategoryController { 19 | 20 | @Autowired 21 | private CategoryService categoryService; 22 | 23 | @RequestMapping(method = RequestMethod.GET, value = "") 24 | public JsonView getAll(PageRequest pageRequest) { 25 | PageInfo pageInfo = categoryService.findAll(pageRequest); 26 | return JsonView.success(pageInfo); 27 | } 28 | 29 | @RequestMapping(method = RequestMethod.GET, value = {"/all", "/front/all"}) 30 | public JsonView getAll() { 31 | List categories = categoryService.findAll(); 32 | return JsonView.success(categories); 33 | } 34 | 35 | @RequestMapping(method = RequestMethod.GET, value = "/{id}") 36 | public JsonView getOne(@PathVariable long id) { 37 | Category category = categoryService.getOne(id); 38 | return JsonView.success(category); 39 | } 40 | 41 | @RequestMapping(method = RequestMethod.POST, value = "") 42 | public JsonView save(@RequestBody Category category) { 43 | categoryService.save(category); 44 | return JsonView.success(); 45 | } 46 | 47 | @RequestMapping(method = RequestMethod.DELETE, value = "/{id}") 48 | public JsonView delete(@PathVariable long id) { 49 | categoryService.delete(id); 50 | return JsonView.success(); 51 | } 52 | 53 | @RequestMapping(method = RequestMethod.PUT, value = "") 54 | public JsonView update(@RequestBody Category category) { 55 | categoryService.update(category); 56 | return JsonView.success(); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/web/HomeController.java: -------------------------------------------------------------------------------- 1 | package com.windhc.web; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.bind.annotation.RequestMethod; 6 | import org.springframework.web.bind.annotation.ResponseBody; 7 | 8 | import javax.servlet.http.HttpServletRequest; 9 | 10 | /** 11 | * Created by HC on 2016/6/20. 12 | */ 13 | @Controller 14 | @RequestMapping(value = "/") 15 | public class HomeController { 16 | 17 | // @RequestMapping(method = RequestMethod.GET) 18 | // public String home() { 19 | // return "/front/index.html"; 20 | // } 21 | 22 | // @RequestMapping(method = RequestMethod.GET, value = "/front/archives/{id}") 23 | // public String detail() { 24 | // return "/front/article/detail.html"; 25 | // } 26 | // 27 | // @RequestMapping(method = RequestMethod.GET, value = "/front/category") 28 | // public String category() { 29 | // return "/front/article/category.html"; 30 | // } 31 | // 32 | // @RequestMapping(method = RequestMethod.GET, value = "/front/archives") 33 | // public String archives() { 34 | // return "/front/article/archive.html"; 35 | // } 36 | // 37 | // @RequestMapping(method = RequestMethod.GET, value = "/front/about") 38 | // public String about() { 39 | // return "/front/article/about.html"; 40 | // } 41 | 42 | 43 | @RequestMapping(method = RequestMethod.GET, value = "/login") 44 | public String login() { 45 | return "/admin/login.html"; 46 | } 47 | 48 | @RequestMapping(method = RequestMethod.POST, value = "/login") 49 | public String sign(HttpServletRequest request) { 50 | String errorClassName = (String) request.getAttribute("shiroLoginFailure"); 51 | System.out.println(errorClassName); 52 | return "redirect:/login"; 53 | } 54 | 55 | @RequestMapping(method = RequestMethod.GET, value = "/admin") 56 | public String admin() { 57 | return "/admin/main.html"; 58 | } 59 | 60 | @ResponseBody 61 | @RequestMapping(method = RequestMethod.GET, value = "/forbidden") 62 | public String forbidden() { 63 | return "forbidden"; 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /src/main/java/com/windhc/web/UserController.java: -------------------------------------------------------------------------------- 1 | package com.windhc.web; 2 | 3 | import com.windhc.domain.User; 4 | import com.windhc.service.UserService; 5 | import com.windhc.utils.BaseUtils; 6 | import com.windhc.utils.ChangePasswordRequest; 7 | import com.windhc.utils.JsonView; 8 | import org.apache.shiro.SecurityUtils; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.web.bind.annotation.RequestBody; 11 | import org.springframework.web.bind.annotation.RequestMapping; 12 | import org.springframework.web.bind.annotation.RequestMethod; 13 | import org.springframework.web.bind.annotation.RestController; 14 | 15 | import java.util.HashMap; 16 | import java.util.Map; 17 | 18 | /** 19 | * Created by HC on 2016/6/17. 20 | */ 21 | @RestController 22 | @RequestMapping(value = "/user") 23 | public class UserController { 24 | 25 | @Autowired 26 | private UserService userService; 27 | 28 | @RequestMapping(method = RequestMethod.GET, value = "/test") 29 | public User test() { 30 | return userService.findOne(1); 31 | } 32 | 33 | @RequestMapping(method = RequestMethod.POST, value = "/login") 34 | public String login() { 35 | return "success"; 36 | } 37 | 38 | @RequestMapping(method = RequestMethod.GET, value = "/info") 39 | public Map info() { 40 | Object principal = SecurityUtils.getSubject().getPrincipal(); 41 | Map map = new HashMap<>(); 42 | map.put("user", principal); 43 | return map; 44 | } 45 | 46 | @RequestMapping(method = RequestMethod.POST, value = "/pwd") 47 | public JsonView changePwd(@RequestBody ChangePasswordRequest request) { 48 | User user = BaseUtils.currentUser(); 49 | if (!user.getPassword().equals(BaseUtils.md5(request.getOldPwd()))) { 50 | return JsonView.fail("原密码错误"); 51 | } 52 | user.setPassword(BaseUtils.md5(request.getNewPwd())); 53 | userService.update(user); 54 | return JsonView.success("密码修改成功"); 55 | } 56 | 57 | @RequestMapping(method = RequestMethod.GET, value = "/pwd/verify") 58 | public JsonView verifyPwd() { 59 | 60 | return JsonView.success(); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | #\u6570\u636E\u5E93\u5B9A\u4E49 2 | spring.datasource.platform=mysql 3 | spring.datasource.url=jdbc:sqlite:blog.db 4 | spring.datasource.username=root 5 | spring.datasource.password=123... 6 | spring.datasource.driver-class-name=org.sqlite.JDBC 7 | # Advanced configuration... 8 | spring.datasource.tomcat.max-active=50 9 | spring.datasource.tomcat.max-idle=5 10 | spring.datasource.tomcat.min-idle=5 11 | spring.datasource.tomcat.initial-size=5 12 | 13 | #mybatis.config-location=classpath:mybatis-config.xml 14 | mybatis.type-aliases-package=com.windhc.domain 15 | mybatis.mapper-locations=classpath:/mapper/*Mapper.xml 16 | 17 | #spring.cache.jcache.config=ehcache3.xml 18 | 19 | server.port=80 20 | 21 | #server.port=443 22 | #security.require-ssl=true 23 | ##\u8BC1\u4E66\u6587\u4EF6\u653E\u5230resources\u76EE\u5F55 24 | #server.ssl.key-store=classpath:keystore.p12 25 | #server.ssl.key-store-password=123456 26 | #server.ssl.keyStoreType=PKCS12 27 | #server.ssl.keyAlias=tomcat 28 | 29 | #\u81EA\u5B9A\u4E49\u914D\u7F6E 30 | #server.http.port=8081 31 | -------------------------------------------------------------------------------- /src/main/resources/ehcache-shiro.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 13 | -------------------------------------------------------------------------------- /src/main/resources/init.sql: -------------------------------------------------------------------------------- 1 | CREATE DATABASE db_blog; 2 | 3 | ALTER TABLE db_blog.comment DROP FOREIGN KEY article_id_FK; 4 | ALTER TABLE db_blog.article DROP FOREIGN KEY category_id_FK; 5 | ALTER TABLE db_blog.article DROP FOREIGN KEY user_id_FK; 6 | ALTER TABLE db_blog.user DROP FOREIGN KEY role_id_FK; 7 | drop table if exists user; 8 | drop table if exists role; 9 | drop table if exists comment; 10 | drop table if exists article; 11 | drop table if exists category; 12 | 13 | drop table if exists user; 14 | drop table if exists role; 15 | drop table if exists comment; 16 | drop table if exists article; 17 | drop table if exists category; 18 | 19 | CREATE TABLE role( 20 | id INT PRIMARY KEY AUTO_INCREMENT, 21 | name VARCHAR(50) 22 | ); 23 | 24 | CREATE TABLE user( 25 | id INT PRIMARY KEY AUTO_INCREMENT, 26 | username VARCHAR(50), 27 | password VARCHAR(125), 28 | email VARCHAR(125), 29 | role_id INT, 30 | constraint role_id_FK foreign key(role_id) references role(id) 31 | ); 32 | 33 | CREATE TABLE category( 34 | id INT PRIMARY KEY AUTO_INCREMENT, 35 | categoryName VARCHAR(50) 36 | ); 37 | 38 | CREATE TABLE article( 39 | id INT PRIMARY KEY AUTO_INCREMENT, 40 | title VARCHAR(125), 41 | summary VARCHAR(256), 42 | content TEXT, 43 | status VARCHAR(25), 44 | createTime BIGINT(20), 45 | deleted BIT(1), 46 | category_id INT, 47 | user_id INT, 48 | constraint category_id_FK foreign key(category_id) references category(id), 49 | constraint user_id_FK foreign key(user_id) references user(userId) 50 | ); 51 | 52 | CREATE TABLE comment( 53 | id INT PRIMARY KEY AUTO_INCREMENT, 54 | content TEXT, 55 | ip VARCHAR(64), 56 | username VARCHAR(50), 57 | email VARCHAR(125), 58 | createTime BIGINT(20), 59 | deleted BIT(1), 60 | article_id INT, 61 | constraint article_id_FK foreign key(article_id) references article(id) 62 | ); 63 | 64 | insert into role (name) values ('admin'); 65 | insert into role (name) values ('guest'); 66 | 67 | insert into user (username, password, email, role_id) values ('admin', md5('admin888'), '123@qq.com', 1); 68 | 69 | INSERT INTO category (categoryName) VALUES ('技术'); 70 | INSERT INTO category (categoryName) VALUES ('生活'); 71 | 72 | INSERT INTO article (title, content, status, createTime, deleted, category_id, user_id) 73 | VALUES ('Springboot的使用','Springboot快速构建微服务,具有极大的优势,免去诸多繁琐的配置','Draft', 1467368721000 , 0 , 1, 1); 74 | INSERT INTO article (title, content, status, createTime, deleted, category_id, user_id) 75 | VALUES ('ELK数据分析','ELK由三个开源组件构建,天生支持分布式扩展','Publish', 1467368721000 , 0 , 1, 1); 76 | 77 | INSERT INTO comment (content, ip, username, email, createTime, deleted, article_id) 78 | VALUES ('写的很不错', '192.168.1.1', 'woshitest', '1111@qq.com', 1467368721000, 0, 1); 79 | 80 | -------------------------------------------------------------------------------- /src/main/resources/mapper/CategoryMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | category.id categoryId, categoryName 11 | 12 | 13 | 19 | 20 | 25 | 26 | 27 | delete from category 28 | where id = #{id,jdbcType=INTEGER} 29 | 30 | 31 | 32 | insert into category (categoryName) 33 | values (#{categoryName,jdbcType=VARCHAR}) 34 | 35 | 36 | 37 | insert into category 38 | 39 | 40 | id, 41 | 42 | 43 | categoryName, 44 | 45 | 46 | 47 | 48 | #{id,jdbcType=INTEGER}, 49 | 50 | 51 | #{categoryName,jdbcType=VARCHAR}, 52 | 53 | 54 | 55 | 56 | 57 | update category 58 | 59 | 60 | categoryName = #{categoryName,jdbcType=VARCHAR}, 61 | 62 | 63 | where id = #{id,jdbcType=INTEGER} 64 | 65 | 66 | 67 | update category 68 | set categoryName = #{categoryName,jdbcType=VARCHAR} 69 | where id = #{id,jdbcType=INTEGER} 70 | 71 | -------------------------------------------------------------------------------- /src/main/resources/mapper/RoleMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | id roleId, roleName 12 | 13 | 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 | -------------------------------------------------------------------------------- /src/main/resources/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 13 | 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 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /src/main/resources/static/admin/article/add.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |

5 | 9 |
10 |
11 |
12 | 13 | 14 |
15 |
16 |
17 |
18 |
19 |
添加文章
20 |
21 |
22 |
23 |
24 | 25 | 26 | 27 | 28 |
29 | 30 |
31 |
32 |
33 |
34 |
35 | -------------------------------------------------------------------------------- /src/main/resources/static/admin/article/article.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by HC on 2016/6/27. 3 | */ 4 | 'use strict'; 5 | 6 | BlogApp.config(['$routeProvider', function ($routeProvider) { 7 | $routeProvider 8 | .when('/article', { 9 | templateUrl: '/admin/article/index.html', 10 | controller: 'ArticleCtrl' 11 | }).when('/article/add', { 12 | templateUrl: '/admin/article/add.html', 13 | controller: 'ArticleAddCtrl' 14 | }).when('/article/:id/edit', { 15 | templateUrl: '/admin/article/edit.html', 16 | controller: 'ArticleEditCtrl' 17 | }).when('/article/:id/detail', { 18 | templateUrl: '/admin/article/detail.html', 19 | controller: 'ArticleDetailCtrl' 20 | }).when('/category', { 21 | templateUrl: '/admin/category/index.html', 22 | controller: 'CategoryCtrl' 23 | }).otherwise({redirectTo: '/article'}); 24 | }]); 25 | 26 | BlogApp.service('ArticleService', ['$http', 27 | function ($http) { 28 | return { 29 | save: function (article) { 30 | return $http.post("/article", article); 31 | }, 32 | update: function (article) { 33 | return $http.put("/article", article); 34 | }, 35 | delete: function (id) { 36 | return $http.delete("/article/" + id); 37 | }, 38 | getOne: function (id) { 39 | return $http.get("/article/" + id); 40 | }, 41 | listArticle: function (params) { 42 | return $http.get("/article?" + params); 43 | }, 44 | getCategory: function (id) { 45 | return $http.get("/category/" + id); 46 | }, 47 | listCategory: function (params) { 48 | return $http.get("/category?" + params); 49 | }, 50 | saveCategory: function (category) { 51 | return $http.post("/category", category); 52 | }, 53 | deleteCategory: function (id) { 54 | return $http.delete("/category/" + id); 55 | }, 56 | updateCategory: function (category) { 57 | return $http.put("/category", category); 58 | }, 59 | allCategory: function () { 60 | return $http.get("/category/all"); 61 | } 62 | }; 63 | } 64 | ]); -------------------------------------------------------------------------------- /src/main/resources/static/admin/article/detail.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |

5 | 9 |
10 |
11 |
12 | 13 | 14 |
15 |
16 |
17 |
18 |
19 |
{{article.title}}
20 |
21 |
22 |
23 | 24 | 25 |
{{article.category.categoryName}}
26 |
27 | 28 |
{{article.createTime | date:'yyyy-MM-dd HH:mm:ss'}}
29 |
30 | 31 |
32 | 33 |
34 |
35 |
36 |
37 |
38 | -------------------------------------------------------------------------------- /src/main/resources/static/admin/article/edit.html: -------------------------------------------------------------------------------- 1 | 2 |
3 |
4 |

5 | 9 |
10 |
11 |
12 | 13 | 14 |
15 |
16 |
17 |
18 |
19 |
编辑文章
20 |
21 |
22 |
23 |
24 | 25 | 26 | 27 | 28 |
29 | 30 |
31 |
32 |
33 |
34 |
35 | -------------------------------------------------------------------------------- /src/main/resources/static/admin/article/form.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 4 |
5 |
6 | 7 | 10 |
11 |
12 | 13 | 17 | 18 |
19 |
20 |
21 | 22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
-------------------------------------------------------------------------------- /src/main/resources/static/admin/category/article.category.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by HC on 2016/6/27. 3 | */ 4 | 'use strict'; 5 | 6 | BlogApp 7 | .controller('CategoryCtrl', ['$scope', 'ArticleService', 'CommonService', 8 | function($scope, ArticleService, CommonService) { 9 | 10 | $scope.totalItems = 0; 11 | $scope.currentPage = 1; 12 | $scope.maxSize = 5; 13 | $scope.pageSize = 10 ; //每页大小 14 | function getPageData() { 15 | $scope.params = "pageSize="+$scope.pageSize+"&pageNum="+($scope.currentPage); 16 | ArticleService.listCategory($scope.params).then(function (response) { 17 | $scope.categories = response.data.data.list; 18 | $scope.totalItems = response.data.data.total; 19 | }); 20 | } 21 | getPageData(); 22 | $scope.pageChanged = function() { 23 | getPageData(); 24 | }; 25 | $scope.delete = function (id) { 26 | CommonService.confirm("确定删除?", function () { 27 | ArticleService.deleteCategory(id).then(function (response) { 28 | CommonService.show(response.data); 29 | getPageData(); 30 | }) 31 | }) 32 | }; 33 | 34 | $scope.save = function () { 35 | ArticleService.saveCategory($scope.category).then(function (response) { 36 | CommonService.show(response.data); 37 | $('#addModal').modal('toggle'); 38 | getPageData(); 39 | }) 40 | }; 41 | 42 | // 打开修改模态框 43 | $scope.openEdit = function (id) { 44 | ArticleService.getCategory(id).then(function (response) { 45 | $('#editModal').modal('show'); 46 | $scope.category = response.data.data; 47 | }) 48 | }; 49 | 50 | // 修改分类 51 | $scope.update = function (id) { 52 | ArticleService.updateCategory($scope.category).then(function (response) { 53 | CommonService.show(response.data); 54 | $('#editModal').modal('toggle'); 55 | getPageData(); 56 | }) 57 | } 58 | } 59 | ]); -------------------------------------------------------------------------------- /src/main/resources/static/admin/common/footer.html: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /src/main/resources/static/admin/common/ibox_tools.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/static/admin/common/navigation.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/static/admin/common/topnavbar.html: -------------------------------------------------------------------------------- 1 |
2 | 53 |
-------------------------------------------------------------------------------- /src/main/resources/static/admin/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 登陆 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 35 | 36 |
37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/main/resources/static/admin/user/user.info.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by HC on 2016/7/28. 3 | */ 4 | 'use strict'; 5 | 6 | BlogApp 7 | .controller('PwdCtrl', ['$scope', '$location', 'UserService', 'CommonService', 8 | function($scope, $location, UserService, CommonService) { 9 | 10 | $scope.cp = {}; 11 | $scope.updatePwd = function () { 12 | if($scope.cp.newPwd != $scope.cp.confirmPwd) { 13 | CommonService.showError("两次密码输入的不一致"); 14 | return; 15 | } 16 | UserService.savePwd($scope.cp).then(function (data) { 17 | CommonService.show(data); 18 | $location.path('/article'); 19 | }) 20 | }; 21 | } 22 | ]); -------------------------------------------------------------------------------- /src/main/resources/static/admin/user/user.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by HC on 2016/6/27. 3 | */ 4 | 'use strict'; 5 | 6 | BlogApp.config(['$routeProvider', function ($routeProvider) { 7 | $routeProvider 8 | .when('/pwd', { 9 | templateUrl: '/admin/user/change-pwd.html', 10 | controller: 'PwdCtrl' 11 | }); 12 | }]); 13 | 14 | BlogApp.service('UserService', ['$http', 15 | function ($http) { 16 | return { 17 | savePwd: function (newPwd) { 18 | return $http.post("/user/pwd", newPwd); 19 | } 20 | }; 21 | } 22 | ]); -------------------------------------------------------------------------------- /src/main/resources/static/css/patterns/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/css/patterns/1.png -------------------------------------------------------------------------------- /src/main/resources/static/css/patterns/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/css/patterns/2.png -------------------------------------------------------------------------------- /src/main/resources/static/css/patterns/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/css/patterns/3.png -------------------------------------------------------------------------------- /src/main/resources/static/css/patterns/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/css/patterns/4.png -------------------------------------------------------------------------------- /src/main/resources/static/css/patterns/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/css/patterns/5.png -------------------------------------------------------------------------------- /src/main/resources/static/css/patterns/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/css/patterns/6.png -------------------------------------------------------------------------------- /src/main/resources/static/css/patterns/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/css/patterns/7.png -------------------------------------------------------------------------------- /src/main/resources/static/css/patterns/congruent_pentagon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/css/patterns/congruent_pentagon.png -------------------------------------------------------------------------------- /src/main/resources/static/css/patterns/header-profile-skin-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/css/patterns/header-profile-skin-1.png -------------------------------------------------------------------------------- /src/main/resources/static/css/patterns/header-profile-skin-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/css/patterns/header-profile-skin-2.png -------------------------------------------------------------------------------- /src/main/resources/static/css/patterns/header-profile-skin-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/css/patterns/header-profile-skin-3.png -------------------------------------------------------------------------------- /src/main/resources/static/css/patterns/header-profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/css/patterns/header-profile.png -------------------------------------------------------------------------------- /src/main/resources/static/css/patterns/otis_redding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/css/patterns/otis_redding.png -------------------------------------------------------------------------------- /src/main/resources/static/css/patterns/shattered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/css/patterns/shattered.png -------------------------------------------------------------------------------- /src/main/resources/static/css/patterns/triangular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/css/patterns/triangular.png -------------------------------------------------------------------------------- /src/main/resources/static/css/signin.css: -------------------------------------------------------------------------------- 1 | /*登陆页面CSS*/ 2 | body { 3 | padding-top: 40px; 4 | padding-bottom: 40px; 5 | background-color: #eee; 6 | } 7 | 8 | .form-signin { 9 | max-width: 330px; 10 | padding: 15px; 11 | margin: 0 auto; 12 | } 13 | .form-signin .form-signin-heading, 14 | .form-signin .checkbox { 15 | margin-bottom: 10px; 16 | } 17 | .form-signin .checkbox { 18 | font-weight: normal; 19 | } 20 | .form-signin .form-control { 21 | position: relative; 22 | height: auto; 23 | -webkit-box-sizing: border-box; 24 | -moz-box-sizing: border-box; 25 | box-sizing: border-box; 26 | padding: 10px; 27 | font-size: 16px; 28 | } 29 | .form-signin .form-control:focus { 30 | z-index: 2; 31 | } 32 | .form-signin input[type="email"] { 33 | margin-bottom: -1px; 34 | border-bottom-right-radius: 0; 35 | border-bottom-left-radius: 0; 36 | } 37 | .form-signin input[type="password"] { 38 | margin-bottom: 10px; 39 | border-top-left-radius: 0; 40 | border-top-right-radius: 0; 41 | } 42 | -------------------------------------------------------------------------------- /src/main/resources/static/front/app.js: -------------------------------------------------------------------------------- 1 | /** 2 | * vue app 3 | * Created by HC on 2016/7/19. 4 | */ 5 | 6 | var header = Vue.extend({ 7 | template: '#header' 8 | }); 9 | // 全局注册组件 10 | Vue.component('my-header', header); 11 | 12 | var footer = Vue.extend({ 13 | template: '#footer' 14 | }); 15 | // 全局注册组件 16 | Vue.component('my-footer', footer); 17 | 18 | var index = Vue.extend({ 19 | template: '#index' 20 | }); 21 | 22 | 23 | 24 | var App = Vue.extend({}); 25 | 26 | var router = new VueRouter(); 27 | 28 | router.map({ 29 | '/': { 30 | component: index 31 | }, 32 | '/bar': { 33 | component: footer 34 | } 35 | }); 36 | 37 | // Now we can start the app! 38 | // The router will create an instance of App and mount to 39 | // the element matching the selector #app. 40 | router.start(App, '#app'); -------------------------------------------------------------------------------- /src/main/resources/static/front/fund/chart.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Administrator on 2015/8/8. 3 | */ 4 | 'use strict'; 5 | 6 | var BlogApp = require('./app.js'); 7 | 8 | BlogApp.config(['$routeProvider', function ($routeProvider) { 9 | $routeProvider 10 | .when('/chart/index', { 11 | templateUrl: '/chart/src/html/chart.html', 12 | controller: 'ChartCtrl' 13 | }).when('/atlas/:id/edit', { 14 | templateUrl: '/views/atlas/edit.html', 15 | controller: 'AtlasEditController' 16 | }).otherwise({redirectTo: '/chart/index'}); 17 | }]); 18 | 19 | BlogApp.service('UserService', ['$http', 20 | function ($http) { 21 | return { 22 | getPage: function () { 23 | return $http.post("/picture/picturePage"); 24 | }, 25 | delete: function (id) { 26 | return $http.get("/user/delete/" + id); 27 | }, 28 | save: function (user) { 29 | return $http.post("/user/save", user); 30 | } 31 | }; 32 | } 33 | ]); -------------------------------------------------------------------------------- /src/main/resources/static/front/gulpfile.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by HC on 2016/7/25. 3 | */ 4 | var gulp = require('gulp'); 5 | var webpack = require('gulp-webpack'); 6 | var named = require('vinyl-named'); 7 | //压缩javascript文件 8 | var uglify = require('gulp-uglify'); 9 | 10 | // 加载webpack的配置文件 11 | var config = require('./webpack.config'); 12 | 13 | var appList = ['main']; 14 | 15 | gulp.task('default', ['bundle'], function() { 16 | console.log('done') 17 | }); 18 | 19 | gulp.task('bundle', function() { 20 | return gulp.src(mapFiles(appList, 'js')) 21 | .pipe(named()) 22 | .pipe(webpack(config)) 23 | //.pipe(uglify()) 24 | .pipe(gulp.dest('dist/')) 25 | }); 26 | 27 | gulp.task('watch', function() { 28 | return gulp.src(mapFiles(appList, 'js')) 29 | .pipe(named()) 30 | .pipe(webpack(getConfig({watch: true}))) 31 | .pipe(gulp.dest('dist/')) 32 | }); 33 | 34 | 35 | /** 36 | * @private 37 | */ 38 | function getConfig(opt) { 39 | var config = { 40 | 41 | module: { 42 | loaders: [ 43 | { test: /\.vue$/, loader: 'vue'} 44 | ] 45 | }, 46 | devtool: 'source-map' 47 | }; 48 | if (!opt) { 49 | return config 50 | } 51 | for (var i in opt) { 52 | config[i] = opt[i] 53 | } 54 | return config 55 | } 56 | 57 | /** 58 | * @private 59 | */ 60 | function mapFiles(list, extname) { 61 | return list.map(function (app) {return 'src/' + app + '.' + extname}) 62 | } -------------------------------------------------------------------------------- /src/main/resources/static/front/images/dasheng.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/front/images/dasheng.jpg -------------------------------------------------------------------------------- /src/main/resources/static/front/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | HC 9 | 10 | 12 | 13 | 27 | 28 | 29 | 30 | 31 | 32 |
33 |
34 |
35 | 36 |
37 |
38 | 39 |
40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /src/main/resources/static/front/js/comment-reply.min.js: -------------------------------------------------------------------------------- 1 | var addComment={moveForm:function(a,b,c,d){var e,f,g,h,i=this,j=i.I(a),k=i.I(c),l=i.I("cancel-comment-reply-link"),m=i.I("comment_parent"),n=i.I("comment_post_ID"),o=k.getElementsByTagName("form")[0];if(j&&k&&l&&m&&o){i.respondId=c,d=d||!1,i.I("wp-temp-form-div")||(e=document.createElement("div"),e.id="wp-temp-form-div",e.style.display="none",k.parentNode.insertBefore(e,k)),j.parentNode.insertBefore(k,j.nextSibling),n&&d&&(n.value=d),m.value=b,l.style.display="",l.onclick=function(){var a=addComment,b=a.I("wp-temp-form-div"),c=a.I(a.respondId);if(b&&c)return a.I("comment_parent").value="0",b.parentNode.insertBefore(c,b),b.parentNode.removeChild(b),this.style.display="none",this.onclick=null,!1};try{for(var p=0;p=3.1.11" 28 | }, 29 | "author": "hc", 30 | "license": "MIT", 31 | "keywords": [ 32 | "vue", 33 | "webpack" 34 | ] 35 | } 36 | -------------------------------------------------------------------------------- /src/main/resources/static/front/src/App.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 24 | 25 | 27 | -------------------------------------------------------------------------------- /src/main/resources/static/front/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/front/src/assets/logo.png -------------------------------------------------------------------------------- /src/main/resources/static/front/src/components/category/index.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 19 | 20 | 36 | -------------------------------------------------------------------------------- /src/main/resources/static/front/src/components/common/about.vue: -------------------------------------------------------------------------------- 1 | 24 | 25 | 26 | 27 | 30 | -------------------------------------------------------------------------------- /src/main/resources/static/front/src/components/common/footer.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 21 | 22 | 31 | -------------------------------------------------------------------------------- /src/main/resources/static/front/src/components/common/header.vue: -------------------------------------------------------------------------------- 1 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/main/resources/static/front/src/main.js: -------------------------------------------------------------------------------- 1 | var Vue = require('vue'); 2 | 3 | Vue.config.debug = true; 4 | 5 | var App = require('./app.vue'); 6 | var VueResource = require('vue-resource'); 7 | var VueRouter = require('vue-router'); 8 | var registerRouters = require('./routers'); 9 | 10 | // 注册两个插件 11 | Vue.use(VueResource); 12 | Vue.use(VueRouter); 13 | 14 | // 过滤器 15 | Vue.filter('date', function (value) { 16 | var date = new Date(value); 17 | return date.getFullYear()+"年"+(date.getMonth()+1)+"月"+date.getDate()+"日"; 18 | }); 19 | 20 | // 路由 21 | var router = new VueRouter({ 22 | }); 23 | 24 | registerRouters(router); 25 | 26 | router.start(App, '#app'); 27 | 28 | // 29 | //import Vue from 'vue' 30 | //import App from './App' 31 | // 32 | //import VueRouter from 'vue-router' 33 | //import VueResource from 'vue-resource' 34 | // 35 | //import ArticleIndex from './components/article/index.vue' 36 | //import Hello from './components/Hello.vue' 37 | // 38 | // 39 | ///* eslint-disable no-new */ 40 | ////new Vue({ 41 | //// el: 'body', 42 | //// components: { App } 43 | ////}); 44 | // 45 | //// 注册两个插件 46 | //Vue.use(VueResource); 47 | //Vue.use(VueRouter); 48 | // 49 | //const router = new VueRouter(); 50 | // 51 | //// 路由map 52 | //router.map({ 53 | // '/': { 54 | // component: ArticleIndex 55 | // }, 56 | // '/hello': { 57 | // component: Hello 58 | // } 59 | //}); 60 | // 61 | //router.start(App, '#app'); 62 | -------------------------------------------------------------------------------- /src/main/resources/static/front/src/routers.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by HC on 2016/7/25. 3 | */ 4 | module.exports = function(router) { 5 | router.map({ 6 | '/': { 7 | name: 'index', 8 | component: require('./components/article/index.vue') 9 | }, 10 | '/article/:id/detail': { 11 | name: 'detail', 12 | component: require('./components/article/detail.vue') 13 | }, 14 | '/category': { 15 | component: require('./components/category/index.vue') 16 | }, 17 | '/archives': { 18 | component: require('./components/article/archives.vue') 19 | }, 20 | '/about': { 21 | component: require('./components/common/about.vue') 22 | } 23 | }); 24 | }; -------------------------------------------------------------------------------- /src/main/resources/static/front/webpack.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by HC on 2016/7/25. 3 | */ 4 | var webpack = require('webpack'); 5 | module.exports = { 6 | entry: "./src/main.js", 7 | output: { 8 | path: __dirname+"/dist", 9 | //publicPath: "/dist/", 10 | filename: "main.js" 11 | }, 12 | module: { 13 | loaders: [ 14 | { test: /\.vue$/, loader: 'vue'} 15 | ] 16 | }, 17 | plugins: [ 18 | new webpack.optimize.UglifyJsPlugin({ 19 | compress: { 20 | warnings: false 21 | } 22 | }) 23 | ], 24 | //watch: true, 25 | //devtool: 'source-map' 26 | } -------------------------------------------------------------------------------- /src/main/resources/static/gulpfile.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by HC on 2016/6/23. 3 | */ 4 | 'use strict'; 5 | 6 | var gulp = require('gulp'); 7 | //压缩javascript文件 8 | var uglify = require('gulp-uglify'); 9 | // 合并css 10 | var concat = require('gulp-concat'); 11 | // 压缩css 12 | var cssnano = require('gulp-cssnano'); 13 | 14 | // 静态文件打包合并,这里使用webpack负责js文件的合并 15 | var webpack = require('gulp-webpack'); 16 | // 上传七牛sdn 17 | var qn = require('gulp-qn'); 18 | // MD5戳 19 | var rev = require('gulp-rev'); 20 | // 替换html中的css及js文件引入的路径 21 | var revCollector = require('gulp-rev-collector'); 22 | // 用来执行多个任务 23 | var runSequence = require('run-sequence'); 24 | 25 | // 加载webpack的配置文件 26 | var config = require('./webpack.config'); 27 | // 七牛云的参数 28 | var qiniu = { 29 | accessKey: 'xxxxxxxx', 30 | secretKey: 'xxxxxxxx', 31 | bucket: 'demo', 32 | domain: 'http://o96etydl2.bkt.clouddn.com' 33 | }; 34 | 35 | //使用webpack来合并js 36 | gulp.task('js', function () { 37 | gulp.src(['./js/admin', './admin/**/*.js']) 38 | .pipe(webpack(config)) 39 | .pipe(gulp.dest('./js/build')); 40 | }); 41 | 42 | //合并CSS 43 | gulp.task('css', function () { 44 | gulp.src([ 45 | './css/main.css', 46 | './css/view.css' 47 | ]) 48 | .pipe(concat('app.css')) 49 | .pipe(gulp.dest('./build')); 50 | }); 51 | 52 | //发布js,合并压缩,加入md5戳,发布到七牛云 53 | gulp.task('publish-js', function () { 54 | return gulp.src(['./js']) 55 | .pipe(webpack(config)) 56 | .pipe(uglify()) 57 | .pipe(rev()) 58 | .pipe(gulp.dest('./build')) 59 | .pipe(qn({ 60 | qiniu: qiniu, 61 | prefix: 'gmap' 62 | })) 63 | .pipe(rev.manifest()) 64 | .pipe(gulp.dest('./build/rev/js')); 65 | }); 66 | 67 | //发布css,合并压缩,加入md5戳,发布到七牛云 68 | gulp.task('publish-css', function () { 69 | return gulp.src(['./css/main.css', './css/view.css']) 70 | .pipe(concat('app.css')) //合并 71 | .pipe(cssnano()) //CSS压缩 72 | .pipe(rev()) //MD5戳 73 | .pipe(gulp.dest('./build')) 74 | .pipe(qn({ 75 | qiniu: qiniu, 76 | prefix: 'gmap' 77 | })) 78 | .pipe(rev.manifest()) 79 | .pipe(gulp.dest('./build/rev/css')); 80 | }); 81 | 82 | //替换html的js和css引入 83 | gulp.task('publish-html', function () { 84 | return gulp.src(['./build/rev/**/*.json', './index.html']) 85 | .pipe(revCollector({ 86 | dirReplacements: { 87 | 'build/': '' 88 | } 89 | })) 90 | .pipe(gulp.dest('./dist/')); 91 | }); 92 | 93 | //发布 94 | gulp.task('publish', function (callback) { 95 | runSequence( 96 | ['publish-css', 'publish-js'], 97 | 'publish-html', 98 | callback); 99 | }); 100 | 101 | gulp.task('watch', function () { 102 | //gulp.watch('./css/*.css', ['css']); 103 | gulp.watch(['./js/admin/*.js', './admin/**/*.js'], ['js']); 104 | }); 105 | -------------------------------------------------------------------------------- /src/main/resources/static/js/admin/app.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by HC on 2016/6/14. 3 | */ 4 | let BlogApp = angular.module('BlogApp', [ 5 | 'common', 6 | 'ngRoute', 7 | 'ui.bootstrap.pagination', 8 | 'hc.marked' 9 | ]); 10 | 11 | // module.exports = BlogApp; -------------------------------------------------------------------------------- /src/main/resources/static/js/admin/main.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by HC on 2016/6/27. 3 | */ 4 | require('./common.js'); 5 | require('./directives.js'); 6 | 7 | require('../../admin/article/article.js'); 8 | require('../../admin/article/article.info.js'); 9 | require('../../admin/category/article.category.js'); 10 | require('../../admin/user/user.js'); 11 | require('../../admin/user/user.info.js'); 12 | 13 | //require('./Service'); 14 | //require('./Directive'); -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/angular-1.6.4/angular-cookies.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | AngularJS v1.6.4 3 | (c) 2010-2017 Google, Inc. http://angularjs.org 4 | License: MIT 5 | */ 6 | (function(n,c){'use strict';function l(b,a,g){var d=g.baseHref(),k=b[0];return function(b,e,f){var g,h;f=f||{};h=f.expires;g=c.isDefined(f.path)?f.path:d;c.isUndefined(e)&&(h="Thu, 01 Jan 1970 00:00:00 GMT",e="");c.isString(h)&&(h=new Date(h));e=encodeURIComponent(b)+"="+encodeURIComponent(e);e=e+(g?";path="+g:"")+(f.domain?";domain="+f.domain:"");e+=h?";expires="+h.toUTCString():"";e+=f.secure?";secure":"";f=e.length+1;4096 4096 bytes)!");k.cookie=e}}c.module("ngCookies",["ng"]).info({angularVersion:"1.6.4"}).provider("$cookies",[function(){var b=this.defaults={};this.$get=["$$cookieReader","$$cookieWriter",function(a,g){return{get:function(d){return a()[d]},getObject:function(d){return(d=this.get(d))?c.fromJson(d):d},getAll:function(){return a()},put:function(d,a,m){g(d,a,m?c.extend({},b,m):b)},putObject:function(d,b,a){this.put(d,c.toJson(b),a)},remove:function(a,k){g(a,void 0,k?c.extend({},b,k):b)}}}]}]);c.module("ngCookies").factory("$cookieStore", 8 | ["$cookies",function(b){return{get:function(a){return b.getObject(a)},put:function(a,c){b.putObject(a,c)},remove:function(a){b.remove(a)}}}]);l.$inject=["$document","$log","$browser"];c.module("ngCookies").provider("$$cookieWriter",function(){this.$get=l})})(window,window.angular); 9 | //# sourceMappingURL=angular-cookies.min.js.map 10 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/angular-1.6.4/angular-csp.css: -------------------------------------------------------------------------------- 1 | /* Include this file in your html if you are using the CSP mode. */ 2 | 3 | @charset "UTF-8"; 4 | 5 | [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], 6 | .ng-cloak, .x-ng-cloak, 7 | .ng-hide:not(.ng-hide-animate) { 8 | display: none !important; 9 | } 10 | 11 | ng\:form { 12 | display: block; 13 | } 14 | 15 | .ng-animate-shim { 16 | visibility:hidden; 17 | } 18 | 19 | .ng-anchor { 20 | position:absolute; 21 | } 22 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/angular-1.6.4/angular-loader.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | AngularJS v1.6.4 3 | (c) 2010-2017 Google, Inc. http://angularjs.org 4 | License: MIT 5 | */ 6 | (function(){'use strict';function g(a,f){f=f||Error;return function(){var d=arguments[0],e;e="["+(a?a+":":"")+d+"] http://errors.angularjs.org/1.6.4/"+(a?a+"/":"")+d;for(d=1;d= 1.3.0", 29 | "marked": "~0.3.1" 30 | }, 31 | "devDependencies": { 32 | "angular-mocks": ">= 1.3.0", 33 | "angular-animate": ">=1.3.0" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/angular-marked-1.2.2/dist/angular-marked.min.js: -------------------------------------------------------------------------------- 1 | (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.angularMarked=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o"+string+""}var renderCode=r.code.bind(r);r.code=function(code,lang,escaped){return wrapNonBindable(renderCode(code,lang,escaped))};var renderCodespan=r.codespan.bind(r);r.codespan=function(code){return wrapNonBindable(renderCodespan(code))};self.defaults=self.defaults||{};self.defaults.renderer=r;m.setOptions(self.defaults);return m}]}markedDirective.$inject=["marked","$templateRequest","$compile"];function markedDirective(marked,$templateRequest,$compile){return{restrict:"AE",replace:true,scope:{opts:"=",marked:"=",compile:"@",src:"="},link:function(scope,element,attrs){if(attrs.marked){set(scope.marked);scope.$watch("marked",set)}else if(attrs.src){scope.$watch("src",function(src){$templateRequest(src,true).then(function(response){set(response)},function(){set("");scope.$emit("$markedIncludeError",attrs.src)})})}else{set(element.text())}function set(text){text=unindent(String(text||""));element.html(marked(text,scope.opts||null));if(scope.$eval(attrs.compile)){$compile(element.contents())(scope.$parent)}}}}}module.exports=angular.module("hc.marked",[]).directive("marked",markedDirective).provider("marked",markedProvider).name},{"./strip-indent":2,marked:"marked"}],2:[function(require,module,exports){module.exports=function unindent(text){if(!text){return text}var lines=text.replace(/\t/g," ").split(/\r?\n/);var min=null;var len=lines.length;var i;for(i=0;i0){for(i=0;i.js', 24 | './docs-template/script.js' 25 | ], 26 | discussions: { 27 | shortName: 'hypercubedgithub', 28 | url: 'http://hypercubed.github.io/<%= pkg.name %>/', 29 | dev: false 30 | } 31 | }, 32 | all: ['lib/<%= pkg.name %>.js'] 33 | } 34 | 35 | }); 36 | 37 | require('load-grunt-tasks')(grunt); 38 | 39 | grunt.registerTask('build', ['ngdocs']); 40 | grunt.registerTask('deploy', ['build', 'gh-pages']); 41 | }; 42 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/angular-marked-1.2.2/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // http://karma-runner.github.io/0.10/config/configuration-file.html 3 | 4 | module.exports = function (config) { 5 | config.set({ 6 | // base path, that will be used to resolve files and exclude 7 | basePath: '', 8 | 9 | // testing framework to use (jasmine/mocha/qunit/...) 10 | frameworks: ['jasmine'], 11 | 12 | preprocessors: {'*/.html': []}, 13 | 14 | // list of files / patterns to load in the browser 15 | files: [ 16 | 'bower_components/angular/angular.js', 17 | 'bower_components/angular-mocks/angular-mocks.js', 18 | 'dist/angular-marked.min.js', 19 | 'bower_components/marked/lib/marked.js', 20 | 'test/**/*.js' 21 | ], 22 | 23 | // list of files / patterns to exclude 24 | exclude: [], 25 | 26 | progress: ['dots'], 27 | 28 | // web server port 29 | port: 8080, 30 | 31 | // level of logging 32 | // possible values: LOG_DISABLE || LOG_ERROR || LOG_WARN || LOG_INFO || LOG_DEBUG 33 | logLevel: config.LOG_INFO, 34 | 35 | // enable / disable watching file and executing tests whenever any file changes 36 | autoWatch: false, 37 | 38 | // Start these browsers, currently available: 39 | // - Chrome 40 | // - ChromeCanary 41 | // - Firefox 42 | // - Opera 43 | // - Safari (only Mac) 44 | // - PhantomJS 45 | // - IE (only Windows) 46 | browsers: ['PhantomJS', 'Chrome'], 47 | 48 | // Continuous Integration mode 49 | // if true, it capture browsers, run tests and exit 50 | singleRun: true 51 | }); 52 | }; 53 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/angular-marked-1.2.2/lib/strip-indent.js: -------------------------------------------------------------------------------- 1 | module.exports = function unindent(text) { 2 | if (!text) { 3 | return text; 4 | } 5 | 6 | var lines = text 7 | .replace(/\t/g, ' ') 8 | .split(/\r?\n/); 9 | 10 | var min = null; 11 | var len = lines.length; 12 | var i; 13 | 14 | for (i = 0; i < len; i++) { 15 | var line = lines[i]; 16 | var l = line.match(/^(\s*)/)[0].length; 17 | if (l === line.length) { 18 | continue; 19 | } 20 | min = (l < min || min === null) ? l : min; 21 | } 22 | 23 | if (min !== null && min > 0) { 24 | for (i = 0; i < len; i++) { 25 | lines[i] = lines[i].substr(min); 26 | } 27 | } 28 | return lines.join('\n'); 29 | }; 30 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/angular-marked-1.2.2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-marked", 3 | "version": "1.2.2", 4 | "description": "AngularJS Markdown using marked.", 5 | "main": "lib/angular-marked.js", 6 | "directories": { 7 | "test": "test" 8 | }, 9 | "dependencies": { 10 | "marked": "^0.3.3" 11 | }, 12 | "devDependencies": { 13 | "browserify": "^13.0.1", 14 | "grunt": "^1.0.1", 15 | "grunt-gh-pages": "^1.1.0", 16 | "grunt-ngdocs": "^0.2.10", 17 | "jasmine-core": "^2.4.1", 18 | "karma": "^1.1.1", 19 | "karma-chrome-launcher": "^1.0.1", 20 | "karma-jasmine": "^1.0.2", 21 | "karma-phantomjs-launcher": "^1.0.1", 22 | "load-grunt-tasks": "^3.5.0", 23 | "uglifyjs": "^2.4.10", 24 | "xo": "^0.16.0" 25 | }, 26 | "scripts": { 27 | "browserify": "browserify lib/angular-marked.js -s angular-marked -o dist/angular-marked.js -x marked", 28 | "uglify": "uglifyjs dist/angular-marked.js -o dist/angular-marked.min.js", 29 | "compile": "npm run browserify && npm run uglify", 30 | "docs": "grunt ngdocs", 31 | "build": "npm run compile && npm run docs", 32 | "lint": "xo lib/*.js test/**/*.js", 33 | "test": "npm run compile && karma start --single-run --browsers PhantomJS", 34 | "check": "npm run lint && npm run test", 35 | "prepublish": "npm run compile", 36 | "postpublish": "grunt deploy" 37 | }, 38 | "repository": { 39 | "type": "git", 40 | "url": "git://github.com/Hypercubed/angular-marked.git" 41 | }, 42 | "keywords": [ 43 | "marked", 44 | "markdown" 45 | ], 46 | "author": "J. Harshbarger", 47 | "license": "MIT", 48 | "bugs": { 49 | "url": "https://github.com/Hypercubed/angular-marked/issues" 50 | }, 51 | "homepage": "https://github.com/Hypercubed/angular-marked", 52 | "xo": { 53 | "space": 2, 54 | "envs": [ 55 | "browser" 56 | ], 57 | "ignores": [ 58 | "docs/**", 59 | "dist/**" 60 | ] 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/angular-marked-1.2.2/todo.md: -------------------------------------------------------------------------------- 1 | # Todo list 2 | 3 | _\( managed using [todo-md](https://github.com/Hypercubed/todo-md) \)_ 4 | 5 | - [x] Compatibility with RequireJS #3 6 | - [-] Add testing to gruntfile 7 | - [x] Minify? 8 | - [ ] ngmin? 9 | - [x] Example for markedProvider in ngDocs 10 | - [x] Fix ng-include demo. 11 | - [ ] Tutorial? 12 | - [-] grunt-conventional-changelog? 13 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/bootstrap-3.3.6-dist/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/js/plugins/bootstrap-3.3.6-dist/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/bootstrap-3.3.6-dist/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/js/plugins/bootstrap-3.3.6-dist/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/bootstrap-3.3.6-dist/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/js/plugins/bootstrap-3.3.6-dist/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/bootstrap-3.3.6-dist/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/js/plugins/bootstrap-3.3.6-dist/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/bootstrap-3.3.6-dist/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/js/plugins/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/js/plugins/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/js/plugins/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/js/plugins/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/windhc/blog/e0da5143d8a04298539d9915bb09f211c6111aa8/src/main/resources/static/js/plugins/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/less/animated.less: -------------------------------------------------------------------------------- 1 | // Animated Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .@{fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/less/bordered-pulled.less: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em @fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .pull-right { float: right; } 11 | .pull-left { float: left; } 12 | 13 | .@{fa-css-prefix} { 14 | &.pull-left { margin-right: .3em; } 15 | &.pull-right { margin-left: .3em; } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/less/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/1 FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | transform: translate(0, 0); // ensures no half-pixel rendering in firefox 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/less/fixed-width.less: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .@{fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/less/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "path.less"; 9 | @import "core.less"; 10 | @import "larger.less"; 11 | @import "fixed-width.less"; 12 | @import "list.less"; 13 | @import "bordered-pulled.less"; 14 | @import "animated.less"; 15 | @import "rotated-flipped.less"; 16 | @import "stacked.less"; 17 | @import "icons.less"; 18 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/less/larger.less: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .@{fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .@{fa-css-prefix}-2x { font-size: 2em; } 11 | .@{fa-css-prefix}-3x { font-size: 3em; } 12 | .@{fa-css-prefix}-4x { font-size: 4em; } 13 | .@{fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/less/list.less: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: @fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .@{fa-css-prefix}-li { 11 | position: absolute; 12 | left: -@fa-li-width; 13 | width: @fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.@{fa-css-prefix}-lg { 17 | left: (-@fa-li-width + (4em / 14)); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | .fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal @fa-font-size-base/1 FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | transform: translate(0, 0); // ensures no half-pixel rendering in firefox 12 | 13 | } 14 | 15 | .fa-icon-rotate(@degrees, @rotation) { 16 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation); 17 | -webkit-transform: rotate(@degrees); 18 | -ms-transform: rotate(@degrees); 19 | transform: rotate(@degrees); 20 | } 21 | 22 | .fa-icon-flip(@horiz, @vert, @rotation) { 23 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation, mirror=1); 24 | -webkit-transform: scale(@horiz, @vert); 25 | -ms-transform: scale(@horiz, @vert); 26 | transform: scale(@horiz, @vert); 27 | } 28 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/less/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}'); 7 | src: url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype'), 8 | url('@{fa-font-path}/fontawesome-webfont.woff2?v=@{fa-version}') format('woff2'), 9 | url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff'), 10 | url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype'), 11 | url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/less/rotated-flipped.less: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } 5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } 6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } 7 | 8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } 9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .@{fa-css-prefix}-rotate-90, 15 | :root .@{fa-css-prefix}-rotate-180, 16 | :root .@{fa-css-prefix}-rotate-270, 17 | :root .@{fa-css-prefix}-flip-horizontal, 18 | :root .@{fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/less/stacked.less: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } 21 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/scss/_animated.scss: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .#{$fa-css-prefix}-spin { 5 | -webkit-animation: fa-spin 2s infinite linear; 6 | animation: fa-spin 2s infinite linear; 7 | } 8 | 9 | .#{$fa-css-prefix}-pulse { 10 | -webkit-animation: fa-spin 1s infinite steps(8); 11 | animation: fa-spin 1s infinite steps(8); 12 | } 13 | 14 | @-webkit-keyframes fa-spin { 15 | 0% { 16 | -webkit-transform: rotate(0deg); 17 | transform: rotate(0deg); 18 | } 19 | 100% { 20 | -webkit-transform: rotate(359deg); 21 | transform: rotate(359deg); 22 | } 23 | } 24 | 25 | @keyframes fa-spin { 26 | 0% { 27 | -webkit-transform: rotate(0deg); 28 | transform: rotate(0deg); 29 | } 30 | 100% { 31 | -webkit-transform: rotate(359deg); 32 | transform: rotate(359deg); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/scss/_bordered-pulled.scss: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em $fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .pull-right { float: right; } 11 | .pull-left { float: left; } 12 | 13 | .#{$fa-css-prefix} { 14 | &.pull-left { margin-right: .3em; } 15 | &.pull-right { margin-left: .3em; } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/scss/_core.scss: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix} { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/1 FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | transform: translate(0, 0); // ensures no half-pixel rendering in firefox 12 | 13 | } 14 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/scss/_fixed-width.scss: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .#{$fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/scss/_larger.scss: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .#{$fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .#{$fa-css-prefix}-2x { font-size: 2em; } 11 | .#{$fa-css-prefix}-3x { font-size: 3em; } 12 | .#{$fa-css-prefix}-4x { font-size: 4em; } 13 | .#{$fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/scss/_list.scss: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: $fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .#{$fa-css-prefix}-li { 11 | position: absolute; 12 | left: -$fa-li-width; 13 | width: $fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.#{$fa-css-prefix}-lg { 17 | left: -$fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | @mixin fa-icon() { 5 | display: inline-block; 6 | font: normal normal normal #{$fa-font-size-base}/1 FontAwesome; // shortening font declaration 7 | font-size: inherit; // can't have font-size inherit on line above, so need to override 8 | text-rendering: auto; // optimizelegibility throws things off #1094 9 | -webkit-font-smoothing: antialiased; 10 | -moz-osx-font-smoothing: grayscale; 11 | transform: translate(0, 0); // ensures no half-pixel rendering in firefox 12 | 13 | } 14 | 15 | @mixin fa-icon-rotate($degrees, $rotation) { 16 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); 17 | -webkit-transform: rotate($degrees); 18 | -ms-transform: rotate($degrees); 19 | transform: rotate($degrees); 20 | } 21 | 22 | @mixin fa-icon-flip($horiz, $vert, $rotation) { 23 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation}); 24 | -webkit-transform: scale($horiz, $vert); 25 | -ms-transform: scale($horiz, $vert); 26 | transform: scale($horiz, $vert); 27 | } 28 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/scss/_path.scss: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?v=#{$fa-version}'); 7 | src: url('#{$fa-font-path}/fontawesome-webfont.eot?#iefix&v=#{$fa-version}') format('embedded-opentype'), 8 | url('#{$fa-font-path}/fontawesome-webfont.woff2?v=#{$fa-version}') format('woff2'), 9 | url('#{$fa-font-path}/fontawesome-webfont.woff?v=#{$fa-version}') format('woff'), 10 | url('#{$fa-font-path}/fontawesome-webfont.ttf?v=#{$fa-version}') format('truetype'), 11 | url('#{$fa-font-path}/fontawesome-webfont.svg?v=#{$fa-version}#fontawesomeregular') format('svg'); 12 | // src: url('#{$fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 13 | font-weight: normal; 14 | font-style: normal; 15 | } 16 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/scss/_rotated-flipped.scss: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-rotate-90 { @include fa-icon-rotate(90deg, 1); } 5 | .#{$fa-css-prefix}-rotate-180 { @include fa-icon-rotate(180deg, 2); } 6 | .#{$fa-css-prefix}-rotate-270 { @include fa-icon-rotate(270deg, 3); } 7 | 8 | .#{$fa-css-prefix}-flip-horizontal { @include fa-icon-flip(-1, 1, 0); } 9 | .#{$fa-css-prefix}-flip-vertical { @include fa-icon-flip(1, -1, 2); } 10 | 11 | // Hook for IE8-9 12 | // ------------------------- 13 | 14 | :root .#{$fa-css-prefix}-rotate-90, 15 | :root .#{$fa-css-prefix}-rotate-180, 16 | :root .#{$fa-css-prefix}-rotate-270, 17 | :root .#{$fa-css-prefix}-flip-horizontal, 18 | :root .#{$fa-css-prefix}-flip-vertical { 19 | filter: none; 20 | } 21 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/scss/_stacked.scss: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .#{$fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .#{$fa-css-prefix}-stack-1x, .#{$fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .#{$fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .#{$fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .#{$fa-css-prefix}-inverse { color: $fa-inverse; } 21 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/font-awesome/scss/font-awesome.scss: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables"; 7 | @import "mixins"; 8 | @import "path"; 9 | @import "core"; 10 | @import "larger"; 11 | @import "fixed-width"; 12 | @import "list"; 13 | @import "bordered-pulled"; 14 | @import "animated"; 15 | @import "rotated-flipped"; 16 | @import "stacked"; 17 | @import "icons"; 18 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/highcharts-ng-0.0.11/example/charts/highstocks-example.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 22 | 23 | 24 |

HighStocks Example

25 | 26 |
27 |
28 |
29 |
30 |
31 | 32 |
33 | 34 |
35 | 36 |
37 |
38 |
39 |
40 | 41 | 42 | -------------------------------------------------------------------------------- /src/main/resources/static/js/plugins/highcharts-ng-0.0.11/example/lazyload/example.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Highcharts-ng maps example 7 | 8 | 9 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 |
23 |
24 | 25 |
26 |
27 |
28 |
29 | 30 |
31 | 32 |
33 |
34 |
35 | 40 |
41 |
42 |
43 | 44 | 45 |
46 |
47 | 48 | 49 |
50 |
51 |
52 | 55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 | 63 |
64 |
65 |
66 |
67 |
68 |
69 | 70 | 71 | -------------------------------------------------------------------------------- /src/main/resources/static/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "blog", 3 | "version": "1.0.0", 4 | "description": "personal blog", 5 | "main": "main.js", 6 | "scripts": { 7 | "test": "test" 8 | }, 9 | "keywords": [ 10 | "blog" 11 | ], 12 | "author": "hc", 13 | "license": "ISC", 14 | "devDependencies": { 15 | "angular": "^1.3.15", 16 | "angular-marked": "^1.2.1", 17 | "angular-route": "^1.3.15", 18 | "angular-ui-bootstrap": "^1.3.3", 19 | "gulp": "^3.9.1", 20 | "gulp-concat": "^2.6.0", 21 | "gulp-cssnano": "^2.1.2", 22 | "gulp-qn": "^0.1.1", 23 | "gulp-rev": "^7.1.0", 24 | "gulp-rev-collector": "^1.0.4", 25 | "gulp-uglify": "^1.5.4", 26 | "gulp-webpack": "^1.5.0", 27 | "run-sequence": "^1.2.1", 28 | "sweetalert": "^1.1.3", 29 | "toastr": "^2.1.2", 30 | "webpack": "^1.13.1" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/resources/static/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: /admin 3 | Disallow: /login 4 | -------------------------------------------------------------------------------- /src/main/resources/static/webpack.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by HC on 2016/6/23. 3 | */ 4 | 'use strict'; 5 | 6 | module.exports = { 7 | devtool: "source-map", //执行gulp的的压缩JS任务时,需注释此行 8 | entry: "./js/admin/main.js", 9 | output: { 10 | path: __dirname + "/js/build", 11 | filename: "app.bundle.js" 12 | }, 13 | //以--> 55 | <#----> 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /src/main/resources/templates/archive.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | HC 9 | 10 | 11 | <#----> 12 | <#----> 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 | 22 | <#include "common/header.html"> 23 | 24 |
25 |
26 |
28 | 29 |
    30 | <#list articles.list as article> 31 |
  • 32 | ${article.title} 33 | [${article.category.categoryName}] 34 |     35 | ${article.createTime?number_to_datetime?string('yyyy-MM-dd')} 36 |
  • 37 | 38 |
39 | 40 |
41 | <#if articles.hasPreviousPage> 42 | 上一页 43 | 44 | <#if articles.hasNextPage> 45 | 46 | 47 |
48 | 49 |
50 |
51 |
52 | 53 | <#include "common/footer.html"> 54 | 55 |
56 | 57 |
58 | 59 | 60 | 61 | <#----> 62 | <#----> 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /src/main/resources/templates/category-article.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | HC-${category.categoryName} 9 | 10 | 11 | <#----> 12 | <#----> 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 | 22 | <#include "common/header.html"> 23 | 24 |
25 |
26 |
28 | 29 |
    30 | <#list articles as article> 31 |
  • 32 | ${article.title} 33 | [${article.category.categoryName}] 34 |     35 | ${article.createTime?number_to_datetime?string('yyyy-MM-dd')} 36 |
  • 37 | 38 |
39 | 40 |
41 |
42 |
43 | 44 | <#include "common/footer.html"> 45 | 46 |
47 | 48 |
49 | 50 | 51 | 52 | <#----> 53 | <#----> 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /src/main/resources/templates/category.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 8 | HC-文章分类 9 | 10 | 11 | <#----> 12 | <#----> 13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 |
21 | 22 | <#include "common/header.html"> 23 | 24 |
25 | 36 |
37 | 38 | <#include "common/footer.html"> 39 | 40 |
41 | 42 |
43 | 44 | 45 | 46 | <#----> 47 | <#----> 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /src/main/resources/templates/common/footer.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 | Proudly powered by jlkm2010/blog

5 |

6 | Theme by moyu 7 | 12 |

13 |
14 | 15 |
-------------------------------------------------------------------------------- /src/main/resources/templates/common/header.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/test/java/com/windhc/BlogApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.windhc; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 7 | import org.springframework.test.context.web.WebAppConfiguration; 8 | 9 | @RunWith(SpringJUnit4ClassRunner.class) 10 | //@SpringApplicationConfiguration(classes = BlogApplication.class) 11 | @SpringBootTest 12 | @WebAppConfiguration 13 | public class BlogApplicationTests { 14 | 15 | @Test 16 | public void contextLoads() { 17 | } 18 | 19 | } 20 | --------------------------------------------------------------------------------