summary refs log tree commit diff stats
path: root/tools
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@gmail.com>2016-09-04 15:24:46 +0200
committerDominik Picheta <dominikpicheta@gmail.com>2016-09-04 15:24:46 +0200
commit7982fc4f098587e3a5dda7266e295c2b2c90bf4d (patch)
treebc404e4deb21d102044b15cad8aab4d0d316d556 /tools
parent409cd07c737d78f3dcc133b03c49393f83bce1df (diff)
downloadNim-7982fc4f098587e3a5dda7266e295c2b2c90bf4d.tar.gz
Show inactive supporters on sponsors page too.
Diffstat (limited to 'tools')
-rw-r--r--tools/nimweb.nim10
-rw-r--r--tools/website.tmpl25
2 files changed, 25 insertions, 10 deletions
diff --git a/tools/nimweb.nim b/tools/nimweb.nim
index 4cf7020c2..cef4df1c6 100644
--- a/tools/nimweb.nim
+++ b/tools/nimweb.nim
@@ -94,7 +94,8 @@ Compile_options:
   rYearMonthDay = r"(\d{4})_(\d{2})_(\d{2})"
   rssUrl = "http://nim-lang.org/news.xml"
   rssNewsUrl = "http://nim-lang.org/news.html"
-  sponsors = "web/sponsors.csv"
+  activeSponsors = "web/sponsors.csv"
+  inactiveSponsors = "web/inactive_sponsors.csv"
   validAnchorCharacters = Letters + Digits
 
 
@@ -446,8 +447,9 @@ proc readSponsors(sponsorsFile: string): seq[Sponsor] =
         since: parser.row[5], level: parser.row[6].parseInt))
   parser.close()
 
-proc buildSponsors(c: var TConfigData, sponsorsFile: string, outputDir: string) =
-  let sponsors = generateSponsors(readSponsors(sponsorsFile))
+proc buildSponsors(c: var TConfigData, outputDir: string) =
+  let sponsors = generateSponsorsPage(readSponsors(activeSponsors),
+                                      readSponsors(inactiveSponsors))
   let outFile = outputDir / "sponsors.html"
   var f: File
   if open(f, outFile, fmWrite):
@@ -500,7 +502,7 @@ proc buildWebsite(c: var TConfigData) =
     buildPage(c, file, if file == "question": "FAQ" else: file, rss)
   copyDir("web/assets", "web/upload/assets")
   buildNewsRss(c, "web/upload")
-  buildSponsors(c, sponsors, "web/upload")
+  buildSponsors(c, "web/upload")
   buildNews(c, "web/news", "web/upload/news")
 
 proc main(c: var TConfigData) =
diff --git a/tools/website.tmpl b/tools/website.tmpl
index dc21de7b1..87e1b151c 100644
--- a/tools/website.tmpl
+++ b/tools/website.tmpl
@@ -218,14 +218,9 @@ runForever()
 </html>
 #end proc
 #
+#
 #proc generateSponsors(sponsors: seq[Sponsor]): string =
 #result = ""
-<h1 id="our-current-sponsors">Our Current Sponsors</h1>
-<p>This page lists the companies and individuals that are, very kindly, contributing a
-monthly amount to help sustain Nim's development. For more details take a
-look at the <a href="https://salt.bountysource.com/teams/nim">Bountysource campaign</a>.</p>
-<p class="lastUpdate">Last updated: ${getTime().getGMTime().format("dd/MM/yyyy")}</p>
-<dl>
 #for sponsor in sponsors:
   <dt class="level-${sponsor.level}">
     #if sponsor.url.len > 0:
@@ -248,6 +243,24 @@ look at the <a href="https://salt.bountysource.com/teams/nim">Bountysource campa
     Donated $$${sponsor.allTime} in total since ${sponsor.since}
   </dd>
 #end for
+#end proc
+#proc generateSponsorsPage(activeSponsors, inactiveSponsors: seq[Sponsor]): string =
+#result = ""
+<h1 id="our-current-sponsors">Our Current Sponsors</h1>
+<p>This section lists the companies and individuals that are, very kindly, contributing a
+monthly amount to help sustain Nim's development. For more details take a
+look at the <a href="https://salt.bountysource.com/teams/nim">Bountysource campaign</a>.</p>
+<p class="lastUpdate">Last updated: ${getTime().getGMTime().format("dd/MM/yyyy")}</p>
+<dl>
+${generateSponsors(activeSponsors)}
+</dl>
+#
+<h1 id="our-past-sponsors">Our Past Sponsors</h1>
+<p>This section lists the companies and individuals that have contributed
+money in the past to help sustain Nim's development. For more details take a
+look at the <a href="https://salt.bountysource.com/teams/nim">Bountysource campaign</a>.</p>
+<dl>
+${generateSponsors(inactiveSponsors)}
 </dl>
 #
 #end proc