Hello, I'm Stanko, a software engineer in Belgrade, writing mostly about JavaScript and React.

Custom scroll bars

1 Comments

Generally when comes to replacing native UI components, I’m strongly against it. But, we’ve all been there, when the client insists on it.

You’ll see how to style it via CSS (webkit only), apply pure JavaScipt plugin with native scrolling or apply simple CSS hack.

Well, let’s go :)

Read more

Simple React slider with touch support

I needed simple React slider component, as we are building our new website as a universal React application. But I did not find anything lightweight. There is a crazy trend in JavaScript world - add gazillion dependencies.

So again, I made something myself.

Demo - React slider with touch support

Check the demo.

It has no dependencies, and about 200 lines of code. Very simple and extensible. Every modern browser is supported and IE10+.

IE9 should work (if you adapt the CSS), but I didn’t test it.

Grab the code on GitHub.

What is the point of the website if it kills my laptop?

People need to realize that is not enough to have a nice website with a ton of animations and effects. There is no point having such website if I can’t scroll it, while CPU and coolers go crazy. And I use latest MacBook with maxed hardware. Can’t imagine trying to use those websites on the old machine (or IE8-9).

Get your performance together.

Jekyll "Read more" link

It is nice to use instead of on your Jekyll home page, but then users can’t see if there is more to read until they open the whole post.

To add Read more link, you can use this simple snippet.

{% if post.excerpt != post.content %}
    <a href="{{ site.baseurl }}{{ post.url }}">Read more</a>
{% endif %}

Jekyll and Gulp workflow

2 Comments

Update, November 2017

I don’t use this setup anymore, it might be outdated, proceed with caution.

Original post

As you probably know this blog is powered by Jekyll. It is a really nice platform, but it lacks a few things I’m used to during development. First one is live reload on file changes (and injecting CSS), using SASS, autoprefixer, ES6…

Read more