Permalink
Browse files

Added theme settings to config, changed the index page.

  • Loading branch information...
Petteri Salmi authored and jammi committed Nov 28, 2014
1 parent 666c9e0 commit e5bcefaa819d8e65597146bc8aad3fa623d8a93b
Showing with 12 additions and 5 deletions.
  1. +2 −1 .gitignore
  2. +6 −0 conf/default_conf.yaml
  3. +3 −2 plugins/main/main.rb
  4. +1 −2 plugins/main/tmpl/index.html
View
@@ -1,8 +1,9 @@
conf/local_conf.yaml
var/*
disabled
+client
.DS_Store
*.rbc
*.gem
.rbx/*
-.yardoc*
+.yardoc*
View
@@ -43,6 +43,12 @@
# The default language to use
# * Used in user_info[:lang] as the default
:lang: en
+
+ #
+ # The default theme for client
+ #
+ :default_theme: 'default'
+
#
# The settings for the main plugin
:main_plugin:
View
@@ -61,9 +61,9 @@ def render_index_html
@conf[:deps].each do |dep|
deps_src += %{<script src="#{dep}" type="text/javascript"></script>}
end
- deps_src += %{<script src="__CLIENT_BASE__/js/#{@conf[:boot_lib]}.js"></script>}
+ deps_src += %{<script src="__CLIENT_BASE__/js/#{@conf[:boot_lib]}.js" type="text/javascript"></script>}
@conf[:default_libs].each do |dep|
- deps_src += %{<script src="__CLIENT_BASE__/js/#{dep}.js"></script>}
+ deps_src += %{<script src="__CLIENT_BASE__/js/#{dep}.js" type="text/javascript"></script>}
end
client_base = File.join(@bconf[:h],client_rev)
@@ -316,6 +316,7 @@ def boot0( msg, ses )
msg.reply read_js( 'main' )
+ msg.reply( "HThemeManager.currentTheme = '#{RSence.config[:default_theme]}'" )
msg.reply("ELEM.setStyle(0,'background-color','#{::RSence.config[:main_plugin][:bg_color]}');")
## url_responder is bound in the client-space
@@ -1,9 +1,8 @@
<!DOCTYPE html>
<html><head>
__META__
-<!-- This page is served to you by RSence - http://rsence.org/ -->
<title>__DEFAULT_TITLE__</title>
-<style type="text/css">body{margin:0;padding:0;background-color:#ddd;font-family: Helvetica, Arial, sans-serif;}</style>
+<style type="text/css">body{margin:0;padding:0;}</style>
__SCRIPT_DEPS__
<script>function RSenceInit(){RSence.serverConf('__CLIENT_BASE__','__CLIENT_HELLO__');}</script></head>
<body id="body"><noscript>__NOSCRIPT__</noscript>__BODY__</body></html>

0 comments on commit e5bcefa

Please sign in to comment.