Check out "Do you speak JavaScript?" - my latest video course on advanced JavaScript.
Language APIs, Popular Concepts, Design Patterns, Advanced Techniques In the Browser

The tiniest presentation framework

posted in JavaScript on 2022-03-06   presentation framework html javascript

I did roughly 50 talks over the years, and for almost all of them, I used Reveal.js. I like it because it's HTML-based. I have complete control of everything and can easily publish the slides online. However, one thing bugs me every single time - the size of my content. I want to use all the available space. This becomes very important when I'm showing code to people. That's why I wrote SimPre. It's a 10KB HTML presentation framework that properly scales and positions my content.

read more

From PHP to Node with Zeit's lambdas and Cypress.io

posted in JavaScript on 2019-05-23   https blog cypress content zeit html javascript article articles

The first post in this blog was published on 25th of August 2008. This place was always living on a shared PHP/MySQL hosting. It was driven by a custom made PHP CMS for over 10 years. It is time to move forward and follow my actual language of choice - JavaScript. I spent some time recently migrating it to Zeit and this article is showing my process.

read more

8 Years of blogging

posted in Must-see on 2017-01-02   javascript top year years pseudo elements css visits blog convert html string practice node js

The first article on this blog is published on 22th of August 2008. It’s about a website which I saw at FWA. Eight years later I’m still publishing stuff here and because it is the beginning of a new year I decided to give you some statistics.

read more

Let's write, not generate code. Thoughts about naming stuff.

posted in JavaScript on 2016-07-03   code data html classes naming css good tags

I’m writing code for approximately ten years now and at some point the word “writing” became more important then “code”. I found out that it is easy to generate code but it is difficult to write code. Writing means creating something meaningful. Something that other human beings will read. The code is indeed sent to machines and they do understand ugly code. Not the same for humans though. An important part of our job is to make sure that our code is clear for other teammates.

read more

My new experiment is released - 10 Lessons in Front-end ebook

posted in Must-see on 2016-03-10   front end html ll book lessons released

It's finally done. My first self-publishing ebook is released. The book is available here. I'm running a free giveaway for the next five days. So, subscribe for my newsletter at this address http://eepurl.com/bKt0TD and you'll get a free coupon that will lower the price to 0$.

read more

Apache .htaccess for HTML5 push state manipulations

posted in Architecture on 2015-12-20   dev krasimir navigo home dev krasimir http home dev index html html http home index html http browser routing

This is a quick post so I document my two hours research. I'm working on a open source library for routing in the browser. Or in other words JavaScript library that uses the history API. The thing is that locally I'm using Apache as a dev server and I wanted all the request to specific folder to be redirected to index.html.

read more

Node.js application made with Express and AbsurdJS

posted in Nodejs on 2014-06-07   html js function css express content styles absurdjs app

Node.js is one of those new technologies, which are attracting more and more developers every day. Mainly, because it's JavaScript driven, a lot of people are interested working with it. In this tutorial, I'll show you how to use AbsurdJS together with Express. Express is one of the popular Node.js frameworks. However, the other instrument is really fresh one and I hope that you will find it useful.

read more

No back-end blog solution with Node.js and Markdown

posted in Nodejs on 2014-04-22   articles techy md tags article blog html page sidebar content

Before a couple of weeks I published Techy. It's a flat CMS based on Node.js and Markdown. I made it because I wanted to write my articles in Markdown format and avoid the annoying publishing workflow which I'm using now. I feel that it's not very clear how Techy works and decided to create a simple blog illustrating the processes.

read more

Look ma, JavaScript only Off-Canvas menu

posted in JavaScript on 2014-03-25   menu content css links function html position absurdjs isopen

The off-canvas menu is pretty popular nowadays. You know, the little button in the right upper corner which opens the navigation with a slide-in effect. That's what we are going to build in this article. The interesting things is that we are not going to use CSS neither HTML, only JavaScript.

read more

Using media queries in JavaScript (AbsurdJS edition)

posted in JavaScript on 2014-03-04   media css function var width window matchmedia dom html mq absurdjs

If you believe in responsive design you probably use a lot of media queries. That's a CSS feature which gives us the power to add something like if statements. We are able to apply rules only if the current page meets certain conditions. In this article I'll show you how I use media queries in JavaScript.

read more

Revealing the magic: How to properly convert HTML string to a DOM element

posted in JavaScript on 2014-01-23   wrapmap table tr element tbody var html td div map

This seems like a trivial task. However, it is not. There are few popular solutions, but they have a big problem and if you use them a lot you will spot the issue.

read more

Extending Jasmine (BDD framework for testing)

posted in JavaScript on 2013-07-05   function jasmine htmlreporter spec reporter jasmineenv test prototype

Don't get me wrong, Jasmine is a wonderful framework. I'm using it for testing JavaScript in both places - front-end (in browser) and back-end (Nodejs). However, the client side has some disadvantages, which I just fixed. I hope that someday these changes will be moved to the official version (or at least I'll make a pull request very soon).

read more

Javascript string replace and regular expression

posted in JavaScript on 2013-06-15   word git replace string innerhtml text replace element innerhtml text changetext function word creator linus torvalds linux creator linus source project started

The replace method in JavaScript is pretty much the same as in the other languages. Replace part/s of a string with something else. However, there are some tricky moments and I wanted to write this article, because I met this problem several times in the past. Actually, very often I use my blog as a documentation for myself and this is one of those cases. Probably I'll be in the same situation after week or so and I'll just check here for the proper solution.

read more

Convert HTML string to DOM element

posted in JavaScript on 2013-06-11   var markup output el link html frame contentdocument document createelement dom element

Checkout Revealing the magic: How to properly convert HTML string to a DOM element article.

I'm working on a chrome extension which accepts user text, work with it and output the result in a div. I used jQuery in the beginning, for several tasks, but later I decided to remove it and deal with pure javascript/DOM manipulations. The output div was filled by using innerHTML property and everything was ok. But, at some point, I sent few buttons to the user and he has to interact with them. However, once I update the div's content the event listeners are detached and the buttons became non-functional.

read more

Web Highlights #5

posted in HTML5 on 2013-05-30   http web design article unnecessary paints adobe device google street view code organizing javascript css paint times http www html5rocks

Everyday I'm reading or watching something which I find helpful. Normally I bookmark those things, but at the end I have dozen of folders and subfolders which I never check. So, I decided to make such blog post where I'll share valuable things in the net.

read more

Web Highlights #3

posted in HTML5 on 2013-04-22   http answer http www html5rocks css paint times design workflow considerations web design workflow responsive web design

A bunch of cool stuff ;-)

read more

AssetsPack - a friend of the front-end developer (pack your assets with NodeJS)

posted in Nodejs on 2013-03-16   css js file assetspack pack tests data type packing html module

AssetsPack is a NodeJS module which helps in organization, compilation and minification of assets. It's meant to be used in local environment during the development process. It was made generally for HTML/CSS/JavaScript based applications.

read more

HTML5: a few links to bookmark

posted in HTML5 on 2013-03-13   http html5

There are tons of information in the internet today. And new stuff are coming all the time. It is really not possible (at least for me) to be up to date with everything. I used RSS before, but very soon my reader was full with content and again I wasn't able to follow all the blogs/developers. Now I'm checking regularly Twitter and Envato network. However, last few weeks I found several sites which worth checking.

read more

HTML slicing the site of VarnaLab using LESS and Twitter Bootstrap

posted in HTML5 on 2013-02-23   varnalab site bootstrap html slicing twitter bootstrap html

HTML slicing the site of VarnaLab using LESS and Twitter Bootstrap

read more

VarnaLab Challenges event

posted in Inspiration on 2012-09-18   varnalab varnalab challanges html www varnalab org http www varnalab varnalab http www great event coming

A great event is coming in VarnaLab - http://www.varnalab.org/2012/09/varnalab-challanges.html

read more

Convert Adobe Flash FLA files into HTML and reach more devices

posted in ActionScript on 2011-03-13   html supported wallaby reach

"Wallaby" is the codename for an experimental technology that converts the artwork and animation contained in Adobe® Flash® Professional (FLA) files into HTML. This allows you to reuse and extend the reach of your content to devices that do not support the Flash runtimes.

read more

Creating simple WYSIWYG editor with AS3 (Flex)

posted in ActionScript on 2011-02-11   text str function font html string editor mx var code

There are dozen of JavaScript WYSIWYG editors available, but most of them are too complicated and a little bit buggy. From time to time I'm using my own tool to provide such kind of functionality. It accepts and exports valid html. I decided to share it with you and explain how I built it.

read more

PHP: find links in a string and replace them with actual html link tags

posted in PHP on 2010-11-24   urlstoreplace str numofurlstoreplace urls alreadyadded numofurlstoreplace count urlstoreplace html link tags

Currently I'm working on an application that gets data from Twitter. The tweet's string contains links that have to be transformed into html link tags. Here is a simple PHP function that helped me.

read more

Deep linking in flash with AS3

posted in ActionScript on 2010-11-14   flash page function hash address deeplinkingclass dl html swf home

Many people will say that Flash is not SEO friendly. Actually that's not 100% true. Flash is just a tool that shows your data. Exactly the same as the HTML. In this article I'll show you how to use ActionScript3 and JavaScript together to make your flash sites SEO friendly and provide a different URL for each of your pages.

read more

How to import images directly into the html code (base64)

posted in PHP on 2010-11-11   base64 file html css small form data fp image
read more

Javascript to Flash communication and vise versa

posted in ActionScript on 2010-08-05   area html text flash javascript

The communication between Flash and JavaScript is really important part of the web sites today. That's why I decided to share how to do it.

read more

Remove tags from a string in AS3

posted in ActionScript on 2010-06-30   text tags var string text replace removehtml text text replace gi text text str regexp gi text

A couple of months ago I integrated a nice WYSIWYG editor written in Flex in my CMS. It worked fine, till yesterday I needed to add more features like text formatting and font color changing. As you know the Flex RichTextEditor component adds some additional tags that I definitely don't want to send to the database. So I wrote a simple function to remove these tags.

read more