basic portal site

master
muflax 2012-06-25 10:06:14 +02:00
parent 8a4b1a3d33
commit 57c7ed9bfb
5 changed files with 78 additions and 28 deletions

View File

@ -19,24 +19,61 @@ There is also [Twitter][].
# Sites
<%= site_link :blog %>
<ul class="table">
<%= site_link :daily %>
<%= render "list-site",
:domain => "blog",
:desc => "A Blog" %>
<%= site_link :letsread %>
<%= render "list-site",
:domain => "daily",
:desc => "Daily[^daily] Practice" %>
<%= site_link :sutra %>
<%= render "list-site",
:domain => "letsread",
:desc => "Reading Is Radical" %>
<%= site_link :gospel %>
<%= render "list-site",
:domain => "sutra",
:desc => "Bloggin' The Sutras" %>
<%= render "list-site",
:domain => "gospel",
:desc => "(a work in progress)" %>
</ul>
[^daily]: On average.
# Topics
<%= topic_link "Antinatalism", "muflax:morality/antinatalism" %>
<ul class="table">
<%= topic_link "Crackpottery", "blog:crackpottery/crackpot-beliefs-the-theory" %>
<%= render "list-topic",
:topic => "Antinatalism",
:link => "muflax:morality/antinatalism",
:desc => "Being Born Sucks" %>
<%= topic_link "Dark Stance", "muflax:morality/stances" %>
<%= render "list-topic",
:topic => "Crackpottery",
:link => "blog:crackpottery/crackpot-beliefs-the-theory",
:desc => "Warranted Crackpot Belief" %>
<%= topic_link "Experiments", "blog:experiments" %>
<%= render "list-topic",
:topic => "Dark Stance",
:link => "muflax:morality/stances",
:desc => "Transform Nothing, Seek No Gain" %>
<%= topic_link "Meta-Ethics", "blog:morality" %>
<%= render "list-topic",
:topic => "Experiments",
:link => "blog:experiments",
:desc => "Trying Cool Stuff" %>
<%= render "list-topic",
:topic => "Meta-Ethics",
:link => "blog:morality",
:desc => "Solving Morality" %>
</ul>
<br/> <!-- force some spacing -->

13
layouts/list-site.erb Normal file
View File

@ -0,0 +1,13 @@
<li>
<span class='align_left'>
<a href="<%= site_url @domain %>">
<%= @site.site_yaml["sites"][@domain]["title"] %>
</a>
</span>
<span class='align_right' markdown="1">
<%= @desc %>
</span>
<div style='clear: both'></div>
</li>

13
layouts/list-topic.erb Normal file
View File

@ -0,0 +1,13 @@
<li>
<span class='align_left'>
<a href="<%= local_link @link %>">
<%= @topic %>
</a>
</span>
<span class='align_right' markdown="1">
<%= @desc %>
</span>
<div style='clear: both'></div>
</li>

View File

@ -1,3 +1,5 @@
# translates various link formats / demands into urls
def local_link url
if m = url.match(/^(?<site>\w+):(?<page>.+)$/)
"#{site_url m[:site]}/#{m[:page]}"
@ -10,21 +12,6 @@ def site_url site
"http://#{site == "muflax" ? "" : "#{site}."}muflax.com"
end
def site_link site
site = site.to_s
url = site_url site
title = @site.site_yaml["sites"][site]["title"]
"#{url} - #{title}"
end
def topic_link topic, target
url = local_link target
"#{url} - #{topic}"
end
class Nanoc::Site
def moved_pages
moved = []

View File

@ -3,7 +3,7 @@ sites:
title: lies and wonderland
disqus_site: muflax
blog:
title: muflax\' mindstream
title: muflax' mindstream
disqus_site: muflaxblog
sutra:
title: Blogchen
@ -12,7 +12,7 @@ sites:
title: muflax becomes a saint
disqus_site: dailymuflax
letsread:
title: Let\'s Read
title: Let's Read
disqus_site: muflaxread
gospel:
title: Unchanging Gospel
title: The Unchanging Gospel