frontend: add src/css

This commit is contained in:
0x1eef 2023-12-09 19:03:41 -03:00
parent 1cb310babd
commit d5f68b64ab
5 changed files with 8 additions and 118 deletions

View file

@ -5,3 +5,4 @@ gem "nanoc-webpack.rb", github: "0x1eef/nanoc-webpack.rb"
gem "nanoc-tidy.rb", github: "0x1eef/nanoc-tidy.rb" gem "nanoc-tidy.rb", github: "0x1eef/nanoc-tidy.rb"
gem "ryo.rb", github: "0x1eef/ryo.rb" gem "ryo.rb", github: "0x1eef/ryo.rb"
gem "sass", "~> 3.7" gem "sass", "~> 3.7"
gem "rainpress", "~> 1.0"

View file

@ -73,6 +73,7 @@ GEM
psych (5.0.1) psych (5.0.1)
stringio stringio
public_suffix (5.0.4) public_suffix (5.0.4)
rainpress (1.0.1)
rb-fsevent (0.11.2) rb-fsevent (0.11.2)
rb-inotify (0.10.1) rb-inotify (0.10.1)
ffi (~> 1.0) ffi (~> 1.0)
@ -102,6 +103,7 @@ DEPENDENCIES
nanoc (~> 4.12) nanoc (~> 4.12)
nanoc-tidy.rb! nanoc-tidy.rb!
nanoc-webpack.rb! nanoc-webpack.rb!
rainpress (~> 1.0)
ryo.rb! ryo.rb!
sass (~> 3.7) sass (~> 3.7)

View file

@ -1,6 +1,11 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
compile("/layouts/*") { write(nil) } compile("/layouts/*") { write(nil) }
compile("/css/main.scss") do
filter(:sass, syntax: :scss)
filter(:rainpress)
write("/css/main.css")
end
compile '/**/*.html' do compile '/**/*.html' do
layout '/default.*' layout '/default.*'
@ -10,21 +15,4 @@ compile '/**/*.html' do
write item.identifier.without_ext + '/index.html' write item.identifier.without_ext + '/index.html'
end end
end end
# This is an example rule that matches Markdown (.md) files, and filters them
# using the :kramdown filter. It is commented out by default, because kramdown
# is not bundled with Nanoc or Ruby.
#
#compile '/**/*.md' do
# filter :kramdown
# layout '/default.*'
#
# if item.identifier =~ '**/index.*'
# write item.identifier.without_ext + '.html'
# else
# write item.identifier.without_ext + '/index.html'
# end
#end
passthrough "/**/*"
layout '/**/*', :erb layout '/**/*', :erb

View file

View file

@ -1,101 +0,0 @@
* {
margin: 0;
padding: 0;
font-family: Georgia, Palatino, serif;
}
body {
background: #fff;
}
a {
text-decoration: none;
}
a:link,
a:visited {
color: #f30;
}
a:hover {
color: #f90;
}
#main {
position: absolute;
top: 40px;
left: 280px;
width: 500px;
}
#main h1 {
font-size: 40px;
font-weight: normal;
line-height: 40px;
letter-spacing: -1px;
}
#main p {
margin: 20px 0;
font-size: 15px;
line-height: 20px;
}
#main ul, #main ol {
margin: 20px;
}
#main li {
font-size: 15px;
line-height: 20px;
}
#main ul li {
list-style-type: square;
}
#sidebar {
position: absolute;
top: 40px;
left: 20px;
width: 200px;
padding: 20px 20px 0 0;
border-right: 1px solid #ccc;
text-align: right;
}
#sidebar h2 {
text-transform: uppercase;
font-size: 13px;
color: #333;
letter-spacing: 1px;
line-height: 20px;
}
#sidebar ul {
list-style-type: none;
margin: 20px 0;
}
#sidebar li {
font-size: 14px;
line-height: 20px;
}