From 3249a3a131ae5d28b42ba70b85839314ed7c227c Mon Sep 17 00:00:00 2001 From: realtradam Date: Thu, 21 Apr 2022 08:51:32 -0400 Subject: prettified --- CHANGELOG.md | 6 +++ Justicar.gemspec | 2 +- README.mdown | 5 ++ lib/Justicar.rb | 3 -- lib/Justicar/version.rb | 2 +- logo/justicar_logo.svg | 119 +++++++++++++++++++++++++++++++++++++++++++ template/Gemfile | 9 ++++ template/Gemfile.lock | 29 +++++++++++ template/public/favicon.ico | Bin 0 -> 15406 bytes template/public/favicon.png | Bin 0 -> 1566 bytes template/public/justicar.png | Bin 0 -> 38093 bytes template/src/index.html.rb | 2 + template/src/style.css.rb | 13 +++++ 13 files changed, 185 insertions(+), 5 deletions(-) create mode 100644 logo/justicar_logo.svg create mode 100644 template/Gemfile create mode 100644 template/Gemfile.lock create mode 100644 template/public/favicon.ico create mode 100644 template/public/favicon.png create mode 100644 template/public/justicar.png diff --git a/CHANGELOG.md b/CHANGELOG.md index 148f4a9..5407279 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ ## [Unreleased] +## [0.1.1] - 2022-04-21 + +- Better template +- Cleanup some print statements +- Logos and prettified readme + ## [0.1.0] - 2022-04-20 - Initial release diff --git a/Justicar.gemspec b/Justicar.gemspec index b33f7d0..8b690af 100644 --- a/Justicar.gemspec +++ b/Justicar.gemspec @@ -24,7 +24,7 @@ Gem::Specification.new do |spec| # The `git ls-files -z` loads the files in the RubyGem that have been added into git. spec.files = Dir.chdir(__dir__) do `git ls-files -z`.split("\x0").reject do |f| - (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)}) + (f == __FILE__) || f.match(%r{\A(?:(?:bin|logo|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)}) end end spec.bindir = "exe" diff --git a/README.mdown b/README.mdown index 19cd579..1252553 100644 --- a/README.mdown +++ b/README.mdown @@ -1,5 +1,10 @@ + ![Justicar](https://github.com/realtradam/Justicar/blob/master/template/public/justicar.png?raw=true) + # Justicar +[![MIT License](https://img.shields.io/github/license/realtradam/Justicar?style=flat)](https://github.com/realtradam/Justicar/blob/master/LICENSE.txt) +[![Ko-Fi](https://img.shields.io/static/v1?message=Buy%20me%20a%20coffee&logo=kofi&labelColor=ff5e5b&color=434B57&logoColor=white&label=%20)](https://ko-fi.com/tradam) + A Ruby obsessed static website generator that does web development Justice! ## Installation diff --git a/lib/Justicar.rb b/lib/Justicar.rb index e57845e..5abf901 100644 --- a/lib/Justicar.rb +++ b/lib/Justicar.rb @@ -54,10 +54,8 @@ class Justicar FileUtils.mkdir target_dir end hash.each do |key, val| - puts "key: #{key}, val: #{val}" if val.is_a? String file_name, type, _rb = key.to_s.split('.') - puts "filename: #{file_name}, type: #{type}" File.open("#{target_dir}/#{file_name}.#{type}", "w") do |file| file.write(val) end @@ -68,7 +66,6 @@ class Justicar self.build("#{target_dir}/#{key}", hash) end end - puts File.expand_path(File.dirname(__FILE__)) end def output diff --git a/lib/Justicar/version.rb b/lib/Justicar/version.rb index 36efc46..55f99c0 100644 --- a/lib/Justicar/version.rb +++ b/lib/Justicar/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true class Justicar - VERSION = "0.1.0" + VERSION = "0.1.1" end diff --git a/logo/justicar_logo.svg b/logo/justicar_logo.svg new file mode 100644 index 0000000..f1b1c7f --- /dev/null +++ b/logo/justicar_logo.svg @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/template/Gemfile b/template/Gemfile new file mode 100644 index 0000000..be6f9dc --- /dev/null +++ b/template/Gemfile @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +source "https://rubygems.org" + +gem "webrick", "~> 1.7" + +gem "opal-browser", "~> 0.3.3" + +gem "Justicar", "~> 0.1.0" diff --git a/template/Gemfile.lock b/template/Gemfile.lock new file mode 100644 index 0000000..7072eae --- /dev/null +++ b/template/Gemfile.lock @@ -0,0 +1,29 @@ +GEM + remote: https://rubygems.org/ + specs: + Justicar (0.1.0) + opal (~> 1.5) + opal-browser (~> 0.3.3) + paggio (~> 0.3.0) + ast (2.4.2) + opal (1.5.0) + ast (>= 2.3.0) + parser (~> 3.0, >= 3.0.3.2) + opal-browser (0.3.3) + opal (>= 1.0, < 2.0) + paggio (>= 0.3.0) + paggio (0.3.0) + parser (3.1.2.0) + ast (~> 2.4.1) + webrick (1.7.0) + +PLATFORMS + x86_64-linux + +DEPENDENCIES + Justicar (~> 0.1.0) + opal-browser (~> 0.3.3) + webrick (~> 1.7) + +BUNDLED WITH + 2.3.12 diff --git a/template/public/favicon.ico b/template/public/favicon.ico new file mode 100644 index 0000000..0ec3748 Binary files /dev/null and b/template/public/favicon.ico differ diff --git a/template/public/favicon.png b/template/public/favicon.png new file mode 100644 index 0000000..5a99253 Binary files /dev/null and b/template/public/favicon.png differ diff --git a/template/public/justicar.png b/template/public/justicar.png new file mode 100644 index 0000000..252bac4 Binary files /dev/null and b/template/public/justicar.png differ diff --git a/template/src/index.html.rb b/template/src/index.html.rb index cefcf6f..9c34064 100644 --- a/template/src/index.html.rb +++ b/template/src/index.html.rb @@ -1,6 +1,8 @@ Paggio.html do script type: "text/javascript", src: "script.js" link rel: "stylesheet", href: "style.css" + link rel: 'icon', type: 'image/x-icon', href: 'favicon.ico' + img.justicar(src: 'justicar.png', alt: 'Justicar', height: '400px') h1 { "Hello world from Justicar" } hr h2.paggio do diff --git a/template/src/style.css.rb b/template/src/style.css.rb index d9684e3..9a41dad 100644 --- a/template/src/style.css.rb +++ b/template/src/style.css.rb @@ -1,4 +1,17 @@ Paggio.css do + rule 'body' do + height 100.vh + end + + rule '.justicar' do + top 134.px + left 360.px + opacity 0.7 + position 'absolute' + width 400.px + height 'auto' + end + rule '.opal' do color :dodgerblue end -- cgit v1.2.3