initial commit
This commit is contained in:
commit
a7350363be
7 changed files with 77 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
_build/
|
8
Gemfile
Normal file
8
Gemfile
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
source "https://rubygems.org"
|
||||||
|
|
||||||
|
# gem "rails"
|
||||||
|
|
||||||
|
gem "phlex", "~> 1.11"
|
||||||
|
gem "phlexite", "~> 0.1.3"
|
16
Gemfile.lock
Normal file
16
Gemfile.lock
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
GEM
|
||||||
|
remote: https://rubygems.org/
|
||||||
|
specs:
|
||||||
|
phlex (1.11.0)
|
||||||
|
phlexite (0.1.3)
|
||||||
|
|
||||||
|
PLATFORMS
|
||||||
|
arm64-darwin-23
|
||||||
|
ruby
|
||||||
|
|
||||||
|
DEPENDENCIES
|
||||||
|
phlex (~> 1.11)
|
||||||
|
phlexite (~> 0.1.3)
|
||||||
|
|
||||||
|
BUNDLED WITH
|
||||||
|
2.5.18
|
14
assets/site.css
Normal file
14
assets/site.css
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
:root {
|
||||||
|
font-family:
|
||||||
|
system-ui,
|
||||||
|
-apple-system,
|
||||||
|
BlinkMacSystemFont,
|
||||||
|
"Segoe UI",
|
||||||
|
Roboto,
|
||||||
|
Oxygen,
|
||||||
|
Ubuntu,
|
||||||
|
Cantarell,
|
||||||
|
"Open Sans",
|
||||||
|
"Helvetica Neue",
|
||||||
|
sans-serif;
|
||||||
|
}
|
10
build.rb
Normal file
10
build.rb
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
require "phlex"
|
||||||
|
require "phlexite"
|
||||||
|
|
||||||
|
require_relative "pages/layout"
|
||||||
|
require_relative "pages/home"
|
||||||
|
|
||||||
|
Phlexite::Site.new { |s|
|
||||||
|
s.mount "assets", on: "/"
|
||||||
|
s.page "index.html", Pages::Home.new
|
||||||
|
}
|
7
pages/home.rb
Normal file
7
pages/home.rb
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
class Pages::Home < ::Phlex::HTML
|
||||||
|
def view_template
|
||||||
|
render ::Pages::Layout.new("Home") {
|
||||||
|
h1 { "Home" }
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
21
pages/layout.rb
Normal file
21
pages/layout.rb
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
module Pages
|
||||||
|
class Layout < ::Phlex::HTML
|
||||||
|
def initialize(title)
|
||||||
|
@title = title
|
||||||
|
end
|
||||||
|
def view_template
|
||||||
|
doctype
|
||||||
|
html {
|
||||||
|
head {
|
||||||
|
title { @title + " | Aleks Rūtiņš" }
|
||||||
|
meta(charset: "utf-8")
|
||||||
|
meta(name: "viewport", content: "width=device-width, initial-scale=1.0")
|
||||||
|
link(rel: "stylesheet", href: "/site.css")
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
yield
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Add table
Add a link
Reference in a new issue