about summary refs log tree commit diff
path: root/app/lib/themes.rb
diff options
context:
space:
mode:
authorkibigo! <marrus-sh@users.noreply.github.com>2017-11-20 22:13:37 -0800
committerkibigo! <marrus-sh@users.noreply.github.com>2017-11-20 22:13:37 -0800
commitbdbbd06dad298dc3e1a5f568f4a3ff3635b48f22 (patch)
tree1a475460389053b41f293d27f7c915f0d545d4ad /app/lib/themes.rb
parent321fa41930f8a11356939a1684ff153f2f46443b (diff)
Finalized theme loading and stuff
Diffstat (limited to 'app/lib/themes.rb')
-rw-r--r--app/lib/themes.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/lib/themes.rb b/app/lib/themes.rb
index f7ec22fd2..7ced9f945 100644
--- a/app/lib/themes.rb
+++ b/app/lib/themes.rb
@@ -7,15 +7,27 @@ class Themes
   include Singleton
 
   def initialize
+
+    core = YAML.load_file(Rails.root.join('app', 'javascript', 'core', 'theme.yml'))
+    core['pack'] = Hash.new unless core['pack']
+
     result = Hash.new
     Dir.glob(Rails.root.join('app', 'javascript', 'themes', '*', 'theme.yml')) do |path|
       data = YAML.load_file(path)
       name = File.basename(File.dirname(path))
       if data['pack']
+        data['name'] = name
         result[name] = data
       end
     end
+
+    @core = core
     @conf = result
+
+  end
+
+  def core
+    @core
   end
 
   def get(name)