summaryrefslogtreecommitdiff
path: root/new
diff options
context:
space:
mode:
authormms <git@sapka.me>2025-01-05 22:34:37 +0100
committermms <git@sapka.me>2025-01-05 22:34:37 +0100
commit628fcf941c322dd0ed24a643c58394392484740e (patch)
tree87d1812f5bb27e9edfb9d8b812e03a3e115d0307 /new
parent89c6116c671c7701f86854111dd58a1933551b6e (diff)
bookmark dump
Diffstat (limited to 'new')
-rwxr-xr-xnew/splash/bin/build.rb11
-rwxr-xr-xnew/splash/bin/server.rb10
-rw-r--r--new/splash/lib/splash.rb11
-rw-r--r--new/splash/lib/splash/builder.rb8
-rw-r--r--new/splash/lib/splash/server.rb3
-rw-r--r--new/splash/pages/.dir-locals.el1
-rw-r--r--new/splash/pages/index.html.erb9
-rw-r--r--new/splash/pages/index.rb29
-rw-r--r--new/splash/theme/index.erb7
9 files changed, 42 insertions, 47 deletions
diff --git a/new/splash/bin/build.rb b/new/splash/bin/build.rb
new file mode 100755
index 0000000..404431f
--- /dev/null
+++ b/new/splash/bin/build.rb
@@ -0,0 +1,11 @@
+#!/usr/bin/env ruby
+# frozen_string_literal: true
+
+require_relative '../lib/splash'
+require_relative '../../bin/builder'
+
+builder_class = Crys::Splash::Builder
+output_dir = "#{File.dirname(File.dirname(__FILE__))}/output"
+file_path = "#{File.dirname(File.dirname(__FILE__))}/pages/#{@options[:filepath]}"
+
+Crys::BuilderRunner.new(file_path: file_path, output_dir: output_dir, builder_class: builder_class).run
diff --git a/new/splash/bin/server.rb b/new/splash/bin/server.rb
index 9da053a..15b3432 100755
--- a/new/splash/bin/server.rb
+++ b/new/splash/bin/server.rb
@@ -1,10 +1,10 @@
#!/usr/bin/env ruby
+# frozen_string_literal: true
-require_relative "../lib/splash.rb"
-require_relative "../../bin/server.rb"
+require_relative '../lib/splash'
+require_relative '../../bin/server'
server_class = Crys::Splash::Server
-root = File.dirname(File.dirname(__FILE__)) + "/output"
-Crys::ServerRunner.new(root: root, server_class: server_class, section: "Splash Page").serve
-
+root = "#{File.dirname(File.dirname(__FILE__))}/output"
+Crys::ServerRunner.new(root: root, server_class: server_class, section: 'Splash Page').serve
diff --git a/new/splash/lib/splash.rb b/new/splash/lib/splash.rb
index ce51e17..68674f9 100644
--- a/new/splash/lib/splash.rb
+++ b/new/splash/lib/splash.rb
@@ -1,10 +1,11 @@
-require_relative "../../lib/crys.rb"
-require_relative "splash/server"
+# frozen_string_literal: true
+
+require_relative '../../lib/crys'
+
+require_relative 'splash/server'
+require_relative 'splash/builder'
module Crys
module Splash
end
end
-
-
-
diff --git a/new/splash/lib/splash/builder.rb b/new/splash/lib/splash/builder.rb
new file mode 100644
index 0000000..5a737e9
--- /dev/null
+++ b/new/splash/lib/splash/builder.rb
@@ -0,0 +1,8 @@
+# frozen_string_literal: true
+
+module Crys
+ module Splash
+ class Builder < Crys::Builder
+ end
+ end
+end
diff --git a/new/splash/lib/splash/server.rb b/new/splash/lib/splash/server.rb
index 5c2a473..688d701 100644
--- a/new/splash/lib/splash/server.rb
+++ b/new/splash/lib/splash/server.rb
@@ -1,7 +1,8 @@
+# frozen_string_literal: true
+
module Crys
module Splash
class Server < Crys::Server
-
end
end
end
diff --git a/new/splash/pages/.dir-locals.el b/new/splash/pages/.dir-locals.el
new file mode 100644
index 0000000..4e2be03
--- /dev/null
+++ b/new/splash/pages/.dir-locals.el
@@ -0,0 +1 @@
+((nil . ((add-hook 'after-save-hook ('message :a))))
diff --git a/new/splash/pages/index.html.erb b/new/splash/pages/index.html.erb
new file mode 100644
index 0000000..d033c90
--- /dev/null
+++ b/new/splash/pages/index.html.erb
@@ -0,0 +1,9 @@
+<html>
+ <head>
+ <title>It works!</title>
+ </head>
+ <body>
+ <h1>Test</h1>
+ Last update: <%= Time.now %>
+ </body>
+</html>
diff --git a/new/splash/pages/index.rb b/new/splash/pages/index.rb
deleted file mode 100644
index b9772d8..0000000
--- a/new/splash/pages/index.rb
+++ /dev/null
@@ -1,29 +0,0 @@
-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
deleted file mode 100644
index ed1dda8..0000000
--- a/new/splash/theme/index.erb
+++ /dev/null
@@ -1,7 +0,0 @@
-<html>
-<title> <%= title %>
-<head>
-<%= body %>
-
-</head>
-</html>