diff options
Diffstat (limited to 'new/splash')
-rw-r--r-- | new/splash/.gitignore | 1 | ||||
-rwxr-xr-x | new/splash/bin/server.rb | 10 | ||||
-rw-r--r-- | new/splash/lib/splash.rb | 10 | ||||
-rw-r--r-- | new/splash/lib/splash/server.rb | 7 | ||||
-rw-r--r-- | new/splash/output/.gitkeep | 0 | ||||
-rw-r--r-- | new/splash/pages/index.rb | 29 | ||||
-rw-r--r-- | new/splash/theme/index.erb | 7 |
7 files changed, 64 insertions, 0 deletions
diff --git a/new/splash/.gitignore b/new/splash/.gitignore new file mode 100644 index 0000000..5a7d1dd --- /dev/null +++ b/new/splash/.gitignore @@ -0,0 +1 @@ +**/output/*.html diff --git a/new/splash/bin/server.rb b/new/splash/bin/server.rb new file mode 100755 index 0000000..d932b53 --- /dev/null +++ b/new/splash/bin/server.rb @@ -0,0 +1,10 @@ +#!/usr/bin/env ruby + +require_relative "../lib/splash.rb" +require_relative "../../bin/server.rb" + +server_class = Crys::Splash::Server + +root = File.dirname(File.dirname(__FILE__)) + "/output" +Crys::ServerRunner.new(root: root, server_class: server_class).serve + diff --git a/new/splash/lib/splash.rb b/new/splash/lib/splash.rb new file mode 100644 index 0000000..ce51e17 --- /dev/null +++ b/new/splash/lib/splash.rb @@ -0,0 +1,10 @@ +require_relative "../../lib/crys.rb" +require_relative "splash/server" + +module Crys + module Splash + end +end + + + diff --git a/new/splash/lib/splash/server.rb b/new/splash/lib/splash/server.rb new file mode 100644 index 0000000..5c2a473 --- /dev/null +++ b/new/splash/lib/splash/server.rb @@ -0,0 +1,7 @@ +module Crys + module Splash + class Server < Crys::Server + + end + end +end diff --git a/new/splash/output/.gitkeep b/new/splash/output/.gitkeep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/new/splash/output/.gitkeep diff --git a/new/splash/pages/index.rb b/new/splash/pages/index.rb new file mode 100644 index 0000000..b9772d8 --- /dev/null +++ b/new/splash/pages/index.rb @@ -0,0 +1,29 @@ +require_relative "../lib/theme.rb" + +module Crys + module Splash + class IndexPage < Theme + BODY = ERB.new <<-EOF + <h1><%= title %></h1> + <%= name %> + EOF + + DATA = { + title: "A page", + name: "A name" + } + + PAGE = "index.erb" + + # filename + # other embbeds + # from .erb file + # from .org file + + + + end + end +end + +p Crys::Splash::IndexPage.new.render diff --git a/new/splash/theme/index.erb b/new/splash/theme/index.erb new file mode 100644 index 0000000..ed1dda8 --- /dev/null +++ b/new/splash/theme/index.erb @@ -0,0 +1,7 @@ +<html> +<title> <%= title %> +<head> +<%= body %> + +</head> +</html> |