Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update navigation on new sitebuilder homepage #34

Open
MirandaEcho opened this issue Feb 11, 2020 · 11 comments
Open

Update navigation on new sitebuilder homepage #34

MirandaEcho opened this issue Feb 11, 2020 · 11 comments

Comments

@MirandaEcho
Copy link
Collaborator

MirandaEcho commented Feb 11, 2020

  1. REMOVE the sticky nav
  2. update the navigation below the logo

Staging site was refreshed this morning from live, including the new homepage.

@MirandaEcho MirandaEcho added this to the Homepage update quicksign milestone Feb 11, 2020
@MirandaEcho
Copy link
Collaborator Author

I want 20-30 minutes of looking into this, and then please report back.

@joshdarby
Copy link

@benlk Have you started on this?

@joshdarby joshdarby reopened this Feb 11, 2020
@benlk
Copy link
Collaborator

benlk commented Feb 11, 2020

I haven't.

There's some past discussion of this at https://innorg.slack.com/archives/GH0FMCCUR/p1580488316001500

@benlk
Copy link
Collaborator

benlk commented Feb 11, 2020

Present homepage top looks like this (when the sticky nav isn't displaying):

Screen Shot 2020-02-11 at 14 46 05

Screen Shot 2020-02-11 at 15 28 57

Site options are:

/* <![CDATA[ */
var Largo = {
    "is_home":"1",
    "is_single":"1",
    "sticky_nav_options": {
        "sticky_nav_display":true,
        "main_nav_hide_article":true,
        "nav_overflow_label":"MORE"
    }
};
/* ]]> */

There appears to be no custom CSS beyond what the theme provides, either in the Theme Editor or the CSS Customizer. This site does not use Largo's LESS Customizer.

Relevant styles:

#site-header {
position: relative;
text-align: center;
.header_img {
max-height: 150px;
}
}

There's some other styles for the sticky nav, which aren't relevant to the main nav.

SiteOrigin PageBuilder doesn't have its own menu function. It does provide a way to insert WordPress' menu widget, which doesn't work in this position:

Screen Shot 2020-02-11 at 15 40 30
Screen Shot 2020-02-11 at 15 40 44

@benlk
Copy link
Collaborator

benlk commented Feb 11, 2020

Questions:

  1. do we want to disable the sticky nav outright, including on mobile? If so, that's custom, because Largo does keep it around for mobile
  2. do we want to port Voice of OC's custom header to hardcoded code? The alternative is to create a specific post which will be used to pagebuild the header — and that doesn't solve the "how do we make the nav real" question.
    • do we want to conduct additional research into whether we can build the main menu in the site builder, or do we want to plow forward with a usual custom header?
    • if porting, what becomes hardcoded and what becomes an editable widget? Things to consider are the left/right ad things, the donation link and the subscribe-today link.

@benlk
Copy link
Collaborator

benlk commented Feb 11, 2020

Very small customization: ~2h

  • remove any hope of drop-downs in the custom pagebuilder: free
  • convert top-level "menu" items in the pagebuilder template to links to their respective categories: 30m
  • empty the Main Nav partial, so that it's always blank, and check to make sure there are no JS errors from Largo's nav js as a result of the removal: 1h

Full custom: 8-10h

  • (separate from the custom header) Disabling the sticky nav completely: copying code from CIJN, might take 1-2h
  • Porting the header to custom header, with assumptions below:
    • 1 custom widget area for the two ad widgets, using the display:flex and order method that Josh used in another project recently to reorder their display from logo, widget, widget to widget, logo, widget: 2h
    • Custom styling for the main and secondary menus: 2h
    • 1 custom widget area for donate and subscribe buttons, with same ordering: 2h
    • Donate/subscribe images for those items, two options:
      • images with a little bit of custom styling in a text widget for alignment to take them from image-over-text to image-beside-text on mobile: 2h
      • show/hide widgets based on screen size using Largo's widget controls: 1h, but harder for client to maintain because the UI wouldn't be explicit about the order the widgets appear in

@benlk
Copy link
Collaborator

benlk commented Feb 14, 2020

Update: With the "Enhanced Text" widget in the Sidebuilder template area used to output the header, and the following "Content:" in the widget, the the markup` for the main nav is output.

<?php
    get_template_part( 'partials/nav', 'main' );
?>

Screen Shot 2020-02-13 at 21 14 13

However, there are some CSS conflicts that prevent the menus working.

.widget li {
    overflow: hidden;
    margin-bottom: 1em;
}

needs to be overridden for the .widget #main-nav li case in order for the dropdowns to display upon hover.

Screen Shot 2020-02-13 at 21 20 08

If we expand the Enhanced Text Widget to also include the secondary nav partial:

<?php
    get_template_part( 'partials/nav', 'main' );
    get_template_part( 'partials/nav', 'secondary' );
?>

Screen Shot 2020-02-13 at 21 21 56


  • CSS to fix the menus: 30m
  • CSS to change the appearance of Trending: 30m
  • Customize header.php to remove main/secondary nav partials, to prevent duplicate elements on page: 30m
  • Unexpected obstacles: 1-2h

@benlk
Copy link
Collaborator

benlk commented Feb 18, 2020

Compare the above screenshots, specifically the colors of the navs, to the following screenshot of the master or staging branch: (they look the same)

Screen Shot 2020-02-18 at 09 43 58

Note the different background colors for the main nav container color, and for the menu items in that nav.

The background color and font color both come from /wp-content/themes/voiceofoc/css/style.min.css?ver=5.3.2, which is to say: these colors come from the compiled Voice of OC CSS, which was in theory compiled from the LESS files.

@benlk
Copy link
Collaborator

benlk commented Feb 18, 2020

This color change does not come from #31

@benlk
Copy link
Collaborator

benlk commented Feb 18, 2020

The color change comes from edits made on prod to the minified CSS file, which will require reverse-engineering in order to capture.

To make future reverse-engineering simpler, let's eliminate the minified file from Grunt builds.

benlk added a commit that referenced this issue Feb 21, 2020
Nav updates for #34, and bring code changes from staging into this repo
@benlk
Copy link
Collaborator

benlk commented Feb 21, 2020

  • keep centered nav
  • remove header search from main-nav partial so that the search can be added directly as a Site Origin widget

@benlk benlk mentioned this issue Feb 21, 2020
1 task
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

No branches or pull requests

3 participants