Commits

Sachirou Inoue committed bb48f3b

Minimize CSS by YUICompressor.

Comments (0)

Files changed (5)

 
 group :development do
   gem 'shotgun'
+  #gem 'ruby-debug19', :require => 'ruby-debug'
 end
 
 desc 'compile SCSS.'
 task :scss do
-  style_path = 'public/styles'
-  Dir["#{style_path}/*.scss"].each do |filename|
-    sh "sass #{filename} #{style_path}/#{File.basename filename, '.scss'}.css"
+  style_dir = 'public/styles'
+  compressor_path = '_resources/yuicompressor-2.4.7.jar'
+  Dir["#{style_dir}/*.scss"].each do |filename|
+    basename = "#{style_dir}/#{File.basename filename, '.scss'}"
+    sh "sass #{filename} #{basename}.css; " +
+       "java -jar #{compressor_path} -o #{basename}.min.css #{basename}.css"
   end
 end
 
 desc 'compile JS by Google ClosureCompiler.'
 task :js do
-  script_path = 'public/scripts'
+  script_dir = 'public/scripts'
   compiler_path = '_resources/compiler.jar'
-  ['barnner'].each do |name|
-    sh "java -jar #{compiler_path} --compilation_level SIMPLE_OPTIMIZATIONS --js #{script_path}/#{name}.js --js_output_file #{script_path}/#{name}.min.js "
+  ['barnner', '../game/Sp2game'].each do |name|
+    sh "java -jar #{compiler_path} --compilation_level SIMPLE_OPTIMIZATIONS --js #{script_dir}/#{name}.js --js_output_file #{script_dir}/#{name}.min.js "
   end
 end
 

public/styles/_working.min.css

+#workingContent{width:80%;float:right;border-left:1px solid #fff}#workingSidemenu{width:19%;float:left}#workingSidemenu ol{list-style-type:none;margin:0;padding:0}#workingSidemenu ol li{display:block;width:100%;height:3em}#workingSidemenu ol li+li{border-top:1px solid #f99}#workingSidemenu ol li a{display:block;width:100%;height:100%;background-color:#966;background-color:rgba(128,63,64,0.4);color:#fff}#workingSidemenu ol li a:hover,#workingSidemenu ol li a:focus{background-color:#fff;background-color:rgba(255,255,255,0.4);color:#f33}

public/styles/style.min.css

+@charset "UTF-8";body{background-color:#000;background-image:url("/images/SpinorNetwork_bg.jpg");background-attachment:fixed;background-repeat:no-repeat;line-height:1.2em}p{margin:0;padding:0}a{color:#33f;text-decoration:underline}a:visited{color:#f3f}a:hover,a:active{color:#f33;text-decoration:underline overline}.iconTwitter{float:left;display:block;width:16px;height:16px;background-image:url("/images/icons.png");background-repeat:none;background-position:0 -0px}.iconFacebook{float:left;display:block;width:16px;height:16px;background-image:url("/images/icons.png");background-repeat:none;background-position:0 -16px}.iconSkype{float:left;display:block;width:16px;height:16px;background-image:url("/images/icons.png");background-repeat:none;background-position:0 -32px}.iconProfile{float:left;display:block;width:16px;height:16px;background-image:url("/images/icons.png");background-repeat:none;background-position:0 -48px}.iconSoundcloud{float:left;display:block;width:16px;height:16px;background-image:url("/images/icons.png");background-repeat:none;background-position:0 -64px}.iconLastfm{float:left;display:block;width:16px;height:16px;background-image:url("/images/icons.png");background-repeat:none;background-position:0 -80px}.iconVimeo{float:left;display:block;width:16px;height:16px;background-image:url("/images/icons.png");background-repeat:none;background-position:0 -96px}.iconGplus{float:left;display:block;width:16px;height:16px;background-image:url("/images/icons.png");background-repeat:none;background-position:0 -112px}.container{position:relative;width:96%;left:2%;top:1em;background-color:#000;background-color:rgba(0,0,0,0.6);color:#fff;font-size:10pt;font-family:"TakaoExゴシック","ヒラギノ角ゴ Pro W3","メイリオ",sans-serif;-moz-box-shadow:0 0 2px rgba(255,255,255,0.8);-wibkit-box-shadow:0 0 2px rgba(255,255,255,0.8);box-shadow:0 0 2px rgba(255,255,255,0.8)}header{position:relative;width:100%;height:125px}header .headerLogo{position:absolute;height:75px;width:130px;top:0;left:0}header h1{position:relative;margin:0;padding:0;width:100%;height:75px;top:.5em;left:0;text-align:center}header nav{position:relative;width:100%;height:50px;top:0;left:0}header nav .item{float:left;width:25%;height:100%;text-align:center;font-size:11pt;-moz-box-shadow:0 0 2px black;-wibkit-box-shadow:0 0 2px black;box-shadow:0 0 2px black}header nav .item a{display:block;width:100%;height:100%;background:#c33;color:#fff}header nav .item a:hover{background:#c66}header nav .item a:active{background:#f66}.main{position:relative;width:100%;top:0;left:0}.main>article{float:left;position:relative;width:70%;top:0;left:0;padding-left:.1em;border-right:1px solid #ccc}.main>article .barnner{display:block;width:432px;height:117px}.main>article h2{padding-top:.5em;padding-bottom:.5em;padding-left:.5em;background:#101010;border-top:1px dotted #999;border-radius:6px;color:red;text-shadow:0 0 2px #ccc;-moz-box-shadow:0 -1px 0 white;-wibkit-box-shadow:0 -1px 0 white;box-shadow:0 -1px 0 white}.main>article h3{padding-top:.2em;padding-left:.2em;color:yellow;text-shadow:1px 1px 2px #999}.main>article blockquote{background-color:#101010;background-color:rgba(16,16,16,0.4);background-image:url("/images/mmng2.png");background-position:right bottom;padding:12px;border-radius:12px;color:#ffc}.main>article .contents{position:relative;width:100%;top:0;left:0}.main>aside{float:right;position:relative;top:0;right:0;width:29%}.main>aside h2{font-size:large;font-weight:bold}footer{clear:both;position:relative;border-top:1px solid #ccc;font-size:smaller;text-align:right}.spacerAfterFooter{position:relative;top:1em;height:1em}@media screen and (min-width:0) and (max-device-width:480px){body{font-size:12pt}img,canvas{max-width:100%}.container{width:100%;left:0}header{height:auto}header h1{line-height:1.2em}header .headerLogo{width:50px;height:29px}header nav .item{float:none;width:100%;height:25px}.main>article,.main>aside{float:none;width:100%;top:auto;left:auto;right:auto}.main .barnner{display:none!important}.main .contents{top:117px!important}}#workingContent{width:80%;float:right;border-left:1px solid #fff}#workingSidemenu{width:19%;float:left}#workingSidemenu ol{list-style-type:none;margin:0;padding:0}#workingSidemenu ol li{display:block;width:100%;height:3em}#workingSidemenu ol li+li{border-top:1px solid #f99}#workingSidemenu ol li a{display:block;width:100%;height:100%;background-color:#966;background-color:rgba(128,63,64,0.4);color:#fff}#workingSidemenu ol li a:hover,#workingSidemenu ol li a:focus{background-color:#fff;background-color:rgba(255,255,255,0.4);color:#f33}
   <!--<link rel="icon" type="image/vnd.microsoft.icon" href="/favicon.ico" />-->
   <link rel="icon" type="image/png" href="/images/favicon.png" />
   <link rel="stylesheet" href="/styles/normalize.css" />
-  <link rel="stylesheet" href="/styles/style.css" />
+  <link rel="stylesheet" href="/styles/style.min.css" />
 </head>
 <body>
 	<div class="container">
     </footer>
   </div>
   <div class="spacerAfterFooter"></div>
-  <!--[if lt IE 9]> 
-    <script src="/scripts/html5.js"></script> 
+  <!--[if lt IE 9]>
+    <script src="/scripts/html5.js"></script>
   <![endif]-->
   <script src="/scripts/es5.min.js"></script>
   <!--