Move top-level json files in src/ to src/json/

This commit is contained in:
0x1eef 2024-03-15 14:51:06 -03:00
parent 7e04b66db3
commit c95da7197c
9 changed files with 8 additions and 8 deletions

4
Rules
View file

@ -9,12 +9,12 @@ require "nanoc-tidy"
locales = %w[ar en]
slugs = Ryo.from(
JSON.parse(
File.read(File.join(Dir.getwd, "src", "slugs.json"))
File.read(File.join(Dir.getwd, "src", "json", "slugs.json"))
)
)
i18n = Ryo.from(
JSON.parse(
File.read(File.join(Dir.getwd, "src", "i18n.json"))
File.read(File.join(Dir.getwd, "src", "json", "i18n.json"))
)
)

View file

@ -9,7 +9,7 @@ module Mixin::T
end
def i18n
path = File.join(Dir.getwd, "src", "i18n.json")
path = File.join(Dir.getwd, "src", "json", "i18n.json")
json = File.binread(path)
Ryo.from JSON.parse(json)
end

View file

@ -30,8 +30,8 @@
</div>
</div>
<div class="root h-full" data-locale="<%= context.locale %>"></div>
<%= inline_json("/i18n.json") %>
<%= inline_json("/surahs.json") %>
<%= inline_json("/json/i18n.json") %>
<%= inline_json("/json/surahs.json") %>
<script src="/js/loaders/surah-index-loader.js"></script>
</body>
</html>

View file

@ -5,7 +5,7 @@
<%= erb("partials/favicon.html.erb") %>
</head>
<body>
<%= inline_json("/slugs.json") %>
<%= inline_json("/json/slugs.json") %>
<script src="/js/random.js"></script>
</body>
</html>

View file

@ -34,8 +34,8 @@
data-locale="<%= context.locale %>"
data-surah-id="<%= context.surah.id %>">
</div>
<%= inline_json("/i18n.json") %>
<%= inline_json("/recitations.json") %>
<%= inline_json("/json/i18n.json") %>
<%= inline_json("/json/recitations.json") %>
<script src="/js/loaders/surah-stream-loader.js"></script>
</body>
</html>