summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavehauenstein <davehauenstein@d4e419ec-0920-11de-bbfd-a7c1bc4c261e>2009-04-17 20:41:52 +0000
committerdavehauenstein <davehauenstein@d4e419ec-0920-11de-bbfd-a7c1bc4c261e>2009-04-17 20:41:52 +0000
commitd50002c3b430b192e1ecec4126bf31f13cd6e5f6 (patch)
treed7edaa9a0089258545e93b393412ddff3e6a9e16
parent023a90eba43c51519943f58724fa51d373a1974d (diff)
downloadreadability-simple-d50002c3b430b192e1ecec4126bf31f13cd6e5f6.tar.bz2
readability-simple-d50002c3b430b192e1ecec4126bf31f13cd6e5f6.zip
added aditional files for spanish support, added redirect if coming from a spanish language preferred browser
git-svn-id: http://arc90labs-readability.googlecode.com/svn/trunk@35 d4e419ec-0920-11de-bbfd-a7c1bc4c261e
-rw-r--r--css/es/readability-home.css181
-rw-r--r--images/es/readability.pngbin0 -> 73459 bytes
-rwxr-xr-xindex.htm21
-rw-r--r--js/.htaccess1
-rw-r--r--js/es/readability-start.js50
5 files changed, 253 insertions, 0 deletions
diff --git a/css/es/readability-home.css b/css/es/readability-home.css
new file mode 100644
index 0000000..238ffd6
--- /dev/null
+++ b/css/es/readability-home.css
@@ -0,0 +1,181 @@
+@charset "utf-8";
+/* CSS Document */
+
+body {
+ background: #1E4E74;
+ color: #ddd;
+}
+img {
+ border: none;
+}
+#container {
+ margin-top: 10px;
+ margin-right:auto;
+ margin-left:auto;
+ width: 980px;
+ height: 1125px;
+ padding: 10px;
+ background: url(../../images/es/readability.png) no-repeat;
+ overflow: hidden;
+}
+#footer {
+ margin-top: 40px;
+ text-align: right;
+}
+div#arcLinks {
+ float: right;
+}
+div#kindlingAd {
+ width: 250px;
+ float: right;
+ margin-right: 150px;
+ text-align: center;
+}
+div#kindlingAd p {
+ color: #fff;
+ font-size: .8em;
+ line-height: 0px;
+}
+a.www-link {
+ margin: 0 8px 0 30px;
+}
+#arc90 {
+ display: block;
+ text-align: right;
+ margin-top: 60px;
+}
+#arc90 img {
+ margin-right: 10px;
+}
+#arc90 a.twitter {
+ color: #ddd;
+ text-decoration: none;
+ font-size: .8em;
+ font-weight: bolder;
+ margin-top: 10px;
+ border-bottom: 1px solid #fff;
+}
+#settings {
+ margin-top: 165px;
+ padding: 0 1.5em;
+ display: block;
+ width: 900px;
+ height: 160px;
+}
+div.settings-box, div#bookmarklet {
+ float: left;
+}
+div#bookmarklet {
+ width: 200px;
+ margin-top: 16px;
+ margin-left: 140px;
+ text-align: center;
+}
+div#style {
+ width: 175px;
+ margin-left: 20px;
+}
+div#size {
+ width: 165px;
+}
+div#margin {
+ width: 160px;
+}
+.settings-box label {
+ margin-left: .5em;
+ cursor: pointer;
+}
+.settings-box p {
+ margin: .1em 0;
+}
+#readHiddenContent {
+ display: none;
+}
+#example {
+ display: block;
+ margin-left: 30px;
+ margin-top: 24px;
+ width: 888px;
+ height: 454px;
+ left: 30px;
+ padding: 1em 2em;
+ overflow: auto;
+}
+#articleContent {
+ text-align: left;
+ line-height: 1.4em;
+ margin: 1em auto;
+}
+/* ---------------- USER-CONFIGURABLE STYLING --------------------- */
+/* ---------------- USER-CONFIGURABLE STYLING --------------------- */
+/* Size options */
+.size-small {
+ font-size: 12px;
+}
+.size-medium {
+ font-size: 18px;
+}
+.size-large {
+ font-size: 26px;
+}
+.size-x-large {
+ font-size: 34px;
+}
+/* Style options */
+.style-novel {
+ font-family:"Palatino Linotype", "Book Antiqua", Palatino, serif;
+ background: #F4F3DB;
+ color: #222;
+}
+.style-ebook {
+ font-family:Arial, Helvetica, sans-serif;
+ background: #eee;
+ color: #333;
+}
+.style-ebook h1 {
+ font-family: "Arial Black", Gadget, sans-serif;
+ font-weight: normal;
+}
+.style-newspaper {
+ font-family:"Times New Roman", Times, serif;
+ background: #F7F7F7;
+ color: #222;
+}
+.style-newspaper h1 {
+ text-transform:capitalize;
+ font-family: Georgia, "Times New Roman", Times, serif;
+}
+.style-terminal {
+ font-family: "Lucida Console", Monaco, monospace;
+ background: #1D4E2C;
+ color: #C6FFC6;
+}
+/* Margin Options */
+/* Margin Options */
+
+.margin-x-wide {
+ width: 35%;
+}
+.margin-wide {
+ width: 55%;
+}
+.margin-medium {
+ width: 75%;
+}
+.margin-narrow {
+ width: 95%;
+}
+/* ---------------- USER-CONFIGURABLE STYLING --------------------- */
+/* ---------------- USER-CONFIGURABLE STYLING --------------------- */
+
+
+
+/* LOCK IN H1 SIZING */
+#articleContent h1 {
+ font-size: 1.2em !important;
+ display: block;
+ text-transform:capitalize;
+}
+#articleContent {
+ line-height: 1.4em;
+}
diff --git a/images/es/readability.png b/images/es/readability.png
new file mode 100644
index 0000000..d06fa2b
--- /dev/null
+++ b/images/es/readability.png
Binary files differ
diff --git a/index.htm b/index.htm
index 92f20d6..ae258f1 100755
--- a/index.htm
+++ b/index.htm
@@ -5,6 +5,27 @@
<link rel="stylesheet" href="css/readability-home.css" type="text/css" media="screen" />
<script type="text/javascript" src="js/jquery-1.3.1.min.js"></script>
<script type="text/javascript" src="js/readability-start.js"></script>
+ <script type="text/javascript">
+ languagesAvailable = ['es'];
+ language = (navigator.language || navigator.userLanguage);
+ languageCode = language.replace(/-.*/,'').toLowerCase();
+ if(languageCode != 'en')
+ {
+ languageIsAvailable = false;
+ for(l in languagesAvailable)
+ {
+ if(languagesAvailable[l] == languageCode)
+ {
+ languageIsAvailable = true;
+ break;
+ }
+ }
+ if(languageIsAvailable)
+ {
+ window.location = "http://lab.arc90.com/experiments/readability/" + languageCode;
+ }
+ }
+ </script>
</head>
<body>
diff --git a/js/.htaccess b/js/.htaccess
new file mode 100644
index 0000000..d42dfaf
--- /dev/null
+++ b/js/.htaccess
@@ -0,0 +1 @@
+Redirect /experiments/readability/js/readability-0.1.js http://lab.arc90.com/experiments/readability/js/readability.js
diff --git a/js/es/readability-start.js b/js/es/readability-start.js
new file mode 100644
index 0000000..8183527
--- /dev/null
+++ b/js/es/readability-start.js
@@ -0,0 +1,50 @@
+var style = "style-newspaper";
+var size = "size-large";
+var margin = "margin-wide";
+
+
+var linkStringStart = "javascript:(function(){";
+var linkStringEnd = "';_readability_script=document.createElement('SCRIPT');_readability_script.type='text/javascript';_readability_script.src='http://lab.arc90.com/experiments/readability/js/readability.js?x='+(Math.random());document.getElementsByTagName('head')[0].appendChild(_readability_script);_readability_css=document.createElement('LINK');_readability_css.rel='stylesheet';_readability_css.href='http://lab.arc90.com/experiments/readability/css/readability.css';_readability_css.type='text/css';document.getElementsByTagName('head')[0].appendChild(_readability_css);_readability_print_css=document.createElement('LINK');_readability_print_css.rel='stylesheet';_readability_print_css.href='http://lab.arc90.com/experiments/readability/css/readability-print.css';_readability_print_css.media='print';_readability_print_css.type='text/css';document.getElementsByTagName('head')[0].appendChild(_readability_print_css);})();";
+
+$(document).ready(function() {
+
+ $("#bookmarkletLink").attr("href", linkStringStart + "readStyle='" + style + "';readSize='" + size + "';readMargin='" + margin + linkStringEnd);
+
+ function applyChange(s,y) {
+ var example = document.getElementById("example");
+ var article = document.getElementById("articleContent");
+
+ switch(s){
+ case "style":
+ style = y;
+ break
+ case "size":
+ size = y;
+ break
+ case "margin":
+ margin = y;
+ break
+ }
+ example.className = style;
+ article.className = margin + " " + size;
+ $("#bookmarkletLink").attr("href", linkStringStart + "readStyle='" + style + "';readSize='" + size + "';readMargin='" + margin + linkStringEnd);
+ }
+
+ $("#settings input").bind("click", function(){
+ applyChange(this.name, this.value);
+ });
+ $("#settings input").bind("click", function(){
+ applyChange(this.name, this.value);
+ });
+ $("#bookmarkletLink").bind("click", function(){
+ if($.browser.msie){
+ alert("Para empezar a usar Readability, click derecho y selecciona 'Agrega a favoritos...' para guardar este link en la barra de marcadores de tu navegador.");
+ }
+ else {
+ alert("Para empezar a usar Readability, arrastra este link a la barra de marcadores de tu navegador.");
+ }
+ return false;
+ });
+
+});
+