Categories
blogan

Heartbeat

My blog now has a heartbeat — I love it!

For those that are interested in the technical details, read on. The rest of you can stop right here.

tl;dr. In the header and footer, the graphic is a background SVG with embedded CSS scaling the heart element. The standalone hearts also are an SVG, this time with external CSS. In both cases, the CSS controls scaling.

First, I created a PNG of the text and heart with a screen capture from Keynote. Then I used an online PNG to SVG converter, the result of which I edited with a text editor to embed the CSS that animates the heart element. The embedded CSS is based on the hovering heartbeat animation CodePen by Joseph Emmerich. I modified the CSS to add transform-origin: 50% 50% immediately before each transform: scale() style to prevent the heart from moving when its scale changes. Finally, I used image replacement on the title text.

So far, I’ve tested it only on MacOS browsers. It works on WebKit-based browsers (Chrome, Opera, Brave, and Safari), but not Firefox. I still need to test on Windows browsers, and probably add a fallback static PNG for browsers that don’t support background SVGs.

Update. Since creating my first heading image, I created others with a lighter font and decreasing the frequency of animation.

Brent Logan

Update 2. Any modern browser now supports background SVGs.

Update 3 (1 Mar 2019). I’ve again changed the appearance of my site, so I have a new header image to match.

Brent Logan

Categories
quotes

He who works with his heart

He who works with his hands is a laborer.
He who works with his hands and his head is a craftsman.
He who works with his hands and his head and his heart is an artist.

Unknown

And he who works with his hands and his head and his heart and his feet is a salesman.
Categories
General

Mandatory screening for athletes saves lives

A study published in the Journal of American Medical Association today came to the “surprising” conclusion that requiring young athletes to be screened for heart conditions before competing reduces the occurrence of sudden death caused by those heart conditions.

The chart above shows the rate of sudden cardiovascular death for screened athletes (downward moving line) and nonscreened nonathletes (horizontal line). Over the term of the study, the athlete incident rate dropped from three to four times that of the nonathletes’ to approximately half of the nonathletes’.

Although the results of the study are not groundbreaking, it still good information to know.