Minor demo styles
Browse files- assets/scripts/src/sholo.js +1 -1
- assets/styles/scss/base.scss +4 -3
- assets/styles/scss/demo.scss +38 -0
- assets/styles/scss/sholo.scss +0 -1
- index.html +9 -10
- package.json +2 -2
- server.js +1 -1
- webpack.config.dev.js +2 -2
- webpack.config.prod.js +1 -1
assets/scripts/src/sholo.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
console.log('
|
|
|
1 |
+
console.log('heeloo');
|
assets/styles/scss/base.scss
CHANGED
@@ -5,6 +5,7 @@ $global-font-size-h3: 20px;
|
|
5 |
$global-font-size-h4: 18px;
|
6 |
$global-font-size-h5: 16px;
|
7 |
$global-font-size-h6: 14px;
|
|
|
8 |
|
9 |
/*=============================================
|
10 |
= Generic styling =
|
@@ -30,8 +31,8 @@ body {
|
|
30 |
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
31 |
font-size: 16px;
|
32 |
line-height: 1.4;
|
33 |
-
color: #
|
34 |
-
background-color: #
|
35 |
overflow-x: hidden;
|
36 |
}
|
37 |
|
@@ -58,7 +59,7 @@ hr {
|
|
58 |
h1, h2, h3, h4, h5, h6 {
|
59 |
margin-top: 0;
|
60 |
margin-bottom: $global-guttering/2;
|
61 |
-
font-weight:
|
62 |
line-height: 1.2;
|
63 |
}
|
64 |
|
|
|
5 |
$global-font-size-h4: 18px;
|
6 |
$global-font-size-h5: 16px;
|
7 |
$global-font-size-h6: 14px;
|
8 |
+
$heading-font-weight: 700;
|
9 |
|
10 |
/*=============================================
|
11 |
= Generic styling =
|
|
|
31 |
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
32 |
font-size: 16px;
|
33 |
line-height: 1.4;
|
34 |
+
color: #000000;
|
35 |
+
background-color: #FFFFFF;
|
36 |
overflow-x: hidden;
|
37 |
}
|
38 |
|
|
|
59 |
h1, h2, h3, h4, h5, h6 {
|
60 |
margin-top: 0;
|
61 |
margin-bottom: $global-guttering/2;
|
62 |
+
font-weight: $heading-font-weight;
|
63 |
line-height: 1.2;
|
64 |
}
|
65 |
|
assets/styles/scss/demo.scss
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
@import "base";
|
2 |
+
|
3 |
+
$container-width: 500px !default;
|
4 |
+
$button-font-size: 13px !default;
|
5 |
+
$dark-button-bg: #2d2d2d !default;
|
6 |
+
$dark-button-text: #ffffff !default;
|
7 |
+
$light-button-bg: #f5f5f5 !default;
|
8 |
+
$light-button-text: #2d2d2d !default;
|
9 |
+
|
10 |
+
.page-wrap {
|
11 |
+
width: $container-width;
|
12 |
+
margin: auto;
|
13 |
+
}
|
14 |
+
|
15 |
+
.btn {
|
16 |
+
font-size: $button-font-size;
|
17 |
+
padding: 7px 10px;
|
18 |
+
border-radius: 3px;
|
19 |
+
|
20 |
+
&.btn__dark {
|
21 |
+
background: $dark-button-bg;
|
22 |
+
color: $dark-button-text;
|
23 |
+
}
|
24 |
+
|
25 |
+
&.btn__light {
|
26 |
+
background: $light-button-bg;
|
27 |
+
color: $light-button-text;
|
28 |
+
}
|
29 |
+
}
|
30 |
+
|
31 |
+
section {
|
32 |
+
margin-bottom: 35px;
|
33 |
+
}
|
34 |
+
|
35 |
+
.section__header {
|
36 |
+
margin: 80px 0 60px;
|
37 |
+
text-align: center;
|
38 |
+
}
|
assets/styles/scss/sholo.scss
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
@import "base";
|
|
|
|
index.html
CHANGED
@@ -5,25 +5,24 @@
|
|
5 |
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
6 |
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
7 |
<title>Sholo</title>
|
8 |
-
<link rel="stylesheet" href="./assets/styles/css/
|
9 |
</head>
|
10 |
<body>
|
11 |
<div class="page-wrap">
|
12 |
-
<section class="
|
13 |
<h1>Sholo</h1>
|
14 |
<p class="text-muted">A light-weight, no-dependency, vanilla JavaScript library to bring certain parts of page in spotlight</p>
|
15 |
-
<a href="#" class="btn
|
16 |
-
<a href="#" class="btn
|
17 |
</section>
|
18 |
-
<section
|
19 |
<h1>Whats does it do?</h1>
|
20 |
<p>Let's you bring any component on the page into the spotlight.</p>
|
21 |
<p>It lets you focus any element of the page while putting an overlay on top of the other elements in page. You can use it to make powerful introduction for different features of your application or for example if you want to highlight some component that needs user attention.</p>
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
</pre>
|
27 |
</section>
|
28 |
</div>
|
29 |
|
|
|
5 |
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
6 |
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
7 |
<title>Sholo</title>
|
8 |
+
<link rel="stylesheet" href="./assets/styles/css/demo.css">
|
9 |
</head>
|
10 |
<body>
|
11 |
<div class="page-wrap">
|
12 |
+
<section class="section__header">
|
13 |
<h1>Sholo</h1>
|
14 |
<p class="text-muted">A light-weight, no-dependency, vanilla JavaScript library to bring certain parts of page in spotlight</p>
|
15 |
+
<a href="#" class="btn btn__dark">Show an Example</a>
|
16 |
+
<a href="#" class="btn btn__light">Learn More</a>
|
17 |
</section>
|
18 |
+
<section>
|
19 |
<h1>Whats does it do?</h1>
|
20 |
<p>Let's you bring any component on the page into the spotlight.</p>
|
21 |
<p>It lets you focus any element of the page while putting an overlay on top of the other elements in page. You can use it to make powerful introduction for different features of your application or for example if you want to highlight some component that needs user attention.</p>
|
22 |
+
</section>
|
23 |
+
<section>
|
24 |
+
<h1>How does it do that?</h1>
|
25 |
+
<p>Ever heard of magic? ...it is not that, it just uses some canvas manipulation to put the focus on some element</p>
|
|
|
26 |
</section>
|
27 |
</div>
|
28 |
|
package.json
CHANGED
@@ -29,9 +29,9 @@
|
|
29 |
"style-loader": "^0.20.2",
|
30 |
"webpack": "^4.0.1",
|
31 |
"webpack-cli": "^2.0.10",
|
32 |
-
"webpack-dev-server": "^3.1.0"
|
|
|
33 |
},
|
34 |
"dependencies": {
|
35 |
-
"extract-text-webpack-plugin": "next"
|
36 |
}
|
37 |
}
|
|
|
29 |
"style-loader": "^0.20.2",
|
30 |
"webpack": "^4.0.1",
|
31 |
"webpack-cli": "^2.0.10",
|
32 |
+
"webpack-dev-server": "^3.1.0",
|
33 |
+
"extract-text-webpack-plugin": "next"
|
34 |
},
|
35 |
"dependencies": {
|
|
|
36 |
}
|
37 |
}
|
server.js
CHANGED
@@ -2,7 +2,7 @@ const webpack = require('webpack');
|
|
2 |
const WebpackDevServer = require('webpack-dev-server');
|
3 |
const opn = require('opn');
|
4 |
|
5 |
-
const config = require('./webpack.dev
|
6 |
|
7 |
const PORT = 3000;
|
8 |
const HOST = 'localhost';
|
|
|
2 |
const WebpackDevServer = require('webpack-dev-server');
|
3 |
const opn = require('opn');
|
4 |
|
5 |
+
const config = require('./webpack.config.dev');
|
6 |
|
7 |
const PORT = 3000;
|
8 |
const HOST = 'localhost';
|
webpack.config.dev.js
CHANGED
@@ -6,7 +6,7 @@ module.exports = {
|
|
6 |
entry: [
|
7 |
'webpack-dev-server/client?http://localhost:3000',
|
8 |
'./assets/scripts/src/sholo.js',
|
9 |
-
'./assets/styles/scss/
|
10 |
],
|
11 |
output: {
|
12 |
path: path.join(__dirname, '/assets'),
|
@@ -43,7 +43,7 @@ module.exports = {
|
|
43 |
},
|
44 |
plugins: [
|
45 |
new ExtractTextPlugin({
|
46 |
-
filename: 'styles/css/
|
47 |
allChunks: true,
|
48 |
}),
|
49 |
],
|
|
|
6 |
entry: [
|
7 |
'webpack-dev-server/client?http://localhost:3000',
|
8 |
'./assets/scripts/src/sholo.js',
|
9 |
+
'./assets/styles/scss/demo.scss',
|
10 |
],
|
11 |
output: {
|
12 |
path: path.join(__dirname, '/assets'),
|
|
|
43 |
},
|
44 |
plugins: [
|
45 |
new ExtractTextPlugin({
|
46 |
+
filename: 'styles/css/demo.css',
|
47 |
allChunks: true,
|
48 |
}),
|
49 |
],
|
webpack.config.prod.js
CHANGED
@@ -5,7 +5,7 @@ module.exports = {
|
|
5 |
mode: 'production',
|
6 |
entry: [
|
7 |
'./assets/scripts/src/sholo.js',
|
8 |
-
'./assets/styles/scss/
|
9 |
],
|
10 |
output: {
|
11 |
path: path.join(__dirname, '/assets'),
|
|
|
5 |
mode: 'production',
|
6 |
entry: [
|
7 |
'./assets/scripts/src/sholo.js',
|
8 |
+
'./assets/styles/scss/demo.scss',
|
9 |
],
|
10 |
output: {
|
11 |
path: path.join(__dirname, '/assets'),
|