mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 09:46:12 +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
|
@ -93,7 +93,7 @@
|
|||
</div>
|
||||
<div class="footer">
|
||||
<div class="footermenu">
|
||||
<a href="/en/alerts">Network Status</a>
|
||||
<a href="/en/alerts" class="statusmenu{% if site.STATUS == 1 %} alert{% endif %}">Network Status</a>
|
||||
{% case page.lang %}
|
||||
{% when 'fa' or 'pl' or 'tr' or 'zh_TW' %}
|
||||
<a href="/en/legal">Legal</a>
|
||||
|
|
|
@ -48,6 +48,11 @@ p{
|
|||
margin-right:0;
|
||||
margin-left:15px;
|
||||
}
|
||||
.statusmenu{
|
||||
padding-left:0;
|
||||
padding-right:20px;
|
||||
background-position:right center;
|
||||
}
|
||||
.titleicon{
|
||||
margin-right:auto;
|
||||
margin-left:5px;
|
||||
|
|
|
@ -405,6 +405,17 @@ table td,table th{
|
|||
white-space:nowrap;
|
||||
}
|
||||
|
||||
.statusmenu{
|
||||
display:inline-block;
|
||||
padding-left:20px;
|
||||
background-position:left center;
|
||||
background-repeat:no-repeat;
|
||||
background-image:url(/img/netstatus_normal.svg);
|
||||
}
|
||||
.statusmenu.alert{
|
||||
background-image:url(/img/netstatus_alert.svg);
|
||||
}
|
||||
|
||||
/*Styles specific to elements in pages*/
|
||||
|
||||
.mainsummary,
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -7,8 +7,7 @@ title: Network status and alerts - Bitcoin
|
|||
<link rel="alternate" type="application/rss+xml" href="/en/rss/alerts.rss" title="Bitcoin network status and alerts">
|
||||
<div class="alerttext">
|
||||
<h1>Network status and alerts<a type="application/rss+xml" href="/en/rss/alerts.rss"><img src="/img/icon_rss.svg" alt="rss" class="rssicon"></a></h1>
|
||||
{% assign active = false %}{% filter_for p in site.pages reversed sort_by:date category:alert %}{% if p.active == true %}{% assign active = true %}{% endif %}{% endfilter_for %}
|
||||
{% if active == false %}
|
||||
{% if site.STATUS == 0 %}
|
||||
<div class="alertstatusinactive">There is no ongoing event on the Bitcoin network.</div>
|
||||
{% else %}
|
||||
<div class="alertstatusactive"">The following network event is ongoing.</div>
|
||||
|
|
BIN
img/netstatus_alert.png
Normal file
BIN
img/netstatus_alert.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 389 B |
65
img/netstatus_alert.svg
Normal file
65
img/netstatus_alert.svg
Normal file
|
@ -0,0 +1,65 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="16"
|
||||
height="16"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="netstatus_alert.svg"
|
||||
inkscape:export-filename="/media/X/bitcoin.org/current/img/netstatus_alert.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90">
|
||||
<defs
|
||||
id="defs4" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="22.4"
|
||||
inkscape:cx="1.7569282"
|
||||
inkscape:cy="5.8929549"
|
||||
inkscape:document-units="px"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:window-width="1615"
|
||||
inkscape:window-height="1026"
|
||||
inkscape:window-x="65"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata7">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
inkscape:label="Calque 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1"
|
||||
transform="translate(0,-1036.3622)">
|
||||
<path
|
||||
style="fill:#ee9209;fill-opacity:1;stroke:#ee9209;stroke-width:2.81357622;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
|
||||
d="m 7.9794577,1040.6131 -4.5726696,7.5013 9.1636209,0 z"
|
||||
id="path2985"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccc" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2 KiB |
BIN
img/netstatus_normal.png
Normal file
BIN
img/netstatus_normal.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 294 B |
69
img/netstatus_normal.svg
Normal file
69
img/netstatus_normal.svg
Normal file
|
@ -0,0 +1,69 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="16px"
|
||||
height="16px"
|
||||
id="svg3009"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.4 r9939"
|
||||
sodipodi:docname="netstatus_normal.svg"
|
||||
inkscape:export-filename="/media/X/bitcoin.org/current/img/netstatus_normal.png"
|
||||
inkscape:export-xdpi="90"
|
||||
inkscape:export-ydpi="90">
|
||||
<defs
|
||||
id="defs3011" />
|
||||
<sodipodi:namedview
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1.0"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="15.696216"
|
||||
inkscape:cx="-7.494944"
|
||||
inkscape:cy="9.0545312"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:window-width="1615"
|
||||
inkscape:window-height="1026"
|
||||
inkscape:window-x="65"
|
||||
inkscape:window-y="24"
|
||||
inkscape:window-maximized="1" />
|
||||
<metadata
|
||||
id="metadata3014">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="Layer 1"
|
||||
inkscape:groupmode="layer">
|
||||
<path
|
||||
sodipodi:type="arc"
|
||||
id="path3019"
|
||||
sodipodi:cx="10.203713"
|
||||
sodipodi:cy="11.157178"
|
||||
sodipodi:rx="6.9150991"
|
||||
sodipodi:ry="6.9150991"
|
||||
d="m 17.118813,11.157178 a 6.9150991,6.9150991 0 1 1 -13.8301987,0 6.9150991,6.9150991 0 1 1 13.8301987,0 z"
|
||||
style="fill:#329239;fill-opacity:1;stroke:none"
|
||||
transform="matrix(0.72305543,0,0,0.72305543,0.62214959,-0.06725815)" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.1 KiB |
Loading…
Add table
Add a link
Reference in a new issue