AggressiveLayout.prototype.setupFeeds = function() { //this.is_feedsApp = navigator.userAgent.match(/Feeds/i); this.setupStandardCSS(); this.appstoreLink = "https://itunes.apple.com/app/id1265608707" this.nameWithTagLine = "Feeds - All the web, one feed"; if (!document.title) document.title = this.nameWithTagLine this.shareURL = this.appstoreLink this.titleTagLine = "#Read **your** news and blogs"; this.textTagLine = "Get the news you want in one single app!\n\nTurns websites into a single feed and saves time by serving you the best updates first.\n\nIt is a **free** download: [Download now!](" + this.appstoreLink + ")"; this.feedsBlueColor = "rgb(84, 138, 196)"; this.feedsGreenColor = "rgb(84, 196, 138)"; this.feedsBlueColorGradient = "rgb(0, 38, 96)"; this.feedsGreenColorGradient = "rgb(0, 96, 38)"; this.setCSSFromSelector("body", { fontSize: "18px" }) this.setCSSFromSelector(".main", { margin : "auto", maxWidth : "1000px", padding: "0 10px" }) this.setCSSFromSelector(".separator", { position: "relative", width: "70%", margin: "20px 0px 20px 15%", borderBottomWidth: "1px", borderBottomStyle: "solid", borderBottomColor: "rgb(0, 0, 0), left: 15%" }) this.setCSSFromSelector(".iconImage", { maxWidth : "512px", width: "90%", margin: "auto", display: "block"}) this.setCSSFromSelector("a:visited", { color : "black" }) this.setCSSFromSelector("a", { color : "black" }) this.setCSSFromSelector(".fillWidth", { backgroundColor: this.feedsBlueColor, color: "white", position : "relative", width: "100%", }) this.setCSSFromSelector(".centerDiv", { padding: "10px", margin: "auto", maxWidth: "800px", }) //things that always are the same - e.g. the title icon this.setCSSFromSelector("#mainTitle", { display: "block", maxHeight : "152px", minHeight : "50px", height: "20vh", margin: "auto" }) //200 x 152 this.mainTitleSmall = { "id": "mainTitle", autoType: AUTO_TYPE.image, alt: "Feeds logo", src: "img/logo_small.png", attributes: { alt: "Feeds Logo" }} //671 x 512: this.mainTitleDiv = { var: "iconImage", className: "iconImage", autoType: AUTO_TYPE.image, alt: "Feeds logo", src: "/img/logo.png", attributes: { alt: "Feeds Logo" }} } AggressiveLayout.prototype.scrollToDiv = function(event, divName) { //Here could be problems! If the anchor changes, stuff does not seem to work as they should. DEBUG and test! //scroll to div if visible, otherwise change hash. this.blockPropagation(event); var div = this.elements[divName] //is is visible? if (div && !div.offsetHeight) div = null; else if (div) { var offset = this.offset(div).top; if (offset) window.scroll(window.window.pageXOffset, offset); else div = null; } if (!div && divName == "autoLoginDiv") { console.log("Todo: change anchor!"); //add login to the anchor and have a login function. Then when login is removed, we are returned to where we were. var anchor = this.modifyValueInQueryString(this.anchor, "page", "login", "#"); this.setAnchor(anchor) } } AggressiveLayout.prototype.setupLogin = function() { if (this.loginAPI) return this.loginAPI = new APILogin({ layout: this, app_slug : "feeds", can_create_account: 1, showLoginAtCreate: 1, fromColor : this.feedsBlueColor, toColor : this.feedsBlueColorGradient, fromColorHover : this.feedsGreenColor, toColorHover : this.feedsGreenColorGradient, buttonTextColor : "white" }); this.loginAPI.loginFooter = [ { type: "span", html: "Your privacy is protected, read our " }, { autoType: AUTO_TYPE.anchorLink, key: "page", value: "privacy", html: "privacy policy", scrollToTop: 1}, ] this.loginAPI.createFooter = [ { type: "span", html: "By signing up you agree to our " }, { autoType: AUTO_TYPE.anchorLink, key: "page", value: "privacy", html: "privacy policy", scrollToTop: 1}, ] this.loginAPI.signupCheckboxes = [ { name: "newsletter", html : " Send me news and updates please (but no ads or spam of course)", checked: true }, ] }