Formatting article.

This commit is contained in:
Samuel Clay 2012-08-11 14:54:44 -07:00
parent 7aaa7b8920
commit 73721f2fb7
3 changed files with 127 additions and 110 deletions

View file

@ -59,4 +59,122 @@
.NB-modal h6 {
font-size: 10px !important;
margin: 12px 0 12px !important;
}
/* ======================== */
/* = Bookmarklet Add Site = */
/* ======================== */
.NB-bookmarklet {
font-family: 'Lucida Sans', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
text-align: left;
}
.NB-bookmarklet .NB-modal-information {
float: right;
margin-top: 10px;
text-transform: uppercase;
color: #909090;
font-size: 10px;
}
.NB-bookmarklet .NB-bookmarklet-folder-container {
margin: 28px 0;
float: right;
}
.NB-bookmarklet .NB-bookmarklet-folder-container .NB-bookmarklet-folder-label {
float: left;
margin: 2px 4px 0 0;
}
.NB-bookmarklet .NB-bookmarklet-folder-container .NB-folders {
font-size: 14px;
}
.NB-bookmarklet .NB-bookmarklet-folder-add-button {
float: left;
margin: 2px 4px 0 0;
cursor: pointer;
}
.NB-bookmarklet .NB-bookmarklet-new-folder-container {
display: none;
float: right;
clear: both;
}
.NB-bookmarklet .NB-bookmarklet-folder-new {
float: left;
padding: 2px;
border: 1px solid #505050;
font-size: 11px;
line-height: 13px;
margin: 2px 0 0;
width: 170px;
}
.NB-bookmarklet .NB-bookmarklet-folder-new-label {
margin: 4px 4px 0 0;
float: left;
}
.NB-bookmarklet .NB-folders {
width: 200px;
}
.NB-bookmarklet .NB-modal-submit {
margin: 24px 0 8px;
padding: 0 0 6px;
}
.NB-bookmarklet .NB-modal-submit-button {
clear: both;
padding: 0 16px;
line-height: 24px;
width: 200px;
text-align: center;
text-shadow: none;
}
.NB-bookmarklet .NB-modal-submit-button img {
margin: 5px 6px 0 0;
width: 16px;
height: 16px;
float: left;
vertical-align: top;
}
.NB-bookmarklet .NB-bookmarklet-error {
margin: 12px 0 0 0;
font-weight: bold;
color: #701040;
}
.NB-bookmarklet .NB-bookmarklet-error img {
float: left;
width: 16px;
height: 16px;
vertical-align: top;
margin: -2px 6px 0 0;
}
.NB-bookmarklet .NB-bookmarklet-folder-label {
float: right;
}
.NB-bookmarklet .NB-folders {
float: right;
}
.NB-bookmarklet .NB-error-invalid {
padding: 12px 12px;
font-size: 13px;
text-shadow: none;
color: white;
background-color: #690F0F;
border-radius: 8px;
}
.NB-bookmarklet .NB-error-invalid a {
color: #9FC6F5;
text-decoration: underline;
}
/* ======================= */
/* = Bookmarklet Content = */
/* ======================= */
.NB-bookmarklet .NB-bookmarklet-page-content {
max-height: 300px;
overflow-y: scroll;
padding: 0 24px;
margin: 24px 0 0;
border-left: 6px solid #74B3B7;
}

View file

@ -501,108 +501,4 @@
.NB-modal .NB-modal-section {
padding: 12px 0;
}
/* ===================== */
/* = Bookmarklet Modal = */
/* ===================== */
.NB-bookmarklet {
font-family: 'Lucida Sans', 'Lucida Grande', Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
text-align: left;
}
.NB-bookmarklet .NB-modal-information {
float: right;
margin-top: 10px;
text-transform: uppercase;
color: #909090;
font-size: 10px;
}
.NB-bookmarklet .NB-bookmarklet-folder-container {
margin: 28px 0;
float: right;
}
.NB-bookmarklet .NB-bookmarklet-folder-container .NB-bookmarklet-folder-label {
float: left;
margin: 2px 4px 0 0;
}
.NB-bookmarklet .NB-bookmarklet-folder-container .NB-folders {
font-size: 14px;
}
.NB-bookmarklet .NB-bookmarklet-folder-add-button {
float: left;
margin: 2px 4px 0 0;
cursor: pointer;
}
.NB-bookmarklet .NB-bookmarklet-new-folder-container {
display: none;
float: right;
clear: both;
}
.NB-bookmarklet .NB-bookmarklet-folder-new {
float: left;
padding: 2px;
border: 1px solid #505050;
font-size: 11px;
line-height: 13px;
margin: 2px 0 0;
width: 170px;
}
.NB-bookmarklet .NB-bookmarklet-folder-new-label {
margin: 4px 4px 0 0;
float: left;
}
.NB-bookmarklet .NB-folders {
width: 200px;
}
.NB-bookmarklet .NB-modal-submit {
margin: 24px 0 8px;
padding: 0 0 6px;
}
.NB-bookmarklet .NB-modal-submit-button {
clear: both;
padding: 0 16px;
line-height: 24px;
width: 200px;
text-align: center;
text-shadow: none;
}
.NB-bookmarklet .NB-modal-submit-button img {
margin: 5px 6px 0 0;
width: 16px;
height: 16px;
float: left;
vertical-align: top;
}
.NB-bookmarklet .NB-bookmarklet-error {
margin: 12px 0 0 0;
font-weight: bold;
color: #701040;
}
.NB-bookmarklet .NB-bookmarklet-error img {
float: left;
width: 16px;
height: 16px;
vertical-align: top;
margin: -2px 6px 0 0;
}
.NB-bookmarklet .NB-bookmarklet-folder-label {
float: right;
}
.NB-bookmarklet .NB-folders {
float: right;
}
.NB-bookmarklet .NB-error-invalid {
padding: 12px 12px;
font-size: 13px;
text-shadow: none;
color: white;
background-color: #690F0F;
border-radius: 8px;
}
.NB-bookmarklet .NB-error-invalid a {
color: #9FC6F5;
text-decoration: underline;
}

View file

@ -118,8 +118,8 @@
get_page_title: function() {
var title = document.title;
if (title.length > 256) {
title = title.substr(0, 256) + '...';
if (title.length > 40) {
title = title.substr(0, 40) + '...';
}
return title;
@ -258,12 +258,15 @@
// =========================
get_page_content: function() {
var $title = $('.NB-bookmarklet-page-title', this.$modal);
var $title = $('.NB-modal-title', this.$modal);
var $content = $('.NB-bookmarklet-page-content', this.$modal);
var $readability = $(window.readability.init());
var readability = window.readability.init();
$title.append(readability);
console.log(["readability", readability, $title]);
var title = $readability.children("h1").text();
$title.html(title);
var content = $("#readability-content", $readability).html();
$content.html(content);
},
// ===========