mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-28 02:03:59 +00:00
Show inactive supporters on sponsors page too.
This commit is contained in:
@@ -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) =
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user