command-line as background page
This commit is contained in:
parent
e46f664363
commit
a808b28940
4 changed files with 75 additions and 2 deletions
16
src/command-line/index.html
Normal file
16
src/command-line/index.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8 />
|
||||
<title>VimVixen command-line</title>
|
||||
<script src='command-line.js'></script>
|
||||
</head>
|
||||
<body class='vimvixen-command-line'>
|
||||
<div>
|
||||
<p class='vimvixen-command-line-title'></p>
|
||||
<div class='vimvixen-command-line-line'>
|
||||
<i class='vimvixen-command-line-line-prompt'></i><input class='vimvixen-command-line-line-input'></input>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
1
src/command-line/index.js
Normal file
1
src/command-line/index.js
Normal file
|
@ -0,0 +1 @@
|
|||
import './index.scss';
|
42
src/command-line/index.scss
Normal file
42
src/command-line/index.scss
Normal file
|
@ -0,0 +1,42 @@
|
|||
html, body, * {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.vimvixen-command-line {
|
||||
border-top: 1px solid gray;
|
||||
bottom: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
&-title {
|
||||
background-color: lightgray;
|
||||
font-weight: bold;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
&-line {
|
||||
background-color: white;
|
||||
display: flex;
|
||||
|
||||
@mixin input-style {
|
||||
font-style: normal;
|
||||
font-family: monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
&-prompt:before {
|
||||
content: ':';
|
||||
|
||||
@include input-style;
|
||||
}
|
||||
|
||||
&-input {
|
||||
border: none;
|
||||
flex-grow: 1;
|
||||
|
||||
@include input-style;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,3 +1,4 @@
|
|||
var HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
var path = require('path');
|
||||
|
||||
const src = path.resolve(__dirname, 'src');
|
||||
|
@ -6,7 +7,8 @@ const dist = path.resolve(__dirname, 'build');
|
|||
module.exports = {
|
||||
entry: {
|
||||
index: path.join(src, 'content'),
|
||||
background: path.join(src, 'background')
|
||||
background: path.join(src, 'background'),
|
||||
'command-line': path.join(src, 'command-line')
|
||||
},
|
||||
|
||||
output: {
|
||||
|
@ -28,10 +30,22 @@ module.exports = {
|
|||
test: /\.css$/,
|
||||
loader: 'style-loader!css-loader',
|
||||
},
|
||||
{
|
||||
test: /\.scss$/,
|
||||
loader: 'style-loader!css-loader!sass-loader?sourceMap=true'
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
resolve: {
|
||||
extensions: [ '.js' ]
|
||||
}
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new HtmlWebpackPlugin({
|
||||
template: path.join(src, 'command-line', 'index.html'),
|
||||
filename: path.join(dist, 'command-line.html'),
|
||||
inject: false
|
||||
})
|
||||
]
|
||||
};
|
||||
|
|
Reference in a new issue