Skip to content

Commit

Permalink
Merge branch 'alertclickable'
Browse files Browse the repository at this point in the history
  • Loading branch information
saivann committed Jul 5, 2015
2 parents 56daa6b + 227dc24 commit 0216bf3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion _layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<div id="detectmobile" class="detectmobile"></div>
{% if site.ALERT %}
<div class="banner-message alert">
<div><div>{{ site.ALERT }}</div></div>
<a href="{{ site.ALERTURL }}"><span>{{ site.ALERT }}</span></a>
</div>
{% endif %}
<div class="head"><div>
Expand Down
18 changes: 10 additions & 8 deletions _less/screen.less
Original file line number Diff line number Diff line change
Expand Up @@ -142,27 +142,29 @@ table td,table th{
font-style:italic;
}

.banner-message div div{
margin:auto;
width:850px;
padding:10px;
}
.banner-message,
.banner-message a,
.banner-message a:link,
.banner-message a:active,
.banner-message a:visited{
display:block;
color:#fff;
}
.banner-message a:hover{
text-decoration:underline;
}
.banner-message.alert div{
.banner-message.alert a{
background-color:#c5251f;
}
.banner-message.info div{
.banner-message.info a{
background-color:#0d579b;
}
.banner-message a span{
display:block;
margin:auto;
width:850px;
padding:10px;
}

.head{
margin:30px 0 30px 0;
Expand Down Expand Up @@ -2162,7 +2164,7 @@ h2 .rssicon{
margin:auto;
margin-bottom:5px;
}
.banner-message div div{
.banner-message a span{
width:auto;
}
.head{
Expand Down
3 changes: 2 additions & 1 deletion _plugins/alerts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def initialize(site, base, lang, srcdir, src, dstdir, dst, date)
else
self.data['category'] = 'alert'
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
if self.data.has_key?('active') and !self.data['active'].nil? and self.data['active'] == true
site.config['STATUS']=1
Expand Down

0 comments on commit 0216bf3

Please sign in to comment.