Sunday, October 02, 2016

On Typing Everything In - My Updated Web Site

I have a quirk of typing what most people wouldn't think type-able.

My wife was once going to be the stateside representative of a Beijing University department, and needed a business card. And as I wanted it to be a perfect business card, I typed the entire thing as EPS as in:

%!PS-Adobe-2.0 EPSF-1.2
%%Title: peking university logo.eps
%%CreationDate: 4/8/08 1:30 PM
%%BoundingBox: 0 0 50 50
/outsidecircletext
{ circtextdict begin
/radius exch def
/centerangle exch def
/ptsize exch def
/str exch def
/xradius radius ptsize 4 div add def
gsave
centerangle str findhalfangle add rotate
str
{ /charcode exch def
( ) dup 0 charcode put outsideplacechar
} forall
grestore
end
} def
/insidecircletext
{ circtextdict begin
/radius exch def /centerangle exch def
/ptsize exch def /str exch def
/xradius radius ptsize 3 div sub def
gsave
centerangle str findhalfangle sub rotate
str
{ /charcode exch def
( ) dup 0 charcode put insideplacechar
} forall
grestore
end
} def
......
This was back when Postscript was fresh in my mind after rebuilding ChemDraw's Postscript sink, nowadays this looks about as confusing to me as it does to most of you. I will admit that doing text along a path in Postscript is not as easy as it sounds. 

And, of course, I write all the graphics for my iOS apps in raw SVG. This has been great for responsive design and reusability. as in this location dot/compass from my broadcast towers apps. 
It seems to me that a good way to learn something, whether it be Postscript, Swift, SVG or any other computer language, you have to roll up your writing sleeves and start typing. Thus, my goal the last month has been to learn CSS. As anybody looking at my sloppy Blogspot blog here can see, I have not been an expert in either HTML or CSS, and I have hopes of changing that. 

So, I took my old iWeb website (yes, I was still using iWeb) and wrote a new one from scratch in pure HTML/CSS. No Javascript, no Typescript, no frameworks or templates. The new GenHelp.com meets my simple needs and is pretty nice, I  think, for somebody with so little experience with modern web page development. It's mobile first, responsive, and makes good use of many of the SVGs I use in my native apps. For instance, all the app pages, use the actual SVG I use to generate the PNGs for the app icons. 

It'd be nice if Safari supported my favorite SVG property: vector-effect="non-scaling-stroke" but other than that, the graphics just work and make for some very light pages, and graphics that scale as the size of the page changes. If you are on a desktop browser, go and see how the icons on my home page scale smoothly with the size of the page. Extra responsive and extra gratifying. 

Maybe now, I can get to work on my Swift CSS parsing project.