...
 
Commits (2)
......@@ -104,3 +104,4 @@ venv.bak/
# mypy
.mypy_cache/
/frontend/node_modules/
......@@ -5,7 +5,6 @@ name = "pypi"
[packages]
flask = "*"
flask-assets = "*"
libsass = "*"
cssmin = "*"
......
{
"_meta": {
"hash": {
"sha256": "23b7b20289d4dbb7048bfbed7b5c024c155e7e73823ec2da0802e8449f0210d6"
"sha256": "cb477e9464de31fd4e5e97c689434074afcf750ee409b8c4a3e3079989366513"
},
"pipfile-spec": 6,
"requires": {
......@@ -38,13 +38,6 @@
"index": "pypi",
"version": "==1.0.2"
},
"flask-assets": {
"hashes": [
"sha256:6031527b89fb3509d1581d932affa5a79dd348cfffb58d0aef99a43461d47847"
],
"index": "pypi",
"version": "==0.12"
},
"itsdangerous": {
"hashes": [
"sha256:321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19",
......@@ -91,12 +84,6 @@
],
"version": "==1.11.0"
},
"webassets": {
"hashes": [
"sha256:e7d9c8887343123fd5b32309b33167428cb1318cdda97ece12d0907fd69d38db"
],
"version": "==0.12.1"
},
"werkzeug": {
"hashes": [
"sha256:c3fd7a7d41976d9f44db327260e263132466836cef6f91512889ed60ad26557c",
......
import '../styles/main.scss';
import 'jquery';
jQuery(function() {
$('#inputForm').change(function() {
const submitButton = $(':submit', this);
let submitEnabled = true;
$(':checkbox', this).each(function(i, el) {
if (submitEnabled && !$(el).is(':checked'))
submitEnabled = false;
});
submitButton.prop('disabled', !submitEnabled);
});
})
......@@ -4,6 +4,17 @@
@import "mittelab";
$body-bg: #222;
$body-color: #fff;
$theme-colors: (
"dark": $body-bg,
"mitte": $mittelab-blue,
"light": $mittelab-logo,
);
@import "~bootstrap/scss/bootstrap";
/* Links */
a,
a:focus,
......@@ -11,22 +22,8 @@ a:hover {
color: $mittelab-green;
}
/* Custom default button */
.btn-secondary,
.btn-secondary:hover,
.btn-secondary:focus {
color: $mittelab-secondary;
text-shadow: none; /* Prevent inheritance from `body` */
background-color: $mittelab-primary;
border: .05rem solid $mittelab-primary;
}
.btn-primary,
.btn-primary:hover,
.btn-primary:focus {
header h3 > a {
color: $mittelab-primary;
background-color: $mittelab-blue;
border: .05rem solid $mittelab-blue;
}
.color-loving {
......@@ -40,7 +37,6 @@ a:hover {
html,
body {
height: 100%;
background-color: $mittelab-secondary;
}
body {
......
This diff is collapsed.
{
"name": "m-ship",
"version": "1.0.0",
"description": "This is a membership panel. The main features are:",
"private": true,
"directories": {
"test": "tests"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack --progress --profile --colors"
},
"dependencies": {
"manifest-revision-webpack-plugin": "^0.4.1"
},
"devDependencies": {
"autoprefixer": "^9.3.1",
"bootstrap": "^4.1.3",
"css-loader": "^1.0.1",
"jquery": "^3.3.1",
"node-sass": "^4.9.4",
"popper.js": "^1.14.4",
"postcss-loader": "^3.0.0",
"precss": "^3.1.2",
"sass-loader": "^7.1.0",
"style-loader": "^0.23.1",
"sync-exec": "^0.6.2",
"webpack": "^4.24.0",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.10"
},
"repository": {
"type": "git",
"url": "git@git-ssh.mittelab.org:infra/m-ship.git"
},
"author": "Mittelab",
"license": "MIT"
}
const path = require('path');
module.exports = {
entry: './assets/scripts/index.js',
output: {
filename: 'main.js',
path: path.resolve(__dirname, 'build/')
},
module: {
rules: [
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
},
{
test: /\.(scss)$/,
use: [{
loader: 'style-loader', // inject CSS to page
}, {
loader: 'css-loader', // translates CSS into CommonJS modules
}, {
loader: 'postcss-loader', // Run post css actions
options: {
plugins: function () { // post css plugins, can be exported to postcss.config.js
return [
require('precss'),
require('autoprefixer')
];
}
}
}, {
loader: 'sass-loader' // compiles Sass to CSS
}]
}
]},
};
\ No newline at end of file
......@@ -5,7 +5,7 @@ from flask import Flask
def create_app(test_config=None):
# create and configure the app
app = Flask(__name__, instance_relative_config=True)
app = Flask(__name__, instance_relative_config=True, static_folder='../frontend/build/', static_url_path='/assets/')
app.config.from_mapping(
SECRET_KEY='dev',
)
......@@ -23,14 +23,6 @@ def create_app(test_config=None):
except OSError:
pass
from flask_assets import Environment, Bundle
app = Flask(__name__)
assets = Environment(app)
css = Bundle('css/style.scss', filters='libsass,cssmin', output='style.css', depends='css/**/*.scss')
assets.register('css_all', css)
from . import main
app.register_blueprint(main.bp)
app.add_url_rule('/', endpoint='index')
......
a,a:focus,a:hover{color:#0ce3ac}.btn-secondary,.btn-secondary:hover,.btn-secondary:focus{color:#222;text-shadow:none;background-color:#fff;border:.05rem solid #fff}.btn-primary,.btn-primary:hover,.btn-primary:focus{color:#fff;background-color:#375a7f;border:.05rem solid #375a7f}.color-loving{color:#fa6c8d}html,body{height:100%;background-color:#222}body{display:-ms-flexbox;display:flex;color:#fff;text-shadow:0 .05rem .1rem rgba(0,0,0,0.5);box-shadow:inset 0 0 5rem rgba(0,0,0,0.5)}.cover-container{max-width:56em}.masthead{margin-bottom:2rem}.masthead-brand{margin-bottom:0}.nav-masthead .nav-link{padding:.25rem 0;font-weight:700;color:rgba(255,255,255,0.5);background-color:transparent;border-bottom:.25rem solid transparent}.nav-masthead .nav-link:hover,.nav-masthead .nav-link:focus{border-bottom-color:rgba(255,255,255,0.25)}.nav-masthead .nav-link+.nav-link{margin-left:1rem}.nav-masthead .active{color:#fff;border-bottom-color:#fff}@media(min-width:48em){.masthead-brand{float:left}.nav-masthead{float:right}}.cover{padding:0 1.5rem}.cover .btn-lg{padding:.75rem 1.25rem;font-weight:700}.mastfoot{color:rgba(255,255,255,0.5)}
\ No newline at end of file
......@@ -5,14 +5,9 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
{% assets "css_all" %}
<link rel="stylesheet" href="{{ ASSET_URL }}" />
{% endassets %}
<script type="text/javascript" src="{{ url_for('static', filename='main.js') }}"></script>
{% block extra_headers %}{% endblock %}
<title>{% block title %}{% endblock %} - m-ship</title>
</head>
<body>
......@@ -36,11 +31,5 @@
</div>
</footer>
</div>
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
</body>
</html>
\ No newline at end of file