Skip to content

Commit 321f771

Browse files
committed
Add demo
1 parent 07055bd commit 321f771

File tree

6 files changed

+11047
-1
lines changed

6 files changed

+11047
-1
lines changed

demo/_src/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
require('./style.less');
2+
3+
var setup = require('../../lib/setup');
4+
setup('sliding-navigation');

demo/_src/style.less

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
@import "../../lib/mixins";
2+
3+
.clearfix() {
4+
zoom: 1;
5+
&:before,
6+
&:after {
7+
content: " "; /* 1 */
8+
display: table; /* 2 */
9+
}
10+
&:after {
11+
clear: both;
12+
}
13+
}
14+
15+
body {
16+
margin: 0;
17+
}
18+
19+
.sliding-navigation {
20+
.dotsunited-sliding-navigation();
21+
22+
position: relative;
23+
max-width: 500px;
24+
height: 100%;
25+
background: #000;
26+
27+
font-family: sans-serif;
28+
29+
li {
30+
.clearfix();
31+
}
32+
33+
a {
34+
display: block;
35+
padding: 14px 20px;
36+
color: #fff;
37+
border-bottom: 1px solid rgba(255, 255, 255, .1);
38+
}
39+
}
40+
41+
.sliding-navigation__open-button {
42+
.dotsunited-sliding-navigation-open-button();
43+
44+
float: right;
45+
46+
opacity: .5;
47+
48+
&:hover {
49+
opacity: 1;
50+
}
51+
}
52+
53+
.sliding-navigation__back {
54+
padding: 0 10px;
55+
background: rgba(255, 255, 255, .1);
56+
}
57+
58+
.sliding-navigation__back-button {
59+
.dotsunited-sliding-navigation-back-button();
60+
color: #fff;
61+
}

demo/_src/webpack.config.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
var path = require('path');
2+
var webpack = require('webpack');
3+
4+
module.exports = {
5+
entry: {
6+
demo: __dirname
7+
},
8+
output: {
9+
path: path.join(__dirname, '..'),
10+
publicPath: './',
11+
filename: '[name].js?[chunkhash]'
12+
},
13+
module: {
14+
loaders: [
15+
{ test: /\.less$/, loader: 'style-loader!css-loader!less-loader' },
16+
{ test: /\.(gif|png|jpe?g|svg)$/, loader: 'url-loader' }
17+
]
18+
}
19+
};

0 commit comments

Comments
 (0)