diff --git a/README.md b/README.md index d3d3108..5438794 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,16 @@ installed to build the website from source: * NodeJS v18.15 (or later) * [tidy-html5](https://github.com/htacg/tidy-html5) +### Optional + +The following tools are used during the generation of the +website's favicons. The favicons generally do not change +and unless you're working with the favicons directly you +won't need to install these tools: + +* rsgv-convert (via [libsvg2](https://gnome.pages.gitlab.gnome.org/librsvg/Rsvg-2.0/overview.html)) +* convert (via [ImageMagick](https://imagemagick.org/)) + ### Examples # Clone repository diff --git a/Rakefile.rb b/Rakefile.rb index 611debe..7705ce4 100644 --- a/Rakefile.rb +++ b/Rakefile.rb @@ -19,4 +19,5 @@ load "rake/tasks/nanoc.rake" load "rake/tasks/t.rake" load "rake/tasks/ci.rake" load "rake/tasks/server.rake" +load "rake/tasks/favicon.rake" task default: "nanoc:build" diff --git a/rake/tasks/favicon.rake b/rake/tasks/favicon.rake new file mode 100644 index 0000000..e985eda --- /dev/null +++ b/rake/tasks/favicon.rake @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +namespace :favicon do + task :png do + %w[256 128 64 48 32 16].each do |size| + infile = File.join(dirs.root, "src", "images", "favicon.svg") + outfile = File.join(dirs.root, "src", "images", "favicon-#{size}x#{size}.png") + argv = ["-h", size, "-w", size, "-a", "-f", "png", infile, "-o", outfile] + sh "rsvg-convert", *argv + end + end + + task :ico do + png = Dir.glob File.join(dirs.root, "src", "images", "favicon-*.png") + ico = File.join(dirs.root, "src", "favicon.ico") + sh "convert", *png, ico + end +end + +desc "Generate favicons" +task favicon: %i[favicon:png favicon:ico] diff --git a/share/al-quran.reflectslight.io/CHANGELOG b/share/al-quran.reflectslight.io/CHANGELOG index 734b6f9..51dd543 100644 --- a/share/al-quran.reflectslight.io/CHANGELOG +++ b/share/al-quran.reflectslight.io/CHANGELOG @@ -2,6 +2,14 @@ * vNEXT +** Add ~favicon.rake~ +The new rake task ~favicon~ can generate the favicon set +from ~favicon.svg~ in a way that's reproducible and automated. + +In the process the favicons have been regenerated, and +the misalignment that existed in ~favicon.svg~ has been +fixed + ** Large screen optimization On large screens - the content now has a maximum height of ~$breakpoint-md~, and the content is both vertically diff --git a/src/favicon.ico b/src/favicon.ico index 4e34ef0..42439dc 100644 Binary files a/src/favicon.ico and b/src/favicon.ico differ diff --git a/src/images/favicon-128x128.png b/src/images/favicon-128x128.png index c860ddd..12c294f 100644 Binary files a/src/images/favicon-128x128.png and b/src/images/favicon-128x128.png differ diff --git a/src/images/favicon-16x16.png b/src/images/favicon-16x16.png index 8ab4942..8ab2790 100644 Binary files a/src/images/favicon-16x16.png and b/src/images/favicon-16x16.png differ diff --git a/src/images/favicon-256x256.png b/src/images/favicon-256x256.png index bdd41e9..f09c897 100644 Binary files a/src/images/favicon-256x256.png and b/src/images/favicon-256x256.png differ diff --git a/src/images/favicon-32x32.png b/src/images/favicon-32x32.png index 1844d0b..30b572f 100644 Binary files a/src/images/favicon-32x32.png and b/src/images/favicon-32x32.png differ diff --git a/src/images/favicon-48x48.png b/src/images/favicon-48x48.png index 932d147..0733428 100644 Binary files a/src/images/favicon-48x48.png and b/src/images/favicon-48x48.png differ diff --git a/src/images/favicon-64x64.png b/src/images/favicon-64x64.png index 5f9869b..8922ac7 100644 Binary files a/src/images/favicon-64x64.png and b/src/images/favicon-64x64.png differ diff --git a/src/images/favicon.svg b/src/images/favicon.svg index e1db86a..8025c5f 100644 --- a/src/images/favicon.svg +++ b/src/images/favicon.svg @@ -1,17 +1,16 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + - \ No newline at end of file +