BuildFeed shills for #Brexit 🇬🇧

deal with it
This commit is contained in:
Thomas Hounsell 2016-06-15 19:54:15 +01:00
parent d5328ce490
commit b72788f6f3
8 changed files with 85 additions and 2 deletions

View File

@ -824,6 +824,10 @@
<Content Include="Scripts\jquery.validate.min.js" />
<Content Include="Scripts\jquery.validate.unobtrusive.js" />
<Content Include="Scripts\jquery.validate.unobtrusive.min.js" />
<Content Include="Scripts\shill.js" />
<Content Include="Scripts\shill.min.js">
<DependentUpon>shill.js</DependentUpon>
</Content>
<Content Include="Scripts\trumbowyg\langs\ar.min.js" />
<Content Include="Scripts\trumbowyg\langs\ca.min.js" />
<Content Include="Scripts\trumbowyg\langs\cs.min.js" />

View File

@ -8,6 +8,7 @@
/// <reference path="jquery-2.2.3.js" />
/// <reference path="jquery-2.2.3.min.js" />
/// <reference path="jsrender.min.js" />
/// <reference path="shill.js" />
/// <reference path="trumbowyg/langs/ar.min.js" />
/// <reference path="trumbowyg/langs/ca.min.js" />
/// <reference path="trumbowyg/langs/cs.min.js" />

View File

@ -0,0 +1,8 @@
$(function() {
$(".shill-eu-close")
.click(function(event) {
event.preventDefault();
$(".shill-eu").hide();
document.cookie = "no_shill=true; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/";
});
})

1
BuildFeed/Scripts/shill.min.js vendored Normal file
View File

@ -0,0 +1 @@
$(function(){$(".shill-eu-close").click(function(n){n.preventDefault();$(".shill-eu").hide();document.cookie="no_shill=true; expires=Fri, 31 Dec 9999 23:59:59 GMT; path=/"})});

View File

@ -142,12 +142,22 @@
</div>
</div>
</div>
@if(Request.Cookies["no_shill"]?.Value != "true")
{
<div class="shill-eu">
<a href="#" class="shill-eu-close"><i class="fa fa-close"></i></a>
<a href="https://twitter.com/search?q=Brexit" target="_blank" rel="nofollow">
<span class="shill-eu-msg">BuildFeed backs #Brexit</span>
<img src="https://d3n8a8pro7vhmx.cloudfront.net/voteleave/pages/2318/attachments/original/1458756579/vl-fb-profile-red.png" alt="United Kingdom" />
</a>
</div>
}
@Scripts.Render("~/bundles/jquery")
<script type="text/javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
@Scripts.Render("~/bundles/jsrender")
<script type="text/javascript" src="~/Scripts/bfs.js"></script>
@RenderSection("scripts", required: false)
<script id="result-template" type="text/x-jsrender">
<script id="result-template" type="text/x-jsrender">
<div class="col-sm-4">
<a href="{{:Url}}" class="list-group-item" title="{{:Title}}">
<h4 class="list-group-item-heading">{{:Label}}</h4>
@ -155,6 +165,7 @@
</a>
</div>
</script>
<script type="text/javascript" src="~/Scripts/shill.min.js"></script>
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5431719a661cbfd0" async="async"></script>
</body>
</html>

View File

@ -10,5 +10,11 @@
"inputFiles": [
"content/rtl.css"
]
},
{
"outputFileName": "Scripts/shill.js",
"inputFiles": [
"Scripts/shill.js"
]
}
]

View File

@ -259,3 +259,55 @@ label, .control-label, .help-block, .checkbox, .radio
@media (min-width: 1200px)
{
}
/* Shill for Vote Leave */
.shill-eu
{
position: fixed;
bottom: -2px;
right: -2px;
border-top-left-radius: 16px;
border: 2px solid #fff;
width: 280px;
max-height: 100px;
overflow: hidden;
background: #da291c;
}
.shill-eu > a.shill-eu-close
{
display: block;
max-width: 100%;
max-height: 100%;
position: absolute;
top: 0;
left: 0;
width: 24px;
height: 24px;
line-height: 24px;
text-align: center;
background: #272b30;
border-bottom-right-radius: 8px;
z-index: 10;
}
.shill-eu .shill-eu-msg
{
position: absolute;
left: 100px;
right: 10px;
margin: 8px 0;
z-index: 10;
font-weight: bold;
font-size: 26px;
line-height: 1em;
text-transform: uppercase;
}
.shill-eu img
{
max-width: 100%;
max-height: 100px;
z-index: 0;
}

View File

@ -1 +1 @@
body,h1,h2,h3{font-family:"Segoe UI",Frutiger,"Frutiger Linotype","Dejavu Sans","Helvetica Neue",Arial,sans-serif}h1,h2,h3{text-shadow:none;font-weight:300}body{font-size:15px}h1{font-size:52px;text-align:center;margin-bottom:15px}h1 a{text-decoration:none;color:#000}@media(max-width:480px){h1{font-size:36px}}h3{font-size:30px;margin:1em 0 .4em}#page-content{padding-top:50px}.addthis_sharing_toolbox{margin:0 -.5em}.at-share-tbx-element .at-share-btn{margin-left:8px !important}.at-share-tbx-element .at-share-btn:first-child{margin-left:0 !important}.at_flat_counter{vertical-align:33% !important}.build-group{margin-bottom:2em}@media(max-width:767px){.build-group:nth-child(2n+1){clear:left}}.build-group-title{font-size:27px;font-weight:300;letter-spacing:-1px;margin:0 0 8px 0}@media(max-width:480px){.build-group-title{font-size:24px}}.build-group-p{color:rgba(255,255,255,.7);margin-bottom:5px}.no-wrapping{-ms-text-overflow:ellipsis;-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.eager-wrapping{-ms-word-wrap:break-word;word-wrap:break-word}.label-build-status{padding-bottom:1px}.field-validation-error{color:#ff4136}.form-details label{font-size:15px;font-weight:normal}.form-details{margin-top:2em}.form-details .form-control-static{font-weight:bold;color:#eaeaea}.form-details .form-control-static .more-link{font-weight:normal}.form-details .row{margin-bottom:.5em}.credits-list dd+dt{margin-top:1.5em}#page-footer{font-size:12px;margin-top:3em}.form-horizontal .control-label{padding-top:8px}label,.control-label,.help-block,.checkbox,.radio{font-size:14px}.btn-reset{padding:9px 0 7px}.btn-xs{font-size:13px}.table .btn{padding:4px 9px}.table-admin h4{margin:.1em 0}.table-admin>tbody>tr>th,.table-admin>tbody>tr>td{vertical-align:middle}.trumbowyg-box.trumbowyg,.trumbowyg-editor.trumbowyg{margin:0;width:100%}.trumbowyg-black .trumbowyg-dropdown button{color:#fff !important}#search-results{margin-top:1em}#search-results .list-group-item{margin-bottom:1em}#search-results .list-group-item-heading{overflow:hidden;-ms-text-overflow:ellipsis;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap}#search-results .list-group-item-heading h4{font-size:16px}@media(min-width:768px) and (max-width:991px){.col-sm-2.build-group:nth-child(6n+1),.col-sm-3.build-group:nth-child(4n+1){clear:left}}@media(min-width:992px){.col-md-2.build-group:nth-child(6n+1){clear:left}}
body,h1,h2,h3{font-family:"Segoe UI",Frutiger,"Frutiger Linotype","Dejavu Sans","Helvetica Neue",Arial,sans-serif}h1,h2,h3{text-shadow:none;font-weight:300}body{font-size:15px}h1{font-size:52px;text-align:center;margin-bottom:15px}h1 a{text-decoration:none;color:#000}@media(max-width:480px){h1{font-size:36px}}h3{font-size:30px;margin:1em 0 .4em}#page-content{padding-top:50px}.addthis_sharing_toolbox{margin:0 -.5em}.at-share-tbx-element .at-share-btn{margin-left:8px !important}.at-share-tbx-element .at-share-btn:first-child{margin-left:0 !important}.at_flat_counter{vertical-align:33% !important}.build-group{margin-bottom:2em}@media(max-width:767px){.build-group:nth-child(2n+1){clear:left}}.build-group-title{font-size:27px;font-weight:300;letter-spacing:-1px;margin:0 0 8px 0}@media(max-width:480px){.build-group-title{font-size:24px}}.build-group-p{color:rgba(255,255,255,.7);margin-bottom:5px}.no-wrapping{-ms-text-overflow:ellipsis;-o-text-overflow:ellipsis;text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.eager-wrapping{-ms-word-wrap:break-word;word-wrap:break-word}.label-build-status{padding-bottom:1px}.field-validation-error{color:#ff4136}.form-details label{font-size:15px;font-weight:normal}.form-details{margin-top:2em}.form-details .form-control-static{font-weight:bold;color:#eaeaea}.form-details .form-control-static .more-link{font-weight:normal}.form-details .row{margin-bottom:.5em}.credits-list dd+dt{margin-top:1.5em}#page-footer{font-size:12px;margin-top:3em}.form-horizontal .control-label{padding-top:8px}label,.control-label,.help-block,.checkbox,.radio{font-size:14px}.btn-reset{padding:9px 0 7px}.btn-xs{font-size:13px}.table .btn{padding:4px 9px}.table-admin h4{margin:.1em 0}.table-admin>tbody>tr>th,.table-admin>tbody>tr>td{vertical-align:middle}.trumbowyg-box.trumbowyg,.trumbowyg-editor.trumbowyg{margin:0;width:100%}.trumbowyg-black .trumbowyg-dropdown button{color:#fff !important}#search-results{margin-top:1em}#search-results .list-group-item{margin-bottom:1em}#search-results .list-group-item-heading{overflow:hidden;-ms-text-overflow:ellipsis;-o-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap}#search-results .list-group-item-heading h4{font-size:16px}@media(min-width:768px) and (max-width:991px){.col-sm-2.build-group:nth-child(6n+1),.col-sm-3.build-group:nth-child(4n+1){clear:left}}@media(min-width:992px){.col-md-2.build-group:nth-child(6n+1){clear:left}}.shill-eu{position:fixed;bottom:-2px;right:-2px;border-top-left-radius:16px;border:2px solid #fff;width:280px;max-height:100px;overflow:hidden;background:#da291c}.shill-eu>a.shill-eu-close{display:block;max-width:100%;max-height:100%;position:absolute;top:0;left:0;width:24px;height:24px;line-height:24px;text-align:center;background:#272b30;border-bottom-right-radius:8px;z-index:10}.shill-eu .shill-eu-msg{position:absolute;left:100px;right:10px;margin:8px 0;z-index:10;font-weight:bold;font-size:26px;line-height:1em;text-transform:uppercase}.shill-eu img{max-width:100%;max-height:100px;z-index:0}