├── .babelrc ├── .gitignore ├── README.md ├── app.js ├── dist ├── bundle.js ├── index.html └── js │ ├── es5-sham.js │ ├── es5-sham.map │ ├── es5-sham.min.js │ ├── es5-shim.js │ ├── es5-shim.map │ ├── es5-shim.min.js │ ├── hack.js │ ├── html5shiv-printshiv.min.js │ ├── html5shiv.min.js │ └── respond.min.js ├── package-lock.json ├── package.json ├── src ├── assets │ ├── iconfont │ │ ├── demo.css │ │ ├── demo_fontclass.html │ │ ├── demo_symbol.html │ │ ├── demo_unicode.html │ │ ├── iconfont.css │ │ ├── iconfont.eot │ │ ├── iconfont.js │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ └── iconfont.woff │ └── imgs │ │ ├── aaa.png │ │ ├── acti-01.png │ │ ├── acti-02.png │ │ ├── acti-03.png │ │ ├── barner-01.png │ │ ├── barner-02.png │ │ ├── barner-03.png │ │ ├── barner-04.png │ │ ├── down_code.png │ │ ├── index_act_01.png │ │ ├── index_act_02.png │ │ ├── logo.png │ │ ├── logoicon.png │ │ ├── mall-barner-01.png │ │ ├── mall-barner-02.png │ │ ├── mall-barner-03.png │ │ └── sprite.png ├── common │ ├── common.css │ └── hack │ │ ├── hack.js │ │ ├── html5shiv-printshiv.min.js │ │ ├── html5shiv.min.js │ │ └── respond.min.js ├── components │ ├── Login │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── LoginInfo │ │ ├── boy.png │ │ ├── girl.png │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── Menu │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── PageTab │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── StatusBar │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── TopBar │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ └── index.js ├── index.css ├── index.html ├── index.js ├── pages │ ├── Home │ │ ├── actions.js │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── Page101 │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── Page102 │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── Page103 │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── Page104 │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── Page201 │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── Page202 │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── Page203 │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── Page204 │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── Page301 │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── Page302 │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── Page303 │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── Page304 │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── Page401 │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── Page402 │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── Page403 │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── Page404 │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── Page501 │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── Page502 │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── Page503 │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ ├── Page504 │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ └── index.js ├── route.config.js ├── services │ ├── animate │ │ └── index.js │ ├── createPage.js │ ├── createStroe.js │ ├── index.js │ ├── parseCssModule.js │ └── routes │ │ ├── HashRouter │ │ └── index.js │ │ ├── NavLink │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ │ ├── Page │ │ ├── index.css │ │ ├── index.html │ │ └── index.js │ │ ├── Route │ │ └── index.js │ │ ├── index.js │ │ └── router.js └── vmodels │ ├── app.vm.js │ └── index.js └── webpack.config.js /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets":["es2015"], 3 | "plugins": [ 4 | "add-module-exports", 5 | "transform-es3-member-expression-literals", 6 | "transform-es3-property-literals" 7 | ] 8 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Dependency directories 2 | node_modules/ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # avalon-spa-app 2 | 3 | 1.git clone https://github.com/Levan-Du/avalon-spa-app.git 4 | 5 | 2.npm install 6 | 7 | 3.npm start 8 | 9 | 4.打开浏览器 http://localhost:8030 10 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | var Koa = require('koa'), 2 | serve = require('koa-static'); 3 | 4 | var app = new Koa(); 5 | 6 | app.use(serve('./dist')); 7 | 8 | app.listen(3000, () => { 9 | console.log('listening...'); 10 | }) 11 | -------------------------------------------------------------------------------- /dist/index.html: -------------------------------------------------------------------------------- 1 |
font-class是unicode使用方式的一种变种,主要是解决unicode书写不直观,语意不明确的问题。
93 |与unicode使用方式相比,具有如下特点:
94 |使用步骤如下:
101 |<link rel="stylesheet" type="text/css" href="./iconfont.css">
105 | <i class="iconfont icon-xxx"></i>
107 | 108 |110 |"iconfont"是你项目下的font-family。可以通过编辑项目查看,默认是"iconfont"。
109 |
这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇文章 133 | 这种用法其实是做了一个svg的集合,与另外两种相比具有如下特点:
134 |font-size
,color
来调整样式。使用步骤如下:
141 |<script src="./iconfont.js"></script>
143 | <style type="text/css">
145 | .icon {
146 | width: 1em; height: 1em;
147 | vertical-align: -0.15em;
148 | fill: currentColor;
149 | overflow: hidden;
150 | }
151 | </style>
152 | <svg class="icon" aria-hidden="true">
154 | <use xlink:href="#icon-xxx"></use>
155 | </svg>
156 |
157 | unicode是字体在网页端最原始的应用方式,特点是:
112 |118 |120 |注意:新版iconfont支持多色图标,这些多色图标在unicode模式下将不能使用,如果有需求建议使用symbol的引用方式
119 |
unicode使用步骤如下:
121 |@font-face {
123 | font-family: 'iconfont';
124 | src: url('iconfont.eot');
125 | src: url('iconfont.eot?#iefix') format('embedded-opentype'),
126 | url('iconfont.woff') format('woff'),
127 | url('iconfont.ttf') format('truetype'),
128 | url('iconfont.svg#iconfont') format('svg');
129 | }
130 |
131 | .iconfont{
133 | font-family:"iconfont" !important;
134 | font-size:16px;font-style:normal;
135 | -webkit-font-smoothing: antialiased;
136 | -webkit-text-stroke-width: 0.2px;
137 | -moz-osx-font-smoothing: grayscale;
138 | }
139 |
140 | <i class="iconfont">3</i>
142 |
143 | 144 |146 |"iconfont"是你项目下的font-family。可以通过编辑项目查看,默认是"iconfont"。
145 |
4 |
5 |
this is page101.
4 |this is page101.
5 |this is page102.
3 |this is page102.
4 |this is page103.
3 |this is page103.
4 |this is page104.
3 |this is page104.
4 |this is page201.
3 |this is page201.
4 |this is page202.
3 |this is page202.
4 |this is page203.
3 |this is page203.
4 |this is page204.
3 |this is page204.
4 |this is page301.
3 |this is page301.
4 |this is page302.
3 |this is page302.
4 |this is page303.
3 |this is page303.
4 |this is page304.
3 |this is page304.
4 |this is page401.
3 |this is page401.
4 |this is page402.
3 |this is page402.
4 |this is page403.
3 |this is page403.
4 |this is page404.
3 |this is page404.
4 |this is page501.
3 |this is page501.
4 |this is page502.
3 |this is page502.
4 |this is page503.
3 |this is page503.
4 |this is page504.
3 |this is page504.
4 |