Skip to content

Conversation

SerhiiCho
Copy link

Intro

Navigation bar is a little bit outdated for 2019, especially the mobile version. I think it's a good idea to make it look more modern for new people coming into the language. But at the same time don't make anything fancy and try to stick with the base structure. Navigation bar is a good place to start, but in future I'd like to continue with other parts as well. Just want to know your guys opinion about restyling php.net

Search bar on mobile view

The biggest change is that search bar is no longer visible on mobile view, instead there is a button with search icon on the left of the navbar. After first click it will show the search and auto focus on search input, but after second click it will try to submit the search form.

Quick preview

web-php

Feel free to edit if you are a maintainer.

SerhiiCho added 21 commits July 4, 2019 23:00
* Before the change the arrow down on search suggestions was an background image sprite, now it's replaced with a pseudo element.
* Also removed search-sprites.png image from images directory because it's not used anywhere.
New scrollbar has styles similar to firefox standard style.
when there is no results found or "search more" message
Decreased width and added height
The name of the site in search seggestions doen't provide any useful information but it takes some space in search dropdown.
* I've duplicate the black svg logo and added fill="white" attribute to each of the letter.
* Removed dark blue border bottom on navbar
In order to keep consistency and not have half code with 2 spaces and half with 4.
* Search field now will be hidden on mobile phones, instead there is search button on the left of the navbar. After clicking this button search form will appear and search field will be in focus and ready for typing. After second click on trigger it will submit the search form.
* Moved svg code from header.inc to /images/search-icon.svg in order to clean header.inc
Because part of the code had 2 spaces and other half 4 spaces.
* Replaced javascript constructur with a simple IIFE function.
@SerhiiCho
Copy link
Author

Quick preview link on play with docker, the link will be dead after 3 hours 50 minutes since this comment.
Only Home and Documentation pages work for the demo.

@Sobak
Copy link
Contributor

Sobak commented Aug 15, 2019

I'm not the right person to judge aesthetics - I'm backend all the way lol, and don't even have any strong opinion on that one. I do think, however, that huge diff caused by changing the indentation is scarying people from reviewing the pull request.

Not only it will take more time for someone to review it but you're going to be asked to revert unrelated changes for the sake of diff readability and not screwing tools like git blame.

One functional problem I can see with that change is that it alters the colors which are also used on other PHP.net websites (e.g. doc.php.net, news.php.net, people.php.net etc). It means that if we want to have new look we would also need complementary change to the php/web-shared repo.

@SerhiiCho
Copy link
Author

The indentation part should have been the separate PR I guess. But it definitely needs to be fixed. I'm closing the pull request

@SerhiiCho SerhiiCho closed this Aug 15, 2019
@SerhiiCho
Copy link
Author

SerhiiCho commented Aug 15, 2019

I've created an extension for Firefox and Chrome for changing styles on php.net. I hope it will be helpful for someone.

@SerhiiCho SerhiiCho deleted the navbar-new-look branch August 16, 2019 20:44
@php php deleted a comment from SimonCastano Mar 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants