mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 01:36:13 +00:00
Merge pull request #621 from bitcoin/status
Display a status icon on the Network status menu entry
This commit is contained in:
commit
5417f48821
9 changed files with 156 additions and 3 deletions
|
@ -35,6 +35,9 @@ module Jekyll
|
|||
if self.data.has_key?('banner') and !self.data['banner'].nil? and self.data['banner'].length>0
|
||||
site.config['ALERT']='<a href="/'+dstdir+'/'+dst.gsub('.html','')+'">'+self.data['banner']+'</a>'
|
||||
end
|
||||
if self.data.has_key?('active') and !self.data['active'].nil? and self.data['active'] == true
|
||||
site.config['STATUS']=1
|
||||
end
|
||||
if self.data.has_key?('alias')
|
||||
site.pages << AlertPage.new(site, base, lang, srcdir, src, '', self.data['alias']+'.html', date)
|
||||
site.pages << AlertPage.new(site, base, lang, srcdir, src, '', self.data['alias']+'/index.html', date)
|
||||
|
@ -46,6 +49,7 @@ module Jekyll
|
|||
class AlertPageGenerator < Generator
|
||||
def generate(site)
|
||||
#generate each alert based on templates
|
||||
site.config['STATUS'] = 0
|
||||
Dir.foreach('_alerts') do |file|
|
||||
next if file == '.' or file == '..'
|
||||
lang = 'en'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue