diff --git a/.gitignore b/.gitignore index 6684837..896953a 100644 --- a/.gitignore +++ b/.gitignore @@ -54,4 +54,8 @@ packages/* .vagrant .vagrant/* -.env \ No newline at end of file +.env + +# built assets +themes/navy/source/js/vendor.js +themes/navy/source/js/vendor.js.map diff --git a/.gitmodules b/.gitmodules index b594082..3cccde8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "themes/navy/layout/partial/shared-partials"] path = themes/navy/layout/partial/shared-partials url = https://github.com/status-im/status.im-partials +[submodule "themes/navy/source/js/shared-js"] + path = themes/navy/source/js/shared-js + url = git@github.com:status-im/status-im-js.git diff --git a/gulpfile.js b/gulpfile.js index a77babf..f451e71 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -37,7 +37,11 @@ var config = { paths: { src: { scss: './themes/navy/source/scss/*.scss', - js: './themes/navy/source/js/main.js', + js: [ + './themes/navy/source/js/shared-js/js/utils.js', + './themes/navy/source/js/shared-js/js/popups.js', + './themes/navy/source/js/main.js', + ] }, dist: { css: './public/css', diff --git a/package.json b/package.json index 862b2f1..9c03712 100644 --- a/package.json +++ b/package.json @@ -13,13 +13,14 @@ "update-submodules": "git submodule update --recursive --remote" }, "dependencies": { - "gulp": "^3.9.1", "cheerio": "^0.20.0", + "gulp": "^3.9.1", "hexo": "^3.7.1", "hexo-deployer-git": "^0.3.1", "hexo-generator-archive": "^0.1.4", "hexo-generator-feed": "^1.1.0", "hexo-generator-sitemap": "^1.1.2", + "hexo-renderer-ejs": "^0.3.1", "hexo-renderer-jade": "^0.4.1", "hexo-renderer-marked": "^0.2.10", "hexo-renderer-stylus": "^0.3.1", diff --git a/source/docs/building.md b/source/docs/building.md index b7bd0ab..11621df 100644 --- a/source/docs/building.md +++ b/source/docs/building.md @@ -8,30 +8,108 @@ This document will explain how to install, test, and run Nimbus on your local ma ## Getting Started - [install Nim](https://bitfalls.com/nim1) -- be on a command-line friendly system (i.e. access to Terminal / Console / Git Bash / Powershell) +- be on a command-line friendly system (i.e. access to Terminal / Console / Cmder / [Git Bash](https://git-scm.com) / Powershell) -## Prerequisites +Alternatively, [download our pre-configured Vagrant box](https://our.status.im/setting-up-a-local-vagrant-environment-for-nim-development/). -- install [RocksDB](https://rocksdb.org/) via official instructions or by running the below commands: +_Note: the Nimbus build system uses Makefiles to make the process identical across platforms, easy to update, and compatible with any OS. We don't use Nim's package manager Nimble because it's fundamentally broken._ - - on OS X: - ```bash - brew install rocksdb - curl https://nim-lang.org/choosenim/init.sh -sSf | sh - ``` - - on Linux - ```bash - sudo apt-get install librocksdb-dev rocksdb # or your own Linux distribution's equivalent - curl https://nim-lang.org/choosenim/init.sh -sSf | sh - ``` - -## Install Nimbus +### Installing + +Clone Nimbus. ```bash -git clone https://github.com/status-im/nimbus +git clone git@github.com:status-im/nimbus cd nimbus -nimble install -nimble test +``` +### Dependencies + +To run Nimbus, we'll need the RocksDB database and a newer version of Nim. On OS X, execute: + +```bash +brew install rocksdb +curl https://nim-lang.org/choosenim/init.sh -sSf | sh ``` -Run Nimbus with `nimbus` or look at flags and options with `nimbus --help`. \ No newline at end of file +On Linux, this should do it: + +```bash +sudo apt-get install librocksdb-dev rocksdb # or your own Linux distribution's equivalent +curl https://nim-lang.org/choosenim/init.sh -sSf | sh +``` + +On Windows, please first make sure you have `make` installed - either in the form of `MinGW32make.exe` via [MinGW website](http://www.mingw.org) or regular old make installed through Git Bash or a package manager like Chocolatey: + +```bash +choco install make +``` + +_Note - Windows requires you to add programs you want to be able to execute from anywhere on your machine to your PATH environment variable. This is done by simply opening the Start Menu, searching for "Env", selecting "Edit the system environment variables", clicking on Environment Variables in the popup, and then editing the PATH variable in the list by adding a new entry that corresponds to the folder into which you installed your version of `make` (Choco takes care of this for you, only applies if you installed manually). [This is what mine looks like](https://imgur.com/a/yQIi6Qa)._ + +Next, run: + +``` +make fetch-dlls +``` + +or + +``` +mingw32make.exe fetch-dlls +``` + +This downloads the rocksdb and sqlitedb DLL files into `nimbus/build` so that the built program can read them. + +_In the content below, `make` will refer to `make` or `mingw32.exe`, depending on which you're using. Make the change to your commands accordingly._ + +### Building, Testing, Running + +To build Nimbus: + +On OS X / Linux: + +```bash +make +``` + +The Nimbus client will now be in `build/nimbus` on any OS and can be run with the same command: + +```bash +./build/nimbus +``` + +It should synchronize up to block 49439 and then crash, as mentioned above. Look at flags and options with `build/nimbus --help`. + +To test, run: + +```bash +make test +``` + +To update the source files for a rebuild: + +```bash +make update +``` + +To clean the slate and start with a fresh build: + +```bash +make clean +``` + +### Ethereum 2.0 + +To run and test the Ethereum 2.0 version of Nimbus (the network simulation): + +```bash +make eth2_network_simulation +``` + +You should now see attestations and blocks being produced and confirmed and a bunch of other details from the nodes as they do their thing. + +![Beacon nodes communicating](/img/beacon.jpg) + +--- + +Congrats! You're now running Nimbus for both the Ethereum 1.0 platform, and the coming [Ethereum 2.0](https://our.status.im/tag/two-point-oh). \ No newline at end of file diff --git a/source/docs/design.md b/source/docs/design.md index 80c7b83..61eb66f 100644 --- a/source/docs/design.md +++ b/source/docs/design.md @@ -42,4 +42,4 @@ Within the community at large, we will promote Ethereum as the leader of scalabl ## Bounty-Based Development -To entice the community to accelerate the development, we will attach bounties to and **[publish](https://openbounty.status.im/app#/)** the tasks that can be self-contained and defined clearly. +To entice the community to accelerate the development, we will attach bounties to and **[publish](https://openbounty.status.im/app#/)** the tasks that can be self-contained and defined clearly. We'll also have bounties [on Gitcoin](https://gitcoin.co/explorer?keywords=nimbus&order_by=-web3_created). diff --git a/source/docs/faq.md b/source/docs/faq.md index bdd8ec1..0038700 100644 --- a/source/docs/faq.md +++ b/source/docs/faq.md @@ -8,12 +8,12 @@ In talking to people both familiar and complete strangers to Ethereum clients, t ### Q: When do you expect to have it production-ready? -Not for a while. Sharding is a long ways off, and until then we'll be focusing on getting Ethereum v1 tests to pass in our full node mode. The full node will be ready in 2019, but the super-light implementation might take longer. +Soon. We've got some network simulations already running for [Ethereum 2.0](https://out.status.im/tag/two-point-oh), and we're syncing up to block 50000 on Ethereum 1.0. To stay in the loop, please follow our development updates on [our blog](https://our.status.im/tag/nimbus). ### Q: How is a super-light node different from just calling Infura through Web3js? A Web3js or any similar JavaScript package for communicating with the blockchain is basically a more advanced XMLHttpRequest / Fetch wrapper. What we mean by this is that these packages retrieve information from another node and trust it implicitly. They ask "has this transaction been confirmed?" and get a response that's either "yes" or "that transaction is unknown". With light nodes, they ask "give me the data to check if this transaction has been confirmed" and then check on their own. This is a trust-minimized setup which combines the best of both worlds - very little storage and processing power required while allowing for cryptographic verification of the full node's claims. -### Q: What's the plan for mobile? You speak of deploying to mobile devices, but Nimbus only compiles to C, C++ and JavaScript and iOS and Android don't support C natively. Will you be compiling to JS and deploying with a web wrapper? That doesn't sound performant! +### Q: What's the plan for mobile? -Native compiles with Nim work for both Android and iOS, just like geth written in go works. It's all NDK/C API. We'll soon have published specific instructions on how to compile it for all manner of devices. \ No newline at end of file +While true that Nimbus only compiles to C, C++ and JavaScript and iOS and Android don't support C natively (and we definitely don't want a JS version of Nimbus running on a mobile device), native compiles with Nim work for both Android and iOS, just like geth written in go works. It's all NDK/C API. We'll soon have published specific instructions on how to compile it for all manner of devices, but you can already give it a go by following the [build instructions](/docs/building.html). \ No newline at end of file diff --git a/source/docs/team.md b/source/docs/team.md index 205804e..a785218 100644 --- a/source/docs/team.md +++ b/source/docs/team.md @@ -17,11 +17,6 @@ With a keen interest and background in peer-to-peer applications and compilers, Mamy joined Status as a Nim developer in the research team. After a career in leading American and French banks and non-profits, he decided that tech, blockchain and AI will eat the world. On the side, instead of mining he is teaching deep learning tricks to his GPU. -### [Ryan Lipscombe](https://github.com/coffeepots) - -Fascinated by the transformative potential of blockchain and distributed systems, Ryan joined Status research as a Nim developer. His career spans from data science to embedded systems and has been part of the Nim community since 2015, working on database components and virtual machines for evolutionary systems. - - ### [Yuriy Glukhov](https://github.com/yglukhov) Yuriy has deep passion for new technologies and keen interest in many areas of IT. He was one of the first CTOs to successfully use Nim in a commercial project. @@ -39,6 +34,14 @@ Dustin is the team's Pure Quickwitted Indianglassfish. Bruno is the technical writer and team's DX guy. He's been in blockchain for 3 years after 15 years of web. His passion for decentralization and forwarding the world's truly censorship-free internet is what drove him to Nimbus. What little free time he has, he tries to spend on sports, board games and VR. You can add him on Oculus and Steam as theswader. +### [Peter Munch-Ellingsen](https://github.com/PMunch) + +Peter has been working with Nim since discovering it during his studies back in 2016. Since a young age he's been interested in programming. Starting out with games, but touching in on everything from web to high-performance and distributed computing through his work and studies. + +### [Ștefan Talpalaru](https://github.com/stefantalpalaru) + +Ștefan comes from a decade of professional web development and a decade and a half of amateur free software contributions in a wide range of domains and programming languages. His claim to fame in the Nim world is the grafting of a Go runtime to the Nim compiler by way of the pluggable garbage collector API. + # ETYMOLOGY Nimbus is a reference to: diff --git a/themes/navy/layout/index.swig b/themes/navy/layout/index.swig index b14999d..e8234f0 100644 --- a/themes/navy/layout/index.swig +++ b/themes/navy/layout/index.swig @@ -5,7 +5,7 @@

Researching and implementing lighter Ethereum 2.0 clients

JOIN OUR GITTER - GET INVOLVED + DOCUMENTATION
@@ -14,7 +14,7 @@

Research for Scale️️

Nimbus is a research project and a client implementation for Ethereum 2.0 designed to perform well on embedded systems and personal mobile devices, including older smartphones with resource-restricted hardware.

- See our repos + See our repos
@@ -65,8 +65,8 @@

Join the Team

We are always looking for passionate and talented individuals to join our team.

- See list of open roles - + See list of open roles +

Work on Bounties

@@ -112,15 +112,6 @@

-
- -

Ryan Lipscombe

-

Descriptive Liquid Nightcrawler

-

See Github profile - -

-

Zahary Karadjov

@@ -145,14 +136,30 @@ See Github profile

-
- -

Bruno Skvorc

-

Sarcastic General BlackRussianTerrier

-

See Github profile - -

-
+
+ +

Bruno Skvorc

+

Sarcastic General BlackRussianTerrier

+

See Github profile + +

+
+
+ +

Peter Munch-Ellingsen

+

Imaginative Admirable Elephant

+

See Github profile + +

+
+
+ +

Ștefan Talpalaru

+

Teeming Frayed Argali

+

See Github profile + +

+

Read our Blog

diff --git a/themes/navy/layout/partial/shared-partials b/themes/navy/layout/partial/shared-partials index ef5db8a..1aac683 160000 --- a/themes/navy/layout/partial/shared-partials +++ b/themes/navy/layout/partial/shared-partials @@ -1 +1 @@ -Subproject commit ef5db8a4de18fe58b1e5e44c7b7f965b13850a91 +Subproject commit 1aac6836d674dbd9006775345a947cf7a8783752 diff --git a/themes/navy/source/img/beacon.jpg b/themes/navy/source/img/beacon.jpg new file mode 100644 index 0000000..ab90aa5 Binary files /dev/null and b/themes/navy/source/img/beacon.jpg differ diff --git a/themes/navy/source/img/peter.jpg b/themes/navy/source/img/peter.jpg new file mode 100644 index 0000000..68b439d Binary files /dev/null and b/themes/navy/source/img/peter.jpg differ diff --git a/themes/navy/source/img/ryan.jpg b/themes/navy/source/img/ryan.jpg deleted file mode 100644 index d3e6c6d..0000000 Binary files a/themes/navy/source/img/ryan.jpg and /dev/null differ diff --git a/themes/navy/source/img/stefan.jpg b/themes/navy/source/img/stefan.jpg new file mode 100644 index 0000000..0fd0aef Binary files /dev/null and b/themes/navy/source/img/stefan.jpg differ diff --git a/themes/navy/source/js/main.js b/themes/navy/source/js/main.js index c64457c..6639667 100644 --- a/themes/navy/source/js/main.js +++ b/themes/navy/source/js/main.js @@ -63,43 +63,8 @@ $(document).ready(function () { /* Popups */ -let community = document.querySelectorAll(".item--dropdown-community")[0] -let projects = document.querySelectorAll(".item--dropdown-projects")[0] - -let popups = document.querySelectorAll(".popup-wrap") -let overlays = document.querySelectorAll(".popup-overlay") -let closeButtons = document.querySelectorAll(".popup__button--close") - -let activePopup = null; -let activeOverlay = null; - -community.addEventListener('click', function(event){ - showPopup(popups[0]) - event.preventDefault() -}) - -projects.addEventListener('click', function(event){ - showPopup(popups[1]) - event.preventDefault() -}) - -closeButtons.forEach((button) => { - button.addEventListener('click', closeActivePopup) -}) - -overlays.forEach((overlay) => { - overlay.addEventListener('click', closeActivePopup) -}) - -function showPopup(whichPopup) { - activePopup = whichPopup - addClassToElement(whichPopup, "popup--shown"); -} - -function closeActivePopup() { - removeClassFromElement(activePopup, "popup--shown"); - activePopup = null; -} +var addClassToElement = require('./shared-js/js/utils').addClassToElement; +var removeClassFromElement = require('./shared-js/js/utils').removeClassFromElement; /* Code highlighting */ @@ -153,19 +118,4 @@ function showNav() { function closeNav() { removeClassFromElement(nav, "mobile-nav--shown"); -} - -/*--- Utils ---*/ -function addClassToElement(element, className) { - (element.classList) ? element.classList.add(className) : element.className += ' ' + className - return element -} - -function removeClassFromElement(element, className) { - if(element.classList) { - element.classList.remove(className) - } else { - element.className = element.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' ') - } - return element -} +} \ No newline at end of file diff --git a/themes/navy/source/js/shared-js b/themes/navy/source/js/shared-js new file mode 160000 index 0000000..24185e5 --- /dev/null +++ b/themes/navy/source/js/shared-js @@ -0,0 +1 @@ +Subproject commit 24185e51517464988a80e3223417a4b3183c7954 diff --git a/themes/navy/source/js/vendor.js b/themes/navy/source/js/vendor.js deleted file mode 100644 index 310df13..0000000 --- a/themes/navy/source/js/vendor.js +++ /dev/null @@ -1,172 +0,0 @@ -(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i' + val.title + '

' + val.title + '

' + excerpt + '

Read More
'); - }); - } - }); - - function getWords(str) { - return str.split(/\s+/).slice(0, 25).join(" "); - } - - var months = { '01': 'Jan', '02': 'Feb', '03': 'Mar', '04': 'Apr', '05': 'May', '06': 'Jun', '07': 'Jul', '08': 'Aug', '09': 'Sep', '10': 'Oct', '11': 'Nov', '12': 'Dec' }; - url = 'https://our.status.im/ghost/api/v0.1/posts/?order=published_at%20desc&limit=2&formats=plaintext&client_id=ghost-frontend&client_secret=2b055fcd57ba'; - - $.ajax({ - type: "get", - url: url, - success: function (response) { - response.posts = response.posts.reverse(); - $.each(response.posts, function (index, val) { - var excerpt = ''; - if (val.custom_excerpt != null) { - excerpt = val.custom_excerpt; - } else { - excerpt = getWords(val.plaintext); - } - var newDate = new Date(val.published_at); - var minutes = newDate.getMinutes(); - minutes = minutes + ""; - if (minutes.length == 1) { - minutes = '0' + minutes; - } - $('.latest-posts').prepend(' \ -
\ - \ -

' + val.title + '

\ -
\ - '); - }); - } - }); -}); - -/* Popups */ - -let community = document.querySelectorAll(".item--dropdown-community")[0]; -let projects = document.querySelectorAll(".item--dropdown-projects")[0]; - -let popups = document.querySelectorAll(".popup-wrap"); -let overlays = document.querySelectorAll(".popup-overlay"); -let closeButtons = document.querySelectorAll(".popup__button--close"); - -let activePopup = null; -let activeOverlay = null; - -community.addEventListener('click', function (event) { - showPopup(popups[0]); - event.preventDefault(); -}); - -projects.addEventListener('click', function (event) { - showPopup(popups[1]); - event.preventDefault(); -}); - -closeButtons.forEach(button => { - button.addEventListener('click', closeActivePopup); -}); - -overlays.forEach(overlay => { - overlay.addEventListener('click', closeActivePopup); -}); - -function showPopup(whichPopup) { - activePopup = whichPopup; - addClassToElement(whichPopup, "popup--shown"); -} - -function closeActivePopup() { - removeClassFromElement(activePopup, "popup--shown"); - activePopup = null; -} - -/* Code highlighting */ - -function highlight() { - $('pre code').each(function (i, block) { - hljs.highlightBlock(block); - }); -} -$(document).ready(function () { - try { - highlight(); - } catch (err) { - console.log("retrying..."); - setTimeout(function () { - highlight(); - }, 2500); - } - - var clipboard = new ClipboardJS(".btn"); - clipboard.on('success', function (e) { - var id = $(e.trigger).attr("data-clipboard-target"); - $(id).toggleClass("flash"); - setTimeout(function () { - $(id).toggleClass("flash"); - }, 200); - e.clearSelection(); - }); -}); - -/* Mobile Nav */ - -let moreLink = document.querySelectorAll(".item--more")[0]; - -let nav = document.querySelectorAll(".mobile-nav-wrap")[0]; -let navOverlay = document.querySelectorAll(".mobile-nav-overlay")[0]; -let navCloseButton = document.querySelectorAll(".mobile-nav-close")[0]; - -moreLink.addEventListener('click', function (event) { - showNav(); - event.preventDefault(); -}); - -navCloseButton.addEventListener('click', closeNav); -navOverlay.addEventListener('click', closeNav); - -function showNav() { - addClassToElement(nav, "mobile-nav--shown"); -} - -function closeNav() { - removeClassFromElement(nav, "mobile-nav--shown"); -} - -/*--- Utils ---*/ -function addClassToElement(element, className) { - element.classList ? element.classList.add(className) : element.className += ' ' + className; - return element; -} - -function removeClassFromElement(element, className) { - if (element.classList) { - element.classList.remove(className); - } else { - element.className = element.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' '); - } - return element; -} - -},{}]},{},[1]) -//# sourceMappingURL=vendor.js.map diff --git a/themes/navy/source/js/vendor.js.map b/themes/navy/source/js/vendor.js.map deleted file mode 100644 index 6b6ad6f..0000000 --- a/themes/navy/source/js/vendor.js.map +++ /dev/null @@ -1,15 +0,0 @@ -{ - "version": 3, - "sources": [ - "node_modules/browser-pack/_prelude.js", - "themes/navy/source/js/main.js" - ], - "names": [], - "mappings": "AAAA;ACAA,EAAE,QAAF,EAAY,KAAZ,CAAkB,YAAY;;AAE5B;AACA,IAAE,eAAF,EAAmB,MAAnB,CAA0B,EAAE,mCAAF,EAAuC,CAAvC,CAA1B;AACA,IAAE,eAAF,EAAmB,MAAnB,CAA0B,EAAE,kCAAF,EAAsC,CAAtC,CAA1B;;AAEA,MAAI,MAAM,uKAAV;AACA,MAAI,UAAU,CAAC,SAAS,QAAV,EAAoB,IAApB,EAA0B,SAAS,IAAnC,EAAyC,SAAS,QAAlD,EAA4D,IAA5D,CAAiE,EAAjE,CAAd;;AAEA,IAAE,IAAF,CAAO;AACL,UAAM,KADD;AAEL,SAAK,GAFA;AAGL,aAAS,UAAU,QAAV,EAAoB;AAC3B,eAAS,KAAT,GAAiB,SAAS,KAAT,CAAe,OAAf,EAAjB;AACA,QAAE,IAAF,CAAO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C,CAA9C,CAAV;AACA,IAAI,aAAa,SAAS,gBAAT,CAA0B,qBAA1B,EAAiD,CAAjD,CAAjB;AACA,IAAI,iBAAiB,SAAS,gBAAT,CAA0B,mBAA1B,EAA+C,CAA/C,CAArB;;AAGA,SAAS,gBAAT,CAA0B,OAA1B,EAAmC,UAAS,KAAT,EAAe;AAC9C;AACA,QAAM,cAAN;AACH,CAHD;;AAKA,eAAe,gBAAf,CAAgC,OAAhC,EAAyC,QAAzC;AACA,WAAW,gBAAX,CAA4B,OAA5B,EAAqC,QAArC;;AAGA,SAAS,OAAT,GAAmB;AACjB,oBAAkB,GAAlB,EAAuB,mBAAvB;AACD;;AAED,SAAS,QAAT,GAAoB;AAClB,yBAAuB,GAAvB,EAA4B,mBAA5B;AACD;;AAED;AACA,SAAS,iBAAT,CAA2B,OAA3B,EAAoC,SAApC,EAA+C;AAC5C,UAAQ,SAAT,GAAsB,QAAQ,SAAR,CAAkB,GAAlB,CAAsB,SAAtB,CAAtB,GAAyD,QAAQ,SAAR,IAAqB,MAAM,SAApF;AACA,SAAO,OAAP;AACD;;AAED,SAAS,sBAAT,CAAgC,OAAhC,EAAyC,SAAzC,EAAoD;AAClD,MAAG,QAAQ,SAAX,EAAsB;AACpB,YAAQ,SAAR,CAAkB,MAAlB,CAAyB,SAAzB;AACD,GAFD,MAEO;AACL,YAAQ,SAAR,GAAoB,QAAQ,SAAR,CAAkB,OAAlB,CAA0B,IAAI,MAAJ,CAAW,YAAY,UAAU,KAAV,CAAgB,GAAhB,EAAqB,IAArB,CAA0B,GAA1B,CAAZ,GAA6C,SAAxD,EAAmE,IAAnE,CAA1B,EAAoG,GAApG,CAApB;AACD;AACD,SAAO,OAAP;AACD", - "file": "generated.js", - "sourceRoot": "", - "sourcesContent": [ - "(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c=\"function\"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error(\"Cannot find module '\"+i+\"'\");throw a.code=\"MODULE_NOT_FOUND\",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u=\"function\"==typeof require&&require,i=0;i\"'+

'+ val.title +'

'+ excerpt +'

Read More ');\n });\n }\n });\n\n function getWords(str) {\n return str.split(/\\s+/).slice(0,25).join(\" \");\n }\n\n var months = {'01':'Jan', '02':'Feb', '03':'Mar', '04':'Apr', '05':'May', '06':'Jun', '07':'Jul', '08':'Aug', '09':'Sep', '10':'Oct', '11':'Nov', '12':'Dec'};\n url = 'https://our.status.im/ghost/api/v0.1/posts/?order=published_at%20desc&limit=2&formats=plaintext&client_id=ghost-frontend&client_secret=2b055fcd57ba';\n\n $.ajax({\n type: \"get\",\n url: url,\n success: function (response) {\n response.posts = response.posts.reverse();\n $.each(response.posts, function (index, val) {\n var excerpt = '';\n if(val.custom_excerpt != null) {\n excerpt = val.custom_excerpt;\n }else{\n excerpt = getWords(val.plaintext);\n }\n var newDate = new Date(val.published_at);\n var minutes = newDate.getMinutes();\n minutes = minutes + \"\";\n if(minutes.length == 1){\n minutes = '0' + minutes;\n }\n $('.latest-posts').prepend(' \\\n
\\\n \\\n

'+ val.title +'

\\\n
\\\n ');\n });\n }\n });\n\n});\n\n/* Popups */\n\nlet community = document.querySelectorAll(\".item--dropdown-community\")[0]\nlet projects = document.querySelectorAll(\".item--dropdown-projects\")[0]\n\nlet popups = document.querySelectorAll(\".popup-wrap\")\nlet overlays = document.querySelectorAll(\".popup-overlay\")\nlet closeButtons = document.querySelectorAll(\".popup__button--close\")\n\nlet activePopup = null;\nlet activeOverlay = null;\n\ncommunity.addEventListener('click', function(event){\n showPopup(popups[0])\n event.preventDefault()\n})\n\nprojects.addEventListener('click', function(event){\n showPopup(popups[1])\n event.preventDefault()\n})\n\ncloseButtons.forEach((button) => {\n button.addEventListener('click', closeActivePopup)\n})\n\noverlays.forEach((overlay) => {\n overlay.addEventListener('click', closeActivePopup)\n})\n\nfunction showPopup(whichPopup) {\n activePopup = whichPopup\n addClassToElement(whichPopup, \"popup--shown\");\n}\n\nfunction closeActivePopup() {\n removeClassFromElement(activePopup, \"popup--shown\");\n activePopup = null;\n}\n\n/* Code highlighting */\n\nfunction highlight() {\n $('pre code').each(function(i, block) {\n hljs.highlightBlock(block);\n });\n}\n $(document).ready(function() {\n try {\n highlight();\n } catch(err) {\n console.log(\"retrying...\")\n setTimeout(function() {\n highlight();\n }, 2500)\n }\n\n var clipboard = new ClipboardJS(\".btn\");\n clipboard.on('success', function(e) {\n var id = $(e.trigger).attr(\"data-clipboard-target\");\n $(id).toggleClass(\"flash\");\n setTimeout(function() {\n $(id).toggleClass(\"flash\");\n }, 200);\n e.clearSelection();\n })\n})\n\n/* Mobile Nav */\n\nlet moreLink = document.querySelectorAll(\".item--more\")[0]\n\nlet nav = document.querySelectorAll(\".mobile-nav-wrap\")[0]\nlet navOverlay = document.querySelectorAll(\".mobile-nav-overlay\")[0]\nlet navCloseButton = document.querySelectorAll(\".mobile-nav-close\")[0]\n\n\nmoreLink.addEventListener('click', function(event){\n showNav()\n event.preventDefault()\n})\n\nnavCloseButton.addEventListener('click', closeNav)\nnavOverlay.addEventListener('click', closeNav)\n\n\nfunction showNav() {\n addClassToElement(nav, \"mobile-nav--shown\");\n}\n\nfunction closeNav() {\n removeClassFromElement(nav, \"mobile-nav--shown\");\n}\n\n/*--- Utils ---*/\nfunction addClassToElement(element, className) {\n (element.classList) ? element.classList.add(className) : element.className += ' ' + className\n return element\n}\n\nfunction removeClassFromElement(element, className) {\n if(element.classList) {\n element.classList.remove(className)\n } else {\n element.className = element.className.replace(new RegExp('(^|\\\\b)' + className.split(' ').join('|') + '(\\\\b|$)', 'gi'), ' ')\n }\n return element\n}\n" - ] -} \ No newline at end of file