martyr— is a brand of MARTYR X LTD
//----------

Hello, blog!

It's finally here. WHAT A TIME TO BE ALIVE!

More than a year has passed since the first time I spoke about making a blog for martyr⁠—. It finally happened and everything works beautifully!

The blog was listed as a launch feature along the new shop in the first week of June 2021 but I couldn't make it through it. It was going to be empty anyway because I didn't have anything to post about. 🤣

Anyway, here is!

Technology is Good

...when used wisely. Always use technology for good. Don't be Mark.

I wanted 3 basic things to work:

  • Zoom for images
  • Dark mode. I already had it working beforehand, but wanted to mention it though. Really important for a good reading experience in some situations.
  • Table of content for each post. This will come very handy for long posts.

Image Zoom: Easier said than done

The ability to zoom images was a must. Some images deserve to be viewed in detail.

How difficult could it be to implement? "Should be a trivial task. A 30 minute thing", I thought. How naive...

Turned out to be a little nightmare.

Most libraries weren't working quite well for the layout I've chose for martyr⁠—. Some of them had horrible bugs or were too slow. Who likes slow stuff? 😴

Then, after a lot of research, I came across medium-zoom.

Look it for yourself. Go open this picture:

HAVE YOU SEEN HOW SMOOTH THAT ANIMATION WAS??

Props to the developers of medium-zoom. I even took some time to add a new feature to it. The margin it creates around the images was fixed and wasn't responsive. It was the same margin in mobile, tablets and desktop. In desktop it looked great whereas in phones the images looked really small with absurd margins around them. Not good.

So, I made some modifications to the original code and added responsive margins as a feature. It works as intended! Then, I took some time to report it to the developers and hope they merge it to the main project. The power of open source 😄

It still lacks some features like proper pinch-to-zoom in mobile devices and such. But still, far better than nothing. Glad I discover it.

Dark Mode

That feature was there already, but it's worth mentioning.

Reading can become a pleasant or painful task by just switching the amount of photons your eyes are getting shoot. The correct color scheme depends on the time of the day, the device you have, the environment, your personal preferences...

For that matter, it's always good to have choices.

Here you have the power of switching back and forth between the light and dark scheme.

How? Press the button at the top right or just press D on your keyboard.

Automatic ToC generation

Found this beautiful library: tocbot.

It generates a table of content based on the content automatically. Very eye-catching, useful and easy to setup. The only hard thing was the panel and button for mobile devices.

The challenge was in the load and unload animations. They need to behave correctly once the page is loaded or when you're leaving the page to preserve the UI/UX of a pseudo app.

Go see it for yourself. If you're on a computer, try narrowing the browser window to see both desktop and mobile versions of it. It took me a whole afternoon. It was exhausting. But really worth it. Very happy with the results!

What's next?

There was a time where I used to post Instagram Stories showing cool tips and tricks as well as behind the scenes of every asset I've made.

At the time of writing this, Instagram is starting to become a video, "entertainment" platform. Sounds like TikTok to me.

Instagram copying features from the competition once again? I'm out.

I don't hold my breath for them anymore.

I needed a platform to express myself the way I WANT without stupid algorithms or features changing every week to their convenience.

That's why I built this.

That's the beauty of internet at its core: decentralized, personal spaces available for everyone. Your rules, your content.

Can you imagine waiting for Instagram or whatever social media to built the crazy features I've been talking about in this post?

No way. I won't sit and wait for a miracle. I'll just built what's needed.

Owning your content has never been more valuable than it is today.