diff options
-rw-r--r-- | 18/index.html | 17 | ||||
-rw-r--r-- | _includes/head.html | 15 | ||||
-rw-r--r-- | _includes/header.html | 13 | ||||
-rw-r--r-- | _includes/relBase.html | 8 | ||||
-rw-r--r-- | _layouts/random-project.html | 3 | ||||
-rw-r--r-- | _layouts/slides.html | 5 | ||||
-rw-r--r-- | articles/random-projects.md | 4 | ||||
-rw-r--r-- | slides/pws/index.html | 9 | ||||
-rw-r--r-- | slides/pws/script.js | 10 | ||||
-rw-r--r-- | slides/pws/style.css | 4 |
10 files changed, 52 insertions, 36 deletions
diff --git a/18/index.html b/18/index.html index e570825..3289b6a 100644 --- a/18/index.html +++ b/18/index.html @@ -1,4 +1,5 @@ <!DOCTYPE html> +{% include relBase.html %} <html lang="nl"> <head> <meta charset="UTF-8"> @@ -7,18 +8,12 @@ <link rel="stylesheet" href="https://opensource.keycdn.com/fontawesome/4.7.0/font-awesome.min.css" integrity="sha384-dNpIIXE8U05kAbPhy3G1cz+yZmTzA6CY8Vg/u2L9xRnHjJiAK76m2BIEaSEV+/aU" crossorigin="anonymous"> <title>18.</title> - <link rel="stylesheet" href="/style/18.css"> - <script> - var host = "noahloomans.com"; - if ((host == window.location.host) && (window.location.protocol != 'https:')) { - window.location = window.location.toString().replace(/^http:/, "https:"); - } - </script> + <link rel="stylesheet" href="{{ relBase }}style/18.css"> <!-- sigh... favicon --> - <link rel="apple-touch-icon" sizes="180x180" href="/assets/icons/apple-touch-icon.png"> - <link rel="icon" type="image/png" href="/assets/icons/favicon-32x32.png" sizes="32x32"> - <link rel="icon" type="image/png" href="/assets/icons/favicon-16x16.png" sizes="16x16"> + <link rel="apple-touch-icon" sizes="180x180" href="{{ relBase }}assets/icons/apple-touch-icon.png"> + <link rel="icon" type="image/png" href="{{ relBase }}assets/icons/favicon-32x32.png" sizes="32x32"> + <link rel="icon" type="image/png" href="{{ relBase }}assets/icons/favicon-16x16.png" sizes="16x16"> </head> <body> <div class="wrapper"> @@ -68,6 +63,6 @@ <p>Noah.</p> </div> </div> - <script src="/18/script.js"></script> + <script src="{{ relBase }}18/script.js"></script> </body> </html> diff --git a/_includes/head.html b/_includes/head.html index 0dc3028..9bedb01 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -1,21 +1,16 @@ +{% include relBase.html %} <head> <meta charset="utf-8"> <title>Noah Loomans</title> <meta name="theme-color" content="#ffffff"> <meta name="viewport" content="width=device-width, initial-scale=1"> - <link rel="stylesheet" href="/style/main.css"> + <link rel="stylesheet" href="{{relBase}}style/main.css"> <link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet"> - <script> - var host = "noahloomans.com"; - if ((host == window.location.host) && (window.location.protocol != 'https:')) { - window.location = window.location.toString().replace(/^http:/, "https:"); - } - </script> <!-- sigh... favicon --> - <link rel="apple-touch-icon" sizes="180x180" href="/assets/icons/apple-touch-icon.png"> - <link rel="icon" type="image/png" href="/assets/icons/favicon-32x32.png" sizes="32x32"> - <link rel="icon" type="image/png" href="/assets/icons/favicon-16x16.png" sizes="16x16"> + <link rel="apple-touch-icon" sizes="180x180" href="{{relBase}}assets/icons/apple-touch-icon.png"> + <link rel="icon" type="image/png" href="{{relBase}}assets/icons/favicon-32x32.png" sizes="32x32"> + <link rel="icon" type="image/png" href="{{relBase}}assets/icons/favicon-16x16.png" sizes="16x16"> {% if page.info %} <meta name="og:title" content="{{ page.info.title }}" /> diff --git a/_includes/header.html b/_includes/header.html index 3b0c26e..eb46a8e 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -1,7 +1,8 @@ +{% include relBase.html %} <header> <div class="logo-container"> - <a href="/"> - <img src="/assets/face.jpg" alt="Noah Loomans" class="logo"> + <a href="{{relBase}}"> + <img src="{{relBase}}assets/face.jpg" alt="Noah Loomans" class="logo"> </a> <div class="dotted-line"></div> </div> @@ -10,10 +11,10 @@ <div class="menu"> <ul class='no-markdown'> <li>const menu = [</li> - <li><a href="/">'Home'</a>,</li> - <li><a href="/projects/">'Projects'</a>,</li> - <li><a href="/random-projects/">'Random Projects'</a>,</li> - <li><a href="/badges/">'Badges'</a></li> + <li><a href="{{relBase}}">'Home'</a>,</li> + <li><a href="{{relBase}}projects/">'Projects'</a>,</li> + <li><a href="{{relBase}}random-projects/">'Random Projects'</a>,</li> + <li><a href="{{relBase}}badges/">'Badges'</a></li> <li>]</li> </ul></div> </div> diff --git a/_includes/relBase.html b/_includes/relBase.html new file mode 100644 index 0000000..b2d4bc4 --- /dev/null +++ b/_includes/relBase.html @@ -0,0 +1,8 @@ +{% assign relBase = '' %} +{% assign tempDepth = page.url | append: 'hackish-solution' | split: '/' | size | minus: 2 %} +{% for i in (1..tempDepth) %} + {% assign relBase = relBase | append: "../" %} +{% endfor %} +{% if relBase == '' %} + {% assign relBase = './' %} +{% endif %} diff --git a/_layouts/random-project.html b/_layouts/random-project.html index 4c7f650..bae9a24 100644 --- a/_layouts/random-project.html +++ b/_layouts/random-project.html @@ -1,5 +1,6 @@ --- --- +{% include relBase.html %} <!DOCTYPE html> <html> {% include head.html %} @@ -7,7 +8,7 @@ {% if page.branding == true %} <div class="random-project__header"> <div class="logo"> - <img src="/assets/face.jpg" alt="Noah Loomans" class="logo"> + <img src="{{relBase}}assets/face.jpg" alt="Noah Loomans" class="logo"> </div> <div class="text">Random Project</div> <div class="grow"></div> diff --git a/_layouts/slides.html b/_layouts/slides.html index db2243a..47be94e 100644 --- a/_layouts/slides.html +++ b/_layouts/slides.html @@ -1,9 +1,10 @@ <!DOCTYPE html> +{% include relBase.html %} <html> <head> <meta charset="utf-8"> <title>{{ page.title }}</title> - <link rel="stylesheet" href="/slides/reveal.js/reveal.css"> + <link rel="stylesheet" href="{{relBase}}slides/reveal.js/reveal.css"> <link href="https://fonts.googleapis.com/css?family=Roboto+Mono" rel="stylesheet"> {% for style in page.styles %} <link rel="stylesheet" href="{{ style }}"> @@ -11,7 +12,7 @@ </head> <body> {{ content }} - <script src="/slides/reveal.js/reveal.js"></script> + <script src="{{relBase}}slides/reveal.js/reveal.js"></script> {% for script in page.scripts %} <script src="{{ script }}"></script> {% endfor %} diff --git a/articles/random-projects.md b/articles/random-projects.md index 4d16824..d788b81 100644 --- a/articles/random-projects.md +++ b/articles/random-projects.md @@ -5,8 +5,8 @@ permalink: /random-projects/ These are some of the random project I've made: - - [Bad Password Generator](/random-projects/bad-password-generator/) - - [Season 3 Countdown](/random-projects/season3-countdown/) + - [Bad Password Generator]({{ relBase }}random-projects/bad-password-generator/) + - [Season 3 Countdown]({{ relBase }}random-projects/season3-countdown/) The source code of all of them can be found on [GitLab](https://gitlab.com/nloomans/noahloomans.com/tree/master/random-projects). diff --git a/slides/pws/index.html b/slides/pws/index.html index af9fb6d..cdf41a7 100644 --- a/slides/pws/index.html +++ b/slides/pws/index.html @@ -45,7 +45,7 @@ styles: [ ../reveal.js/theme/blood.css, ../reveal.js/zenburn.css, ./style.css ] </section> <section> <section> - <p>Hoe de robot werkt.</p> + <h3>Hoe werkt de robot?</h3> </section> <section data-background-image="https://static1.squarespace.com/static/571803cd27d4bde8997774b0/t/57361430f85082cb3f1a7ee8/1463161911625/web-iStock_000084382279_Large.jpg?format=1500w" @@ -71,6 +71,13 @@ styles: [ ../reveal.js/theme/blood.css, ../reveal.js/zenburn.css, ./style.css ] <section> <h3>Process</h3> </section> + <section> + <ul> + <li>3 keer herinstalleren</li> + <li class="fragment">Van IOTA naar Ethereum</li> + <li class="fragment">Niet perfect</li> + </ul> + </section> <section data-background-image="/assets/robot.jpeg" data-background-size="contain"> diff --git a/slides/pws/script.js b/slides/pws/script.js index 3f95d00..e044cd7 100644 --- a/slides/pws/script.js +++ b/slides/pws/script.js @@ -1,15 +1,18 @@ -const web3 = new Web3(new Web3.providers.HttpProvider('http://95.85.1.235:8545')); +const web3 = new Web3(new Web3.providers.HttpProvider('http://80.61.192.39:8545')); Reveal.initialize({ history: true, backgroundTransition: 'slide' }) -function addToSlide(data, isHeader) { +function addToSlide(data, isHeader, isToRobot) { const pre = document.createElement('pre'); if (isHeader) { pre.classList.add('header'); } + if (isToRobot) { + pre.classList.add('robot'); + } pre.textContent = data; document.querySelector('#blockchain').appendChild(pre); @@ -39,6 +42,7 @@ filter.watch((err, blockHash) => { } const humanReadableValue = web3.fromWei(transaction.value, 'ether').toString(); - addToSlide(`${compactStr(transaction.from)} -> ${humanReadableValue} ETHER -> ${compactStr(transaction.to)}`); + const isToRobot = transaction.to === '0x5bcd404e6b96dfd033bd362d0f947753d5fb1f57' + addToSlide(`${compactStr(transaction.from)} -> ${humanReadableValue} ETHER -> ${compactStr(transaction.to)}`, false, isToRobot); }); }); diff --git a/slides/pws/style.css b/slides/pws/style.css index 73cf12a..0f5ebc5 100644 --- a/slides/pws/style.css +++ b/slides/pws/style.css @@ -45,6 +45,10 @@ font-weight: bold; } +.robot { + background-color: #7d7d23; +} + @keyframes appear { from { background-color: #91971b; |