Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Autogenerate css file by sass when invoked by make.

  • Loading branch information...
commit df3ed4fd3d2076d682a8ba7c020294a803d13af0 1 parent 72eb537
Huan-wen Hsiao authored
View
6 Makefile.PL
@@ -40,14 +40,16 @@ auto_set_repository;
install_share;
clean_files "share/static/gen/*.js";
+clean_files "share/static/gen/*.sass";
WriteAll;
sub MY::postamble {
return <<'MAKE_FRAG';
-all:: buildjs
+all:: build_css_and_jss
-buildjs:
+build_css_and_jss:
$(PERL) utils/build.pl
+
MAKE_FRAG
}
View
0  share/static/tschart.sass → sass/tschart.sass
File renamed without changes
View
239 share/static/tschart.css
@@ -1,239 +0,0 @@
-body {
- background: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.1)), to(rgba(0, 0, 0, 0.3)));
- position: relative; }
-
-div#header {
- position: absolute;
- height: 10px;
- left: 10px;
- top: 0px; }
-div#trade-header {
- height: 10px;
- position: absolute;
- right: 10px;
- top: 0px; }
-
-#header .price.up, #trade-header .up {
- color: red; }
-
-#header .price.down, #trade-header .down {
- color: green; }
-
-#header .span {
- margin: 0; }
-
-span.xlabel.cursor {
- -webkit-transform: rotateZ(-10deg);
- -webkit-transition-property: top;
- -webkit-transition-duration: 0.1s;
- -webkit-transition-timing-function: easeout;
- -moz-transform: rotate(-10deg);
- -moz-transition-property: top;
- -moz-transition-duration: 0.1s;
- -moz-transition-timing-function: easeout;
- background-color: orange;
- color: white;
- z-index: 9; }
-span.ylabel.cursor {
- -webkit-transform: rotateZ(-10deg);
- -webkit-transition-property: top;
- -webkit-transition-duration: 0.1s;
- -webkit-transition-timing-function: easeout;
- -moz-transform: rotate(-10deg);
- -moz-transition-property: top;
- -moz-transition-duration: 0.1s;
- -moz-transition-timing-function: easeout;
- background-color: orange;
- color: white;
- z-index: 9; }
-span.ylabel.order {
- color: white;
- z-index: 2; }
- span.ylabel.order.filled {
- -webkit-transition-property: opacity;
- -webkit-transition-duration: 5s;
- -moz-transition-property: opacity;
- -moz-transition-duration: 5s;
- opacity: 0.1; }
-span.ylabel.low {
- -webkit-transform: rotateZ(-10deg);
- -webkit-box-reflect: below -1px -webkit-gradient(linear, 0% 0%, 0% 100%, from(transparent), to(rgba(255, 255, 255, 0.393))) 0 0 0 0 stretch stretch;
- -moz-transform: rotate(-10deg);
- -moz-box-reflect: below -1px -moz-gradient(linear, 0% 0%, 0% 100%, from(transparent), to(rgba(255, 255, 255, 0.393))) 0 0 0 0 stretch stretch;
- background-color: green;
- color: white;
- z-index: 1; }
-span.ylabel.high {
- -webkit-transform: rotateZ(-10deg);
- -webkit-box-reflect: above -1px -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(255, 255, 255, 0.393)), to(transparent)) 0 0 0 0 stretch stretch;
- -moz-transform: rotate(-10deg);
- -moz-box-reflect: above -1px -moz-gradient(linear, 0% 0%, 0% 100%, from(rgba(255, 255, 255, 0.393)), to(transparent)) 0 0 0 0 stretch stretch;
- background-color: red;
- color: white;
- z-index: 1; }
-
-div.hcursor {
- border-top-style: solid;
- border-top-width: 1px;
- height: 0px;
- left: 0px;
- position: absolute;
- width: 100%;
- cursor: crosshair; }
-div.vcursor {
- border-left-style: solid;
- border-left-width: 1px;
- position: absolute;
- width: 0px;
- top: 0px;
- cursor: crosshair; }
-div.order-line {
- border-top-style: solid;
- border-top-width: 1px;
- height: 0px;
- margin-top: -50%;
- margin-left: -100%;
- position: absolute;
- width: 100%; }
-div.yaxis-line {
- border-top-style: solid;
- border-top-color: balack;
- border-top-width: 1px;
- height: 0px;
- margin-top: -50%;
- position: absolute;
- opacity: 0.2; }
-
-span.order.submitted div.order-line {
- border-top-style: dotted; }
-span.order.pending div.order-line {
- border-top-style: dashed; }
-
-div.infobox {
- background: rgba(255, 255, 255, 0.59);
- text-shadow: white 3px 3px 3px;
- color: black;
- border: 1px solid black;
- font-size: smaller;
- width: 120px;
- overflow: hidden;
- padding: 5px;
- position: absolute;
- white-space: pre;
- z-index: 2; }
-
-#holder {
- border: black 1px solid;
- margin: 0;
- position: relative;
- height: 600px;
- left: 10px;
- width: 800px;
- -moz-user-select: none;
- -khtml-user-select: none;
- -webkit-user-select: none;
- -o-user-select: none; }
-
-#connection-status {
- position: absolute;
- top: 0px;
- right: 0px;
- background-color: red; }
- #connection-status.connected {
- background-color: lime;
- display: none; }
-
-#drawing-control {
- display: none; }
-
-span.draw-prop {
- padding: 1em; }
-
-div.chat {
- position: absolute;
- right: 0px;
- top: 0px;
- width: 250px; }
-div.chat-messages {
- width: 100%;
- overflow-y: auto;
- overflow-x: hidden; }
-
-input#chat {
- width: 100%;
- height: 100px;
- font-size: 1.2em; }
-
-table#messages {
- margin-top: 1em;
- margin-right: 3em;
- width: 100%; }
-
-tr.message {
- height: 1em; }
-
-.chat-message {
- width: 70%;
- word-break: break-all; }
- .chat-message .name {
- font-weight: bold; }
-
-.user-list span {
- margin-left: 0.5em;
- margin-right: 0.5em; }
-
-span.cancel-order {
- margin-left: 0.5em;
- text-decoration: underline;
- background: #ee0000;
- border-color: #aaaaaa black black #aaaaaa;
- border-style: solid;
- border-width: 1px;
- color: white;
- cursor: pointer; }
- span.cancel-order:hover {
- background: red;
- border-color: black #aaaaaa #aaaaaa black; }
-
-.ui-layout-toggler-east span.content-closed {
- -webkit-transform: rotate(90deg);
- -moz-transform: rotate(90deg);
- background: green;
- color: orange;
- margin-left: -20px;
- width: 50px; }
-
-.contextMenu {
- position: absolute;
- z-index: 99999;
- border: solid 1px #cccccc;
- background: #eeeeee;
- padding: 0px;
- margin: 0px;
- display: none; }
- .contextMenu LI {
- list-style: none;
- padding: 0px;
- margin: 0px;
- overflow: hidden; }
- .contextMenu A {
- color: #333333;
- text-decoration: none;
- display: block;
- line-height: 2em;
- height: 2em;
- background-position: 6px center;
- background-repeat: no-repeat;
- outline: none;
- padding: 1px 5px;
- padding-left: 28px; }
- .contextMenu LI.hover A {
- color: white;
- background-color: #3399ff; }
- .contextMenu LI.disabled A {
- color: #aaaaaa;
- cursor: default; }
- .contextMenu LI.hover.disabled A {
- background-color: transparent; }
- .contextMenu LI.separator {
- border-top: solid 1px #cccccc; }
View
2  share/templates/base_session.tx
@@ -15,7 +15,7 @@
<link rel="stylesheet" href="/static/screen.css" type="text/css" />
% block css -> {
-<link rel="stylesheet" href="/static/tschart.css" type="text/css" />
+<link rel="stylesheet" href="/static/gen/tschart.css" type="text/css" />
<link href="/static/jquery.alerts.css" rel="stylesheet" type="text/css" media="screen" />
% }
View
12 utils/build.pl
@@ -2,13 +2,21 @@
use strict;
use File::Path;
use IPC::Cmd qw(can_run);
-my @files = <coffee/*.coffee>;
+my @js_files = <coffee/*.coffee>;
+my @css_files = <sass/*.sass>;
my $coffee_path = can_run('coffee') or die 'coffee is not installed!';
+my $sass_path = can_run('sass') or die 'sass is not installed!';
mkpath ['share/static/gen'];
-for (@files) {
+for (@js_files) {
my ($name) = m/.*?\/([^.]+)\.coffee/;
print "coffee/$name.coffee -> share/static".$/;
system("$coffee_path -c -o share/static/gen coffee/$name.coffee");
}
+
+for (@css_files) {
+ my ($name) = m/.*?\/([^.]+)\.sass/;
+ print "sass/$name.sass -> share/static".$/;
+ system("$sass_path sass/$name.sass share/static/gen/$name.css");
+}
Please sign in to comment.
Something went wrong with that request. Please try again.