Skip to content

Conversation

@ThisIsJustUs
Copy link

Changes

A number of new media queries have been added to enable a mobile-friendly site. Mostly new flexbox settings were added in these queries to ensure that the site's content is distributed throughout the small display. Additionally, a button was added that is shown when the display's width is small enough which shows the navbar as a dropdown menu.

Media queries are added and specific css changes are made (e.g. new flexbox layout and image size). A new meta tag that specifies the viewport and JS code for responsiveness is added.
Turnt flex-direction from row to column and specified size for .text and img in relation with the .card container.
Changed the partner logo's grid to flexbox and made adjustments to the width.
@MTCoster MTCoster added the new feature New feature or request label Jan 28, 2019
Copy link
Author

@ThisIsJustUs ThisIsJustUs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes

The previous navbar toggler required the user to press the button twice because the specific css code would be added to the html tag first until if-statement can make sense of it. Now the toggle button toggles between two classes and only requires on button push. Additionally, the specific event page is now mobile friendly.

Copy link
Member

@MTCoster MTCoster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly minor things, see individual comments for details. I stopped commenting for formatting fixes, but follow through and fix all of them please.

</a>
</div>
<button id="navbar-toggler" type="button">
<i class="fas fa-bars"></i>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong indent

{% endcomment %}
<meta charset="utf-8">
<meta name="viewport" content="width=960">
<!-- <meta name="viewport" content="width=960"> -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don’t leave comments in code - this is why we have a version history!

{%- comment %}
Site resources
{% endcomment %}
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a poor choice - adding 54kB to every page load just for a single close icon

}
}

@media (max-width: 960px){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing space between ) {

}

@media (max-width: 960px){
margin: 17px 0px;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zero sizes in CSS should have no units

border: transparent;
font-size: 22px;
position: absolute;
right: 30px;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These dimensions should probably be em as well

}
}
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Files should end with a newline

const content = document.getElementById('content');
const padding = header.offsetHeight - threshold;
const toggler = document.getElementById('navbar-toggler');
const nav = document.getElementsByClassName('nav')[0];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don’t pad like this. And don’t use getElementsByClassName() - add an id to the element instead


// Toggle between display none and block for mobile navbar
toggler.addEventListener('click', () => {
if(nav.className == "nav"){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never use double quotes (") in JS, always single (')


// Toggle between display none and block for mobile navbar
toggler.addEventListener('click', () => {
if(nav.className == "nav"){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This mechanism seems rocky, add and remove a nav-small class on top of the existing nav class to prevent duplication of CSS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants