Permalink
Browse files

Move icons and login styles to private public in module

  • Loading branch information...
1 parent f2d082b commit cd859a4d7d01d21d296580d9675840429782ba6e @richtera richtera committed Nov 3, 2012
View
9 lib/core/Module.js
@@ -1,6 +1,7 @@
var app, rootpath = process.cwd() + '/',
path = require('path'),
- calipso = require(path.join('..', 'calipso'));
+ calipso = require(path.join('..', 'calipso'))
+ fs = require('fs');
/**
* Route all of the modules based on the module event model
@@ -358,7 +359,11 @@ function initModules() {
*/
function initModule(module, depends) {
-
+ var p = path.join(calipso.modules[module].router.modulePath, 'public');
+ if ((fs.existsSync || path.existsSync)(p)) {
+ var express = require('express');
+ calipso.app.use(express["static"](p, {maxAge: 86400000}));
+ }
// If the module has no dependencies, kick start it
if (depends || !calipso.modules[module].fn.depends) {
View
26 modules/core/user/public/css/login-icons.css
@@ -0,0 +1,26 @@
+/* line 2, ../sass/login-icons.scss */
+.googleicon {
+ display: block;
+ padding-left: 20px;
+ padding-bottom: 2px;
+ padding-top: 2px;
+ background: url(../images/google.ico) center left no-repeat;
+}
+
+/* line 3, ../sass/login-icons.scss */
+.twittericon {
+ display: block;
+ padding-left: 20px;
+ padding-bottom: 2px;
+ padding-top: 2px;
+ background: url(../images/twitter.ico) center left no-repeat;
+}
+
+/* line 4, ../sass/login-icons.scss */
+.facebookicon {
+ display: block;
+ padding-left: 20px;
+ padding-bottom: 2px;
+ padding-top: 2px;
+ background: url(../images/facebook.ico) center left no-repeat;
+}
View
0 ...ore/cleanslate/public/images/facebook.ico → modules/core/user/public/images/facebook.ico
File renamed without changes.
View
0 .../core/cleanslate/public/images/google.ico → modules/core/user/public/images/google.ico
File renamed without changes.
View
0 ...core/cleanslate/public/images/twitter.ico → modules/core/user/public/images/twitter.ico
File renamed without changes.
View
24 modules/core/user/public/sass/config.rb
@@ -0,0 +1,24 @@
+# Require any additional compass plugins here.
+
+# Set this to the root of your project when deployed:
+http_path = "/"
+css_dir = "../css"
+sass_dir = "."
+images_dir = "../images"
+javascripts_dir = "../js"
+
+# You can select your preferred output style here (can be overridden via the command line):
+# output_style = :expanded or :nested or :compact or :compressed
+
+# To enable relative paths to assets via compass helper functions. Uncomment:
+# relative_assets = true
+
+# To disable debugging comments that display the original location of your selectors. Uncomment:
+# line_comments = false
+
+
+# If you prefer the indented syntax, you might want to regenerate this
+# project again passing --syntax sass, or you can uncomment this:
+# preferred_syntax = :sass
+# and then run:
+# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
View
4 modules/core/user/public/sass/login-icons.scss
@@ -0,0 +1,4 @@
+
+.googleicon { display:block; padding-left:20px; padding-bottom:2px; padding-top:2px; background: url(../images/google.ico) center left no-repeat; }
+.twittericon { display:block; padding-left:20px; padding-bottom:2px; padding-top:2px; background: url(../images/twitter.ico) center left no-repeat; }
+.facebookicon { display:block; padding-left:20px; padding-bottom:2px; padding-top:2px; background: url(../images/facebook.ico) center left no-repeat; }
View
1 modules/core/user/templates/login.html
@@ -1,4 +1,5 @@
<div id="user-login">
+ <link rel="stylesheet" href="/css/login-icons.css" />
<% if(user.anonymous) { %>
<%- form %>
View
1 modules/core/user/templates/loginPage.html
@@ -1,4 +1,5 @@
<div id="login-form" class="stackContent">
+ <link rel="stylesheet" href="/css/login-icons.css" />
<% if(user.anonymous) { %>
<%- form %>
View
31 themes/core/cleanslate/public/css/style.css
@@ -999,29 +999,8 @@ form .section:first-child {
page-break-after: avoid;
}
}
-/* line 605, ../sass/style.scss */
-.googleicon {
- display: block;
- padding-left: 20px;
- padding-bottom: 2px;
- padding-top: 2px;
- background: url(../images/google.ico) center left no-repeat;
-}
-
-/* line 606, ../sass/style.scss */
-.twittericon {
- display: block;
- padding-left: 20px;
- padding-bottom: 2px;
- padding-top: 2px;
- background: url(../images/twitter.ico) center left no-repeat;
-}
-
-/* line 607, ../sass/style.scss */
-.facebookicon {
- display: block;
- padding-left: 20px;
- padding-bottom: 2px;
- padding-top: 2px;
- background: url(../images/facebook.ico) center left no-repeat;
-}
+/*
+.googleicon { display:block; padding-left:20px; padding-bottom:2px; padding-top:2px; background: url(../images/google.ico) center left no-repeat; }
+.twittericon { display:block; padding-left:20px; padding-bottom:2px; padding-top:2px; background: url(../images/twitter.ico) center left no-repeat; }
+.facebookicon { display:block; padding-left:20px; padding-bottom:2px; padding-top:2px; background: url(../images/facebook.ico) center left no-repeat; }
+*/
View
2 themes/core/cleanslate/public/sass/style.scss
@@ -602,6 +602,8 @@ form .section:first-child {border:0;}
h2, h3{ page-break-after: avoid; }
}
+/*
.googleicon { display:block; padding-left:20px; padding-bottom:2px; padding-top:2px; background: url(../images/google.ico) center left no-repeat; }
.twittericon { display:block; padding-left:20px; padding-bottom:2px; padding-top:2px; background: url(../images/twitter.ico) center left no-repeat; }
.facebookicon { display:block; padding-left:20px; padding-bottom:2px; padding-top:2px; background: url(../images/facebook.ico) center left no-repeat; }
+*/

0 comments on commit cd859a4

Please sign in to comment.