PSD To HTML. Still Designing Websites In Photoshop!
Tags: beginners, react, design
Published: 2020-07-21 05:30:39

<!-- wp:paragraph -->
<p>So the other day, it was implied that I must be kind of old if I'm still designing websites in Photoshop.<br><br>With apps like Figma, which lets you copy and paste CSS straight into your IDE (who knew!), It's possible I'm making things more difficult for myself.<br><br> <strong>With age also comes wisdom about one's self</strong>, which for me is an addiction to wasting countless hours playing with shiny new objects! 😄<br><br>If I have an idea, I try to find the quickest implementation available.<br><br>This means that with the 12 years of using Photoshop, Illustrator and InDesign - my hands have some muscle memory that I can put to use.<br><br>By the time I've learned and played with the new app and gotten lost down the rabbit hole of shiny object syndrome, I could have the design finished.<br><br></p>
<!-- /wp:paragraph -->

<!-- wp:html -->
<figure><iframe width="100%" height="166" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/294824991&amp;color=%23b13138&amp;auto_play=false&amp;hide_related=true&amp;show_comments=false&amp;show_user=false&amp;show_reposts=false&amp;show_teaser=false"></iframe></figure>
<!-- /wp:html -->

<!-- wp:heading {"level":3} -->
<h3>Finding A Layout Template</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>I haven't done this for a long time so I needed to look up the best screen size to start off with.<br><br>I decided to go with a max-width of 1440px and found a Photoshop template with all the guides already laid out (which I HATE doing manually).<br><br><a href="https://1440px.com/" target="_blank" rel="noreferrer noopener">https://1440px.com</a> is where you can download it too.<br><br>Ok, we're off to a good start. I like to move through things as quickly as possible and this one saved me a few hours of fiddling around.<br><br>Next up was to gather some materials that matched the idea in my head.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Inspiration</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>I had recently binge-watched really great artists, drawing mecha art and it got me in the mood for mecha design.<br><br>As the drawing days are long since gone for me, I decided I wanted to use my website to get that inspiration off my chest.<br><br>Googling around and finding a png site, I grabbed a couple of images to run with.<br><br>Next up, I add all of these images into Photoshop and let the muscle memory go to work.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":111,"sizeSlug":"large"} -->
<figure class="wp-block-image size-large"><img src="http://calvint1.sg-host.com/wp-content/uploads/2020/07/1-design-1024x636.png" alt="" class="wp-image-111"/></figure>
<!-- /wp:image -->

<!-- wp:heading {"level":3} -->
<h3>Layout</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>While sticking to the grid lines, I usually start off with text and let the images come in to play later to fill in space and bring the layout together.<br><br>While they can be a bit restricting, the guides are there for a reason. With restriction, comes freedom. Freedom of making tough decisions as to whether the layout is balanced or lined up correctly.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":120,"sizeSlug":"large"} -->
<figure class="wp-block-image size-large"><img src="http://calvint1.sg-host.com/wp-content/uploads/2020/07/1_-_design-cropped.jpg" alt="" class="wp-image-120"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Stick to the guides for 90% of the time and throw a curveball now and again to break things up a little bit.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>From PSD To HTML</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Once I get to the point where I'm just pushing pixels around and not really contributing to moving the project forwards, I slap myself on the wrist and to things to the next stage.<br><br>The whole website doesn't need to be in PSD, I just need to get down the overall design that will be repeated throughout. Font styles, buttons and details.<br><br>I whipped up "Create React App" through the terminal (No, I still don't custom build my boilerplate react apps) and started to plan out the site folder structure.<br><br>The plan is just to get the bare bones of the site down so I have something to work with.<br><br>There's nothing worse than staring at a blank canvas!<br><br>So just like an artist, I start laying down my brush strokes in the form of &lt;div&gt; tags and &lt;p&gt; tags.<br><br>To maintain an idea of where I am and what my plan was in my head, I use ID attributes to label the various parts of the skeleton.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":115,"sizeSlug":"large"} -->
<figure class="wp-block-image size-large"><img src="http://calvint1.sg-host.com/wp-content/uploads/2020/07/2_-_ugly_ids-cropped-1.jpg" alt="" class="wp-image-115"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>It's ugly and probably not best practice, but it's easier to reason about when I'm context switching throughout the plan.<br><br>I find it extremely difficult not to add styling while I'm laying down brush strokes but the idea is to have the skeleton finished before I make it look pretty.<br><br>For large areas of text that I don't yet have content for, I use <a rel="noreferrer noopener" href="https://www.lipsum.com/feed/html" target="_blank">https://www.lipsum.com/feed/html</a>.<br><br>It mimics text as naturally as possible and helps to fill out content areas.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":118,"sizeSlug":"large"} -->
<figure class="wp-block-image size-large"><img src="http://calvint1.sg-host.com/wp-content/uploads/2020/07/3_-_basic_layout-cropped.jpg" alt="" class="wp-image-118"/></figure>
<!-- /wp:image -->

<!-- wp:heading {"level":3} -->
<h3>Trying To Make Things Pretty</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>I recently learned about <a rel="noreferrer noopener" href="https://bulma.io/" target="_blank">https://bulma.io/</a>, I tried to implement it quickly by using their CDN and failed miserably.<br><br>After an hour of frustration I finally realised that you can't override CSS styles when they're being pulled in via a CDN, but by then I had already started looking for alternatives.<br><br>I discovered <a rel="noreferrer noopener" href="https://tailwindcss.com/" target="_blank">https://tailwindcss.com/</a> and decided to go with that instead.<br><br>It's pretty simple to install and get started with, the documentation is here <a rel="noreferrer noopener" href="https://tailwindcss.com/docs/installation/" target="_blank">https://tailwindcss.com/docs/installation/</a>.<br><br>The classes that you have to use are quite intuitive and within an hour a found that I didn't need to refer to the documentation very much at all.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":126,"sizeSlug":"large"} -->
<figure class="wp-block-image size-large"><img src="http://calvint1.sg-host.com/wp-content/uploads/2020/07/tailwind-example-1024x560.jpg" alt="" class="wp-image-126"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>Above you can see within the <strong>className</strong> I have the settings for width 1. mobile 2. large screens 3. super large screens, then margin and padding for the Y axis (top and bottom) then X axis which I like to keep separate.<br><br>Unfortunately I haven't found a way to apply Tailwind to the dangerouslySetInnerHTML (love that name) so I had to use a few CSS changes in the main styles file to have my blog post match the rest of the site.<br><br>I also configure each component within my React app individually on the screen to keep things clear in my head and minimise how much caca has to load on the screen for each change.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":127,"sizeSlug":"large"} -->
<figure class="wp-block-image size-large"><img src="http://calvint1.sg-host.com/wp-content/uploads/2020/07/Screenshot-2020-07-12-at-20.09.54-1024x591.png" alt="" class="wp-image-127"/></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>I do this by just updating the home page within my React Router to be the element I'm currently working on while filling it with dummy content.</p>
<!-- /wp:paragraph -->

<!-- wp:heading {"level":3} -->
<h3>Wrapping Up</h3>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>There's probably an easier way to get all of this done, like using <a rel="noreferrer noopener" href="https://frontity.org/" target="_blank">Frontity</a> or <a rel="noreferrer noopener" href="https://www.gatsbyjs.org/" target="_blank">Gatsby</a>.<br><br>I downloaded and spent around 2 hours playing with Frontity but there was so much bloat that I felt my shiny object syndrome coming on and killed the exploration immediately.<br><br>I couldn't justify spending so much time reconfiguring layouts and CSS when I could just do it myself in a bare bones fashion.<br><br>In my next post I'll dig a little into how I connected up my Wordpress installation, the plugins needed and hooking it up with my React project.</p>
<!-- /wp:paragraph -->