Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Clone in Desktop Download ZIP
Browse files

setting up app_config.py for INN, removing some of NPR's ad-code

  • Loading branch information...
commit 7284ae5077dbfc9872ca195867a26ffe7187e211 1 parent f6297fd
@rnagle rnagle authored
View
35 app_config.py
@@ -22,7 +22,7 @@
# The name of the repository containing the source
REPOSITORY_NAME = '$NEW_REPOSITORY_NAME'
-GITHUB_USERNAME = 'nprapps'
+GITHUB_USERNAME = 'INN'
REPOSITORY_URL = 'git@github.com:%s/%s.git' % (GITHUB_USERNAME, REPOSITORY_NAME)
REPOSITORY_ALT_URL = None # 'git@bitbucket.org:nprapps/%s.git' % REPOSITORY_NAME'
@@ -35,29 +35,25 @@
"""
PRODUCTION_S3_BUCKETS = [
{
- 'bucket_name': 'apps.npr.org',
- 'region': 'us-east-1'
- },
- {
- 'bucket_name': 'apps2.npr.org',
- 'region': 'us-east-1'
+ 'bucket_name': 'apps.investigativenewsnetwork.org',
+ 'region': 'us-west-2'
}
]
STAGING_S3_BUCKETS = [
{
- 'bucket_name': 'stage-apps.npr.org',
- 'region': 'us-east-1'
+ 'bucket_name': 'stage-apps.investigativenewsnetwork.org',
+ 'region': 'us-west-2'
}
]
ASSETS_S3_BUCKET = {
- 'bucket_name': 'assets.apps.npr.org',
- 'region': 'us-east-1'
+ 'bucket_name': 'assets.apps.investigativenewsnetwork.org',
+ 'region': 'us-west-2'
}
-PRODUCTION_SERVERS = ['cron.nprapps.org']
-STAGING_SERVERS = ['50.112.92.131']
+PRODUCTION_SERVERS = []
+STAGING_SERVERS = []
# Should code be deployed to the web/cron servers?
DEPLOY_TO_SERVERS = False
@@ -108,21 +104,10 @@
SHARE_URL = 'http://%s/%s/' % (PRODUCTION_S3_BUCKETS[0], PROJECT_SLUG)
"""
-ADS
-"""
-
-NPR_DFP = {
- 'STORY_ID': '1002',
- 'TARGET': 'homepage',
- 'ENVIRONMENT': 'NPRTEST',
- 'TESTSERVER': 'false'
-}
-
-"""
SERVICES
"""
GOOGLE_ANALYTICS = {
- 'ACCOUNT_ID': 'UA-5828686-4',
+ 'ACCOUNT_ID': 'UA-5828686-4', # TODO: Replace INN's UA code
'DOMAIN': PRODUCTION_S3_BUCKETS[0],
'TOPICS': '' # e.g. '[1014,3,1003,1002,1001]'
}
View
41 less/adhesion.less
@@ -1,41 +0,0 @@
-#adhesion {
- position: fixed;
- bottom: 0;
- left: 0; /* Added for testing - DD. Guess: it's cuz of bootstrap */
- width: 100%;
- -webkit-transition: all .3s ease-in-out;
- z-index: 1000;
-
- .adhesionWrapper {
- width: 100%;
- position: fixed;
- bottom: 0;
- }
- img {
- width: 100%;
- -webkit-transition: all .3s ease-in-out;
- }
-
- #adhesionClose {
- float: right;
-
- img {
- width: 33px;
- float: right;
- }
- }
-
- .expand {
- background: black;
- -webkit-transition: all .3s ease-in-out;
-
- img {
- bottom: 50%;
- -webkit-transition: all .3s ease-in-out;
- }
- }
-}
-
-@media only screen and (min-width: 1025px) {
- #adhesion { display: none; }
-}
View
1  less/app.less
@@ -1,7 +1,6 @@
@import "less/lib/bootstrap/bootstrap";
@import "less/lib/font-awesome/font-awesome";
@import "less/lib/prefixer";
-@import "less/adhesion";
@import "less/share-modal.less";
// Global variables
View
1  templates/_base.html
@@ -116,7 +116,6 @@
{{ JS.push('js/app_config.js') }}
{{ JS.push('js/copy.js') }}
{{ JS.push('js/console.js') }}
- {{ JS.push('js/ads.js') }}
{{ JS.push('js/templates.js') }}
{{ JS.push('js/comments.js') }}
{{ JS.push('js/app.js') }}
View
74 www/js/ads.js
@@ -1,74 +0,0 @@
-var ADS = {};
-var googletag = { cmd: [] };
-
-/*
- * Configure our ad slots and targeting.
- */
-ADS.setup_ads = function() {
- // Desktop ad slot
- if (!Modernizr.touch && Modernizr.mq('(min-width: 1025px)')) {
- googletag.defineSlot('/6735/n6735.' + APP_CONFIG.NPR_DFP.ENVIRONMENT + '/' + APP_CONFIG.NPR_DFP.TARGET, [300,250], 'ad-desktop').addService(googletag.pubads());
- }
-
- // Story targeting
- googletag.pubads().setTargeting('storyId', APP_CONFIG.NPR_DFP.STORY_ID);
- googletag.pubads().setTargeting('testserver', APP_CONFIG.NPR_DFP.TESTSERVER);
-
- // Device
- var ua = navigator.userAgent.toLowerCase();
-
- if (ua.indexOf('android') > -1) {
- googletag.pubads().setTargeting('device', 'android');
- } else if (ua.match(/(iPad|iPhone|iPod)/i)) {
- googletag.pubads().setTargeting('device', 'ios');
- }
-
- // Orientation
- var orient = '';
-
- if (Modernizr.touch && Modernizr.mq('(max-width: 1024px)')) {
- if (Modernizr.mq('(orientation: portrait)')) {
- orient = 'portrait';
- } else if (Modernizr.mq('(orientation: landscape)')) {
- orient = 'landscape';
- }
- }
-
- googletag.pubads().setTargeting('orient', orient);
-
- googletag.pubads().enableSingleRequest();
- googletag.pubads().collapseEmptyDivs();
- googletag.enableServices();
-};
-
-/*
- * Load Google JS.
- */
-ADS.setup_googletag = function() {
- var gads = document.createElement('script');
- gads.async = true;
- gads.type = 'text/javascript';
- var useSSL = 'https:' == document.location.protocol;
- gads.src = (useSSL ? 'https:' : 'http:') + '//www.googletagservices.com/tag/js/gpt.js';
- var node = document.getElementsByTagName('script')[0];
- node.parentNode.insertBefore(gads, node);
-};
-
-// Configure when ready
-googletag.cmd.push(function() {
- try {
- ADS.setup_ads();
- } catch(e) {
- NPR.messaging.exception(e, 'Define Google Publisher Tags', NPR.messaging.constants.SPONSORSHIP_ERROR);
- }
-});
-
-// Render desktop ad if needed
-if (!Modernizr.touch && Modernizr.mq('(min-width: 1025px)')) {
- googletag.cmd.push(function() {
- googletag.display('ad-desktop');
- });
-}
-
-// Load Google
-ADS.setup_googletag();

0 comments on commit 7284ae5

Please sign in to comment.
Something went wrong with that request. Please try again.