Skip to main content

Posts

Showing posts with the label web design

WordPress: How to add custom fonts to a twenty seventeen child theme.

Quick help to those who have tried to find some help and failed (as I have so I have to write the code myself). Assuming that you have your virgin child theme configured and activated: here is a function which goes into the functions.php file (of your configured and activated child theme): function childtheme_twentyseventeen_fonts_url() { $replace_original_font = true; // unless you really like Libre Franklin if ($replace_original_font !== true) { $hyph = '-custom-'; } else { $hyph = '-'; }; $font_families = array( //add your Google fonts and weights (400 and 700 are defaults for normal and bold) here: 'Oswald:200,400,700', 'Lato:200,400,700', ); $query_args = array( 'family' => urlencode( implode( '|', $font_families ) ), 'subset' => urlencode( 'latin,latin-ext' ), ); $fonts_url = add_query_arg( $query_args, 'https://fonts.googleapis.com/css' ); wp_enqueue_style( 'twentyseventeen' ....

How to Make a Website Everyone Has

Full page smooth CSS scroll

Use the mousewheel to scroll the page in the codepen window (the whole blog will try to scroll as well, of course, the model is supposed to be run in a separate window but you get the idea).   See the Pen Full page CSS-based scroll (pure vanilla JS, no libraries) by Ilya Gerasimenko ( @igstudio ) on CodePen .

May 1st Reboot 2016

My main site gets a facelift (about half-a-decade overdue). Due to a chronic caching issues with iPage, I have to model everything on CodePen , and then FTP files to iPage, where, for some mysterious reason, html gets updated instantly, but CSS and Javascripts marinate somewhere for at least half an hour, before starting to render, which makes it impossible to model anything in real time. Annoying. Oh, well. At least I finally got to re-doing the site. I still do not have a concept for the galleries, though, and a main navigation menu is really primitive, but the new site is HTML5, CSS3 and what not, and I am not ashamed to refer people to it anymore. Yay. P.S. Resolved the cache issue with .htaccess file: FileETag None Header unset ETag Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate" Header set Pragma "no-cache" Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"  everything now works a lot livelier. P.P.S. Why is Blo...

3D SVG Logo (iG)

Now, how can I transform this into a navigational unit?... See the Pen 3D Transform Study (SVG logo) by Ilya Gerasimenko ( @igstudio ) on CodePen .

{position:fixed} in iOS 6

I stumbled upon this oddity when upgrading to iOS 6 while working on a mobile advertising project, and it took me a better part of the day to figure out what is going on: all of a sudden an element {position:fixed} stopped working in a correct manner (which is staying put, while the page is scrolling), and started "sticking" to the scrolling page, moving out of the viewport, and then just "jumping" back to the correct location after the scrolling was finished.If you scroll this page , you will see it—hint: that's the one labeled "broken"—assuming that you have a correct device/browser combination. Mine was iPhone4 and iOS 6.0 (6.0.1-6.1.3 behaves just the same). On the original page, where I first encountered the problem, all of my elements were created dynamically using JavaScript, but at the end of the day (literally) it become clear, that the glitch is in the iOS 6 CSS implementation.Here is what happens: if you have an element {position:fixed} whic...

document.elementFromPoint

More of a mental note: for document.elementFromPoint IE/Mozilla calculates coordinates of the point from the top left corner of a viewport; WebKit and Opera - from the top left corner of a document.

On The Endless Wonders Of Internet Explorer

May be somebody will stumble upon this post and save some time for him/herself. Apparently—it only become apparent after several hours of trial, cursing and error, as it usually goes with IE—, Internet Explorer (up to version 7) throws a runtime error, if you try to modify innerHTML of the dynamically created element under certain conditions. The conditions, as it always go with IE, are significantly lacking consistent logic. For starters, if you assign innerHTML to the element before you insert it into a DOM tree, the error may not come up at all, but will surface later, when you try to modify it. So far it looks like the error mostly comes up, if you change innerHTML of the block element inserted into inline element (which is not kosher in standard-compliant HTML, so it makes sense), and some nested block elements (like DIVs inside Ps—why is that considered wrong, too?—for instance). So, if one really-really need to insert a division into a paragraph, and w...

Things I Do Not Get

Amongst many things, and in no particular order: A Web-standard-compliant box model. Why the default size of the box is determined by it's contents, and why the padding should be added to the overall dimensions. The Internet Explorer's model makes more sense (blasphemy). It does. Another CSS thing which puzzles me: why I can float things right and left, but not to the center? Right and left here are in fact top-right and top-left, but I sooo could use bottom-right and bottom-left positions as well... And why decided that vertical margins should collapse? Not a very important one, but still... really, why?

Netscape Is Dead

I feel sooo old. Somehow, when Microsoft announced the end of support for the Internet Explorer for Mac at the version 5.2, I didn't feel that weird, but I always was a bit of a fan of NN—just to stick it to the man, I guess—, even after I switched to Firefox a couple of years ago and made it a primary browser on my Windows machines, having Safari rule my Mac environment. Surviving a web browser may not be a life-changing experience, but it does make one ponder...

Template Update

Nothing special, really, just updated the blogger template for the sake of trying something new. And, yea, I lost my previous template backup somehow, so there was no way back. Now I have found my backup, but I don't like it anymore, so I am going to stay with this template for a while. Who cares.

On The Last Day Of Steady Employment

It's been raining for the last two days, and the glorious city of New Your smells like sewage and dog pee. And it's hot. The Internet connection in the office is very flickery, which really screws up my writing flow, but it feels like the events of these few days somehow should be documented or at least reflected upon. So... My desk is sterile with the exception of a few things I still plan on using today: headphones, Palm, half-pack of chewing gum and an antique* Maxwell House coffee mug. My ailing Windows box is cleaned up of all the stuff I kept in it during almost two years I had it. My coworkers are conspiring to take me out to lunch (I, of course, already bought one in the morning, because initially the gathering was supposed to be a short run for a beer after work). Darn. Will have to take it home along with the antique mug. The office of congressman just called. Apparently, my case is not showing up anymore anywhere in both organizations, so I have to re-file. I don...

Writing A Job Description For Myself

It is kind of a fun assignment: to write your own job description. Nevertheless, worth trying... OK, soooo... after I leave this job, you, guys, are going to be looking for a Visual Web Designer/Front-End Web Developer with a minimum (well, and maximum, too) of B(F)A, schooled in both conventional (hard copy) as well as fluid layout (web) composition, with experience in image editing, web image optimization, typography, with strong hand-coding (no WYSIWYG!) skill set (XHTML/DHTML, CSS, client-side JavaScript) and basic understanding of .NET developing environment. The above professional should be aware of the latest Web design trends and principles, and be able to create standard-compliant cross-browser and cross-platform HTML structures and be able to (err... to see them being butchered by the developer team without spiraling down into a fit? no, not that...) oversee and ensure proper implementation of the aforementioned designs, as well as being able to maintain and troubleshoot (i.e...

On IE7 Upgrade

Since I really have nothing to loose at work, where I am spending my last two weeks (I gave a notice on Monday), I have upgraded to IE7. After that I have spent two hours, trying to figure out, why my website makes IE7 crash. I finally did, but damn, that was entertaining. It looks like document.open('text/html','replace') needed to loose the replace argument, document.writeln() can not be used for writing links to external scripts, the address bar is not removable anymore, and window.resizeTo() doesn't want to work (that pretty much disables all my portfolio galleries). Lovely. What was even more annoying, is that IE would work with .html files, if they were opened locally, but crash, when opening the exact same files from the server. So much for the upgrade. All other imaginable browsers do display my site correctly, with little or no problems. Even Opera. P.S. During the fixing fit, I removed the reflection.js script---which wasn't mine anyway, I was jus...