diff --git a/content/style.scss b/content/style.scss index 67e900d..e2767ce 100644 --- a/content/style.scss +++ b/content/style.scss @@ -70,6 +70,11 @@ div#episteme { line-height: 2em; } +/* mindkiller warning */ +div#mindkiller { + background: $episteme; +} + div#disqus { border-top: 10px solid $h1; text-align: center; diff --git a/layouts/default.erb b/layouts/default.erb index a3117a1..1c0a558 100644 --- a/layouts/default.erb +++ b/layouts/default.erb @@ -32,8 +32,14 @@ <% end %> + <% if @item.mindkiller? %> +
+

Warning: this page contains mind-killing content. Proceed with caution. The author does not endorse any of the views expressed here, even when they may look convincing. If you feel offended, consider that the author might be trolling you and whether you want to encourage them even further.

+
+ <% end %> + - <% if @item[:episteme] %> + <% if @item.epistemic? %>

Last modified: @@ -50,12 +56,6 @@

<% end %> - <% if @item[:mindkiller] %> -
-

Warning: this page contains mind-killing content. Proceed with caution. The author does not endorse any of the views expressed here, even when they may look convincing. If you feel offended, consider that the author might be trolling you and whether you want to encourage them even further.

-
- <% end %> -
diff --git a/lib/episteme.rb b/lib/episteme.rb index 4ddb773..adbec47 100644 --- a/lib/episteme.rb +++ b/lib/episteme.rb @@ -27,3 +27,14 @@ end def episteme_cat status "[#{episteme status}][Epistemic State]{:.episteme}" end + +class Nanoc3::Item + def epistemic? + !!self[:episteme] + end + + def mindkiller? + topics = %w{history} + !!self[:mindkiller] || !!path.match(%r{^/(#{topics.join("|")})/}) + end +end