Skip to content
This repository was archived by the owner on Apr 17, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions r2/r2/public/static/discussion.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,8 @@
#header.discussion {
background: url(/static/background-discussion.jpg) no-repeat top left;
}

#header.discussion #header-img {
height: 55px;
@media (max-width: 975px) {
img#tagline {
display: none !important;
}
}

#header.discussion #tagline {
display: none;
}
2 changes: 1 addition & 1 deletion r2/r2/public/static/lesswrong.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#content.clear.fullwidth {
padding: 0 15px;
width: 920px;
max-width: 920px;
}

div.comment-meta span span {
Expand Down
Binary file modified r2/r2/public/static/logo-discussion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 21 additions & 7 deletions r2/r2/public/static/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ body {
background-color: #d8d8d8;
margin: 0;
padding: 0;
word-wrap: break-word;
overflow-wrap: break-word;
}
#wrapper {
background-color: #fff;
Expand All @@ -38,19 +40,29 @@ body {
box-shadow: 0px 0px 10px #555;
margin: 0 auto;
padding: 0;
width: 990px;
max-width: 990px;
min-width: 780px;
}
#main {
padding: 15px 20px;
display: table;
table-layout: fixed;
width: 100%;

}
#content {
float: left;
padding: 0 0 0 15px;
width: 695px;
width: 100%;
padding: 15px 20px 20px 35px;
}
#sidebar {
float: right;
width: 220px;
padding: 15px 20px 20px 0;
}
#header {
overflow: hidden;
}
#content, #sidebar {
display: table-cell;
vertical-align: top;
}


Expand Down Expand Up @@ -200,7 +212,9 @@ input, select, textarea, button {
a#logo {
display: block;
float: left;
margin: 35px 10px 0 35px;
height: 54px;
overflow: hidden;
margin: 35px 10px 14px 35px;
}
img#tagline {
display: block;
Expand Down
40 changes: 40 additions & 0 deletions r2/r2/public/static/viewport-min-width.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/**
* This JavaScript adds a "min-width" attribute to the viewport meta tag. If
* the device's width is less than the min-width, we will scale the viewport
* to the min-width; otherwise we will leave the meta tag alone.
*
* This script must be added *after* the viewport meta tag, since it relies on
* that tag already being available in the DOM.
*
* Implementation note: The reason we remove the old tag and insert a new one
* is that Firefox doesn't pick up changes to the viewport
* meta tag.
*
* Author: Brendan Long <self@brendanlong.com>
* License: Public Domain - http://unlicense.org/
* See: https://github.com/brendanlong/viewport-min-width-polyfill
*/
(function() {
var viewport = document.querySelector("meta[name=viewport]");
if (viewport) {
var content = viewport.getAttribute("content");
var parts = content.split(",");
for (var i = 0; i < parts.length; ++i) {
var part = parts[i].trim();
var pair = part.split("=");
if (pair[0] === "min-width") {
var minWidth = parseInt(pair[1]);
if (screen.width < minWidth) {
document.head.removeChild(viewport);

var newViewport = document.createElement("meta");
newViewport.setAttribute("name", "viewport");
newViewport.setAttribute("content", "width=" + minWidth);
document.head.appendChild(newViewport);
break;
}
}
}
}
})();

2 changes: 2 additions & 0 deletions r2/r2/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
<meta name="description" content="${description | h}" />
%endif
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, min-width=780, inital-scale=1.0"/>
<script type="text/javascript" src="${static('viewport-min-width.js')}"></script>
${self.robots()}
##these are globals, so they should be run first
##things that need are referenced by the reddit, the buttons, and
Expand Down