Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Stripping back styling to basics, cleaner and less opinion driven

  • Loading branch information...
commit ac6c75152345a2576c738fef1155ec9ea9d327f4 1 parent 42a30b6
@tommoor authored
View
122 hn.css
@@ -1,15 +1,15 @@
body {
- background: #fdfdfd;
- margin-top: 40px;
+ background: #f9f9f9;
+ margin: 0;
}
table td,
table {
- background: transparent;
+ background: #fff;
}
/*********** Header Logo ***********/
-
+/*
table tr td table tr td {
width: auto;
position: relative;
@@ -51,7 +51,7 @@ table tr td table tr {
.topsel a:visited {
color: #222;
}
-
+*/
/*********** Points, Comments & Time **************/
@@ -108,7 +108,7 @@ td.title .meta li.highlight span {
}
/*********** Header Bar **************/
-
+/*
center > table > tbody > tr:first-child > td:first-child > table {
background-image: -webkit-gradient( linear, left bottom, left top, color-stop(0.3, rgba(253, 253, 253, 0)), color-stop(0.6, #FDFDFD) );
position: fixed;
@@ -122,7 +122,7 @@ center > table > tbody > tr:first-child > td:first-child > table {
center > table > tbody > tr:first-child > td:first-child > table img {
display: none;
}
-
+*/
/*********** Filters *****************/
@@ -164,6 +164,37 @@ a.logout {
/*********** News Listings ***********/
+body > center > table {
+ margin: 0 -20px;
+ padding: 20px;
+}
+
+td.title {
+ padding: 10px 0 2px;
+}
+
+td.title a {
+ font-size: 20px;
+ letter-spacing: -1px;
+ color: #2279B2;
+}
+
+td.title a:visited {
+ color: #87C1E8;
+}
+
+td.title .comhead a {
+ color: #444;
+ font-size: 8pt;
+}
+
+td.title:first-child {
+ font-size: 20px;
+ color: #bbb;
+ min-width: 33px;
+}
+
+/*
table tr td table {
width: 90%;
}
@@ -177,15 +208,6 @@ td.title {
padding: 10px 2px;
}
-td.title:first-child {
- line-height: 1.2;
- font-size: 20px;
- position: relative;
- left: 0;
- color: #666;
- opacity: 0.6;
-}
-
td tr td center a {
opacity: 0.1;
position: absolute;
@@ -215,57 +237,50 @@ td tr:hover td.title .meta li span {
opacity: 0.9;
}
-td.title a {
- font-size: 20px;
- letter-spacing: -1px;
- color: #3299BB;
- text-shadow: 0 1px 0 #fff;
-}
-
-td.title a:visited {
- color: #9AD2E4;
-}
-
-td.title .comhead a {
- color: #444;
- font-size: 8pt;
-}
-
td.subtext {
display: none;
}
+*/
/*********** Story Page ***************/
-html.item table tr td table {
- margin-left: 32px;
+form textarea {
+ width: 100%;
}
-html.item table tr td table table {
- margin-left: 0;
+.item form textarea {
+ margin: 0 0 -10px;
}
-html.item table tr:first-child td table {
- width: 100%;
- margin-left: 0;
+.item form {
+ margin: 0;
}
-form textarea {
+.item table tr td table tr td form:first-child textarea {
+ min-width: 600px;
+}
+
+
+/*********** Inline Replies ***********/
+
+#quick-reply {
width: 100%;
}
-.item form textarea {
- margin: 0 0 -10px;
+#quick-reply input[type=submit] {
+ margin-left: 0;
}
-.item form {
- margin: 0;
+
+#quick-reply .loading {
+ min-height: 38px;
+ background: url(chrome-extension://__MSG_@@extension_id__/images/loading-light.gif) no-repeat center center;
}
+
/*********** Profile Bubble ***********/
-#quick-reply,
#profile-bubble {
position: relative;
display: none;
@@ -276,7 +291,6 @@ form textarea {
width: 150px;
}
-#quick-reply em,
#profile-bubble em {
position: absolute;
top: -6px;
@@ -295,7 +309,6 @@ form textarea {
overflow: hidden;
}
-#quick-reply .loading,
#profile-bubble .loading {
min-height: 38px;
background: url(chrome-extension://__MSG_@@extension_id__/images/loading.gif) no-repeat center center;
@@ -318,21 +331,6 @@ form textarea {
list-style: none;
}
-#quick-reply {
- width: 300px;
-}
-
-#quick-reply textarea {
- background: rgba(255,255,255,0.9);
- color: #333;
- border: 0px;
-}
-
-#quick-reply input[type=submit] {
- margin: 0;
- float: right;
-}
-
/*********** Ident Icons ***********/
View
BIN  images/loading-light.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
28 js/hn.js
@@ -12,7 +12,7 @@ var hn = {
hn.createProfileBubble();
hn.createQuickReply();
hn.createFilterMenu();
- hn.parseStories();
+ //hn.parseStories();
hn.bindEvents();
},
@@ -30,7 +30,6 @@ var hn = {
styleElements: function(){
$('input[type=submit]').addClass('btn');
- $('.pagetop a[href^="/r"]').addClass('logout').text('').attr('title', 'Log Out');
},
createProfileBubble: function(){
@@ -45,7 +44,7 @@ var hn = {
createFilterMenu: function(){
//<input id="add-filter" placeholder="Filter stories containing..." type="text" />
- $('.pagetop').last().append(' <a class="settings" title="Settings"></a> <ul class="current-filters"></ul>');
+ //$('.pagetop').last().append(' <a class="settings" title="Settings"></a> <ul class="current-filters"></ul>');
hn.refreshFilters();
},
@@ -87,9 +86,13 @@ var hn = {
ev.preventDefault();
var $point = $(this);
- var $reply = $('#quick-reply .reply');
+ var $element = $('#quick-reply').clone();
+ var $reply = $('.reply', $element);
var url = $(this).attr('href') + ' form';
+ $point.after($element);
+ $point.remove();
+
// load reply page into quick reply container
$reply.empty();
$reply.addClass('loading');
@@ -104,18 +107,6 @@ var hn = {
// focus ready for reply ;)
$reply.find('textarea').focus();
});
-
- // position correctly
- var left = $point.offset().left + ($point.width()/2);
- var width = $('#profile-bubble').outerWidth()/2;
-
- // position
- $('#quick-reply').css({
- display: 'block',
- position: 'absolute',
- top: $point.offset().top+20,
- left: left-width
- });
},
loadUserDetails: function(){
@@ -230,11 +221,6 @@ var hn = {
if (!$(ev.target).parents('#profile-bubble').length && ev.target != $('#profile-bubble')[0]) {
$('#profile-bubble').fadeOut(200);
}
-
- var href = ev.target.getAttribute('href') || '';
- if (!$(ev.target).parents('#quick-reply').length && ev.target != $('#quick-reply')[0] && !href.match(/^reply/)) {
- $('#quick-reply').fadeOut(200);
- }
},
filterStories: function(){
View
2  manifest.json
@@ -5,7 +5,7 @@
"background_page": "background.html",
"content_scripts": [
{
- "matches": ["http://news.ycombinator.com/*"],
+ "matches": ["http://news.ycombinator.com/*", "http://news.ycombinator.org/*"],
"css": ["forms.css", "hn.css"],
"js": [
"js/libs/jquery-1.7.1.min.js",
Please sign in to comment.
Something went wrong with that request. Please try again.