Commit 63422781 authored by Aral Balkan's avatar Aral Balkan
Browse files

Updated the index pages to use the new set partials.

parent 05a07f7f
Pipeline #48 skipped
......@@ -333,8 +333,8 @@ class Blockdown
{ class: 'trackers', link: '/trackers', label: 'Trackers', selected: false}
{ class: 'companies', link: '/companies', label: 'Companies', selected: false}
]
sitesIndexHeaderPartialHTML = @partial(set.render(@theme.header, {title: 'Sites', navigationList: navigationList}))
sitesIndexHTML = sitesIndexHeaderPartialHTML + '<main>' + sitesIndexMainSectionPartialHTML + '</main>' + @theme.footer
sitesIndexHeaderPartialHTML = @partial(set.render(@theme.header, {navigationList: navigationList}))
sitesIndexHTML = set.render(@theme.page, {title: 'Sites', header: sitesIndexHeaderPartialHTML, content: sitesIndexMainSectionPartialHTML})
sitesIndexPath = path.join dataPath, '/sites/index.html'
fs.outputFileAsync sitesIndexPath, sitesIndexHTML
@info 'Generated and wrote the sites index.'
......@@ -348,8 +348,8 @@ class Blockdown
{ class: 'trackers', link: '/trackers', label: 'Trackers', selected: true}
{ class: 'companies', link: '/companies', label: 'Companies', selected: false}
]
trackersIndexHeaderPartialHTML = @partial(set.render(@theme.header, {title: 'Trackers', navigationList: navigationList}))
trackersIndexHTML = trackersIndexHeaderPartialHTML + '<main>' + trackersIndexMainSectionPartialHTML + '</main>' + @theme.footer
trackersIndexHeaderPartialHTML = @partial(set.render(@theme.header, {navigationList: navigationList}))
trackersIndexHTML = set.render(@theme.page, {title: 'Trackers', header: trackersIndexHeaderPartialHTML, content: trackersIndexMainSectionPartialHTML})
trackersIndexPath = path.join dataPath, '/trackers/index.html'
fs.outputFileAsync trackersIndexPath, trackersIndexHTML
@info 'Generated and wrote the trackers index.'
......@@ -363,8 +363,8 @@ class Blockdown
{ class: 'trackers', link: '/trackers', label: 'Trackers', selected: false}
{ class: 'companies', link: '/companies', label: 'Companies', selected: true}
]
companiesIndexHeaderPartialHTML = @partial(set.render(@theme.header, {title: 'Companies', navigationList: navigationList}))
companiesIndexHTML = companiesIndexHeaderPartialHTML + '<main>' + companiesIndexMainSectionPartialHTML + '</main>' + @theme.footer
companiesIndexHeaderPartialHTML = @partial(set.render(@theme.header, {navigationList: navigationList}))
companiesIndexHTML = set.render(@theme.page, {title: 'Companies', header: companiesIndexHeaderPartialHTML, content:companiesIndexMainSectionPartialHTML})
companiesIndexPath = path.join dataPath, '/companies/index.html'
fs.outputFileAsync companiesIndexPath, companiesIndexHTML
@info 'Generated and wrote the companies index.'
......@@ -378,8 +378,8 @@ class Blockdown
{ class: 'trackers', link: '/trackers', label: 'Trackers', selected: false}
{ class: 'companies', link: '/companies', label: 'Companies', selected: false}
]
homePageHeaderPartialHTML = @partial(set.render(@theme.header, {title: 'Companies', navigationList: navigationList}))
homePageHTML = homePageHeaderPartialHTML + '<main>' + homePageMainSectionPartialHTML + '</main>' + @theme.footer
homePageHeaderPartialHTML = @partial(set.render(@theme.header, {navigationList: navigationList}))
homePageHTML = set.render(@theme.page, header: homePageHeaderPartialHTML, content: homePageMainSectionPartialHTML)
homePagePath = path.join dataPath, '/index.html'
fs.outputFileAsync homePagePath, homePageHTML
@info 'Generated and wrote the home page.'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment