Skip to content

Commit dab75bf

Browse files
CITguyCathy Siller
authored andcommitted
feat(alert bars): alert bars from spec
2 parents 87407cf + 6a2f634 commit dab75bf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2357
-274
lines changed

_config.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -77,29 +77,3 @@ deploy:
7777
repo: [email protected]:rackerlabs/helix-ui.git
7878
branch: gh-pages
7979
message: "Docs Updated: {{ now('YYYY-MM-DD HH:mm:ss') }}"
80-
81-
82-
# Additional Configurations
83-
nav:
84-
guides:
85-
Installing: /install
86-
components:
87-
Alerts: /alerts
88-
Badges: /badges
89-
Blockquotes: /blockquotes
90-
Breadcrumbs: /breadcrumbs
91-
Buttons: /buttons
92-
Code: /code
93-
Dropdowns: /dropdowns
94-
Forms: /forms
95-
Grid: /grid
96-
Lists: /lists
97-
Modals: /modals
98-
Navigation: /navigation
99-
Pagination: /pagination
100-
Popovers: /popovers
101-
"Progress Bars": /progressbars
102-
Tables: /tables
103-
Tabs: /tabs
104-
Tooltips: /tooltips
105-
Typography: /typography

bin/server.js

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@
33

44
const browserSync = require('browser-sync').create();
55
const { hexo, config } = require('./hexo');
6+
const webpack = require('./webpack').compiler;
7+
8+
function runWebpack () {
9+
webpack.run((err, stats) => {
10+
if (err || stats.hasErrors()) {
11+
// Handle errors here
12+
console.log('there was an error running webpack');
13+
}
14+
15+
console.log(stats.toString({
16+
chunks: false, // Makes the build much quieter
17+
colors: true // Shows colors in the console
18+
}))
19+
});
20+
}//runWebpack()
621

722
function initServer () {
823
const serverRoutes = {}
@@ -15,12 +30,12 @@ function initServer () {
1530
`${config.public_dir}/**/*`,
1631
{
1732
match: [
18-
'source/**/*',
19-
'themes/**/*'
33+
`(source|themes)/**/*`
2034
],
2135
fn: (evt, file) => {
2236
// force regeneration of hexo assets on change of source or theme
23-
hexo.call('generate', { force: true });
37+
hexo.call('generate', { force: true })
38+
.then(runWebpack);
2439
}
2540
}
2641
],
@@ -40,7 +55,9 @@ hexo.init().then(() => {
4055
hexo.call('clean')
4156
.then(() => {
4257
// MUST have empty obj as 2nd arg or the call will fail
43-
return hexo.call('generate', {});
58+
return hexo.call('generate', {}).then(() => {
59+
runWebpack();
60+
});
4461
})
4562
.then(initServer)
4663
.catch((err) => {

bin/webpack.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
'use strict';
2+
3+
// REF: https://webpack.js.org/api/node/
4+
5+
const path = require('path');
6+
const webpack = require('webpack');
7+
8+
const rootPath = path.resolve(__dirname, '..');
9+
const sourcePath = `${rootPath}/source`;
10+
const publicPath = `${rootPath}/public`;
11+
12+
const config = {
13+
entry: {
14+
'helix-ui': `${sourcePath}/scripts/_helix-ui.js`,
15+
'explorer': `${sourcePath}/scripts/_explorer.js`
16+
},
17+
output: {
18+
path: `${publicPath}/scripts`,
19+
filename: '[name].js'
20+
},
21+
module: {
22+
rules: [
23+
{
24+
test: /\.svg$/,
25+
use: 'svg-inline-loader',
26+
},
27+
{
28+
test: /\.js$/,
29+
exclude: /(node_modules|bower_components)/,
30+
use: {
31+
loader: 'babel-loader',
32+
options: {
33+
presets: ['es2015']
34+
}
35+
}
36+
}
37+
]
38+
},
39+
plugins: []
40+
};
41+
42+
exports.compiler = webpack(config);

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
"hexo-server": "^0.2.1"
1515
},
1616
"devDependencies": {
17+
"babel-core": "^6.26.0",
18+
"babel-loader": "^7.1.2",
19+
"babel-preset-es2015": "^6.24.1",
1720
"browser-sync": "2.x",
1821
"clean-css": "4.1.3",
1922
"gulp": "3.x",
@@ -22,7 +25,9 @@
2225
"js-yaml": "^3.9.1",
2326
"less": "2.x",
2427
"less-plugin-clean-css": "^1.5.1",
25-
"lodash": "4.x"
28+
"lodash": "4.x",
29+
"svg-inline-loader": "^0.8.0",
30+
"webpack": "^3.5.5"
2631
},
2732
"scripts": {
2833
"clean": "rm -fr node_modules",

source/_data/icons.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
- angle-down
2+
- angle-left
3+
- angle-right
4+
- angle-up
5+
- calendar
6+
- checkmark
7+
- cog
8+
- envelope
9+
- exclamation-circle
10+
- exclamation-triangle
11+
- fanatiguy
12+
- info-circle
13+
- input-file
14+
- input-number
15+
- input-time
16+
- input-url
17+
- kbd-arrow-down
18+
- kbd-arrow-left
19+
- kbd-arrow-right
20+
- kbd-arrow-up
21+
- kbd-capslock
22+
- kbd-command
23+
- kbd-delete
24+
- kbd-eject
25+
- kbd-option
26+
- kbd-return
27+
- kbd-shift
28+
- kbd-space
29+
- kbd-tab
30+
- lock
31+
- phone
32+
- plus-or-minus
33+
- search
34+
- support
35+
- times
36+
- times-circle

source/_data/nav.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
guides:
2+
Installing: /install
3+
components:
4+
Alerts: /alerts
5+
Badges: /badges
6+
Blockquotes: /blockquotes
7+
Breadcrumbs: /breadcrumbs
8+
Buttons: /buttons
9+
Code: /code
10+
Dropdowns: /dropdowns
11+
Forms: /forms
12+
Grid: /grid
13+
Icons: /icons
14+
Lists: /lists
15+
Modals: /modals
16+
Navigation: /navigation
17+
Pagination: /pagination
18+
Popovers: /popovers
19+
"Progress Bars": /progressbars
20+
Tables: /tables
21+
Tabs: /tabs
22+
Tooltips: /tooltips
23+
Typography: /typography
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
.hxAlerts {
2+
//reserved for future styling
3+
}
4+
5+
.hxAlert {
6+
background-color: @blue-100;
7+
color: @gray-1000;
8+
display: flex;
9+
font-weight: 300;
10+
line-height: 1.25em;
11+
12+
& > * {
13+
padding-bottom: 0.875em;
14+
padding-top: 0.875em;
15+
}
16+
17+
&--error {
18+
background-color: @red-900;
19+
color: @gray-0;
20+
}
21+
22+
&--warning {
23+
background-color: @yellow-700;
24+
}
25+
26+
&--success {
27+
background-color: @green-700;
28+
color: @gray-0;
29+
}
30+
31+
&__icon {
32+
flex-grow: 0;
33+
flex-shrink: 0;
34+
flex-basis: 1em;
35+
margin-left: 1em;
36+
}
37+
38+
&__text {
39+
flex-grow: 1;
40+
margin-left: 1em;
41+
}
42+
43+
&__status {
44+
font-weight: 500;
45+
text-transform: uppercase;
46+
47+
&:after {
48+
content: ":";
49+
}
50+
}
51+
52+
&__action {
53+
margin-left: 1em;
54+
text-align: right;
55+
56+
a {
57+
color: inherit;
58+
font-weight: 500;
59+
text-transform: uppercase;
60+
61+
&:hover {
62+
color: inherit;
63+
text-decoration: underline;
64+
}
65+
}
66+
}
67+
68+
&__dismiss {
69+
background-color: transparent;
70+
border: none;
71+
display: flex;
72+
flex-direction: column;
73+
padding: 0.875em 1em;
74+
75+
hx-icon {
76+
height: 0.75em;
77+
width: 0.75em;
78+
}
79+
}
80+
}

0 commit comments

Comments
 (0)