make the guest warning ('Over 18?') configurable

This commit is contained in:
edshot99 2024-11-13 00:08:08 -06:00
parent 0234362cb0
commit 81add14565
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,4 @@
<% if Danbooru.config.guest_warning? %>
<div class="guest-warning" style="display: none;">
<div class="guest-warning-dialog">
<h1 class="dialog-header">Over 18?</h1>
@ -17,3 +18,4 @@
</div>
</div>
</div>
<% end %>

View File

@ -29,6 +29,10 @@ module Danbooru
false
end
def guest_warning?
true
end
# The canonical hostname of the site.
def hostname
Socket.gethostname