mirror of
https://github.com/ralsina/tartrazine.git
synced 2025-08-31 18:57:30 +00:00
Implemented decent version of the CLI
This commit is contained in:
@@ -10,6 +10,11 @@ require "xml"
|
||||
module Tartrazine
|
||||
alias Color = Sixteen::Color
|
||||
|
||||
class ThemeFiles
|
||||
extend BakedFileSystem
|
||||
bake_folder "../styles", __DIR__
|
||||
end
|
||||
|
||||
def self.theme(name : String) : Theme
|
||||
begin
|
||||
return Theme.from_base16(name)
|
||||
@@ -23,9 +28,16 @@ module Tartrazine
|
||||
end
|
||||
end
|
||||
|
||||
class ThemeFiles
|
||||
extend BakedFileSystem
|
||||
bake_folder "../styles", __DIR__
|
||||
# Return a list of all themes
|
||||
def self.themes
|
||||
themes = Set(String).new
|
||||
ThemeFiles.files.each do |file|
|
||||
themes << file.path.split("/").last.split(".").first
|
||||
end
|
||||
Sixteen::DataFiles.files.each do |file|
|
||||
themes << file.path.split("/").last.split(".").first
|
||||
end
|
||||
themes.to_a.sort!
|
||||
end
|
||||
|
||||
class Style
|
||||
|
Reference in New Issue
Block a user