fixing scss compile duplication and altering layout
scss compiler was not ignoring precompiled app css file, also some style/layout changes (1080p)
This commit is contained in:
parent
e7a7edf13c
commit
bd9532d5ea
20
compile.py
20
compile.py
@ -1,8 +1,5 @@
|
||||
import os
|
||||
import logging
|
||||
import shutil
|
||||
import subprocess
|
||||
import argparse
|
||||
import StringIO
|
||||
|
||||
from scss import Scss
|
||||
@ -17,38 +14,41 @@ log.setLevel(logging.INFO)
|
||||
|
||||
#
|
||||
def main():
|
||||
|
||||
|
||||
current_directory = os.getcwd()
|
||||
|
||||
logging.info("Compiling from local files ...")
|
||||
dashing_dir = os.path.join(current_directory, 'pydashie')
|
||||
logging.info("Using walk path : %s" % dashing_dir)
|
||||
|
||||
|
||||
fileList = []
|
||||
for root, subFolders, files in os.walk(dashing_dir):
|
||||
for fileName in files:
|
||||
if 'scss' in fileName:
|
||||
if 'scss' in fileName:
|
||||
fileList.append(os.path.join(root, fileName))
|
||||
log.info('Found SCSS to compile: %s' % fileName)
|
||||
|
||||
css_output = StringIO.StringIO()
|
||||
css = Scss()
|
||||
css_output.write('\n'.join([css.compile(open(filePath).read()) for filePath in fileList]))
|
||||
|
||||
|
||||
fileList = []
|
||||
for root, subFolders, files in os.walk(dashing_dir):
|
||||
for fileName in files:
|
||||
if 'css' in fileName and 'scss' not in fileName:
|
||||
if not fileName.endswith('~'):
|
||||
if (not fileName.endswith('~') and
|
||||
not fileName == "application.css"):
|
||||
# discard any temporary files
|
||||
# ignore the base application.css (duplication issues)
|
||||
fileList.append(os.path.join(root, fileName))
|
||||
log.info('Found CSS to append: %s' % fileName)
|
||||
css_output.write('\n'.join([open(filePath).read() for filePath in fileList]))
|
||||
|
||||
app_css_filepath = os.path.join(current_directory, 'pydashie/assets/stylesheets/application.css')
|
||||
app_css_filepath = os.path.join(current_directory,
|
||||
'pydashie/assets/stylesheets/application.css')
|
||||
with open(app_css_filepath, 'w') as outfile:
|
||||
outfile.write(css_output.getvalue())
|
||||
log.info('Wrote CSS out to : %s' % app_css_filepath )
|
||||
log.info('Wrote CSS out to : %s' % app_css_filepath)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
@ -336,8 +336,8 @@
|
||||
Dashing.on('ready', function() {
|
||||
var contentWidth;
|
||||
Dashing.widget_margins || (Dashing.widget_margins = [5, 5]);
|
||||
Dashing.widget_base_dimensions || (Dashing.widget_base_dimensions = [300, 360]);
|
||||
Dashing.numColumns || (Dashing.numColumns = 4);
|
||||
Dashing.widget_base_dimensions || (Dashing.widget_base_dimensions = [320, 360]);
|
||||
Dashing.numColumns || (Dashing.numColumns = 6);
|
||||
contentWidth = (Dashing.widget_base_dimensions[0] + Dashing.widget_margins[0] * 2) * Dashing.numColumns;
|
||||
return Batman.setImmediate(function() {
|
||||
$('.gridster').width(contentWidth);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -13,10 +13,13 @@ class SynergySampler(DashieSampler):
|
||||
return 'synergy'
|
||||
|
||||
def sample(self):
|
||||
s = {'value': random.randint(0, 100),
|
||||
'current': random.randint(0, 100),
|
||||
s = {'min': 0,
|
||||
'max': 100,
|
||||
'value': random.randint(0, 100),
|
||||
'last': self._last}
|
||||
self._last = s['current']
|
||||
s['moreinfo'] = "%s/%s" % (s['value'], s['max'])
|
||||
s['current'] = s['value']
|
||||
self._last = s['value']
|
||||
return s
|
||||
|
||||
|
||||
|
@ -21,52 +21,46 @@
|
||||
<div class="gridster">
|
||||
<ul>
|
||||
<li data-row="1" data-col="1" data-sizex="2" data-sizey="1">
|
||||
<div data-id="welcome" data-view="Text" data-title="Hello" data-text="This is your shiny new (python powered) dashboard." data-moreinfo="Protip: You can drag the widgets around!"></div>
|
||||
- <div data-id="welcome" data-view="Text" data-title="Hello" data-text="This is your shiny new (python powered) dashboard." data-moreinfo="Protip: You can drag the widgets around!"></div>
|
||||
</li>
|
||||
|
||||
<li data-row="1" data-col="3" data-sizex="1" data-sizey="1">
|
||||
<div data-id="synergy" data-view="Meter" data-title="Synergy" data-min="0" data-max="100"></div>
|
||||
<div data-id="hotness" data-view="Hotness" data-title="Hotness" data-cool="40" data-warm="90"></div>
|
||||
</li>
|
||||
|
||||
<li data-row="1" data-col="4" data-sizex="1" data-sizey="2">
|
||||
<div data-id="buzzwords" data-view="List" data-unordered="true" data-title="Buzzwords" data-moreinfo="Absolute ranking of pony preferences"></div>
|
||||
</li>
|
||||
|
||||
<li data-row="2" data-col="1" data-sizex="1" data-sizey="1">
|
||||
<li data-row="1" data-col="4" data-sizex="1" data-sizey="1">
|
||||
<div data-id="clock" data-view="Clock" data-title="Clock"></div>
|
||||
</li>
|
||||
</li>
|
||||
|
||||
<li data-row="2" data-col="2" data-sizex="1" data-sizey="1">
|
||||
<li data-row="1" data-col="5" data-sizex="1" data-sizey="1">
|
||||
<div data-view="Image" data-image="/images/dashie.png"></div>
|
||||
</li>
|
||||
|
||||
<li data-row="2" data-col="3" data-sizex="1" data-sizey="1">
|
||||
<div data-id="website_up" data-view="Text" data-title="Website"></div>
|
||||
<li data-row="2" data-col="2" data-sizex="2" data-sizey="1">
|
||||
<div data-id="progress_bars" data-view="ProgressBars" data-title="Project Bars"></div>
|
||||
</li>
|
||||
|
||||
|
||||
<li data-row="3" data-col="1" data-sizex="1" data-sizey="1">
|
||||
<div data-id="hotness" data-view="Hotness" data-title="Hotness" data-cool="40" data-warm="90"></div>
|
||||
<li data-row="2" data-col="4" data-sizex="1" data-sizey="1">
|
||||
<div data-id="synergy" data-view="Meter" data-title="Synergy"></div>
|
||||
</li>
|
||||
|
||||
<li data-row="2" data-col="5" data-sizex="1" data-sizey="1">
|
||||
<div data-id="synergy" data-view="Meter" data-title="Synergy"></div>
|
||||
</li>
|
||||
|
||||
<li data-row="2" data-col="1" data-sizex="1" data-sizey="2">
|
||||
<div data-id="buzzwords" data-view="List" data-unordered="true" data-title="Buzzwords" data-moreinfo="Absolute ranking of pony preferences"></div>
|
||||
</li>
|
||||
|
||||
<li data-row="3" data-col="2" data-sizex="2" data-sizey="1">
|
||||
<div data-id="convergence" data-view="Graph" data-title="Convergence" style="background-color:#ff9618"></div>
|
||||
</li>
|
||||
|
||||
<li data-row="3" data-col="4" data-sizex="1" data-sizey="1">
|
||||
<div data-id="synergy" data-view="Number" data-title="NumSynergy"></div>
|
||||
</li>
|
||||
|
||||
|
||||
<li data-row="4" data-col="1" data-sizex="1" data-sizey="1">
|
||||
<div data-id="comments" data-view="comments" data-title="Comments"></div>
|
||||
<div data-id="website_up" data-view="Text" data-title="Website"></div>
|
||||
</li>
|
||||
|
||||
<li data-row="4" data-col="2" data-sizex="2" data-sizey="1">
|
||||
<div data-id="progress_bars" data-view="ProgressBars" data-title="Project Bars"></div>
|
||||
</li>
|
||||
|
||||
<li data-row="4" data-col="4" data-sizex="1" data-sizey="1">
|
||||
<li data-row="3" data-col="5" data-sizex="1" data-sizey="1">
|
||||
<!-- <style scoped>.memcached_used_memory .gauge { height: 145px;}</style> -->
|
||||
<div data-id="usage_gauge" data-view="UsageGauge" style="background-color: #3e3735" data-title="Power !!"></div>
|
||||
</li>
|
||||
|
@ -1,7 +1,7 @@
|
||||
// ----------------------------------------------------------------------------
|
||||
// Sass declarations
|
||||
// ----------------------------------------------------------------------------
|
||||
$background-color: #dc5945;
|
||||
$background-color: #666666;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Widget-clock styles
|
||||
|
@ -1,7 +1,7 @@
|
||||
// ----------------------------------------------------------------------------
|
||||
// Sass declarations
|
||||
// ----------------------------------------------------------------------------
|
||||
$background-color: #4b4b4b;
|
||||
$background-color: #FFFFFF;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Widget-image styles
|
||||
@ -10,4 +10,4 @@ $background-color: #4b4b4b;
|
||||
|
||||
background-color: $background-color;
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user