Try adding docs
This commit is contained in:
parent
15c0a1ccc0
commit
04e1d9eb91
10 changed files with 144 additions and 74 deletions
13
docs/build.rb
Normal file
13
docs/build.rb
Normal file
|
@ -0,0 +1,13 @@
|
|||
require_relative '../lib/phlexite'
|
||||
require 'phlex'
|
||||
|
||||
module Phlexite
|
||||
module Docs end
|
||||
end
|
||||
|
||||
require_relative 'pages/layout'
|
||||
require_relative 'pages/index'
|
||||
|
||||
Phlexite::Site.new { |s|
|
||||
s.page 'index.html', Phlexite::Docs::Pages::Index.new
|
||||
}
|
10
docs/pages/index.rb
Normal file
10
docs/pages/index.rb
Normal file
|
@ -0,0 +1,10 @@
|
|||
module Phlexite::Docs::Pages
|
||||
class Index < ::Phlex::HTML
|
||||
def view_template
|
||||
render Layout.new {
|
||||
h1 { 'Phlexite' }
|
||||
p { 'Phlexite is a simple static site generator for Ruby.' }
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
29
docs/pages/layout.rb
Normal file
29
docs/pages/layout.rb
Normal file
|
@ -0,0 +1,29 @@
|
|||
module Phlexite::Docs::Pages
|
||||
class Layout < ::Phlex::HTML
|
||||
def view_template
|
||||
doctype
|
||||
html {
|
||||
head {
|
||||
meta charset: 'utf-8'
|
||||
|
||||
meta name: 'viewport', content: 'width=device-width, initial-scale=1.0'
|
||||
title { "Phlexite" }
|
||||
|
||||
link rel: 'stylesheet', href: 'https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css'
|
||||
}
|
||||
body(style: "padding: 0; margin: 0; display: flex; flex-direction: row; height: 100vh; width: 100vw;") {
|
||||
aside(style: 'padding: 30px; min-width: 15%; border-right: 1px solid #6F7887;') {
|
||||
nav {
|
||||
ul {
|
||||
li { a(href: '/') { 'Home' } }
|
||||
}
|
||||
}
|
||||
}
|
||||
div(class: 'container', style: 'padding: 20px') {
|
||||
yield
|
||||
}
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue