Make full alert banners clickable

This commit is contained in:
Saivann 2015-07-04 11:59:28 -04:00
parent 6a03c57dbf
commit 227dc24d68
No known key found for this signature in database
GPG key ID: 5780F5D31B5577B0
3 changed files with 13 additions and 10 deletions

View file

@ -24,7 +24,7 @@
<div id="detectmobile" class="detectmobile"></div> <div id="detectmobile" class="detectmobile"></div>
{% if site.ALERT %} {% if site.ALERT %}
<div class="banner-message alert"> <div class="banner-message alert">
<div><div>{{ site.ALERT }}</div></div> <a href="{{ site.ALERTURL }}"><span>{{ site.ALERT }}</span></a>
</div> </div>
{% endif %} {% endif %}
<div class="head"><div> <div class="head"><div>

View file

@ -142,27 +142,29 @@ table td,table th{
font-style:italic; font-style:italic;
} }
.banner-message div div{
margin:auto;
width:850px;
padding:10px;
}
.banner-message, .banner-message,
.banner-message a, .banner-message a,
.banner-message a:link, .banner-message a:link,
.banner-message a:active, .banner-message a:active,
.banner-message a:visited{ .banner-message a:visited{
display:block;
color:#fff; color:#fff;
} }
.banner-message a:hover{ .banner-message a:hover{
text-decoration:underline; text-decoration:underline;
} }
.banner-message.alert div{ .banner-message.alert a{
background-color:#c5251f; background-color:#c5251f;
} }
.banner-message.info div{ .banner-message.info a{
background-color:#0d579b; background-color:#0d579b;
} }
.banner-message a span{
display:block;
margin:auto;
width:850px;
padding:10px;
}
.head{ .head{
margin:30px 0 30px 0; margin:30px 0 30px 0;
@ -2166,7 +2168,7 @@ h2 .rssicon{
margin:auto; margin:auto;
margin-bottom:5px; margin-bottom:5px;
} }
.banner-message div div{ .banner-message a span{
width:auto; width:auto;
} }
.head{ .head{

View file

@ -36,7 +36,8 @@ module Jekyll
else else
self.data['category'] = 'alert' self.data['category'] = 'alert'
if self.data.has_key?('banner') and !self.data['banner'].nil? and self.data['banner'].length>0 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>' site.config['ALERT']=self.data['banner']
site.config['ALERTURL']='/'+dstdir+'/'+dst.gsub('.html','')
end end
if self.data.has_key?('active') and !self.data['active'].nil? and self.data['active'] == true if self.data.has_key?('active') and !self.data['active'].nil? and self.data['active'] == true
site.config['STATUS']=1 site.config['STATUS']=1