update layout
This commit is contained in:
parent
8bae7d764d
commit
eed6a102e7
|
@ -1,3 +1,6 @@
|
||||||
|
@import "mixins.less";
|
||||||
|
|
||||||
|
|
||||||
// general styles
|
// general styles
|
||||||
body {
|
body {
|
||||||
background-color: #333;
|
background-color: #333;
|
||||||
|
@ -19,18 +22,29 @@ a:visted {
|
||||||
color: #6ff;
|
color: #6ff;
|
||||||
}
|
}
|
||||||
// Layout
|
// Layout
|
||||||
div.children {
|
div#header {
|
||||||
div {
|
.clearfix();
|
||||||
padding: 0px 15px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
div.dirs {
|
div#key {
|
||||||
float: left;
|
float: left;
|
||||||
width: 50%;
|
width: 30%;
|
||||||
}
|
}
|
||||||
div.files {
|
div#svg-container {
|
||||||
float: right;
|
float: right;
|
||||||
width: 50%;
|
width: 70%;
|
||||||
|
}
|
||||||
|
div#index {
|
||||||
|
.clearfix();
|
||||||
|
div#dirs {
|
||||||
|
float: left;
|
||||||
|
width: 50%;
|
||||||
|
padding-right: 15px;
|
||||||
|
}
|
||||||
|
div#files {
|
||||||
|
float: right;
|
||||||
|
width: 50%;
|
||||||
|
padding-left: 15px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Details
|
// Details
|
||||||
svg {
|
svg {
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
.clearfix() {
|
||||||
|
&:before,
|
||||||
|
&:after {
|
||||||
|
content: " ";
|
||||||
|
display: table;
|
||||||
|
}
|
||||||
|
&:after {
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,7 +1,5 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
# import locale
|
|
||||||
# locale.setlocale(locale.LC_ALL, 'en_US')
|
|
||||||
import logging
|
import logging
|
||||||
import cherrypy
|
import cherrypy
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
|
|
39
gruntfile.js
39
gruntfile.js
|
@ -1,24 +1,7 @@
|
||||||
const webpackConfig = require('./webpack.config.js');
|
const webpackConfig = require('./webpack.config.js');
|
||||||
|
|
||||||
|
|
||||||
module.exports = function(grunt) {
|
module.exports = function(grunt) {
|
||||||
grunt.initConfig({
|
grunt.initConfig({
|
||||||
/*less: {
|
|
||||||
website: {
|
|
||||||
files: {
|
|
||||||
'styles/css/main.css': 'styles/less/main.less'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},*/
|
|
||||||
/*cssmin: {
|
|
||||||
website: {
|
|
||||||
files: {
|
|
||||||
'styles/mincss/pure.css': 'node_modules/purecss/build/pure.css',
|
|
||||||
'styles/mincss/grids-responsive-min.css': 'node_modules/purecss/build/grids-responsive.css',
|
|
||||||
'styles/mincss/main.css': 'styles/css/main.css'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},*/
|
|
||||||
webpack: {
|
webpack: {
|
||||||
dev: webpackConfig,
|
dev: webpackConfig,
|
||||||
},
|
},
|
||||||
|
@ -41,27 +24,10 @@ module.exports = function(grunt) {
|
||||||
sourceMap: true
|
sourceMap: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/*concat: {
|
|
||||||
deps_js: {
|
|
||||||
src: [
|
|
||||||
'node_modules/d3-voronoi-treemap/build/d3-voronoi-treemap.js',
|
|
||||||
'node_modules/d3-voronoi-map/build/d3-voronoi-map.js',
|
|
||||||
'node_modules/d3-weighted-voronoi/build/d3-weighted-voronoi.js',
|
|
||||||
'node_modules/d3-scale/dist/d3-scale.js',
|
|
||||||
'node_modules/d3/dist/d3.js',
|
|
||||||
'node_modules/randomcolor/randomColor.js',
|
|
||||||
'assets/js/main.js'
|
|
||||||
],
|
|
||||||
dest: 'static/scripts.js',
|
|
||||||
},
|
|
||||||
},*/
|
|
||||||
watch: {
|
watch: {
|
||||||
jshits: {
|
jshits: {
|
||||||
files: ['assets/js/*.js'],
|
files: ['assets/js/*.js'],
|
||||||
tasks: ['webpack:dev', 'babel'],
|
tasks: ['webpack:dev', 'babel'],
|
||||||
// options: {
|
|
||||||
// spawn: false
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
cshits: {
|
cshits: {
|
||||||
files: ["assets/style/main.less"],
|
files: ["assets/style/main.less"],
|
||||||
|
@ -70,15 +36,10 @@ module.exports = function(grunt) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// grunt.loadNpmTasks('grunt-contrib-less');
|
|
||||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||||
// grunt.loadNpmTasks('grunt-contrib-cssmin');
|
|
||||||
// grunt.loadNpmTasks('grunt-contrib-concat');
|
|
||||||
grunt.loadNpmTasks('grunt-webpack');
|
grunt.loadNpmTasks('grunt-webpack');
|
||||||
grunt.loadNpmTasks('grunt-babel');
|
grunt.loadNpmTasks('grunt-babel');
|
||||||
grunt.loadNpmTasks('grunt-contrib-less');
|
grunt.loadNpmTasks('grunt-contrib-less');
|
||||||
|
|
||||||
// grunt.registerTask('default', ['less:website', 'cssmin:website', 'concat:dist']);
|
|
||||||
grunt.registerTask('default', ['webpack:dev', 'babel', 'less:styles']);
|
grunt.registerTask('default', ['webpack:dev', 'babel', 'less:styles']);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,11 +11,8 @@
|
||||||
<link rel="stylesheet" href="/static/style.css" />
|
<link rel="stylesheet" href="/static/style.css" />
|
||||||
</head>
|
</head>
|
||||||
<body onload="Application.boot();">
|
<body onload="Application.boot();">
|
||||||
<div class="header">
|
<div id="header">
|
||||||
<div id="svg-container">
|
<div id="key">
|
||||||
<svg><g class="chart"></g></svg>
|
|
||||||
</div>
|
|
||||||
<div class="key">
|
|
||||||
<h1>{{ node.path|pathjoin }}</h1>
|
<h1>{{ node.path|pathjoin }}</h1>
|
||||||
<div>
|
<div>
|
||||||
<ul>
|
<ul>
|
||||||
|
@ -31,26 +28,27 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div id="svg-container">
|
||||||
<div class="viewer">
|
<svg><g class="chart"></g></svg>
|
||||||
{% if node.typ in (NodeType.ROOT, NodeType.DIR) %}
|
|
||||||
<div class="children">
|
|
||||||
<div class="dirs">
|
|
||||||
<h2>Subdirs:</h2>
|
|
||||||
{% for child in node.children|sort(attribute='total_children', reverse=True) %}{% if child.typ in NodeGroup.DIRLIKE %}
|
|
||||||
<hr />
|
|
||||||
<a href="/?n={{ child|id }}">{{ child.name }}</a>: {{ child.total_size|data }} - {{ child.total_children|commafy }} children
|
|
||||||
{% endif %}{% endfor %}
|
|
||||||
</div>
|
|
||||||
<div class="files">
|
|
||||||
<h2>Files:</h2>
|
|
||||||
{% for child in node.children|sort(attribute='name') %}{% if child.typ in NodeGroup.FILELIKE %}
|
|
||||||
<hr />
|
|
||||||
<a href="/?n={{ child|id }}">{{ child.name }}</a>: {{ child.total_size|data }}
|
|
||||||
{% endif %}{% endfor %}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
|
||||||
</div>
|
</div>
|
||||||
|
{% if node.typ in (NodeType.ROOT, NodeType.DIR) %}
|
||||||
|
<div id="index">
|
||||||
|
<div id="dirs">
|
||||||
|
<h2>Subdirs:</h2>
|
||||||
|
{% for child in node.children|sort(attribute='total_children', reverse=True) %}{% if child.typ in NodeGroup.DIRLIKE %}
|
||||||
|
<hr />
|
||||||
|
<a href="/?n={{ child|id }}">{{ child.name }}</a>: {{ child.total_size|data }} - {{ child.total_children|commafy }} children
|
||||||
|
{% endif %}{% endfor %}
|
||||||
|
</div>
|
||||||
|
<div id="files">
|
||||||
|
<h2>Files:</h2>
|
||||||
|
{% for child in node.children|sort(attribute='name') %}{% if child.typ in NodeGroup.FILELIKE %}
|
||||||
|
<hr />
|
||||||
|
<a href="/?n={{ child|id }}">{{ child.name }}</a>: {{ child.total_size|data }}
|
||||||
|
{% endif %}{% endfor %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Loading…
Reference in New Issue