Categories
Uncategorised

autoprefixer

I highly recommended running your CSS through this auto prefixer.  https://autoprefixer.github.io/

Categories
Uncategorised

Standard plugins for maintenance of wp site

These are the plugins I add to all new installations. Allows for easy secuity, seo, caching, custom post types and fields, and also ability to customise wp-admin menu. With managewp as well, I can maintain any site with automated backups too.

  • WordFence
  • Yoast SEO
  • Hummingbird
  • Custom Post Types UI
  • ACF
  • Admin Menu Editor
Categories
Uncategorised

no style

Personal note. My main business website is looking bland and uninspiring. I’ve focused too much on what I think people want to see and read locally, that I’ve done nothing to inspire anyone or stand out from my competitors.

Categories
Uncategorised

Microdata

Structured data within HTML.

https://developer.mozilla.org/en-US/docs/Web/HTML/Microdata

http://schema.org/docs/gs.html

 

Categories
Uncategorised

Things plugins do that annoy me

  • Ask for feedback when you deactivate
  • Use graphics that don’t mesh with the dashboard ui
  • Create lots of ‘notifications’ at the top of the dashboard
  • Spelling mistakes
  • Difficult to find settings
  • Poorly documented

/rant

Categories
Uncategorised

Toolset Types plugin alternative

Alternative to Toolset Types.  Lightweight, easy to use. I recommend combining with ACF as replacement for Toolset Types.

Custom Post Type UI

Categories
Uncategorised

Flexbox vs Grid

I am undecided but currently use flexbox.

https://hackernoon.com/the-ultimate-css-battle-grid-vs-flexbox-d40da0449faf

https://css-tricks.com/css-grid-replace-flexbox/

https://tutorialzine.com/2017/03/css-grid-vs-flexbox (features a great line “There is no reason to use only CSS grids or only flexbox. Learn both and use them together.”)

Categories
Uncategorised

fixed header, resize on scroll

imo header should always be fixed if it is going to scroll with the screen, rather than changing to position:fixed; one you start to scroll, as you have to account for the gap it leaves (can cause the content to ‘jump’ up which looks awful).

example. to clear a 100px header, I will add 100px padding to the top of <body>.

js

var offset = 0;
var duration = 500;
$(window).scroll(function() {
	if ($(this).scrollTop() > offset) {
		$('header').addClass('fixed');
	} else {
		$('header').removeClass('fixed');
	}
});

this adds and removes the .fixed class to header. note you can add an offset.

header { height:100px; transition:all 0.5s ease; }
header.fixed { height:80px; }

transitions between heights when .fixed class is added.

Categories
Uncategorised

100% height of screen minus height of header

Technique to get scrollable nav for menu which is 100 vertical-height minus the height of <header>

nav {
   height:calc(100vh - 100px);
   /* where header is 100px */
}

nav will likely be position:fixed; top:100px; right:0;

Categories
Uncategorised

transform:translate();

css absolute positioning to center element

#element {
   position:absolute;
   left:50%;
   top:50%;
   transition:translate(-50%, -50%);
}