From fa19f06242e6872f7bede8c769ec520b2d7501ee Mon Sep 17 00:00:00 2001
From: Nicky Case
Date: Fri, 26 Oct 2018 15:00:02 -0400
Subject: [PATCH] FINAL FIXES
---
README.md | 2 +
css/comic.css | 21 ++++++++++
index.html | 24 ++++++++----
js/comic.js | 36 ++++++++++++++++++
sharing/email.svg | 1 +
sharing/facebook.svg | 1 +
sharing/reddit.svg | 1 +
sharing/tumblr.svg | 1 +
sharing/twitter.svg | 1 +
sims/downloads/all.css | 4 +-
sims/downloads/download_all.js | 3 +-
supporters/index.html | 2 +-
.../peeps/{_underscore.png => underscore.png} | Bin
13 files changed, 86 insertions(+), 11 deletions(-)
create mode 100644 sharing/email.svg
create mode 100644 sharing/facebook.svg
create mode 100644 sharing/reddit.svg
create mode 100644 sharing/tumblr.svg
create mode 100644 sharing/twitter.svg
rename supporters/peeps/{_underscore.png => underscore.png} (100%)
diff --git a/README.md b/README.md
index 0de7f07..1812fcd 100644
--- a/README.md
+++ b/README.md
@@ -35,6 +35,8 @@ and was made possible thanks to [my Patreon supporters](https://www.patreon.com/
**Font:** [Patrick Hand](https://fonts.google.com/specimen/Patrick+Hand) by Patrick Wagesreiter
+**Share Buttons:** [Social Flat Rounded Rects](http://www.aha-soft.com/free-icons/) by Aha-Soft (CC BY)
+
## How To Translate:
**[IMPORTANT:
diff --git a/css/comic.css b/css/comic.css
index 211d792..e35f268 100644
--- a/css/comic.css
+++ b/css/comic.css
@@ -244,6 +244,27 @@ a:hover{
border-radius: 25px;
}
+#share_buttons{
+ text-align: center;
+ margin-top: 90px;
+ padding-bottom: 50px;
+}
+#share_buttons a{
+ position: relative;
+ transition: top 0.1s ease-in-out;
+ top:0px;
+}
+#share_buttons a:hover{
+ top:-3px;
+}
+#share_buttons img{
+ width: 40px;
+ height: 40px;
+ margin: 0 5px;
+ border-radius: 23px;
+ overflow: hidden;
+}
+
/*******************/
/* LANGUAGE PROMPT */
diff --git a/index.html b/index.html
index b3e2177..d22cc3c 100644
--- a/index.html
+++ b/index.html
@@ -34,7 +34,7 @@ Good luck, and many thanks again!
How To Remember Anything Forever-ish
-
+
@@ -42,18 +42,18 @@ Good luck, and many thanks again!
-
+
-
+
-
+
@@ -799,8 +799,8 @@ If that's not possible, and your text doesn't fit in its box, you can modify att
@@ -2002,6 +2002,9 @@ Remember, if your translated word is too big, you can modify the CSS! (especiall
~ Nicky Case
+
+
+
@@ -2267,6 +2270,13 @@ When you translate, make sure the [N] is there if it was there in the original.
DONE! Check your Downloads folder.
+
+
+ How To Remember Anything Forever-ish
+
+
+ an interactive comic on the art & science of memory
+
@@ -2376,7 +2386,7 @@ Good luck!
-
+
(note: it decays quickly, then slowly - "exponential decay")
diff --git a/js/comic.js b/js/comic.js
index af0e25f..799ecaf 100644
--- a/js/comic.js
+++ b/js/comic.js
@@ -515,4 +515,40 @@ xhr.open("GET", "translations.txt");
xhr.send();
+/////////////////////////////
+// SHARE BUTTONS ////////////
+/////////////////////////////
+var share_title = encodeURIComponent( $("#share_title").innerText.trim() );
+var share_desc = encodeURIComponent( $("#share_desc").innerText.trim() );
+var share_url = encodeURIComponent( /*window.location.origin+window.location.pathname*/ "https://ncase.me/remember/" );
+
+var hrefs = {
+ facebook: "https://www.facebook.com/sharer/sharer.php?u="+share_url,
+ twitter: "https://twitter.com/intent/tweet?source="+share_url+"&text="+share_title+" – "+share_desc+":%20"+share_url,
+ tumblr: "http://www.tumblr.com/share?v=3&u="+share_url+"&t=+share_title+&s=",
+ reddit: "http://www.reddit.com/submit?url="+share_url+"&title="+share_title,
+ email: "mailto:?subject="+share_title+"&body="+share_desc+":%20"+share_url
+};
+var platforms = [
+ "facebook",
+ "twitter",
+ "tumblr",
+ "reddit",
+ "email"
+];
+
+platforms.forEach(function(platform){
+
+ // Link
+ var link = document.createElement("a");
+ link.href = hrefs[platform];
+ link.target = "_blank";
+ $("#share_buttons").appendChild(link);
+
+ // Image
+ var img = new Image();
+ img.src = "./sharing/"+platform+".svg";
+ link.appendChild(img);
+
+});
diff --git a/sharing/email.svg b/sharing/email.svg
new file mode 100644
index 0000000..c66e4d3
--- /dev/null
+++ b/sharing/email.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/sharing/facebook.svg b/sharing/facebook.svg
new file mode 100644
index 0000000..b56ba16
--- /dev/null
+++ b/sharing/facebook.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/sharing/reddit.svg b/sharing/reddit.svg
new file mode 100644
index 0000000..224f27e
--- /dev/null
+++ b/sharing/reddit.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/sharing/tumblr.svg b/sharing/tumblr.svg
new file mode 100644
index 0000000..8823e4e
--- /dev/null
+++ b/sharing/tumblr.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/sharing/twitter.svg b/sharing/twitter.svg
new file mode 100644
index 0000000..074287b
--- /dev/null
+++ b/sharing/twitter.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/sims/downloads/all.css b/sims/downloads/all.css
index 04f9a34..bc66e6e 100644
--- a/sims/downloads/all.css
+++ b/sims/downloads/all.css
@@ -7,13 +7,13 @@
}
body{
- /*background:#bada55;*/
+ background:#bada55;
font-family: "PatrickHand", Helvetica, Arial;
background: none;
margin: 0;
}
canvas{
- width:150px;
+ width:50px;
margin: 5px;
}
#download{
diff --git a/sims/downloads/download_all.js b/sims/downloads/download_all.js
index 37aa1b3..ca85148 100644
--- a/sims/downloads/download_all.js
+++ b/sims/downloads/download_all.js
@@ -76,12 +76,13 @@ download_btn.onclick = function(){
var filename = results[0];
var canvas = results[1];
zip.file(filename+".png", canvas.toDataURL().substr(22), {base64: true});
- document.body.appendChild(canvas);
+ //document.body.appendChild(canvas);
});
// Download...
zip.generateAsync({type:"blob"})
.then(function(content) {
+
saveAs(content, "flashcards.zip");
// Done!
diff --git a/supporters/index.html b/supporters/index.html
index b0c596c..0e34d0e 100644
--- a/supporters/index.html
+++ b/supporters/index.html
@@ -105,7 +105,7 @@
T
Yu-Han Kuo
Zach Smith
-
_Underscore
+
_Underscore
ljt
diff --git a/supporters/peeps/_underscore.png b/supporters/peeps/underscore.png
similarity index 100%
rename from supporters/peeps/_underscore.png
rename to supporters/peeps/underscore.png