Chapter 4: Medium Design

Medium design, tablet dimension Medium design, mobile dimension
Medium design, tablet and mobile dimensions
Medium design, desktop dimension
Medium design, desktop dimension

NOTE: Gradient is missing in these screenshots.

4a: Tour Page

4A part 1: HTML Structure

Edit the HTML and CSS on the existing easy site and remove the extra materials. We only need the tour information, not the photos and reviews. Remove the CSS for reviews and photos and the media queries EXCEPT the wrapper styles.

When you are done, you should have the Magenta Lime logo, the tour dates, and the footer.

4A part 2: Add Buttons

Add links for "Buy Tickets" (class of button-primary) or "Sold Out" (classes of button-primary button-soldout).


          <p><a class="button-primary button-soldout">Sold Out</a></p>
          <p><a href="#" class="button-primary">Buy Tickets</a></p>
        

Note that "sold out" has no href attribute. This means the link is not clickable. However, it still has a hover state!

With our basic HTML in place, we'll style a bunch of things.

4A part 3: Footer challenge

Create a footer for the page that looks like this. On hover, the icons should change color from lime to cyan (like the Spotify icon).

Footer challenge.

Useful links include the following icons for Instagram, Spotify, and Soundcloud. Remember that you may view this link directly in your browser and then view source to get the SVG code, or you may use these in an img element. Link each icon to the home page for each social media page.

https://assets.codepen.io/296057/fem-instagram.svg 

https://assets.codepen.io/296057/fem-spotify.svg 

https://assets.codepen.io/296057/fem-soundcloud.svg 

Be sure to consider the correct markup for the footer, then style accordingly. This CSS Tricks article may be useful for you.

Footer solution

When done, integrate the footer into your Tour page. Your page should look something like this (click for larger format):

finished state

Finished tour page

4B: Album and Tracklist

We reuse our button and some font styles to make our album box and playlist.

4B part 1: Markup the HTML

Discuss what the right markup might be, then mark up the text.

4B Part 2: Styling

Style the album box and the track list to match the mobile view screenshot. Remember that the gradient background is smooth -- the choppy background is an artifact of the screenshot technology.

finished state

Tips:

4C: Reviews and Images

The first thing we must do is discuss our approach. We start with HTML from our easy design for the 3 images and 4 quotes that make up this section of the page. I've also included all CSS we've generated for the medium design to this point, along with the style from the easy design for this section.

On mobile, we show only the reviews.

finished state

On tablet, the images appear in between the reviews, and a border appears (but the images hang outside of it). You may find hints in this article helpful. (Remember: sometimes you don't want a grid blowout... but sometimes you do!)

finished state

On desktop, we stack the images and reviews on top of each other.

finished state

What should be our default source order? How will we handle the appearing/disappearing images? What technology will we use to lay this out?

4C part 1: HTML markup

Let's plan our markup order for the layout on desktop, where quotes and images are stacked on top of each other in a column.

Modify the HTML such that each image and each figure is a child of a container (currently aside). Add the additional quote:

These guys know how to party
(5 stars)
The Electric Vibe

The result should be alternating figures and images. Each image should be surrounded by a div with a class of .featured-img for image flexibility.

4C part 2: Styling

We will style the mobile, tablet, and desktop versions of the layout.

4D: Audio Player

We'll reskin an existing audio player.

4D part 1: Evaluation

We found an audio player we want to use on our site, as it has most of the elements we want. Audio seek slider, volume slider, play button, mute button are all included. The current track name is not included, but we can add this.

The styling is not what we want, but as long as most of the elements are there, we are in great shape for re-skinning.

(Note: our design is static, playing only one track. Making this dynamic and loading a track from a list/database is beyond the scope of this course.)

finished state
Starting audio player design
finished state
Ending audio player design

Things we need to change:

4B part 2: MODIFY HTML

Always start with the HTML!

Consider the layout - what elements need to be added to achieve this layout? Should we use Flexbox or Grid?

Part 2 Ending CodePen

4D part 3: SIMPLIFY CSS AND ADD STANDARD STYLES

Read the CSS that's present and delete what doesn't make sense.

4D part 4: Controls layout

Now let's lay out the grid for our name/play button and the track/volume controls.

Ending CodePen

4D part 5: FINAL STYLING OF ELEMENTS

Once everything is in the general position, now we can style more carefully with CSS to get the look we want.

Ending CodePen

4D part 6: Add album image

Let's add the album image above the audio player and wrap the whole thing in a section.

Ending CodePen

4E: Hamburger menu

Now that you've seen how to repurpose code from elsewhere, you try it. We'll work through each step.

finished state
Mobile navbar design
finished state
Desktop navbar design

4E part 1: Evaluation

Let's discuss the code we have, including:

4E part 2: Modify HTML

We identified the following issues:

Ending CodePen

4E part 3: ADD STANDARD STYLES AND SIMPLIFY CSS

Copy/paste our "base" styling from another pen.

Set up a new layer called "header" for these styles.

Remove styles pertaining to "action".

Ending CodePen

4E part 4: Style mobile dropdown menu

Ending CodePen

4F: FINAL SITE ASSEMBLY FOR MOBILE AND TABLET

We have everything coded for this page, at least in mobile format. Let's assemble this into a single document.

Beginning CodePen

Fork the starting head of the document we already created.

Now add elements:

4G: FINAL SITE WITH DESKTOP LAYOUT

We have everything coded for this page, except we have not finished the desktop layout.