Magento 2 - Move Menu Location - magento2

I'm trying to move the navigation menu on a Magento 2 installation. I've created a child theme of the default blank theme and I want to move the navigation menu into the header of the site. At present I've accomplished it in CSS but I would rather move it in the code as it will be cleaner.
I've tried following other posts on this site along with the Magento Docs but all I seem to achieve is making the navigation menu disappear. Below is the code I'm using. It's probably something really small and stupid that I'm doing wrong but I was wondering if anyone out there could look at the code with a fresh set of eyes and spot the error of my ways ;)
Any help gratefully appreciated:
Code:
<move element="nav-sections" destination="page-header" after="block-search"/>
Thanks
Kev

I'm not sure where you want to move it, the following moves it to the very top:
<move element="navigation.sections" destination="after.body.start"/>
In htdocs/vendor/magento/module-theme/view/frontend/layout/default.xml you can finde some destinations that fit your needs.

Related

Ionic v4 ion-slides problems

I have created a component in my project that is purely an ion-slides UI component. I've injected into the main page of my side-drawer template app and I'm experiencing a number of issues/annoyances:
The content doesn't always center within the main pane. It seems as though the width of the individual ion-slide items all get set with an inline element style width that is greater than the pane width! I've realised that this only happens when the whole app is loaded. If I click on the side menu item of the page to reload it individually, the issue disappears. This leads me to believe it's an issue with the order that components are rendered. Can anyone help me understand what is happening? Is it a bug?
Undesired behaviour
I can't work out how to get navigation arrows to display/work - is this possible?
https://stackblitz.com/edit/angular-ionic4-test-yuppm1?embed=1&file=src/app/app.module.ts
The above Stackblitz should help to give you an idea of my setup but it doesn't show the problem I'm experiencing. It does show one other peculiarity though:
With loop set to true in the options, when you get to the last slide and you go to the next slide, it jumps to second element rather than the first! Any help on understanding why this is happening will be appreciated.
Thanks

How do I create an App-like header with html/css?

I'm building an app with Phonegap/Cordova and Web standards, such as HTML and CSS. However, somewhere on the part of creating this, my skills aren't sufficient.
Ok, let's get this straight: I'm trying to create a navigation bar at the top of the screen. Very basic, even without buttons, just plain text with links.
Check-out this screenshot. As you might see or not.. The middle one isn't exactly placed in the middle. I've tried with div styles, span classes and tables seem the best option.. Yet still insufficient.
What's the best option to create such header?
p.s. No, of course there won't be a border in the table :D - Just for viewing. ^^
I did an example of something like this for a talk... here's a basic version with just a header and some scrollable content: http://jsbin.com/UWeQeli/1/edit
Hope it helps.

Facebook hide content from non-fans in a unique way

I need to build a tab looking like this one:
https://www.facebook.com/auto.co.il/app_134594493332806
I know how to add an image and a comment box and i know of several "plain" ways to hide the content from non-fans, but i came across the above tab and i really like the way it shows thee content yet you cant engage it until you press the like button.
Any help please?
Thanks in advance.
Oren
Your link didn't work for me, but you can place a absolutely positioned div with a high z-index above the rest of your content to prevent the user from clicking on anything.
Update: Now that the link has been updated I see that they are doing exactly what I described above. In chrome if you right-click the background and select "inspect element" you will see the following computed style for the div:
rgba(0,0,0,0.796);
display:block;
height:1612px;
width:810px;
The content is blacked out simply with a div with a black background and some opacity. Just for fun, you can overcome their like gate (without liking) via chrome's JS console by selecting the iframe context and then entering the following:
$('.like_float_c').detach();
... now call youself a 'hacker' ;)

progress bar positioning

#haehn Hi Haehn
I'm using GWT with XTK. And I have been successful in using "min-height:100%" trick in the to get XTK going in the GWT app. Now everything is working, except the fact that the progress bar is positioned right below the black area.
In one of the posts you mentioned something about using position:relative to make it appear in the center of the black area. But that trick didnt help me in my case. Actually, I'm not quite sure if I followed your explanation properly in that post. A quick glance through the XTK code base didn't light any blubs either.
A little help here?
thanks
There is a new way to define CSS for the progress bar: overload the CSS class xtk-progress-bar. Any style gets automatically applied to the progress bar.
this is a tough one - you have to play with the css style. if you figure out the problem, please let us know!

How to disable hover effect to highlight menu items in GWT MenuBar?

I am making a vertical Menu using GWT MenuBar and selection of particular MenuItem shows content on the right, I am trying to make something similar to TabPanel, but with Tabs on left instead of being on top. Now, since I've got the Menu items and actions in place, I want to remove the effect of hovering over and changing color, and keep that menu item selected which was clicked last and whose content is loaded on the right.
I am open to any comments, if you have a better solution to implement this, using some other components(with-in) GWT, please drop in a comment with your suggestions, I'll really appreciate that.
Or if you can just tell me how can I disable this effect, of hovering and sticking to only that selection, That would be awesome too..
Thanks to everyone, taking time to read this and suggesting a solution.
It's all defined in the CSS of your GWT's theme (probably the default one), so it's a matter of overriding those styles - make sure it's not the other way around :) Inspect the code with a tool like Firebug to see what's exactly being set and change that.