From 1eae70c99e5a1414dfe194b1323d59771557a062 Mon Sep 17 00:00:00 2001 From: David Wu Date: Sun, 17 Dec 2017 19:21:38 +0100 Subject: [PATCH 1/3] Add logo hyperlink to repo --- docs/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.html b/docs/index.html index c8bf8ab88fe..b901fc395e0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -23,7 +23,7 @@
-

 30 seconds of code

+

 30 seconds of code

From e3e7ca3eaaf9e5d0ca3b585db0007dcedee16a61 Mon Sep 17 00:00:00 2001 From: David Wu Date: Sun, 17 Dec 2017 19:26:17 +0100 Subject: [PATCH 2/3] remove changes from non-static index --- docs/index.html | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/index.html b/docs/index.html index b901fc395e0..e11294cd0ce 100644 --- a/docs/index.html +++ b/docs/index.html @@ -23,7 +23,7 @@
-

 30 seconds of code

+

 30 seconds of code

@@ -934,12 +934,12 @@

Utility

Converts a colorcode to a rgb() string.

Use bitwise right-shift operator and mask bits with & (and) operator to convert a hexadecimal color code (prefixed with #) to a string with the RGB values. In case it's a 3-digit-colorcode, do the same with the 6-digit-colorcode extended by the extendHex() function (ref. extendHex snippet)

const hexToRgb = hex => {
-  const extendHex = shortHex => 
+  const extendHex = shortHex =>
     '#' + shortHex.slice(shortHex.startsWith('#') ? 1 : 0).split('').map(x => x+x).join('');
-  return hex.slice(1).length==3 ? 
+  return hex.slice(1).length==3 ?
   `rgb(${parseInt(extendHex(hex).slice(1), 16) >> 16}, ${(parseInt(extendHex(hex).slice(1), 16) & 0x00ff00) >> 8}, ${parseInt(extendHex(hex).slice(1), 16) & 0x0000ff})`:
   `rgb(${parseInt(hex.slice(1), 16) >> 16}, ${(parseInt(hex.slice(1), 16) & 0x00ff00) >> 8}, ${parseInt(hex.slice(1), 16) & 0x0000ff})`;
-}   
+}
 // hexToRgb('#27ae60') -> 'rgb(39, 174, 96)'
 // hexToRgb('#acd') -> 'rgb(170, 204, 221)'
 
@@ -1042,8 +1042,7 @@

Utility


- + - From f715571a5c9db0bab49df720929c5a49fa2a7b20 Mon Sep 17 00:00:00 2001 From: David Wu Date: Sun, 17 Dec 2017 19:26:27 +0100 Subject: [PATCH 3/3] make logo a hyperlink to repository --- static-parts/index-start.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static-parts/index-start.html b/static-parts/index-start.html index 3b5b1c52553..0aeee1e31a7 100644 --- a/static-parts/index-start.html +++ b/static-parts/index-start.html @@ -23,7 +23,7 @@
-

 30 seconds of code

+

 30 seconds of code