al-quran.reflectslight.io/nanoc/rules/index.rules

34 lines
963 B
Text
Raw Normal View History

2023-03-10 05:46:02 +01:00
#!/usr/bin/env ruby
2023-03-11 18:31:44 +01:00
# frozen_string_literal: true
2024-05-02 16:56:23 +02:00
# contains rules for the surah index available at /<locale>/
2023-03-10 05:46:02 +01:00
locales.each do |locale|
compile "/html/index.html.erb", rep: "/#{locale}/surah/index" do
2024-01-03 19:55:21 +01:00
context = Ryo.from(filename: "index.html.erb", locale:, locales:)
2024-05-01 05:09:13 +02:00
locals = {locale: context.locale, locales: context.locales, context:}
filter(:erb, {locals:})
filter(:tidy)
2023-03-11 18:31:44 +01:00
write "/#{locale}/index.html"
2023-03-10 05:46:02 +01:00
end
end
2024-03-16 08:17:49 +01:00
compile "/js/main/surah-index.tsx" do
2023-03-10 14:41:19 +01:00
filter :webpack, depend_on: ["/js/components",
2024-03-16 08:17:49 +01:00
"/js/lib/",
2023-03-10 14:41:19 +01:00
"/js/hooks"]
2024-03-16 08:17:49 +01:00
write "/js/main/surah-index.js"
2023-06-30 00:49:42 +02:00
filter :gzip
2024-03-16 08:17:49 +01:00
write "/js/main/surah-index.js.gz"
2023-03-10 05:46:02 +01:00
end
compile "/js/loaders/SurahIndexLoader.ts" do
2024-03-16 08:17:49 +01:00
filter :webpack
write "/js/loaders/surah-index-loader.js"
2023-03-10 05:46:02 +01:00
end
2024-04-30 02:16:28 +02:00
compile "/css/main/SurahIndex.scss" do
2023-03-10 05:46:02 +01:00
filter :sass, syntax: :scss, style: :compact
filter :rainpress
2024-04-30 02:16:28 +02:00
write("/css/main/surah-index.css")
2023-03-10 05:46:02 +01:00
end