<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <title>Nigel Bunner</title>
  <subtitle>A collection of creative ideas and thoughts by Nigel Bunner</subtitle>
  <link href="https://www.nigelbunner.co.uk/feed.xml" rel="self" />
  <link href="https://www.nigelbunner.co.uk/" />
  <updated>2021-12-14T20:00:00Z</updated>
  <id>https://www.nigelbunner.co.uk/</id>
  <author>
    <name>Nigel Bunner</name>
  </author>
  <entry>
    <title>Little Music List - a music recommendation site</title>
    <link href="https://www.nigelbunner.co.uk/blog/little-music-list/" />
    <updated>2021-12-14T20:00:00Z</updated>
    <id>https://www.nigelbunner.co.uk/blog/little-music-list/</id>
    <content type="html">&lt;p&gt;I recently finished creating a new website. It&#39;s a music recommendation site called &lt;a href=&quot;https://www.littlemusiclist.com&quot;&gt;Little Music List&lt;/a&gt;. The genesis of the site began from a list I&#39;ve been creating on my phone.&lt;/p&gt;
&lt;p&gt;I listen to music all the time, mostly on BBC 6music. When I hear a song I like I use a &lt;a href=&quot;https://forums.getdrafts.com/t/using-dropbox-with-drafts/20&quot;&gt;Drafts.app action&lt;/a&gt; to add it to a markdown list inside Dropbox.&lt;/p&gt;
&lt;p&gt;The list has been growing over the years so I decided to make a website from it. At first I thought it would be good to take one song from either end of the list. But the songs I chose like this ended not sounding right when placed together. So I looked for songs on the list that would compliment each other, not in a songs that sound like each other way, but more like how songs follow each other as part of a playlist. That&#39;s when I came up with the idea of making a song recommendation  website with the tagline &amp;quot;if you like this song, you might like this one too&amp;quot;&lt;/p&gt;
&lt;p&gt;The site is built using &lt;a href=&quot;https://www.11ty.dev/&quot;&gt;Eleventy&lt;/a&gt;. It&#39;s all standard HTML  generated from Nunjucks templates. I’ve used big JavaScript frameworks such as GatsbyJS and NextJS before on other projects, but for this I wanted something less complicated that produced a fast loading site without the large Javascript files those other Static Site Generators produce. The only JavaScript on the site is a small piece of inline code in the footer that allows me to &lt;a href=&quot;https://www.nigelbunner.co.uk/blog/a-simple-way-to-lazy-load-embedded-youtube-videos-using-vanilla-javascript/&quot;&gt;lazy load the YouTube videos&lt;/a&gt; by displaying the default image for that video instead of the iframe. The image is replaced with the iframe when the user clicks on the image.&lt;/p&gt;
&lt;p&gt;For each video added to Youtube there are a set of preview images at different sizes you can access via a simple URL. You just add the Video ID into the URL and then choose the size of the image by using a number from 0 to 3 for the filename,  where 0 is the largest.&lt;/p&gt;
&lt;p&gt;e.g.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;https://img.youtube.com/vi/xMDwqeFQuKg/0.jpg
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Eleventy produces a pretty good Lighthouse score out of the box without any extra optimisations.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.nigelbunner.co.uk/img/posts/little-music-list-lighthouse.jpg&quot; alt=&quot;Lighthouse score&quot;&gt;&lt;/p&gt;
&lt;p&gt;The backend runs on &lt;a href=&quot;https://www.sanity.io/&quot;&gt;Sanity&lt;/a&gt;. I&#39;ve used this before in another project and found it so simple and yet powerful to work with that I knew I wanted to manage this website using it. It takes a bit of setting up at first but once the site grows larger I know I&#39;m going to grateful for the better user experience it provides. I use the same YouTube preview image url to grab the preview image for the video. Within the Sanity Studio CMS I have also given myself the option of using an image directly uploaded to Sanity in case the default YouTube one is unsuitable. Whatever source image is used is transformed to both an optimised WebP and JPEG by the &lt;a href=&quot;https://www.11ty.dev/docs/plugins/image/&quot;&gt;Eleventy Image&lt;/a&gt; plug-in.&lt;/p&gt;
&lt;p&gt;I plan to add some more functionality to the site in the future such as links to related posts at the bottom of each post. I’ll also need to add pagination at some point before the homepage becomes too unwieldy. Pagination is incredibly simple to add with Eleventy and I’ve already started categorising the posts in Sanity in anticipation of adding related posts.&lt;/p&gt;
&lt;p&gt;I’m really happy with the result. It amazes me how a powerful setup like this can be made so easily and for pretty much no cost.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.littlemusiclist.com&quot;&gt;www.littlemusiclist.com&lt;/a&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Modern web development on an 8 year old Mac</title>
    <link href="https://www.nigelbunner.co.uk/blog/modern-web-development-on-an-8-year-old-Mac/" />
    <updated>2020-07-12T20:00:00Z</updated>
    <id>https://www.nigelbunner.co.uk/blog/modern-web-development-on-an-8-year-old-Mac/</id>
    <content type="html">&lt;p&gt;There’s a question that often gets asked on computer and web development forums.  Is the current, cheapest Mac laptop going to be powerful enough for web development? Usually the computer in question is something like the 2019 MacBook Air.&lt;/p&gt;
&lt;p&gt;Common questions include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Will the base i5 processor will be fast enough or should they move up to the top spec i9?&lt;/li&gt;
&lt;li&gt;Do they need more than 8gb of ram and a 1tb SSD?&lt;/li&gt;
&lt;li&gt;Will the 13” Retina screen be big enough?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Whenever I see one of these questions I smile, and glance down at the computer I use to do my web development on. It’s a base 11” MacBook Air with 8gb Ram, an i5 processor and a 500gb SSD. Oh and it’s from 2012, that’s 8 years old at the time of writing. And yes, it is perfectly capable of doing the job.&lt;/p&gt;
&lt;p&gt;Just to clarify things a little, here’s a breakdown of the sort of tasks I use it for.&lt;/p&gt;
&lt;p&gt;Caveat: this article is Mac OS based as that’s what I use. The general principle of using an older computer for web development may apply equally well to Windows, Linux etc.&lt;/p&gt;
&lt;h2&gt;Web development&lt;/h2&gt;
&lt;p&gt;Most of my web development work for my personal sites is done in NodeJS. For this my old laptop is perfectly fine. It’s not until you start building really large sites with tens of thousands of pages that you start to need something more powerful.&lt;/p&gt;
&lt;p&gt;I also used to build sites in both Wordpress and basic PHP, and the laptop was fine for this too.&lt;/p&gt;
&lt;h3&gt;Browsers&lt;/h3&gt;
&lt;p&gt;My web browser of choice for web development is usually either Firefox or Chrome.&lt;/p&gt;
&lt;p&gt;Why? I just prefer the development tools that come with them compared to those in Safari. I do use Safari, just mainly for non work related browsing and for double checking websites display properly.&lt;/p&gt;
&lt;p&gt;The only time my laptop starts to slow down is if I have multiple browsers open and am running memory intensive apps in them such as &lt;a href=&quot;https://codesandbox.io/&quot;&gt;Codesandbox&lt;/a&gt;. This is one of those times when the 8gb of memory starts to become a problem.&lt;/p&gt;
&lt;h3&gt;IDE&lt;/h3&gt;
&lt;p&gt;I use either &lt;a href=&quot;https://www.sublimetext.com&quot;&gt;Sublime Text&lt;/a&gt; or &lt;a href=&quot;https://code.visualstudio.com&quot;&gt;VS Code&lt;/a&gt;. I do notice VS Code runs a little slower than Sublime Text at times. There’s the occasional pause every now and then, but it’s not enough to disrupt my general workflow.&lt;/p&gt;
&lt;h2&gt;Graphics&lt;/h2&gt;
&lt;p&gt;I usually deal with simple graphics such as touching up photos, resizing images, creating SVGs or creating a multi layered mockup. For this I either use the original version of &lt;a href=&quot;http://pixelmator.com&quot;&gt;Pixelmator&lt;/a&gt;, &lt;a href=&quot;https://affinity.serif.com/en-gb/photo/&quot;&gt;Affinity Photo&lt;/a&gt; or &lt;a href=&quot;https://affinity.serif.com/en-gb/designer/&quot;&gt;Affinity Designer&lt;/a&gt;. As I do all of this at 72dpi the 8Gb of RAM is plenty. If I was doing higher resolution photo or video work then I can imagine I would need more RAM.&lt;/p&gt;
&lt;p&gt;I have also made a few music videos using Final Cut. This obviously wasn’t as fluid to work with as a faster machine and the render took a while to complete but it was perfectly usable and got the job done ok.&lt;/p&gt;
&lt;h2&gt;What this is not good at&lt;/h2&gt;
&lt;p&gt;So that’s a break down on what works well. Now, here’s a list of tasks that don’t work quite so well.&lt;/p&gt;
&lt;h3&gt;Very large sites involving a multi platform setup&lt;/h3&gt;
&lt;p&gt;There are a few use cases where I wouldn’t recommend using a laptop as old and as underpowered as this. One of those are when you are working on really large websites. For my day job, one of the sites I work on in development has a PHP based API backend running in Docker. This has a Redis Cache that uses several Gb of memory. On top of this I have the front end NuxtJS codebase running in development mode. This is a large site consisting of over 100,000 pages.&lt;/p&gt;
&lt;p&gt;I also work on another large React based site that also has a PHP backend running in a Docker container.&lt;/p&gt;
&lt;p&gt;Developing sites like these can eat away at your Macs memory so it could be slow going working with just 8Gb of ram.&lt;/p&gt;
&lt;p&gt;For reference my work laptop is a 2019 15” i7 MacBook Pro with 32Gb of ram.&lt;/p&gt;
&lt;h2&gt;Screen size - use an external monitor&lt;/h2&gt;
&lt;p&gt;The 11” non retina screen doesn’t prove to be too much of a problem for me, but it may be for some. Sure, it isn’t as clear or as large as my work laptop. But I learned web development many years ago on an old 12” iBook which seemed ok at the time. I find I just adjust how I work to whatever screen size is in front of me.&lt;/p&gt;
&lt;p&gt;That said, I usually plug whatever laptop I’m working on into a 32” external monitor. This is non Retina, but large enough to allow me to view my IDE on one side of the screen and a web browser on the other.&lt;/p&gt;
&lt;p&gt;When I’m working on just the laptop screen I run each app using the full width of the smaller screen and switch between apps using command tab.&lt;/p&gt;
&lt;h2&gt;Future MacOS support&lt;/h2&gt;
&lt;p&gt;One thing to note is that Apple has followed a pattern in the last couple of years where they have dropped support for Macs over 7 years old. That means that I won’t be able to upgrade to &lt;a href=&quot;https://www.apple.com/macos/big-sur-preview/&quot;&gt;Mac OS Big Sur&lt;/a&gt; when it comes out later in the year.&lt;/p&gt;
&lt;p&gt;This affects hardware support too, so If something goes wrong with the hardware then I’ll need to take it to a 3rd party supplier to be fixed instead of Apple.&lt;/p&gt;
&lt;p&gt;That’s not too big an issue as it will still receive security updates for a number of years to come, just something to bear in mind.&lt;/p&gt;
&lt;p&gt;There’s a list on &lt;a href=&quot;https://9to5mac.com/2020/06/22/macos-big-sur-compatible-macs/&quot;&gt;9to5mac&lt;/a&gt; showing which Macs will run MacOS Big Sur&lt;/p&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;Modern macs are so powerful these days that even the basic model can be fine for developing simple websites. When I say modern, this may also include those from a few years ago. There’s really no need to spend thousands of pounds on the latest Mac just to code up small Wordpress or Node based websites. Save some money and get something second hand instead.&lt;/p&gt;
&lt;p&gt;Just make sure you have at least 8Gb of ram and an SSD instead of a spinning hard drive. Retina screens are nice but you can get by without and use the money saved on a much larger external monitor instead.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>7 tips for working from home</title>
    <link href="https://www.nigelbunner.co.uk/blog/7-tips-for-working-from-home/" />
    <updated>2020-05-28T21:00:00Z</updated>
    <id>https://www.nigelbunner.co.uk/blog/7-tips-for-working-from-home/</id>
    <content type="html">&lt;p&gt;It seems like more and more companies are realising that working from home can be just as, if not more productive than commuting into an office everyday.&lt;/p&gt;
&lt;p&gt;I’ve worked from home for a few years now and have picked up a number of tips on the way. Seeing as more and more of us are now doing this, I thought I’d share some of the tips I’ve picked up over the past few years.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ergonomics and posture&lt;/li&gt;
&lt;li&gt;Designate a space just for work&lt;/li&gt;
&lt;li&gt;Pomorodo technique&lt;/li&gt;
&lt;li&gt;Keep a schedule&lt;/li&gt;
&lt;li&gt;What music or background noise to use&lt;/li&gt;
&lt;li&gt;Communication&lt;/li&gt;
&lt;li&gt;Footwear&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Ergonomics and posture&lt;/h2&gt;
&lt;p&gt;Chances are you’ve been given a laptop to work from and you’ve placed it straight down on a table. This is fine but after a while working like this you may find your neck and back start to ache. To achieve a better working posture with a laptop you basically have 2 options.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Raise the laptop and attach an external keyboard and mouse/trackpad.&lt;/li&gt;
&lt;li&gt;Plug your laptop into an external monitor.&lt;/li&gt;
&lt;li&gt;Both of the above.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Before doing anything though, I suggest checking out this website which gives you precise measurements for screen height etc based on your own height.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.ergotron.com/en-gb/tools/workspace-planner&quot;&gt;Desk height calculator&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Done that? Good.&lt;/p&gt;
&lt;h3&gt;Raising the laptop&lt;/h3&gt;
&lt;p&gt;I use a stand to place my laptop on. You could also use a pile of books or anything else stable and the right height. You’ll also need a separate keyboard and mouse or trackpad. These could be Bluetooth or wired. The final setup should have the monitor high enough for you to look straight ahead while working with the keyboard and mouse/trackpad lower down on the table. This should help your shoulders stay nice and relaxed from your arms being at a more comfortable angle.&lt;/p&gt;
&lt;h3&gt;Use an external monitor&lt;/h3&gt;
&lt;p&gt;Most laptops have a socket that allows you to connect it to an external monitor. You may need an adaptor or a new lead depending on your laptop and monitor. Most monitors have a few different sockets on them but be aware that not all of them will allow you to view your content in the full resolution available.&lt;/p&gt;
&lt;p&gt;Using a monitor gives you the option of using the keyboard and trackpad on the laptop. The laptop remains on the desk as before, but your head is now looking straight ahead at the monitor instead of down at the laptop screen. You can also use the laptop as a second screen.&lt;/p&gt;
&lt;p&gt;On a Mac, you also have the option of running the laptop in what’s known as clamshell mode. This is when the laptop is running closed but connected to an external monitor, keyboard and trackpad. Again, you could splash out on a stand to place the laptop in this position, or just use the &lt;a href=&quot;https://osxdaily.com/2011/03/16/use-a-2-ikea-napkin-holder-as-a-vertical-macbook-stand/&quot;&gt;Ikea napkin holder hack&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Feel free to mix things up a little too if you can and work on the sofa or in the garden if you have one. A change of scenery can really help you stay focused and the advantage to using a laptop is you can use it to work in multiple different setups and places.&lt;/p&gt;
&lt;p&gt;Another option is to make yourself a standing desk. There are lots of examples of this on the internet. You can buy fully adjustable standing desks that go from standing to sitting position at the flick of a switch, and adjustable monitor stands that you place on your existing desk.&lt;/p&gt;
&lt;p&gt;Don’t worry about spending much money on this for now as it’s relatively easy to make your own temporary solution first to see how you get along with the idea.&lt;/p&gt;
&lt;p&gt;I use a monitor arm that allows me to move the monitor easily from standing to sitting position. When I’m standing I place my keyboard and trackpad on a piece of wood which has short metal legs from IKEA attached to it.&lt;/p&gt;
&lt;p&gt;If you work for a company it’s worth checking if they have any budget available to spend on any of this. Your HR department might also have a set protocol to go through to ensure you have a comfortable working environment.&lt;/p&gt;
&lt;h2&gt;Designate a space just for work&lt;/h2&gt;
&lt;p&gt;Try to do all of this in a designated space if possible. Even if you have to share a space and go to another part of your home for, say the afternoon, make it clear that space is yours for the period of time you’re using it.&lt;/p&gt;
&lt;p&gt;This will help you stay focused while you’re working as you’ll find it easier to fit into work mode when you’re in your work space.&lt;/p&gt;
&lt;p&gt;If you’re keeping a schedule then this should also help you keep to that and avoid working extra in the evenings. When your office is no longer a train ride away it can sometimes be very tempting to just work a bit extra to finish a tricky project or to just check your work email. Before you know it that five minutes has turned into an hour and most of your evening has gone.&lt;/p&gt;
&lt;p&gt;If you can’t shut the door on your workspace then place your laptop away after you’ve finished for the day.&lt;/p&gt;
&lt;p&gt;There’s a famous video of someone being interviewed for a BBC news programme when his children wander into the room in the middle of the interview. Another younger child joins shortly after, followed by their Mother rushing in and taking them out of the room as discretely as possible. However hard you try to avoid it, these things can happen. Don’t worry if they do. These are difficult times and most people will be understanding.&lt;/p&gt;
&lt;h2&gt;Pomodoro Technique&lt;/h2&gt;
&lt;p&gt;This is something that isn’t exclusive to working from home but can be really useful if you’re struggling to stay focused on your work.&lt;/p&gt;
&lt;p&gt;From Wikipedia...&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The Pomodoro Technique is a time management method developed by Francesco Cirillo in the late 1980s. The technique uses a timer to break down work into intervals, traditionally 25 minutes in length, separated by short breaks.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;If you are having trouble staying focused give the Pomodoro Technique a go. By working in short 20-25 minute bursts and then having a proper short break it can really help with getting focussed.&lt;/p&gt;
&lt;h2&gt;Schedule&lt;/h2&gt;
&lt;p&gt;Along with the Pomorodo technique, try to stick to a regular schedule. It doesn’t have to be 9-5, just do what works best for you and your work colleagues if you have any. You could try starting earlier and then finishing earlier, but just having some kind of routine really helps.&lt;/p&gt;
&lt;h2&gt;Music or other background noise&lt;/h2&gt;
&lt;p&gt;Having some music to work to can be really helpful but this is very much a personal thing. Some people prefer working in silence, others the radio, and others to the background hum of a coffee shop. I knew one person who even preferred working with films playing in the background. Here are a few places where you can download or stream some of these different options.&lt;/p&gt;
&lt;h3&gt;Ambient music&lt;/h3&gt;
&lt;p&gt;I’ve set up a Spotify playlist of music that I sometimes use myself. This also includes my own album of piano music called Piano Days, released under the moniker Jigsaw Goldrush, which you can also download for free here too.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://open.spotify.com/user/sugardrum/playlist/2IcE1M7PJ3t5Y2HMaHT7RA?si=fe_zmes9RBi08vfKRw7t4Q&quot;&gt;Ambient working playlist on Spotify&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.jigsawgoldrush.com/&quot;&gt;Piano Days by Jigsaw Goldrush&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;Background noise&lt;/h3&gt;
&lt;p&gt;There are various different apps and websites you can use for this.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://rainycafe.com/&quot;&gt;Rainy Cafe&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.noisli.com/&quot;&gt;Noisli&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://mynoise.net/&quot;&gt;My Noise&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Communication&lt;/h2&gt;
&lt;p&gt;If you work with colleagues or have clients you usually speak to it’s important to keep this line of communication going when working from home. If you work for a company then they will most likely have their own system setup already, using something like Slack, Zoom, Skype etc.&lt;/p&gt;
&lt;p&gt;Try to have regular meetings with your work colleagues, via video if possible. Also, make it clear when you’d prefer not to be disturbed as regular interruptions can affect your flow when you’re hard at work.&lt;/p&gt;
&lt;h2&gt;Footwear&lt;/h2&gt;
&lt;p&gt;You may find yourself wearing different footwear now you’re no longer in the office. No more fancy heels or brogues whilst walking around the lounge.&lt;/p&gt;
&lt;p&gt;The typical office shoe barely resembles the shape of a natural foot, and usually provides arch support along with a raised heel. There’s plenty of evidence to show that this combination can make our feet weak and affect our overall posture.&lt;/p&gt;
&lt;p&gt;Whilst working from home, many people may spend all day either barefoot or in much less restrictive footware. This sudden change may result in your feet starting to ache as the muscles are being made to work more without any time to adapt.&lt;/p&gt;
&lt;p&gt;If you don’t have a medical condition that could be the cause then this change may be something to consider. It’s a bit like taking a limb out of a plaster cast and expecting to be able to use it at full strength straight away.&lt;/p&gt;
&lt;p&gt;Maybe look at doing some foot strengthening exercises to help your feet adapt.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.vivobarefoot.com/uk/blog/december-2014/engage-your-feet-with-a-spot-of-toega&quot;&gt;Engage your feet with a spot of Toega&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;There you go then. Hopefully you’ve found something useful here to make your working from home easier.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>A simple way to lazy load embedded YouTube videos using vanilla Javascript</title>
    <link href="https://www.nigelbunner.co.uk/blog/a-simple-way-to-lazy-load-embedded-youtube-videos-using-vanilla-javascript/" />
    <updated>2019-04-17T21:00:00Z</updated>
    <id>https://www.nigelbunner.co.uk/blog/a-simple-way-to-lazy-load-embedded-youtube-videos-using-vanilla-javascript/</id>
    <content type="html">&lt;p&gt;A couple of years ago I wrote an &lt;a href=&quot;https://www.nigelbunner.co.uk/blog/a-simple-way-to-lazy-load-embedded-youtube-videos/&quot;&gt;article&lt;/a&gt; about how to use lazy loading on YouTube videos. It&#39;s the code I use for the videos on my Sugardrum music site and I went to reference from it myself when I needed a similar solution for the videos on this site.&lt;/p&gt;
&lt;p&gt;Only thing is that the example is done using jQuery, but I don&#39;t use jQuery on this site. I use hardly any JavaScript at all except for the code used to toggle the main menu on mobile devices and setting up the service worker for the progressive web app version of the site. So I needed another solution. I ended up coding it up myself using vanilla JavaScript and thought I&#39;d share it here in case anyone else found it useful.&lt;/p&gt;
&lt;p&gt;To recap, lazy loading of videos is a technique where you replace a video on your site with a static image. This is faster for the browser to load due to its smaller file size than the video hence making the overall initial page load faster. This is especially useful when you multiple videos on a page. Clicking on the image then swaps it for the video.&lt;/p&gt;
&lt;h2&gt;The HTML&lt;/h2&gt;
&lt;p&gt;Here is the HTML for our player:&lt;/p&gt;
&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;youtube-container home-youtube-container embed-responsive embed-responsive-item videoPlayer&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;vid-ijo0I2xD9gM&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;homeVideoThumbnail video-player&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;img&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;//img.youtube.com/vi/ijo0I2xD9gM/0.jpg&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;alt&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;YouTube video&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;svg&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;xmlns&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;http://www.w3.org/2000/svg&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;x&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;0px&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;y&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;0px&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;video-player__btn homeVideoPlayButton&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token attr-name&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;96&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;96&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;viewBox&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;0 0 48 48&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; 
    &lt;span class=&quot;token special-attr&quot;&gt;&lt;span class=&quot;token attr-name&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt; fill:#000000;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;g&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;path&lt;/span&gt; &lt;span class=&quot;token special-attr&quot;&gt;&lt;span class=&quot;token attr-name&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt; fill:#FF3D00;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;M 43.199219 33.898438 C 42.800781 36 41.101563 37.601563 39 37.898438 C 35.699219 38.398438 30.199219 39 24 39 C 17.898438 39 12.398438 38.398438 9 37.898438 C 6.898438 37.601563 5.199219 36 4.800781 33.898438 C 4.398438 31.601563 4 28.199219 4 24 C 4 19.800781 4.398438 16.398438 4.800781 14.101563 C 5.199219 12 6.898438 10.398438 9 10.101563 C 12.300781 9.601563 17.800781 9 24 9 C 30.199219 9 35.601563 9.601563 39 10.101563 C 41.101563 10.398438 42.800781 12 43.199219 14.101563 C 43.601563 16.398438 44.101563 19.800781 44.101563 24 C 44 28.199219 43.601563 31.601563 43.199219 33.898438 Z &lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;path&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;path&lt;/span&gt; &lt;span class=&quot;token special-attr&quot;&gt;&lt;span class=&quot;token attr-name&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt; fill:#FFFFFF;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;d&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;M 20 31 L 20 17 L 32 24 Z &lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;path&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;g&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;svg&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;  
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The first div is container with some classes that set the styling. This also has an id containing the id of the video which is used by the Javascript . Then there is another div and inside this is an image. For every video on their site, Youtube generates a set of 4 thumbnails - 1 large and 3 small. These are named with the numbers 0 to 3 with 0 being the largest and the other smaller thumbnails featuring different scenes from the video.&lt;/p&gt;
&lt;p&gt;Every video also has an id which yo can obtain from the url in your browser when you are watching it. i.e.&lt;/p&gt;
&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;https://www.youtube.com/watch?v=ijo0I2xD9gM&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In this case the id is:&lt;/p&gt;
&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;ijo0I2xD9gM&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;We pass this id via the id of the container in the html, with the prefix vid- added to it.&lt;/p&gt;
&lt;p&gt;Then we have a SVG icon. In my previous article I used a Fontawesome. This is still perfectly ok  if you prefer but if you don’t already use Fontawesome, or have no need to use any of its other icons on your site then the SVG is, in my opinion the best option. This particular icon is the same as the play button on Youtube videos and is positioned on top of and in the centre of the photo using the CSS code.&lt;/p&gt;
&lt;h2&gt;The CSS&lt;/h2&gt;
&lt;p&gt;Here is the CSS used to style the youtube image before the video is loaded:&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.embed-responsive&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; block&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;margin-bottom&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 12px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;  
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token selector&quot;&gt;.embed-responsive .embed-responsive-item,
.embed-responsive iframe,
.embed-responsive embed,
.embed-responsive object,
.embed-responsive video&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;border&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;bottom&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 100%&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; absolute&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 100%&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token selector&quot;&gt;.embed-responsive-16by9&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;padding-bottom&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 56.25%&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;  
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token selector&quot;&gt;.video-player&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;max-width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 640px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; relative&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token selector&quot;&gt;.video-player__btn&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; #fff&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; 
  &lt;span class=&quot;token property&quot;&gt;font-size&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 72px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; 
  &lt;span class=&quot;token property&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 50%&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; 
  &lt;span class=&quot;token property&quot;&gt;margin&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; -33px 0 0 -44px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; 
  &lt;span class=&quot;token property&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; absolute&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; 
  &lt;span class=&quot;token property&quot;&gt;text-shadow&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0 1px 1px #4ab4d7&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; 
  &lt;span class=&quot;token property&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 50%&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;There isn’t much going on here except for the some styling to make sure the iFrame remains responsive, a max-width setting on the container so the image doesn’t become larger than its default size and positioning the play button over the top and in the centre of the video image.&lt;/p&gt;
&lt;p&gt;You could also position the play button using flex box but this would involve changing the video image so it’s a background on the container div the play button is in. I may change this in the future when I have time.&lt;/p&gt;
&lt;h2&gt;The Javascript&lt;/h2&gt;
&lt;p&gt;Here’s the Javascript. Remember, this is just Vanilla Javascript which means there’s no need to load in jQuery, or any other dependancies.&lt;/p&gt;
&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; v &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; document&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;getElementsByClassName&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;videoPlayer&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;updateVideo&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;                
        &lt;span class=&quot;token keyword&quot;&gt;const&lt;/span&gt; id &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;id&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;vid-&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;classList&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;add&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;embed-responsive-16by9&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token comment&quot;&gt;// adds responsive styling to the video iframe via a css class&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;innerHTML &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; 
            &lt;span class=&quot;token string&quot;&gt;&#39;&amp;lt;iframe src=&quot;//www.youtube.com/embed/&#39;&lt;/span&gt; 
            &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; id 
            &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;?autoplay=1&quot; width=&quot;560&quot; height=&quot;315&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&amp;lt;/iframe&gt;&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;           
        &lt;span class=&quot;token keyword&quot;&gt;for&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;i &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token number&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; i &lt;span class=&quot;token operator&quot;&gt;&amp;lt;&lt;/span&gt; v&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;length&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; i&lt;span class=&quot;token operator&quot;&gt;++&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
            v&lt;span class=&quot;token punctuation&quot;&gt;[&lt;/span&gt;i&lt;span class=&quot;token punctuation&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;addEventListener&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;click&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; updateVideo&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
        &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;First we define a constant, v that get’s all the elements containing the classname videoPlayer. This allows us to have multiple videos on the same page. Note that I use camelCase for the class name keeping line with my recommendtions on a previous blog post about using this for CSS classnames associated with Javascript - &lt;a href=&quot;https://www.nigelbunner.co.uk/blog/2015/12/09/some-css-style-naming-and-layout-tips/&quot;&gt;Some CSS style naming and layout tips.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Then there’s a function that is run when the user clicks on the video image. This does the following:&lt;/p&gt;
&lt;p&gt;We get the id of each of these elements and create a new const called id with the vid- part removed. The reason I added the vid- in the first place was that ids and classnames in CSS cannot begin with a number and there’s no guarantee the id of our video won’t begin with one.&lt;/p&gt;
&lt;p&gt;Then we replace the content of this element with the code for the video player. This is the standard iframe code usually used for embedding YouTube videos. To this we add the id of the video to the src of the iframe. I’ve set the width and height to common values but feel free to change these if you wish them to be different. Remember the CSS code makes sure the initial image of the video fits on  devices with smaller screens such as mobile phones . It also makes sure it never becomes larger than 640px across. Feel free to change this if you wish the initial image to be larger,  but be sure to test this to make sure the image is large enough for the chosen maximum size.&lt;/p&gt;
&lt;p&gt;Finally we add a click event to all of the elements we found at the start of the code with the classname videoPlayer which runs the function and all the code explained above when the user clicks on the relevant element.&lt;/p&gt;
&lt;h2&gt;Bonus tips: how I use this with Jekyll&lt;/h2&gt;
&lt;p&gt;I use a Static Site Generator (SSG)  called Jekyll to generate the code on this site. Here’s how I set up the lazy loading for Jekyll.&lt;/p&gt;
&lt;p&gt;I created an include file called youtube-static-image.html for the html. In here I replaced the video id in both places where it is used with a variable that is passed in, i.e.&lt;/p&gt;
&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;youtube-container home-youtube-container embed-responsive embed-responsive-16by9 embed-responsive-item videoPlayer&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;vid-{{ include.youtubeId }}&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In my blog post I then include this file using the following code:&lt;/p&gt;
&lt;pre class=&quot;language-liquid&quot;&gt;&lt;code class=&quot;language-liquid&quot;&gt;&lt;span class=&quot;token liquid language-liquid&quot;&gt;&lt;span class=&quot;token delimiter punctuation&quot;&gt;{%&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;include&lt;/span&gt; youtube&lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;static&lt;span class=&quot;token operator&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;token object&quot;&gt;image&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;html youtubeId&lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;zSIDRHUWlVo&quot;&lt;/span&gt; &lt;span class=&quot;token delimiter punctuation&quot;&gt;%}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Where the value for &lt;em&gt;youtubeId&lt;/em&gt; is the id of the chosen youtube video.&lt;/p&gt;
&lt;p&gt;I also pass in a variable in the YAML front matter of the post indicating that it has videos .&lt;/p&gt;
&lt;pre class=&quot;language-yaml&quot;&gt;&lt;code class=&quot;language-yaml&quot;&gt;&lt;span class=&quot;token key atrule&quot;&gt;useVideo&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;token boolean important&quot;&gt;true&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As I use hardly any Javascript on this site I simply load it inline towards the bottom of the html.  In my default layout file I added an if statement to only load the youtube lazy loading Javascript code if the &lt;em&gt;useVideo&lt;/em&gt; variable is present.&lt;/p&gt;
&lt;pre class=&quot;language-liquid&quot;&gt;&lt;code class=&quot;language-liquid&quot;&gt;&lt;span class=&quot;token liquid language-liquid&quot;&gt;&lt;span class=&quot;token delimiter punctuation&quot;&gt;{%&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token object&quot;&gt;page&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;useVideo &lt;span class=&quot;token operator&quot;&gt;==&lt;/span&gt; &lt;span class=&quot;token boolean&quot;&gt;true&lt;/span&gt; &lt;span class=&quot;token delimiter punctuation&quot;&gt;%}&lt;/span&gt;&lt;/span&gt;
&amp;lt; javascript code goes here &gt;
&lt;span class=&quot;token liquid language-liquid&quot;&gt;&lt;span class=&quot;token delimiter punctuation&quot;&gt;{%&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;endif&lt;/span&gt; &lt;span class=&quot;token delimiter punctuation&quot;&gt;%}&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Demo&lt;/h2&gt;
&lt;p&gt;You can see an example of this code below and on my recent blog post about running technique - &lt;a href=&quot;https://www.nigelbunner.co.uk/blog/a-simple-guide-to-good-running-form/&quot;&gt;A simple guide to good running form&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you like the music in the video below feel free to download the album and share it using the links on my &lt;a href=&quot;https://sugardrum.com/listen/&quot;&gt;Sugardrum website&lt;/a&gt;.&lt;/p&gt;
&lt;div class=&quot;youtube-container home-youtube-container embed-responsive embed-responsive-item videoPlayer&quot; id=&quot;vid-ijo0I2xD9gM&quot;&gt;
  &lt;div class=&quot;homeVideoThumbnail video-player&quot;&gt;
    &lt;img src=&quot;https://img.youtube.com/vi/ijo0I2xD9gM/0.jpg&quot; alt=&quot;Play YouTube video&quot; loading=&quot;lazy&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; class=&quot;video-player__btn homeVideoPlayButton&quot; width=&quot;96&quot; height=&quot;96&quot; viewBox=&quot;0 0 48 48&quot; aria-hidden=&quot;true&quot;&gt;&lt;path fill=&quot;#FF3D00&quot; d=&quot;M43.2 33.9c-.4 2.1-2.1 3.7-4.2 4-3.3.5-8.8 1.1-15 1.1-6.1 0-11.6-.6-15-1.1-2.1-.3-3.8-1.9-4.2-4C4.4 31.6 4 28.2 4 24s.4-7.6.8-9.9c.4-2.1 2.1-3.7 4.2-4 3.3-.5 8.8-1.1 15-1.1s11.6.6 15 1.1c2.1.3 3.8 1.9 4.2 4 .4 2.3.9 5.7.9 9.9-.1 4.2-.5 7.6-.9 9.9z&quot;&gt;&lt;/path&gt;&lt;path fill=&quot;#FFF&quot; d=&quot;M20 31V17l12 7z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;em&gt;Bubble Clouds by Sugardrum. From the album Postcards, available to stream from &lt;a href=&quot;https://itunes.apple.com/gb/album/postcards/id1081336392&quot; target=&quot;_blank&quot;&gt;Apple Music&lt;/a&gt;, &lt;a href=&quot;https://open.spotify.com/album/3SowuTWPQwJf2ndygPUfUv&quot; target=&quot;_blank&quot;&gt;Spotify&lt;/a&gt; and download/buy from &lt;a href=&quot;https://sugardrum.bandcamp.com/album/postcards&quot;&gt;Bandcamp&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>A simple guide to good running form</title>
    <link href="https://www.nigelbunner.co.uk/blog/a-simple-guide-to-good-running-form/" />
    <updated>2019-01-08T21:00:00Z</updated>
    <id>https://www.nigelbunner.co.uk/blog/a-simple-guide-to-good-running-form/</id>
    <content type="html">&lt;p&gt;I started running just around the time I turned 40. I can&#39;t remember the exact day or how far I went but I remember running around the local park for 10mins thinking to myself how this was the furthest I had run for over twenty years.&lt;/p&gt;
&lt;p&gt;I soon became hooked and started running regularly a couple of times per week. Then I did some research on running technique.&lt;/p&gt;
&lt;p&gt;I read loads about different ways of landing on your feet - forefoot was supposed to be best. I was a bit confused as to exactly what this meant so the next day I ran purely on my toes. Mmm, big mistake. The next day my calves felt like they had sharp pointy things in them and I could hardly walk for several days from the pain.&lt;/p&gt;
&lt;p&gt;It was a valuable lesson as I realised you were supposed to allow the heel to drop down as your foot landed. This was what I had been doing naturally before I started messing around with the running on my toes thing so I just went back to that - much happier calves!&lt;/p&gt;
&lt;p&gt;One thing I remember when I first started was people telling me to be careful with my knees. In fact people still say it to me, the line usually being
&lt;strong&gt;”oh I tried running for a while but it was too hard on my knees. You should be careful the same thing doesn’t happen to you.“&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Other injury warnings followed until I had a list of areas of the body that I would inevitably damage at some point if I carried on; knees, shins, hamstring, calves and fallen off toenails. In fact before I started running I was a little scared of it due to the litany of injuries various people kept telling me to expect to end up with.&lt;/p&gt;
&lt;p&gt;Fortunately, I didn’t listen to these horror stories and ran anyway, and those injuries never happened. I also discovered a love for running that I never realised I had before and that it was something I was fairly good at it.&lt;/p&gt;
&lt;p&gt;Along the way, I’ve done a fair amount of reading on running technique, spoken to various different professionals on the subject and realised why so many people get these particular injuries when they start running, and why I never have.&lt;/p&gt;
&lt;p&gt;Below is a summary of what I have learnt. I believe there are a few basic things most people can do to improve their running style if they wish/need to.&lt;/p&gt;
&lt;p&gt;Do with this info as you will. If you’re happy with your current technique and never get injured or aren’t fussed about a possible way to run faster then feel free to ignore it and carry on as you are.&lt;/p&gt;
&lt;p&gt;I’m not a doctor or a physiotherapist. These are just tips I have picked up from lots of reading, my personal experiences as a runner and taking advice from professional running coaches (links to these at the bottom of this article).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Whatever you do, make any changes slowly.&lt;/strong&gt; Listen to your body, as making changes to your technique can take time for your body to adjust. You may need to drastically reduce your mileage and running intensity to allow for this. If you notice any unusual aches or pains then stop running and seek medical advice.&lt;/p&gt;
&lt;h2&gt;A summary of running technique tips&lt;/h2&gt;
&lt;p&gt;Here’s a quick summary of the key points, followed by further detail about each one.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Don’t over stride&lt;/li&gt;
&lt;li&gt;Take lighter smaller steps with a higher cadence&lt;/li&gt;
&lt;li&gt;Practise deep squats to improve your technique&lt;/li&gt;
&lt;li&gt;Run tall&lt;/li&gt;
&lt;li&gt;Relax your hands and arms&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Don’t over stride&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Painful knees is most likely a sign of overstriding (reaching out your leg too far in front of you), landing on your heels and running with a slow cadence or steps per min. This creates a braking effect, sending a shockwave up through your leg and hence hurting joints like the knees.&lt;/li&gt;
&lt;li&gt;It’s better to try to take shorter strides, landing on the front or mid part of your foot with your heel coming down straight after (don’t just run on your toes as your calves won’t be too happy).&lt;/li&gt;
&lt;li&gt;Try to land with your foot beneath you so your centre of gravity is beneath you too and take more steps per min. That way you have more spring in your step and reuse the energy to move yourself rather than hurting your joints. This leads onto my next tip...&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Take lighter smaller steps with a higher cadence&lt;/h3&gt;
&lt;p&gt;Imagine a boxer jumping up and down in the ring or training with a skipping rope. The faster they bounce up and down the more spring they have and the easier it becomes.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Try jumping up and down barefoot, first at a slow plodding pace and then a faster one i.e. about 180 jumps per min or 3 per sec - you should find the latter much less tiring. This number is what I mean by cadence.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You could use a metronome to mark out the beats for you or just &lt;strong&gt;try counting 3 steps every second&lt;/strong&gt;. It also helps counting in threes as you may find yourself landing at first with slightly more emphasis on the first beat and counting in threes avoids this happening on the same foot each time.&lt;/p&gt;
&lt;p&gt;If you’re used to running at a much slower cadence than 180 then &lt;strong&gt;increase it slowly&lt;/strong&gt;, a little at a time.&lt;/p&gt;
&lt;h3&gt;Practise a deep barefoot squat&lt;/h3&gt;
&lt;p&gt;Children are the best example of how to run  - nearly all will run with a short stride, landing on their mid foot and with a high cadence.&lt;/p&gt;
&lt;p&gt;Another thing that most toddlers are experts at doing is a &lt;strong&gt;deep squat&lt;/strong&gt;. Most adults in Western society do this balancing on our toes with our heels in the air and our feet pointed outwards. But if you look at how most young children do this it’s with their feet flat on the ground and straight.&lt;/p&gt;
&lt;p&gt;The deep squat is a natural resting stance in various cultures around the world. This is mainly due to them having less muscle imbalances from sitting down all day or wearing shoes with an elevated heel.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.nigelbunner.co.uk/img/posts/monk-squatting.jpg&quot; alt=&quot;Monk squatting&quot;&gt;&lt;/p&gt;
&lt;p&gt;It&#39;s also a really good exercise to work on the muscles and ligaments you need to run efficiently.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Try practise holding a deep squat for a minute each day or at various times throughout the day when you would usually kneel down. Do this with your heels in the ground, not balancing on your toes. See the links below for more info on this.&lt;/li&gt;
&lt;li&gt;If you find it difficult to do this at first then try doing something called the assisted squat. This is the same but holding onto something as you move down, e.g. a door frame or table leg.&lt;/li&gt;
&lt;li&gt;If you can, do this without your shoes on.&lt;/li&gt;
&lt;li&gt;Here are a couple of good articles on this. &lt;a href=&quot;https://www.vivobarefoot.com/uk/blog/october-2017/daily-exercise-tutorials&quot;&gt;Daily Exercise Tutorials | Vivobarefoot&lt;/a&gt;
and &lt;a href=&quot;https://www.leesaxby.com/foot-function-and-squatting/&quot;&gt;Foot Function and Squatting — Functional Foot Map by Lee Saxby&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Run tall&lt;/h3&gt;
&lt;p&gt;Too many people look down at their feet when running. This can affect your posture, causing your head to drop forward and your back to become arched.&lt;/p&gt;
&lt;p&gt;Try keeping your head more upright but relaxed. A good way to do this is to imagine a vertical cord coming out of the top of your head. Whilst doing this aim to look straight ahead but keep glancing down to the ground a few feet ahead of you for possible obstacles.&lt;/p&gt;
&lt;h3&gt;Relax your hands and arms&lt;/h3&gt;
&lt;p&gt;Try not to clench your fists whilst you run. Keep you fingers relaxed instead and your arms at a roughly 90 angle but relaxed down from your shoulders. Be aware of any tension in your neck and shoulders and allow your shoulders to relax downwards if you notice them tensing up.&lt;/p&gt;
&lt;h2&gt;Take it slowly at first&lt;/h2&gt;
&lt;p&gt;One word of warning regarding the points I’ve mentioned. &lt;strong&gt;Your body may need time to adjust&lt;/strong&gt; to a new style of running so take it slowly. If you start feeling pain in your feet or calves etc then stop running and try again when you feel better.&lt;/p&gt;
&lt;p&gt;This may mean drastically cutting down your mileage until your body has adapted to the change in running style. Maybe intersperse running with walking to help this.&lt;/p&gt;
&lt;p&gt;Changing running technique means your body will be using different muscles which may not be used to the extra work being put on them. Doing too much too soon is a sure way to become injured so listen to your body.&lt;/p&gt;
&lt;p&gt;If possible, &lt;strong&gt;try barefoot running&lt;/strong&gt; once a week for part of a training run. Find a park with a smooth tarmac path and run on it for a while with no shoes or socks on.&lt;/p&gt;
&lt;p&gt;Your bare feet will usually start to hurt before you get the chance to injure yourself elsewhere from overtraining.&lt;/p&gt;
&lt;p&gt;This is a great way to notice possible problems with your technique. If you still try things like over striding, landing on your heels, or sliding your foot forwards as you land then your bare feet will soon let you know about it.&lt;/p&gt;
&lt;p&gt;Many people suggest barefoot running on grass but unless the grass is very short and the ground nice and even then you run the risk of stepping on a small stone, down a hole or onto dog poo.&lt;/p&gt;
&lt;h2&gt;Example videos&lt;/h2&gt;
&lt;p&gt;Here are a couple of videos that help demonstrate some of the points I’ve mentioned.&lt;/p&gt;
&lt;div class=&quot;youtube-container home-youtube-container embed-responsive embed-responsive-item videoPlayer&quot; id=&quot;vid-xec_am8o0Ow&quot;&gt;
  &lt;div class=&quot;homeVideoThumbnail video-player&quot;&gt;
    &lt;img src=&quot;https://img.youtube.com/vi/xec_am8o0Ow/0.jpg&quot; alt=&quot;Play YouTube video&quot; loading=&quot;lazy&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; class=&quot;video-player__btn homeVideoPlayButton&quot; width=&quot;96&quot; height=&quot;96&quot; viewBox=&quot;0 0 48 48&quot; aria-hidden=&quot;true&quot;&gt;&lt;path fill=&quot;#FF3D00&quot; d=&quot;M43.2 33.9c-.4 2.1-2.1 3.7-4.2 4-3.3.5-8.8 1.1-15 1.1-6.1 0-11.6-.6-15-1.1-2.1-.3-3.8-1.9-4.2-4C4.4 31.6 4 28.2 4 24s.4-7.6.8-9.9c.4-2.1 2.1-3.7 4.2-4 3.3-.5 8.8-1.1 15-1.1s11.6.6 15 1.1c2.1.3 3.8 1.9 4.2 4 .4 2.3.9 5.7.9 9.9-.1 4.2-.5 7.6-.9 9.9z&quot;&gt;&lt;/path&gt;&lt;path fill=&quot;#FFF&quot; d=&quot;M20 31V17l12 7z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;em&gt;A short video by &lt;a href=&quot;https://www.championseverywhere.com&quot;&gt;Champions Everywhere&lt;/a&gt; about simple methods to improve your technique.&lt;/em&gt;&lt;/p&gt;
&lt;div class=&quot;youtube-container home-youtube-container embed-responsive embed-responsive-item videoPlayer&quot; id=&quot;vid-zSIDRHUWlVo&quot;&gt;
  &lt;div class=&quot;homeVideoThumbnail video-player&quot;&gt;
    &lt;img src=&quot;https://img.youtube.com/vi/zSIDRHUWlVo/0.jpg&quot; alt=&quot;Play YouTube video&quot; loading=&quot;lazy&quot;&gt;
    &lt;svg xmlns=&quot;http://www.w3.org/2000/svg&quot; class=&quot;video-player__btn homeVideoPlayButton&quot; width=&quot;96&quot; height=&quot;96&quot; viewBox=&quot;0 0 48 48&quot; aria-hidden=&quot;true&quot;&gt;&lt;path fill=&quot;#FF3D00&quot; d=&quot;M43.2 33.9c-.4 2.1-2.1 3.7-4.2 4-3.3.5-8.8 1.1-15 1.1-6.1 0-11.6-.6-15-1.1-2.1-.3-3.8-1.9-4.2-4C4.4 31.6 4 28.2 4 24s.4-7.6.8-9.9c.4-2.1 2.1-3.7 4.2-4 3.3-.5 8.8-1.1 15-1.1s11.6.6 15 1.1c2.1.3 3.8 1.9 4.2 4 .4 2.3.9 5.7.9 9.9-.1 4.2-.5 7.6-.9 9.9z&quot;&gt;&lt;/path&gt;&lt;path fill=&quot;#FFF&quot; d=&quot;M20 31V17l12 7z&quot;&gt;&lt;/path&gt;&lt;/svg&gt;
  &lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&lt;em&gt;A much longer video from &lt;a href=&quot;https://naturalrunningcenter.com&quot;&gt;The Natural Running Center&lt;/a&gt;, but one of the best and most comprehensive on showing you how to improve your running style.&lt;/em&gt;&lt;/p&gt;
&lt;!-- &lt;iframe width=&quot;300&quot; height=&quot;169&quot; src=&quot;https://www.youtube.com/embed/xec_am8o0Ow&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt; --&gt;
&lt;!-- &lt;iframe width=&quot;300&quot; height=&quot;169&quot; src=&quot;https://www.youtube.com/embed/zSIDRHUWlVo&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen&gt;&lt;/iframe&gt; --&gt;
&lt;p&gt;Everybody’s body is slightly different so If you want advice specific to you here are a couple of places you can go to.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://www.vivobarefoot.com/uk/coaching&quot;&gt;Vivobarefoot - Walking Barefoot &amp;amp; Natural Running Transition &amp;amp; Courses&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;https://strideuk.com/&quot;&gt;Stride UK Running rehab, performance and 3D analysis.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I have no affiliation with either of them, just a happy customer of both.&lt;/p&gt;
&lt;p&gt;That’s a general summary of things. In part two I plan do go into more detail about footwear. Until then, happy running!&lt;/p&gt;
&lt;h2&gt;References&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://www.vivobarefoot.com/uk/blog/october-2017/daily-exercise-tutorials&quot;&gt;Vivobarefoot - Daily Exercise Tutorials&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.leesaxby.com/foot-function-and-squatting/&quot;&gt;Foot Function and Squatting — Functional Foot Map by Lee Saxby&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://xeroshoes.com/sandals-barefoot/how-not-to-start-barefoot-running/&quot;&gt;How NOT to start barefoot running - Xero Shoes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://xeroshoes.com/sandals-barefoot/5-common-stride-missteps/&quot;&gt;5 Common Stride Missteps - Xero Shoes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.kinetic-revolution.com/running-technique-6-ways-to-improve-efficiency/&quot;&gt;Proper Running Technique: Six Ways to Improve Efficiency&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://naturalrunningcenter.com/2013/11/17/40-tips-improve-running-form/&quot;&gt;5 Tips on How To Improve Your Running Form - Natural Running Center&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.theguardian.com/lifeandstyle/the-running-blog/2013/apr/17/barefoot-running-thin-soles-technique&quot;&gt;There&#39;s more to &#39;barefoot&#39; running than thin soles: technique is vital, too - The Guardian&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://runforefoot.com/tight-leg-muscles-running-performance/&quot;&gt;Why Tight Leg Muscles Are a Good Thing for Running Performance - RUN FOREFOOT&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=OnVQCjYzYuQ&amp;amp;feature=share&quot;&gt;Dr. Rangan Chatterjee on why barefoot is best for kids - YouTube&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://ekaminhale.com/blogs/news/the-secret-to-reclaiming-your-flat-footed-squat&quot;&gt;Secrets To Reclaiming Your Flat Footed Squat For Yoga Pt 1 (Update 201 – Ekaminhale&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
  <entry>
    <title>Short Story collection free all this week</title>
    <link href="https://www.nigelbunner.co.uk/blog/short-story-collection-free-this-week/" />
    <updated>2018-04-02T21:00:00Z</updated>
    <id>https://www.nigelbunner.co.uk/blog/short-story-collection-free-this-week/</id>
    <content type="html">&lt;p&gt;My book of short stories, &lt;em&gt;For You I Hide This&lt;/em&gt;, is available for free all this week from the Amazon Kindle store.&lt;/p&gt;
&lt;p&gt;Go &lt;a href=&quot;https://amzn.to/2GshjUx&quot;&gt;download it now&lt;/a&gt; while it&#39;s free.&lt;/p&gt;
&lt;p&gt;Here&#39;s a preview:&lt;/p&gt;
&lt;blockquote&gt;    
    &lt;h3&gt;For you I hide This&lt;/h3&gt;
    &lt;p&gt;A fascinating collection of twelve short stories drawn from Nigel’s experiences and imagination. A magical trail under the stairs offers a glimpse into a future self, the hidden words written on postcards on a wall, a cat who tries to break free from its natural instinct to eat everything that moves, the joy of taking the day off to play in a snow covered landscape and the heartfelt tale of living with dementia. Each story is based on a song from Nigel&#39;s debut album Postcards performing as indie folk artist Sugardrum.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;iframe type=&quot;text/html&quot; width=&quot;336&quot; height=&quot;550&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot; style=&quot;max-width:100%&quot; src=&quot;https://read.amazon.co.uk/kp/card?asin=B01N3OBT3W&amp;preview=inline&amp;linkCode=kpe&amp;ref_=cm_sw_r_kb_dp_o8.VAb6JV5D43&amp;tag=nigebunn-21&quot;&gt;&lt;/iframe&gt;
</content>
  </entry>
  <entry>
    <title>New Sugardrum live video</title>
    <link href="https://www.nigelbunner.co.uk/blog/new-sugardrum-live-video/" />
    <updated>2017-10-15T12:28:00Z</updated>
    <id>https://www.nigelbunner.co.uk/blog/new-sugardrum-live-video/</id>
    <content type="html">&lt;p&gt;I have a new live video over on my &lt;a href=&quot;https://sugardrum.com/blog/2017/10/11/new-video-postcard-live/&quot;&gt;Sugardrum music&lt;/a&gt; website, and a little story behind the making of it.&lt;/p&gt;
&lt;div class=&quot;embed-responsive embed-responsive-16by9&quot;&gt;&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/RiEAOT2YXbM&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;</content>
  </entry>
  <entry>
    <title>Social media for musicians</title>
    <link href="https://www.nigelbunner.co.uk/blog/social-media-for-musicians/" />
    <updated>2017-07-19T20:30:00Z</updated>
    <id>https://www.nigelbunner.co.uk/blog/social-media-for-musicians/</id>
    <content type="html">&lt;p&gt;There are a fair number of guides on the web, listing what the author thinks are the best social media websites for musicians to use. Most of them pick the usual popular big two of Facebook and Twitter, ignoring some of the slightly lesser known sites.&lt;/p&gt;
&lt;p&gt;This guide is slightly different in that I list the websites and services I have used as a musician over the past 19 years with the added knowledge that comes from being a web developer. I was inspired to write it after a friend of mine posted a request on Facebook for suggestions on sites to sell their music via iTunes, Spotify etc. None of the suggestions matched what I currently use which made me wonder if some of the other sites I use were that well known by other musicians too.&lt;/p&gt;
&lt;p&gt;Most of what follows is in the end down to personal preference. One website that works well for one person might not be so useful to the next, so choose what you think will work best for you. If it doesn&#39;t work then try something else - as musicians we&#39;re a bit spoilt for choice.&lt;/p&gt;
&lt;h2&gt;The ones to try&lt;/h2&gt;
&lt;p&gt;Here is my list of the social websites I currently use to promote my music.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Bandcamp&lt;/li&gt;
&lt;li&gt;Buffer&lt;/li&gt;
&lt;li&gt;Facebook&lt;/li&gt;
&lt;li&gt;IFTTT&lt;/li&gt;
&lt;li&gt;Music Brainz&lt;/li&gt;
&lt;li&gt;Routenote&lt;/li&gt;
&lt;li&gt;Songkick&lt;/li&gt;
&lt;li&gt;Soundcloud&lt;/li&gt;
&lt;li&gt;Twitter&lt;/li&gt;
&lt;li&gt;YouTube&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;and that&#39;s it. That&#39;s still a fairly long list, but wait until you see the ones that I&#39;ve tried over the years and no longer use.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;14 tracks&lt;/li&gt;
&lt;li&gt;Amazing tunes&lt;/li&gt;
&lt;li&gt;Bandwagon gigs&lt;/li&gt;
&lt;li&gt;Beat100&lt;/li&gt;
&lt;li&gt;Coverium&lt;/li&gt;
&lt;li&gt;Eventim&lt;/li&gt;
&lt;li&gt;Exposed vocals&lt;/li&gt;
&lt;li&gt;Flickr&lt;/li&gt;
&lt;li&gt;Gigs and tours&lt;/li&gt;
&lt;li&gt;Instagram&lt;/li&gt;
&lt;li&gt;Last.fm&lt;/li&gt;
&lt;li&gt;LinkedIn&lt;/li&gt;
&lt;li&gt;Music X-ray&lt;/li&gt;
&lt;li&gt;Music clout&lt;/li&gt;
&lt;li&gt;MySpace&lt;/li&gt;
&lt;li&gt;Ourstage&lt;/li&gt;
&lt;li&gt;Peoplesound&lt;/li&gt;
&lt;li&gt;Ping&lt;/li&gt;
&lt;li&gt;Reverbnation&lt;/li&gt;
&lt;li&gt;Reviewshine&lt;/li&gt;
&lt;li&gt;Songkick&lt;/li&gt;
&lt;li&gt;Sonicbids&lt;/li&gt;
&lt;li&gt;The sixty one&lt;/li&gt;
&lt;li&gt;Vimeo&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some of these are now defunct, others I&#39;m still a member of but no longer actively use as I found them not worth my time doing so.&lt;/p&gt;
&lt;p&gt;Rather than go into why the above do not work for me I&#39;ll list the reasons why I use the websites I do use.&lt;/p&gt;
&lt;p&gt;All of these should hopefully save you time setting up and maintaining your online presence so you can spend more time being a musician.&lt;/p&gt;
&lt;h2&gt;Bandcamp&lt;/h2&gt;
&lt;p&gt;When I first created a website for &lt;a href=&quot;https://www.sugardrum.com&quot;&gt;Sugardrum&lt;/a&gt; the only way to add music to your website was to create and upload the mp3s yourself, then add some code such as a Flash based music player so people could listen to them. Before doing this the mp3s had to have their ID3 tags and file names set correctly. You also had to attempt to hide the actual location of the mp3s in case someone tried to bypass the online player and download the tracks for free.&lt;/p&gt;
&lt;p&gt;On top of this if you wanted to sell your music on your site you either added some PayPal buttons or setup your own shopping cart software. I tried both of these and even created my own shopping cart software which was used on a couple of other sites for a while.&lt;/p&gt;
&lt;p&gt;Nowadays I don&#39;t bother with any of this as I just use &lt;a href=&quot;https://shop.sugardrum.com/&quot;&gt;Bandcamp&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This is a great way to sell your music online. They have HTML5 players that you can easily style and embed onto your own website. You also get your own set of pages on their site where you can market and sell your music. These pages can be styled with images and colours to match your own branding. Once you&#39;ve setup a new album or EP and uploaded the tracks in WAV format they take care of all the file conversion into other formats for you and the tracks have the correct ID3 information added based on the album you add them to.&lt;/p&gt;
&lt;p&gt;Users are given the option of downloading in MP3, Ogg and WAV formats and they even give you the option to sell CDs or other physical merchandise on their site too. They send you an email when a purchase has been made which, if it&#39;s a physical item, you post yourself.&lt;/p&gt;
&lt;p&gt;Here&#39;s an example of one the simplest of their music player layouts:&lt;/p&gt;
&lt;iframe class=&quot;musicplayer&quot; style=&quot;border: 0; width: 100%; height: 42px;&quot; src=&quot;https://bandcamp.com/EmbeddedPlayer/album=1566325814/size=small/bgcol=ffffff/linkcol=0687f5/transparent=true/&quot; seamless=&quot;&quot;&gt;&lt;a href=&quot;https://shop.sugardrum.com/album/postcards&quot;&gt;Postcards by Sugardrum&lt;/a&gt;&lt;/iframe&gt;
&lt;h2&gt;Soundcloud&lt;/h2&gt;
&lt;p&gt;You&#39;ve setup your tracks in Bandcamp and have them grouped together by the albums they belong to. But what if you want to upload a track to your website that isn&#39;t in an album? Maybe it&#39;s a new demo version or a live recording and you want to send someone a link to this file where they can listen to it online. This is where &lt;a href=&quot;https://soundcloud.com/sugardrum/tracks&quot;&gt;Soundcloud&lt;/a&gt; is really useful.&lt;/p&gt;
&lt;p&gt;Many people may only be aware of a Soundcloud as a streaming service similar to Spotify or Apple Music. What sets Soundcloud apart is it&#39;s used extensively by musicians, blogs and radio stations as a way to both promote and share music.&lt;/p&gt;
&lt;p&gt;I used to use their widgets on my own site before I decided it made more sense to just use the Bandcamp embedded player. I still upload tracks there though as it&#39;s such a great tool for sharing. I can create private playlists with demos or unreleased tracks and send people the URL to download or listen to them online.&lt;/p&gt;
&lt;p&gt;It can also be used to submit tracks to competitions, record labels or radio stations via an inbox facility that you upload one of your tracks on Soundcloud to. I&#39;ve had great results from this, uploading tracks to the &lt;a href=&quot;https://freshonthenet.co.uk/&quot;&gt;Freshonthenet&lt;/a&gt; Soundcloud page run by Tom Robinson&#39;s BBC 6music show.&lt;/p&gt;
&lt;p&gt;Soundcloud have a free and a pro plan, the latter giving you more recording time and playlists for a small annual fee. Despite the recents cuts they&#39;ve made to their workforce and the rumours of an imminent buyout I still think it&#39;s worth creating an artist account if you haven&#39;t already and taking a look at what they have to offer.&lt;/p&gt;
&lt;h2&gt;IFTTT&lt;/h2&gt;
&lt;p&gt;The best kind of websites are those that update themselves using data from other sites. I use the If This Then That &lt;a href=&quot;https://ifttt.com/&quot;&gt;(IFTTT)&lt;/a&gt; service to link my &lt;a href=&quot;https://instagram.com/sugardrum&quot;&gt;Instagram&lt;/a&gt; and Twitter accounts together. Now, whenever I post a picture to Instagram a tweet of the photo is automatically created in my Twitter account. You can do so much more with IFTTT, linking thousands of different services together and all for free.&lt;/p&gt;
&lt;h2&gt;Buffer&lt;/h2&gt;
&lt;p&gt;I use &lt;a href=&quot;https://buffer.com/&quot;&gt;Buffer&lt;/a&gt; to write posts for &lt;a href=&quot;https://twitter.com/sugardrummusic&quot;&gt;Twitter&lt;/a&gt;, Facebook or Google Plus when I think of them in advance. These are then scheduled to go live at the best time possible.&lt;/p&gt;
&lt;p&gt;This is my only point of contact with Google plus; I just set up the posts via Buffer and check their stats to see how they are performing.&lt;/p&gt;
&lt;h2&gt;Facebook&lt;/h2&gt;
&lt;p&gt;Just as hardly any non musicians use MySpace, the opposite can be said about &lt;a href=&quot;https://www.facebook.com/pages/sugardrum/289395918859&quot;&gt;Facebook&lt;/a&gt;. It can be a great promotional tool for gigs, videos and new releases. I usually post a short summary of any blog posts on there to direct people to my website and have also paid to promote a few posts using Facebook ads.&lt;/p&gt;
&lt;p&gt;One of my more successful promotions was a live video I made of my acoustic cover of The Smiths song, &lt;a href=&quot;https://youtu.be/jt9BeiRDwJI&quot;&gt;There is a light and it never goes out&lt;/a&gt;. Using targeted ads I was able to get this seen by thousands of Smiths fans and received some lovely feedback as a result. I&#39;ve found that posting videos directly to Facebook creates more user engagement than a link to a video on YouTube or Vimeo.&lt;/p&gt;
&lt;p&gt;The one annoying thing about Facebook is that when you set up an event for one of your gigs, you cannot then go and invite all the people who have liked your page unless you are friends with them. I know, it&#39;s odd. It&#39;s as if they went to loads of trouble allowing us to setup artist pages, but then refused to also adapt this feature to work better with them. As I don&#39;t really use Facebook in my personal life I just don&#39;t bother using the event pages for my gigs anymore, unless it&#39;s something the venue has set up already.&lt;/p&gt;
&lt;h2&gt;Musicbrainz&lt;/h2&gt;
&lt;p&gt;This is used by the &lt;a href=&quot;https://www.bbc.co.uk/music/artists/ec5a1f87-9ec3-4893-bf62-2405f71be622&quot;&gt;BBC&lt;/a&gt; to supply your profile page with the data it needs. &lt;a href=&quot;https://musicbrainz.org/&quot;&gt;Musicbrainz&lt;/a&gt; isn&#39;t the most stylish or easy to use website there is but it does the job it was meant to do and you need to have a profile on there if you have an artist page on the BBC website and wish it to have all the relevant information.&lt;/p&gt;
&lt;h2&gt;Routenote&lt;/h2&gt;
&lt;p&gt;The reason why I haven&#39;t included iTunes, Spotify etc is that this UK website allows you to upload your releases to these and a load of other online shops and streaming services. They have two pricing tiers - I find the no fee option where they instead take a 15% cut off your sales suffices for my needs. If I sold more online then I&#39;d look into changing to the premium package where you get 100% of your sales for a small fixed monthly fee.&lt;/p&gt;
&lt;h2&gt;YouTube&lt;/h2&gt;
&lt;p&gt;More people are listening to music on YouTube than ever before. I usually upload my music videos to both &lt;a href=&quot;https://www.youtube.com/user/sugardrum&quot;&gt;YouTube&lt;/a&gt; and Vimeo but have had more success promoting them on YouTube. Recording live videos of unique cover versions and uploading them to YouTube can be a great promotional tool. My Smiths cover mentioned earlier has become one of the top 3 most listened to acoustic covers of the song on there.&lt;/p&gt;
&lt;div class=&quot;embed-responsive embed-responsive-16by9&quot;&gt;&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/jt9BeiRDwJI&quot; frameborder=&quot;0&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;p&gt;You can add keywords and create playlists grouping videos together. They also provide a simple widget to display them on your own site with options to further refine the load times using &lt;a href=&quot;https://www.nigelbunner.co.uk/blog/a-simple-way-to-lazy-load-embedded-youtube-videos/&quot;&gt;Lazy Loading&lt;/a&gt; .&lt;/p&gt;
&lt;h2&gt;Songkick&lt;/h2&gt;
&lt;p&gt;It used to take me ages having to enter gigs onto MySpace, then copying them over to Facebook, Peoplesound and a number of other sites which all had their own gigs implementation. Now I just post them onto Songkick via their &lt;a href=&quot;https://tourbox.songkick.com/&quot;&gt;Tour Box&lt;/a&gt; subsite and the data is then used by a number of other websites. It&#39;s become the one stop place on the web to enter your gig dates.&lt;/p&gt;
&lt;p&gt;You just create an artist account, then go ahead and enter any gigs you are doing. They have a large database of venues which means you don&#39;t have enter that data again yourself.&lt;/p&gt;
&lt;p&gt;You can also share the gig details you&#39;ve just entered on your own site, either with a widget or as text using their API.&lt;/p&gt;
&lt;h2&gt;Summary&lt;/h2&gt;
&lt;p&gt;As musicians we&#39;re often encouraged to join every new music related website. Each one promises to help us get that big break or to reach out to our fans. But the reality is, it&#39;s best to focus your time on just a handful of sites, otherwise you end up doing nothing else but managing your web presence. If your current social media usage has left your efforts to promote your music feel like they&#39;ve been spread too thinly, then hopefully this guide may help you decide which ones to no longer use.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>A simple way to lazy load embedded Youtube videos</title>
    <link href="https://www.nigelbunner.co.uk/blog/a-simple-way-to-lazy-load-embedded-youtube-videos/" />
    <updated>2017-06-06T20:55:00Z</updated>
    <id>https://www.nigelbunner.co.uk/blog/a-simple-way-to-lazy-load-embedded-youtube-videos/</id>
    <content type="html">&lt;p&gt;Like most musicians I use embedded YouTube videos on my website. They look great, but can really slow the page down. This is especially true if you have more than one of them and is due to the &lt;a href=&quot;https://www.nigelbunner.co.uk/glossary/web-browser.html&quot;&gt;browser&lt;/a&gt; having to download extra content from another &lt;a href=&quot;https://www.nigelbunner.co.uk/glossary/server.html&quot;&gt;server&lt;/a&gt;. Not only can this affect the experience for the user but it could also have an affect on your page ranking on Google.&lt;/p&gt;
&lt;p&gt;Fortunately, you can get around this by replacing the video iframe with a static image of the video. The video itself is then loaded in when the user clicks on the image. You can make it look even more userfriendly by adding a play icon over the top of the static image.&lt;/p&gt;
&lt;p&gt;This is called Lazy Loading and you can see an example of this on my &lt;a href=&quot;https://sugardrum.com/&quot;&gt;Sugardrum website&lt;/a&gt;. I use this on both the home and on the videos pages, the latter of which uses some additional code to have just the one placement for multiple embedded videos. This is then refreshed depending on which video thumbnail you click on. I&#39;ll show how that is done in another blog post, for now here&#39;s how you do the lazy loading featured on the home page.&lt;/p&gt;
&lt;h2&gt;The HTML&lt;/h2&gt;
&lt;p&gt;Here is the HTML for our player:&lt;/p&gt;
&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;section&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;videos-section&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;col-cont&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;youtube-container home-youtube-container embed-responsive embed-responsive-16by9 embed-responsive-item&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;videoPlayer&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;div&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;homeVideoThumbnail home-videoplayer&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;vid-4pM6WphmRhQ&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;img&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;//img.youtube.com/vi/4pM6WphmRhQ/0.jpg&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;/&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
      &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;i&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;fa fa-youtube-play homeVideoPlayButton&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;i&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;  
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
    &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;p&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;class&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;col-xs-12&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;Postcard (Official Video) by Sugardrum&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;p&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;div&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;section&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;link&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;rel&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;stylesheet&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;href&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;https://use.fontawesome.com/releases/v5.6.3/css/all.css&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;integrity&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;crossorigin&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;anonymous&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;
  &lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;script&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;src&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;https://code.jquery.com/jquery-3.2.1.min.js&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;integrity&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token attr-name&quot;&gt;crossorigin&lt;/span&gt;&lt;span class=&quot;token attr-value&quot;&gt;&lt;span class=&quot;token punctuation attr-equals&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;anonymous&lt;span class=&quot;token punctuation&quot;&gt;&quot;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;token script&quot;&gt;&lt;/span&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;/&lt;/span&gt;script&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;  &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;First there is a div with some classes on it which set up the styling. Inside this is another div with two classes; one called &lt;em&gt;home-videplayer&lt;/em&gt; which does some additional styling and another called &lt;em&gt;homeVideoThumbnail&lt;/em&gt; which is used by the jQuery. This matches with the naming conventions I recommended in my blog post about &lt;a href=&quot;https://www.nigelbunner.co.uk/blog/2015/12/09/some-css-style-naming-and-layout-tips/&quot;&gt;CSS styling tips&lt;/a&gt;, where I suggest using camelCase names just for classes used by jQuery.&lt;/p&gt;
&lt;p&gt;Then there is an image. The url for this is a link to the image Youtube uses for it&#39;s own thumbnails for your video. There are 4 featured images available for each video. To get the image for your video just add your Youtube ID to the url and the number of the thumbnail from 0  - 3 at the end, i.e.&lt;/p&gt;
&lt;pre class=&quot;language-html&quot;&gt;&lt;code class=&quot;language-html&quot;&gt;https://img.youtube.com/vi/&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token tag&quot;&gt;&lt;span class=&quot;token punctuation&quot;&gt;&amp;lt;&lt;/span&gt;insert-youtube-video-id-here&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;&gt;&lt;/span&gt;&lt;/span&gt;/0.jpg&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So in my example I&#39;ve added the ID of the video, which is &lt;em&gt;4pM6WphmRhQ&lt;/em&gt; and selected the first thumbnail which is named &lt;em&gt;0&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;You may have noticed that this div also has an id with the video id as part of it. This is used by the jQuery to add the correct YouTube ID into the URL for the iframe.&lt;/p&gt;
&lt;p&gt;Finally, there is an &lt;em&gt;i tag&lt;/em&gt;. This is a Fontawesome video player play icon that is positioned over the top of the image to make it look more like a video. I&#39;ve included the link and script tags to load in Fontawesome and jQuery but you should check the &lt;a href=&quot;https://fontawesome.io/get-started/&quot;&gt;Fontawesome website&lt;/a&gt; for the latest version, which at the time of writing this (January 2019) is version 5.6.3.&lt;/p&gt;
&lt;h2&gt;The CSS&lt;/h2&gt;
&lt;p&gt;Here is the CSS used to style this:&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.col-cont&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;margin&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0 auto&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;max-width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 640px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token selector&quot;&gt;.home-youtube-container&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;cursor&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; pointer&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;  &lt;span class=&quot;token property&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; relative&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;  
&lt;span class=&quot;token selector&quot;&gt;.home-youtube-container img&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;max-height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 360px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;max-width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 640px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 100%&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token selector&quot;&gt;.home-youtube-container i&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; #fff&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;font-size&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 72px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 50%&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;margin&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; -33px 0 0 -31px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; absolute&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;text-shadow&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0 0 8px &lt;span class=&quot;token function&quot;&gt;rgba&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; 0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; 0&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; .5&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 50%&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token selector&quot;&gt;.embed-responsive&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token selector&quot;&gt;.embed-responsive-16by9&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;padding-bottom&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 56.25%&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token selector&quot;&gt;.embed-responsive iframe&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;border&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;bottom&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 100%&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;position&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; absolute&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;top&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 0&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 100%&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and a media query for slightly larger screens:&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token atrule&quot;&gt;&lt;span class=&quot;token rule&quot;&gt;@media&lt;/span&gt; &lt;span class=&quot;token keyword&quot;&gt;only&lt;/span&gt; screen &lt;span class=&quot;token keyword&quot;&gt;and&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;min-width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 481px&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
	&lt;span class=&quot;token selector&quot;&gt;.home-youtube-container img&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;max-height&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 360px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;max-width&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 640px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This adds a cursor to the container and gives it a relative position so we can position the play icon in the middle. It also sets the width of the image inside the container, which is the video thumbnail, to 100% but with a maximum setting for both height and width. The height is set to auto by default so there&#39;s no need to set this in our CSS. The code inside the media query increases the maximum settings for height and width for the slightly larger screen. This is the largest our video will be but you could set this to be larger if you wanted to and if your video was a high enough resolution.&lt;/p&gt;
&lt;p&gt;The other classes are part of the Bootstrap responsive embed code which I won&#39;t go to here as they aren&#39;t required for the lazy loading of the video but they help keep the image and video looking right at different screen sizes.&lt;/p&gt;
&lt;h2&gt;The jQuery&lt;/h2&gt;
&lt;p&gt;Then we have the jQuery.&lt;/p&gt;
&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token function&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;document&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;ready&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token parameter&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;token function&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;.homeVideoThumbnail&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; id &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;attr&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;id&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;replace&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;vid-&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; title &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;span&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; descrip &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token function&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;children&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&quot;em&quot;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;                       
    &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; vid &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;&amp;lt;iframe src=&quot;//www.youtube.com/embed/&#39;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; id &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;?autoplay=1&quot; width=&quot;560&quot; height=&quot;315&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&amp;lt;/iframe&gt;&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;            
    &lt;span class=&quot;token keyword&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;typeof&lt;/span&gt; title &lt;span class=&quot;token operator&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;undefined&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;token keyword&quot;&gt;var&lt;/span&gt; vid &lt;span class=&quot;token operator&quot;&gt;=&lt;/span&gt; vid &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;&amp;lt;p&gt;&#39;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; title &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39; &amp;amp;mdash; &amp;lt;em&gt;&#39;&lt;/span&gt; &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; descrip &lt;span class=&quot;token operator&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;token string&quot;&gt;&#39;&amp;lt;/p&gt;&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;
    &lt;span class=&quot;token function&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;#videoPlayer&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;vid&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;    
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token function&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;.homeVideoPlayButton&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
      &lt;span class=&quot;token function&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;.homeVideoThumbnail&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;  
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;A click event is added to the div with the class name .homeVideoThumbnail. Then we set some variables.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;em&gt;id&lt;/em&gt; is the YouTube video ID and is obtained from the ID of the container div we clicked on with the the vid- part removed. This was added as CSS class names cannot start with a number and Youtube Video IDs usually start with one.&lt;/li&gt;
&lt;li&gt;&lt;em&gt;title&lt;/em&gt; is the name of the video and is taken from the span that follows this div&lt;/li&gt;
&lt;li&gt;The description for the video is also taken from a child element, this time em.&lt;/li&gt;
&lt;li&gt;Then we have the html that is inserted into our HTML page. This consists of the standard iframe code that Youtube supplies for embedding videos with our video ID.&lt;/li&gt;
&lt;li&gt;Below this we display the title and description of the video if we have one.&lt;/li&gt;
&lt;li&gt;The following code then replaces the contents of the container with the id videoPlayer with our iframe html.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token function&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;#videoPlayer&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;html&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;vid&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Making the play icon work&lt;/h2&gt;
&lt;p&gt;There&#39;s one last step. At the moment clicking on the play icon won&#39;t actually do anything as our click event is linked to its parent div with the class homeVideoThumbnail. As the play icon is positioned absolutely above this it obscures the div and so clicking on it does nothing. To fix this we need to add one more piece of jQuery code.&lt;/p&gt;
&lt;pre class=&quot;language-javascript&quot;&gt;&lt;code class=&quot;language-javascript&quot;&gt;&lt;span class=&quot;token function&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;.homeVideoPlayButton&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token keyword&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;token function&quot;&gt;$&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token string&quot;&gt;&#39;.homeVideoThumbnail&#39;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;token function&quot;&gt;click&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;)&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This creates a click event on the parent div when a click is made on the play button.&lt;/p&gt;
&lt;p&gt;And that&#39;s it. Some fairly simple jQuery code to lazy load your Embedded Youtube videos.&lt;/p&gt;
&lt;h2&gt;Demo&lt;/h2&gt;
&lt;p&gt;See the &lt;a href=&quot;https://sugardrum.com/&quot;&gt;Sugardrum homepage&lt;/a&gt; for an example of this in action.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Updated&lt;/strong&gt; January 2019 with new Fontawesome link tag for their CDN.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Photo: Early Morning Running Is Usually The Prettiest</title>
    <link href="https://www.nigelbunner.co.uk/blog/photo-early-morning-running-is-usually-the-prettiest/" />
    <updated>2016-12-14T04:36:00Z</updated>
    <id>https://www.nigelbunner.co.uk/blog/photo-early-morning-running-is-usually-the-prettiest/</id>
    <content type="html">&lt;p&gt;I was fortunate to go for a run early enough yesterday morning  to catch the view below with the mist still hanging over the lake and grass. It was a beautiful sight. &lt;/p&gt;

&lt;p&gt;I also nearly got a photo of the geese flying low across the lake but they were a little too quick for me - next time.&lt;/p&gt;

&lt;blockquote class=&quot;instagram-media&quot; data-instgrm-version=&quot;7&quot; style=&quot; background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:658px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);&quot;&gt;&lt;div style=&quot;padding:8px;&quot;&gt; &lt;div style=&quot; background:#F8F8F8; line-height:0; margin-top:40px; padding:50.0% 0; text-align:center; width:100%;&quot;&gt; &lt;div style=&quot; background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAMUExURczMzPf399fX1+bm5mzY9AMAAADiSURBVDjLvZXbEsMgCES5/P8/t9FuRVCRmU73JWlzosgSIIZURCjo/ad+EQJJB4Hv8BFt+IDpQoCx1wjOSBFhh2XssxEIYn3ulI/6MNReE07UIWJEv8UEOWDS88LY97kqyTliJKKtuYBbruAyVh5wOHiXmpi5we58Ek028czwyuQdLKPG1Bkb4NnM+VeAnfHqn1k4+GPT6uGQcvu2h2OVuIf/gWUFyy8OWEpdyZSa3aVCqpVoVvzZZ2VTnn2wU8qzVjDDetO90GSy9mVLqtgYSy231MxrY6I2gGqjrTY0L8fxCxfCBbhWrsYYAAAAAElFTkSuQmCC); display:block; height:44px; margin:0 auto -44px; position:relative; top:-22px; width:44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt;&lt;p style=&quot; color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; line-height:17px; margin-bottom:0; margin-top:8px; overflow:hidden; padding:8px 0 7px; text-align:center; text-overflow:ellipsis; white-space:nowrap;&quot;&gt;&lt;a href=&quot;https://www.instagram.com/p/BN85rdXBAKi/&quot; style=&quot; color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none;&quot; target=&quot;_blank&quot;&gt;A photo posted by Sugardrum (@sugardrum)&lt;/a&gt; on &lt;time style=&quot; font-family:Arial,sans-serif; font-size:14px; line-height:17px;&quot; datetime=&quot;2016-12-13T09:02:48+00:00&quot;&gt;Dec 13, 2016 at 1:02am PST&lt;/time&gt;&lt;/p&gt;&lt;/div&gt;&lt;/blockquote&gt; &lt;script async=&quot;&quot; defer=&quot;&quot; src=&quot;https://platform.instagram.com/en_US/embeds.js&quot;&gt;&lt;/script&gt;
</content>
  </entry>
  <entry>
    <title>Moving From Wordpress To Jekyll</title>
    <link href="https://www.nigelbunner.co.uk/blog/2016/12/09/moving-from-wordpress-to-jekyll/" />
    <updated>2016-12-09T23:17:00Z</updated>
    <id>https://www.nigelbunner.co.uk/blog/2016/12/09/moving-from-wordpress-to-jekyll/</id>
    <content type="html">&lt;p&gt;Wow, it&#39;s been exactly a year since I last updated this website. Much has happened since then, including changing how this site is created. It used to be powered by Wordpress but now I&#39;m using a static website generator called Jekyll.&lt;/p&gt;
&lt;h2&gt;Advantages of moving from Wordpress to Jekyll&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;No more plugin and security updates to worry about.&lt;/li&gt;
&lt;li&gt;No more security plugins to maintain.&lt;/li&gt;
&lt;li&gt;No more faffing around keeping a local copy of the &lt;a href=&quot;https://www.nigelbunner.co.uk/glossary/database.html&quot;&gt;database&lt;/a&gt; as a backup and to use for development, as there is no database.&lt;/li&gt;
&lt;li&gt;Whilst on the subject of databases no more having to search and replace hard coded links in the database export to be used locally, i.e. Wordpress saves links as &lt;code&gt;https://www.nigelbunner.co.uk/link.html&lt;/code&gt; instead of &lt;code&gt;/link.html&lt;/code&gt; which makes it a pain when you need to change the first part to be used in a local dev environment such as &lt;code&gt;www.nigelbunner-dev.co.uk&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Jekyll generates static HTML files from the templates I setup so the site loads much, much faster.&lt;/li&gt;
&lt;li&gt;I can now host it on Amazon S3 or Github Pages which are both faster and much cheaper.&lt;/li&gt;
&lt;li&gt;Everything is stored in a Github repository which means I now have version control. This makes it easier to roll back any edits if I need to and keep a track of updates.&lt;/li&gt;
&lt;li&gt;Did I mention it loads way faster? :)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Disadvantages&lt;/h2&gt;
&lt;p&gt;And the disadvantages? Well there is no &lt;a href=&quot;https://www.nigelbunner.co.uk/glossary/cms.html&quot;&gt;CMS&lt;/a&gt; as such - all the post and pages are created using a text editor in the form of Markdown or HTML templates, which are then used by Jekyll to generate the static HTML pages. I can, however create and edit the content via the Github Pages admin and I&#39;m going to investgate using a simple online CMS called &lt;a href=&quot;https://prose.io/&quot;&gt;Prose&lt;/a&gt; written especially for Jekyll.&lt;/p&gt;
&lt;h2&gt;Third times a charm&lt;/h2&gt;
&lt;p&gt;This is the 3rd site I&#39;ve converted to Jekyll and I can feel myself becoming more confident now I&#39;ve done so a couple of times already. The 1st site was my music website at &lt;a href=&quot;https://www.sugardrum.com&quot;&gt;https://www.sugardrum.com&lt;/a&gt; which I did earlier in the year. The 2nd was a little website I created way back in 2008 - &lt;a href=&quot;https://www.amnestyfreedomfestival.org&quot;&gt;https://www.amnestyfreedomfestival.org&lt;/a&gt;. This was for a festival I helped to organise and took part in. It&#39;s so old that pretty much nobody ever looks at it any more, so was the perfect site to experiment on without causing too much disruption. It also was only 4 pages in size and was put together using &lt;a href=&quot;https://www.nigelbunner.co.uk/glossary/php.html&quot;&gt;PHP&lt;/a&gt; templates, so was also pretty simple to move to Jekyll.&lt;/p&gt;
&lt;h2&gt;Replacing Bones with Twitter Bootstrap&lt;/h2&gt;
&lt;p&gt;When this site was on Wordpress I used a  fantastic starter theme called &lt;a href=&quot;https://themble.com/bones/&quot;&gt;Bones&lt;/a&gt; as a starter to build the rest of the design on. This was great as it improved upon the basic Wordpress install by removing some of the bloat, adding its own grid system for &lt;a href=&quot;https://www.nigelbunner.co.uk/glossary/CSS.html&quot;&gt;CSS&lt;/a&gt; layout, setingup some nice typography defaults to work with and creating a set of useful break points to make your design Adaptive. I used the same theme as a starter for my Sugardrum website and just left the CSS and &lt;a href=&quot;https://www.nigelbunner.co.uk/glossary/javascript.html&quot;&gt;JavaScript&lt;/a&gt; as is when I copied it over to use Jekyll. For this site however, I decided to spend the time removing the existing CSS and startfrom scratch. There was a fair amount of code in the Bones style sheets I knew I&#39;d never need, such as styling for Wordpress comments. This all ended up taking less time than I thought as I used &lt;a href=&quot;https://getbootstrap.com/&quot;&gt;Bootstrap&lt;/a&gt; instead, changed the layout to use the Bootstrap grid, nav and pagination and then created a new style sheet with the few bits of code required for the rest of the old design. The end result was much cleaner and smaller CSS code.&lt;/p&gt;
&lt;h2&gt;Some useful links&lt;/h2&gt;
&lt;p&gt;If you&#39;re thinking of using Jekyll for a website yourself, here are links to some of the sites I used to help me:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://jekyllrb.com&quot;&gt;https://jekyllrb.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://danielgroves.net/notebook/2013/05/goodbye-wordpress-hello-jekyll&quot;&gt;https://danielgroves.net/notebook/2013/05/goodbye-wordpress-hello-jekyll&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://nicolashery.com/fast-mobile-friendly-website-with-jekyll/&quot;&gt;https://nicolashery.com/fast-mobile-friendly-website-with-jekyll/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://deanattali.com/2015/03/12/beautiful-jekyll-how-to-build-a-site-in-minutes/&quot;&gt;https://deanattali.com/2015/03/12/beautiful-jekyll-how-to-build-a-site-in-minutes/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://blog.8thcolor.com/en/2014/05/migrate-from-wordpress/&quot;&gt;https://blog.8thcolor.com/en/2014/05/migrate-from-wordpress/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://paulstamatiou.com/how-to-wordpress-to-jekyll/&quot;&gt;https://paulstamatiou.com/how-to-wordpress-to-jekyll/&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://mademistakes.com/articles/using-jekyll-2016/&quot;&gt;https://mademistakes.com/articles/using-jekyll-2016/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
  <entry>
    <title>Photo: a heron in a tree again</title>
    <link href="https://www.nigelbunner.co.uk/blog/2015/12/09/photo-a-heron-in-a-tree-again/" />
    <updated>2015-12-09T18:26:28Z</updated>
    <id>https://www.nigelbunner.co.uk/blog/2015/12/09/photo-a-heron-in-a-tree-again/</id>
    <content type="html">&lt;blockquote class=&quot;instagram-media&quot; data-instgrm-captioned=&quot;&quot; data-instgrm-version=&quot;7&quot; style=&quot; background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:658px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);&quot;&gt;&lt;div style=&quot;padding:8px;&quot;&gt; &lt;div style=&quot; background:#F8F8F8; line-height:0; margin-top:40px; padding:50.0% 0; text-align:center; width:100%;&quot;&gt; &lt;div style=&quot; background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAMUExURczMzPf399fX1+bm5mzY9AMAAADiSURBVDjLvZXbEsMgCES5/P8/t9FuRVCRmU73JWlzosgSIIZURCjo/ad+EQJJB4Hv8BFt+IDpQoCx1wjOSBFhh2XssxEIYn3ulI/6MNReE07UIWJEv8UEOWDS88LY97kqyTliJKKtuYBbruAyVh5wOHiXmpi5we58Ek028czwyuQdLKPG1Bkb4NnM+VeAnfHqn1k4+GPT6uGQcvu2h2OVuIf/gWUFyy8OWEpdyZSa3aVCqpVoVvzZZ2VTnn2wU8qzVjDDetO90GSy9mVLqtgYSy231MxrY6I2gGqjrTY0L8fxCxfCBbhWrsYYAAAAAElFTkSuQmCC); display:block; height:44px; margin:0 auto -44px; position:relative; top:-22px; width:44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt; &lt;p style=&quot; margin:8px 0 0 0; padding:0 4px;&quot;&gt; &lt;a href=&quot;https://www.instagram.com/p/_ERPtLh0kY/&quot; style=&quot; color:#000; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none; word-wrap:break-word;&quot; target=&quot;_blank&quot;&gt;Same bird as yesterday, this time giving his/her wings a lovely stretch.&lt;/a&gt;&lt;/p&gt; &lt;p style=&quot; color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; line-height:17px; margin-bottom:0; margin-top:8px; overflow:hidden; padding:8px 0 7px; text-align:center; text-overflow:ellipsis; white-space:nowrap;&quot;&gt;A photo posted by Sugardrum (@sugardrum) on &lt;time style=&quot; font-family:Arial,sans-serif; font-size:14px; line-height:17px;&quot; datetime=&quot;2015-12-09T09:52:30+00:00&quot;&gt;Dec 9, 2015 at 1:52am PST&lt;/time&gt;&lt;/p&gt;&lt;/div&gt;&lt;/blockquote&gt; &lt;script async=&quot;&quot; defer=&quot;&quot; src=&quot;https://platform.instagram.com/en_US/embeds.js&quot;&gt;&lt;/script&gt;
&lt;p&gt;I saw the same bird in the tree as yesterday on my morning running today. This time he/she was giving their wings a lovely stretch so I had to take a photo. I think the bird is enjoying posing for photos 🙂&lt;/p&gt;
&lt;p&gt;I thought the photo would make nice background to my website so I updated it to use it.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Some CSS style naming and layout tips</title>
    <link href="https://www.nigelbunner.co.uk/blog/2015/12/09/some-css-style-naming-and-layout-tips/" />
    <updated>2015-12-09T18:11:58Z</updated>
    <id>https://www.nigelbunner.co.uk/blog/2015/12/09/some-css-style-naming-and-layout-tips/</id>
    <content type="html">&lt;p&gt;After doing CSS development work for a number of years there’s a few little tips that I’ve picked up that I thought it might be helpful to pass on.&lt;/p&gt;
&lt;h2&gt;List the styles alphabetically&lt;/h2&gt;
&lt;p&gt;I saw this tip listed on another website a few years ago and have been doing this myself ever since. It makes it so much easier to quickly scan across and see which styles you have used. Here’s an example of what I mean:&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.container&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; #fff&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; red&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 5px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;margin&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 1.5em 0&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;becomes&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;&lt;span class=&quot;token selector&quot;&gt;.container&lt;/span&gt; &lt;span class=&quot;token punctuation&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;token property&quot;&gt;background&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; red&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;color&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; #fff&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;margin&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 1.5em 0&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;token property&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;:&lt;/span&gt; 5px&lt;span class=&quot;token punctuation&quot;&gt;;&lt;/span&gt;&lt;span class=&quot;token punctuation&quot;&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Use a different naming convention for class names used by JavaScript and keep them exclusive&lt;/h2&gt;
&lt;p&gt;I learnt this after working on larger websites and changing a class name in the HTML only to find this broke the JavaScript. It’s sometimes tricky to know if changing a class name would do this.&lt;/p&gt;
&lt;p&gt;Using a different naming convention for classnames that are going to be used by the Javascript helps avoids this confusion. Here’s what I mean:&lt;/p&gt;
&lt;p&gt;for CSS only use:&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;.btn-top or .btn_top&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;leaving the following just for JavaScript only:&lt;/p&gt;
&lt;pre class=&quot;language-css&quot;&gt;&lt;code class=&quot;language-css&quot;&gt;.btnTop&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Doing this means you always know if a class name in the HTML is used by the CSS or the JavaScript. The same holds true for ID’s too although I try not to use them at all if possible.&lt;/p&gt;
&lt;p&gt;Which brings me on to my final tip…&lt;/p&gt;
&lt;h2&gt;Use a hyphen instead of an underscore in between words in class names and IDs&lt;/h2&gt;
&lt;p&gt;This becomes really useful when you use the keyboard to navigate around your code; the cursor always stops at a – which makes it so much easier if you want to change one of the words in the middle of a class and or ID. Using a _ instead would means the cursor keys take you to the end of the class name as it just treats _ the same as a letter.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Photo: a heron doing his thing on a tall tree</title>
    <link href="https://www.nigelbunner.co.uk/blog/2015/12/08/photo-a-heron-doing-his-thing-on-a-tall-tree/" />
    <updated>2015-12-08T08:14:47Z</updated>
    <id>https://www.nigelbunner.co.uk/blog/2015/12/08/photo-a-heron-doing-his-thing-on-a-tall-tree/</id>
    <content type="html">&lt;blockquote class=&quot;instagram-media&quot; data-instgrm-captioned=&quot;&quot; data-instgrm-version=&quot;7&quot; style=&quot; background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:658px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);&quot;&gt;&lt;div style=&quot;padding:8px;&quot;&gt; &lt;div style=&quot; background:#F8F8F8; line-height:0; margin-top:40px; padding:50.0% 0; text-align:center; width:100%;&quot;&gt; &lt;div style=&quot; background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAMUExURczMzPf399fX1+bm5mzY9AMAAADiSURBVDjLvZXbEsMgCES5/P8/t9FuRVCRmU73JWlzosgSIIZURCjo/ad+EQJJB4Hv8BFt+IDpQoCx1wjOSBFhh2XssxEIYn3ulI/6MNReE07UIWJEv8UEOWDS88LY97kqyTliJKKtuYBbruAyVh5wOHiXmpi5we58Ek028czwyuQdLKPG1Bkb4NnM+VeAnfHqn1k4+GPT6uGQcvu2h2OVuIf/gWUFyy8OWEpdyZSa3aVCqpVoVvzZZ2VTnn2wU8qzVjDDetO90GSy9mVLqtgYSy231MxrY6I2gGqjrTY0L8fxCxfCBbhWrsYYAAAAAElFTkSuQmCC); display:block; height:44px; margin:0 auto -44px; position:relative; top:-22px; width:44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt; &lt;p style=&quot; margin:8px 0 0 0; padding:0 4px;&quot;&gt; &lt;a href=&quot;https://www.instagram.com/p/_BtAWiB0ux/&quot; style=&quot; color:#000; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none; word-wrap:break-word;&quot; target=&quot;_blank&quot;&gt;Mr Heron in the park this morning&lt;/a&gt;&lt;/p&gt; &lt;p style=&quot; color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; line-height:17px; margin-bottom:0; margin-top:8px; overflow:hidden; padding:8px 0 7px; text-align:center; text-overflow:ellipsis; white-space:nowrap;&quot;&gt;A photo posted by Sugardrum (@sugardrum) on &lt;time style=&quot; font-family:Arial,sans-serif; font-size:14px; line-height:17px;&quot; datetime=&quot;2015-12-08T09:57:21+00:00&quot;&gt;Dec 8, 2015 at 1:57am PST&lt;/time&gt;&lt;/p&gt;&lt;/div&gt;&lt;/blockquote&gt; &lt;script async=&quot;&quot; defer=&quot;&quot; src=&quot;https://platform.instagram.com/en_US/embeds.js&quot;&gt;&lt;/script&gt;
&lt;p&gt;I saw a heron doing his or her thing on a very tall tree whilst running in the park today and had to stop to take a photo.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Photo: new guitar strings</title>
    <link href="https://www.nigelbunner.co.uk/blog/2015/11/12/photo-new-guitar-strings/" />
    <updated>2015-11-12T08:19:01Z</updated>
    <id>https://www.nigelbunner.co.uk/blog/2015/11/12/photo-new-guitar-strings/</id>
    <content type="html">&lt;blockquote class=&quot;instagram-media&quot; data-instgrm-captioned=&quot;&quot; data-instgrm-version=&quot;7&quot; style=&quot; background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:658px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);&quot;&gt;&lt;div style=&quot;padding:8px;&quot;&gt; &lt;div style=&quot; background:#F8F8F8; line-height:0; margin-top:40px; padding:50.0% 0; text-align:center; width:100%;&quot;&gt; &lt;div style=&quot; background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAMUExURczMzPf399fX1+bm5mzY9AMAAADiSURBVDjLvZXbEsMgCES5/P8/t9FuRVCRmU73JWlzosgSIIZURCjo/ad+EQJJB4Hv8BFt+IDpQoCx1wjOSBFhh2XssxEIYn3ulI/6MNReE07UIWJEv8UEOWDS88LY97kqyTliJKKtuYBbruAyVh5wOHiXmpi5we58Ek028czwyuQdLKPG1Bkb4NnM+VeAnfHqn1k4+GPT6uGQcvu2h2OVuIf/gWUFyy8OWEpdyZSa3aVCqpVoVvzZZ2VTnn2wU8qzVjDDetO90GSy9mVLqtgYSy231MxrY6I2gGqjrTY0L8fxCxfCBbhWrsYYAAAAAElFTkSuQmCC); display:block; height:44px; margin:0 auto -44px; position:relative; top:-22px; width:44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt; &lt;p style=&quot; margin:8px 0 0 0; padding:0 4px;&quot;&gt; &lt;a href=&quot;https://www.instagram.com/p/9_pbRDh0oc/&quot; style=&quot; color:#000; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none; word-wrap:break-word;&quot; target=&quot;_blank&quot;&gt;Shiny new strings ready for recording next week! #nofilter&lt;/a&gt;&lt;/p&gt; &lt;p style=&quot; color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; line-height:17px; margin-bottom:0; margin-top:8px; overflow:hidden; padding:8px 0 7px; text-align:center; text-overflow:ellipsis; white-space:nowrap;&quot;&gt;A photo posted by Sugardrum (@sugardrum) on &lt;time style=&quot; font-family:Arial,sans-serif; font-size:14px; line-height:17px;&quot; datetime=&quot;2015-11-12T18:16:12+00:00&quot;&gt;Nov 12, 2015 at 10:16am PST&lt;/time&gt;&lt;/p&gt;&lt;/div&gt;&lt;/blockquote&gt; &lt;script async=&quot;&quot; defer=&quot;&quot; src=&quot;https://platform.instagram.com/en_US/embeds.js&quot;&gt;&lt;/script&gt;
&lt;p&gt;I forget how nice my guitar can sound when I haven&amp;#8217;t changed the strings for a while.&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Photo: autumn is here</title>
    <link href="https://www.nigelbunner.co.uk/blog/2015/11/01/photo-autumn-is-here/" />
    <updated>2015-11-01T08:23:32Z</updated>
    <id>https://www.nigelbunner.co.uk/blog/2015/11/01/photo-autumn-is-here/</id>
    <content type="html">&lt;blockquote class=&quot;instagram-media&quot; data-instgrm-captioned=&quot;&quot; data-instgrm-version=&quot;7&quot; style=&quot; background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:658px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);&quot;&gt;&lt;div style=&quot;padding:8px;&quot;&gt; &lt;div style=&quot; background:#F8F8F8; line-height:0; margin-top:40px; padding:50.0% 0; text-align:center; width:100%;&quot;&gt; &lt;div style=&quot; background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAMUExURczMzPf399fX1+bm5mzY9AMAAADiSURBVDjLvZXbEsMgCES5/P8/t9FuRVCRmU73JWlzosgSIIZURCjo/ad+EQJJB4Hv8BFt+IDpQoCx1wjOSBFhh2XssxEIYn3ulI/6MNReE07UIWJEv8UEOWDS88LY97kqyTliJKKtuYBbruAyVh5wOHiXmpi5we58Ek028czwyuQdLKPG1Bkb4NnM+VeAnfHqn1k4+GPT6uGQcvu2h2OVuIf/gWUFyy8OWEpdyZSa3aVCqpVoVvzZZ2VTnn2wU8qzVjDDetO90GSy9mVLqtgYSy231MxrY6I2gGqjrTY0L8fxCxfCBbhWrsYYAAAAAElFTkSuQmCC); display:block; height:44px; margin:0 auto -44px; position:relative; top:-22px; width:44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt; &lt;p style=&quot; margin:8px 0 0 0; padding:0 4px;&quot;&gt; &lt;a href=&quot;https://www.instagram.com/p/9i0Jt4h0qV/&quot; style=&quot; color:#000; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none; word-wrap:break-word;&quot; target=&quot;_blank&quot;&gt;Autumn is here! #nofilter&lt;/a&gt;&lt;/p&gt; &lt;p style=&quot; color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; line-height:17px; margin-bottom:0; margin-top:8px; overflow:hidden; padding:8px 0 7px; text-align:center; text-overflow:ellipsis; white-space:nowrap;&quot;&gt;A photo posted by Sugardrum (@sugardrum) on &lt;time style=&quot; font-family:Arial,sans-serif; font-size:14px; line-height:17px;&quot; datetime=&quot;2015-11-01T13:31:57+00:00&quot;&gt;Nov 1, 2015 at 5:31am PST&lt;/time&gt;&lt;/p&gt;&lt;/div&gt;&lt;/blockquote&gt; &lt;script async=&quot;&quot; defer=&quot;&quot; src=&quot;https://platform.instagram.com/en_US/embeds.js&quot;&gt;&lt;/script&gt;
&lt;p&gt;The autumn leaves are falling from the trees&amp;#8230;&lt;/p&gt;</content>
  </entry>
  <entry>
    <title>Photo: Wupadupa gig at grey horse</title>
    <link href="https://www.nigelbunner.co.uk/blog/2014/10/15/photo-wupadupa-gig-at-grey-horse/" />
    <updated>2014-10-15T00:20:52Z</updated>
    <id>https://www.nigelbunner.co.uk/blog/2014/10/15/photo-wupadupa-gig-at-grey-horse/</id>
    <content type="html">&lt;blockquote class=&quot;instagram-media&quot; data-instgrm-captioned=&quot;&quot; data-instgrm-version=&quot;7&quot; style=&quot; background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:658px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);&quot;&gt;&lt;div style=&quot;padding:8px;&quot;&gt; &lt;div style=&quot; background:#F8F8F8; line-height:0; margin-top:40px; padding:50.0% 0; text-align:center; width:100%;&quot;&gt; &lt;div style=&quot; background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAMUExURczMzPf399fX1+bm5mzY9AMAAADiSURBVDjLvZXbEsMgCES5/P8/t9FuRVCRmU73JWlzosgSIIZURCjo/ad+EQJJB4Hv8BFt+IDpQoCx1wjOSBFhh2XssxEIYn3ulI/6MNReE07UIWJEv8UEOWDS88LY97kqyTliJKKtuYBbruAyVh5wOHiXmpi5we58Ek028czwyuQdLKPG1Bkb4NnM+VeAnfHqn1k4+GPT6uGQcvu2h2OVuIf/gWUFyy8OWEpdyZSa3aVCqpVoVvzZZ2VTnn2wU8qzVjDDetO90GSy9mVLqtgYSy231MxrY6I2gGqjrTY0L8fxCxfCBbhWrsYYAAAAAElFTkSuQmCC); display:block; height:44px; margin:0 auto -44px; position:relative; top:-22px; width:44px;&quot;&gt;&lt;/div&gt;&lt;/div&gt; &lt;p style=&quot; margin:8px 0 0 0; padding:0 4px;&quot;&gt; &lt;a href=&quot;https://www.instagram.com/p/fuhB9GB0pQ/&quot; style=&quot; color:#000; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none; word-wrap:break-word;&quot; target=&quot;_blank&quot;&gt;Wupadupa gig at grey horse&lt;/a&gt;&lt;/p&gt; &lt;p style=&quot; color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; line-height:17px; margin-bottom:0; margin-top:8px; overflow:hidden; padding:8px 0 7px; text-align:center; text-overflow:ellipsis; white-space:nowrap;&quot;&gt;A photo posted by Sugardrum (@sugardrum) on &lt;time style=&quot; font-family:Arial,sans-serif; font-size:14px; line-height:17px;&quot; datetime=&quot;2013-10-21T10:53:56+00:00&quot;&gt;Oct 21, 2013 at 3:53am PDT&lt;/time&gt;&lt;/p&gt;&lt;/div&gt;&lt;/blockquote&gt; &lt;script async=&quot;&quot; defer=&quot;&quot; src=&quot;https://platform.instagram.com/en_US/embeds.js&quot;&gt;&lt;/script&gt;</content>
  </entry>
  <entry>
    <title>Fixing race numbers without using pins</title>
    <link href="https://www.nigelbunner.co.uk/blog/2014/03/25/fixing-race-numbers-without-using-pins/" />
    <updated>2014-03-25T10:19:53Z</updated>
    <id>https://www.nigelbunner.co.uk/blog/2014/03/25/fixing-race-numbers-without-using-pins/</id>
    <content type="html">&lt;p&gt;I’ve taken part in a couple of races recently and didn’t want to risk making holes in my top by fixing my race number to it with safety pins.&lt;/p&gt;
&lt;p&gt;Fortunately, I had a Spi-Belt that I was going to wear anyway so I folded the number over, stuck the 2 ends together and looped the belt through it. Most race numbers have a bit of excess paper at the top and the bottom which is perfect for doing this whilst still leaving the number visible.&lt;/p&gt;
&lt;p&gt;Here are some photos below to show what I mean…&lt;/p&gt;
&lt;div id=&quot;attachment_369&quot; style=&quot;width: 310px&quot; class=&quot;wp-caption alignnone&quot;&gt;
  &lt;img class=&quot;size-medium wp-image-369 &quot; alt=&quot;Fixing race number using tape and a Spi belt&quot; src=&quot;https://www.nigelbunner.co.uk/img/wp-blog/2014/03/IMG_2598-300x224.jpg&quot; width=&quot;300&quot; height=&quot;224&quot; srcset=&quot;https://www.nigelbunner.co.uk/img/wp-blog/2014/03/IMG_2598-300x224.jpg 300w, https://www.nigelbunner.co.uk/img/wp-blog/2014/03/IMG_2598-1024x764.jpg 1024w&quot; sizes=&quot;(max-width: 300px) 100vw, 300px&quot;&gt;
  &lt;p class=&quot;wp-caption-text&quot;&gt;
    Fixing a race number using tape and a Spi belt.
  &lt;/p&gt;
&lt;/div&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;You can see how the number is still clearly visible from this photo, and no holes in my running top…&lt;/p&gt;
&lt;img class=&quot;alignnone size-medium wp-image-371&quot; alt=&quot;IMG_2583-2&quot; src=&quot;https://www.nigelbunner.co.uk/img/wp-blog/2014/03/IMG_2583-2.jpg&quot; width=&quot;174&quot; height=&quot;108&quot;&gt; 
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Thursday photo &amp;#8211; a misty morning in the park</title>
    <link href="https://www.nigelbunner.co.uk/blog/2014/01/23/thursday-photo-a-misty-morning-in-the-park/" />
    <updated>2014-01-23T20:26:00Z</updated>
    <id>https://www.nigelbunner.co.uk/blog/2014/01/23/thursday-photo-a-misty-morning-in-the-park/</id>
    <content type="html">&lt;!--nextpage--&gt; Here&amp;#8217;s a photo from my morning run the other day on a particularly misty morning&amp;#8230;
&lt;p&gt;&lt;a href=&quot;https://www.flickr.com/photos/icklephotos/12107135023/&quot; title=&quot;Beautiful misty morning in the park on my run the other day. by icle fotos, on Flickr&quot;&gt;&lt;img alt=&quot;Beautiful misty morning in the park on my run the other day.&quot; src=&quot;https://farm6.staticflickr.com/5487/12107135023_d91d9ec809_z.jpg&quot; width=&quot;640&quot; height=&quot;480&quot;&gt;&lt;/a&gt;&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Using a microphone stand as a bike stand</title>
    <link href="https://www.nigelbunner.co.uk/blog/2013/10/18/using-a-microphone-stand-as-a-bike-stand/" />
    <updated>2013-10-18T11:11:55Z</updated>
    <id>https://www.nigelbunner.co.uk/blog/2013/10/18/using-a-microphone-stand-as-a-bike-stand/</id>
    <content type="html">&lt;img class=&quot;alignnone size-full wp-image-338&quot; alt=&quot;diy-bike-stand&quot; src=&quot;https://www.nigelbunner.co.uk/img/wp-blog/2013/04/diy-bike-stand.jpg&quot; width=&quot;690&quot; height=&quot;518&quot; srcset=&quot;https://www.nigelbunner.co.uk/img/wp-blog/2013/04/diy-bike-stand.jpg 690w, https://www.nigelbunner.co.uk/img/wp-blog/2013/04/diy-bike-stand-300x225.jpg 300w&quot; sizes=&quot;(max-width: 690px) 100vw, 690px&quot;&gt; 
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Bike stands are great when you need to do some maintenance work on your bicycle. If you can’t afford to buy one though and happen to have a spare microphone stand lying around then give this a go.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Using an old belt, rope or fabric tie it in a loop around the top tube of the bike.&lt;/li&gt;
&lt;/ol&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;
  &lt;img class=&quot;size-full wp-image-334 aligncenter&quot; alt=&quot;Tie a loop around the bike&quot; src=&quot;https://www.nigelbunner.co.uk/img/wp-blog/2013/04/diy-bike-stand-1.jpg&quot; width=&quot;330&quot; height=&quot;440&quot; srcset=&quot;https://www.nigelbunner.co.uk/img/wp-blog/2013/04/diy-bike-stand-1.jpg 330w, https://www.nigelbunner.co.uk/img/wp-blog/2013/04/diy-bike-stand-1-224x300.jpg 224w&quot; sizes=&quot;(max-width: 330px) 100vw, 330px&quot;&gt;
&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;ol start=&quot;2&quot;&gt;
&lt;li&gt;Set your mic stand to the required height.&lt;/li&gt;
&lt;/ol&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;
  &lt;img class=&quot;size-full wp-image-335 aligncenter&quot; alt=&quot;set the mic stand to the required height&quot; src=&quot;https://www.nigelbunner.co.uk/img/wp-blog/2013/04/diy-bike-stand-2.jpg&quot; width=&quot;330&quot; height=&quot;440&quot; srcset=&quot;https://www.nigelbunner.co.uk/img/wp-blog/2013/04/diy-bike-stand-2.jpg 330w, https://www.nigelbunner.co.uk/img/wp-blog/2013/04/diy-bike-stand-2-224x300.jpg 224w&quot; sizes=&quot;(max-width: 330px) 100vw, 330px&quot;&gt;
&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;ol start=&quot;3&quot;&gt;
&lt;li&gt;Lift the loop up so it rests on the top of the stand. If it’s not high enough then simply take it off and raise the mic stand up a bit more before lifting the loop back onto the stand again. You could also tie the end of the belt around the top of the stand to keep it extra secure.&lt;/li&gt;
&lt;/ol&gt;
&lt;p style=&quot;text-align: center;&quot;&gt;
  &lt;img class=&quot;size-full wp-image-336 aligncenter&quot; alt=&quot;Lift the loop so it rests on the top of the stand.&quot; src=&quot;https://www.nigelbunner.co.uk/img/wp-blog/2013/04/diy-bike-stand-3.jpg&quot; width=&quot;330&quot; height=&quot;440&quot; srcset=&quot;https://www.nigelbunner.co.uk/img/wp-blog/2013/04/diy-bike-stand-3.jpg 330w, https://www.nigelbunner.co.uk/img/wp-blog/2013/04/diy-bike-stand-3-224x300.jpg 224w&quot; sizes=&quot;(max-width: 330px) 100vw, 330px&quot;&gt;
&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;As you can see in the next photo it allows you to raise the back wheel up by a considerable height and  you can also turn the pedals as they have room to travel to the side of the stand.&lt;/p&gt;
&lt;img class=&quot;size-full wp-image-337 alignnone&quot; alt=&quot;back wheel raised up&quot; src=&quot;https://www.nigelbunner.co.uk/img/wp-blog/2013/04/diy-bike-stand-4.jpg&quot; width=&quot;690&quot; height=&quot;518&quot; srcset=&quot;https://www.nigelbunner.co.uk/img/wp-blog/2013/04/diy-bike-stand-4.jpg 690w, https://www.nigelbunner.co.uk/img/wp-blog/2013/04/diy-bike-stand-4-300x225.jpg 300w&quot; sizes=&quot;(max-width: 690px) 100vw, 690px&quot;&gt; 
&lt;p&gt; &lt;/p&gt;
</content>
  </entry>
</feed>