Skip to content

Commit d4cb2b2

Browse files
committed
Responsive styling navigation
1 parent 6b3cba6 commit d4cb2b2

File tree

4 files changed

+52
-35
lines changed

4 files changed

+52
-35
lines changed

public/css/app.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,10 @@ video {
783783
margin-bottom: 0.25rem;
784784
}
785785

786+
.ml-6 {
787+
margin-left: 1.5rem;
788+
}
789+
786790
.block {
787791
display: block;
788792
}
@@ -939,6 +943,18 @@ video {
939943
width: 1rem;
940944
}
941945

946+
.w-48 {
947+
width: 12rem;
948+
}
949+
950+
.w-44 {
951+
width: 11rem;
952+
}
953+
954+
.w-36 {
955+
width: 9rem;
956+
}
957+
942958
.flex-1 {
943959
flex: 1 1 0%;
944960
}

public/js/app.js

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -21502,7 +21502,7 @@ var _hoisted_7 = /*#__PURE__*/_withScopeId(function () {
2150221502
});
2150321503

2150421504
var _hoisted_8 = {
21505-
"class": "flex flex-row w-2/12 px-2 my-2 lg:hidden"
21505+
"class": "flex flex-row w-2/12 px-2 py-2 ml-8 lg:hidden"
2150621506
};
2150721507
var _hoisted_9 = {
2150821508
"class": "self-center block w-full mr-4"
@@ -21593,89 +21593,82 @@ var _hoisted_1 = {
2159321593
"class": "container flex flex-col justify-center px-0 pt-6 mx-auto mb-6"
2159421594
};
2159521595
var _hoisted_2 = {
21596-
"class": "flex flex-wrap"
21597-
};
21598-
var _hoisted_3 = {
21599-
"class": "w-9/12 pr-2 my-2 overflow-hidden lg:w-3/12 md:w-10/12 flex flex-wrap"
21596+
"class": "flex flex-wrap justify-between"
2160021597
};
2160121598

21602-
var _hoisted_4 = /*#__PURE__*/_withScopeId(function () {
21599+
var _hoisted_3 = /*#__PURE__*/_withScopeId(function () {
2160321600
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
21601+
"class": "pr-2 my-2 overflow-hidden"
21602+
}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
2160421603
"class": "ml-4 lg:ml-0 hidden md:block"
2160521604
}, [/*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("img", {
2160621605
alt: "Logo",
2160721606
"class": "h-20 lg:h-24",
2160821607
"aria-label": "Nettbutikk logo",
2160921608
src: _img_svg_Logo_svg__WEBPACK_IMPORTED_MODULE_1__["default"]
21610-
})], -1
21611-
/* HOISTED */
21612-
);
21613-
});
21614-
21615-
var _hoisted_5 = /*#__PURE__*/_withScopeId(function () {
21616-
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("img", {
21609+
})]), /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("img", {
2161721610
alt: "Mobile logo",
2161821611
"class": "h-16 md:hidden block w-32",
2161921612
"aria-label": "Nettbutikk logo",
2162021613
src: _img_svg_MobileLogo_svg__WEBPACK_IMPORTED_MODULE_2__["default"]
21621-
}, null, -1
21614+
})], -1
2162221615
/* HOISTED */
2162321616
);
2162421617
});
2162521618

21626-
var _hoisted_6 = {
21619+
var _hoisted_4 = {
2162721620
"class": "lg:hidden block"
2162821621
};
2162921622

21630-
var _hoisted_7 = /*#__PURE__*/_withScopeId(function () {
21623+
var _hoisted_5 = /*#__PURE__*/_withScopeId(function () {
2163121624
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", {
2163221625
"class": "hidden lg:w-1/12 lg:block"
2163321626
}, null, -1
2163421627
/* HOISTED */
2163521628
);
2163621629
});
2163721630

21638-
var _hoisted_8 = {
21631+
var _hoisted_6 = {
2163921632
id: "nav-content",
2164021633
"class": "hidden w-full mt-4 bg-black lg:w-8/12 lg:block lg:bg-white lg:mt-0 lg:text-right",
2164121634
"aria-expanded": "false"
2164221635
};
21643-
var _hoisted_9 = {
21636+
var _hoisted_7 = {
2164421637
"class": "px-6 lg:px-0 lg:pt-5 xl:pt-7"
2164521638
};
21646-
var _hoisted_10 = {
21639+
var _hoisted_8 = {
2164721640
id: "block-main",
2164821641
role: "navigation",
2164921642
"aria-labelledby": "block-main-menu"
2165021643
};
21651-
var _hoisted_11 = {
21644+
var _hoisted_9 = {
2165221645
"class": "items-center justify-end flex-1 pr-4 -mr-4 list-reset lg:flex"
2165321646
};
21654-
var _hoisted_12 = {
21647+
var _hoisted_10 = {
2165521648
"class": "inline-block py-2 text-xl font-semibold no-underline lg:text-base pl-6"
2165621649
};
2165721650

21658-
var _hoisted_13 = /*#__PURE__*/_withScopeId(function () {
21651+
var _hoisted_11 = /*#__PURE__*/_withScopeId(function () {
2165921652
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", {
2166021653
"class": "text-2xl text-white no-underline lg:text-black link-underline link-underline-blue"
2166121654
}, " Home ", -1
2166221655
/* HOISTED */
2166321656
);
2166421657
});
2166521658

21666-
var _hoisted_14 = {
21659+
var _hoisted_12 = {
2166721660
"class": "inline-block py-2 text-xl font-semibold no-underline lg:text-base pl-6"
2166821661
};
2166921662

21670-
var _hoisted_15 = /*#__PURE__*/_withScopeId(function () {
21663+
var _hoisted_13 = /*#__PURE__*/_withScopeId(function () {
2167121664
return /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("span", {
2167221665
"class": "text-2xl text-white no-underline lg:text-black link-underline link-underline-blue"
2167321666
}, " Products ", -1
2167421667
/* HOISTED */
2167521668
);
2167621669
});
2167721670

21678-
var _hoisted_16 = {
21671+
var _hoisted_14 = {
2167921672
"class": "inline-block py-2 text-xl font-semibold no-underline lg:text-base pl-6"
2168021673
};
2168121674
function render(_ctx, _cache) {
@@ -21685,27 +21678,27 @@ function render(_ctx, _cache) {
2168521678

2168621679
var _component_router_link = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("router-link");
2168721680

21688-
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("header", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_3, [_hoisted_4, _hoisted_5, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_6, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_cart_component)])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_mobile_menu), _hoisted_7, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_8, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_9, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("nav", _hoisted_10, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("ul", _hoisted_11, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("li", _hoisted_12, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_router_link, {
21681+
return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("header", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [_hoisted_3, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_4, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_cart_component)]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_mobile_menu), _hoisted_5, (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_6, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_7, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("nav", _hoisted_8, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("ul", _hoisted_9, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("li", _hoisted_10, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_router_link, {
2168921682
tabindex: "0",
2169021683
to: "/"
2169121684
}, {
2169221685
"default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
21693-
return [_hoisted_13];
21686+
return [_hoisted_11];
2169421687
}),
2169521688
_: 1
2169621689
/* STABLE */
2169721690

21698-
})]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("li", _hoisted_14, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_router_link, {
21691+
})]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("li", _hoisted_12, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_router_link, {
2169921692
tabindex: "0",
2170021693
to: "/products"
2170121694
}, {
2170221695
"default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () {
21703-
return [_hoisted_15];
21696+
return [_hoisted_13];
2170421697
}),
2170521698
_: 1
2170621699
/* STABLE */
2170721700

21708-
})]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("li", _hoisted_16, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_cart_component)])])])])])])]);
21701+
})]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("li", _hoisted_14, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_cart_component)])])])])])])]);
2170921702
}
2171021703

2171121704
/***/ }),

resources/js/components/Header/MobileMenu.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</ul>
2323
</div>
2424
<div class="w-5/12 lg:hidden" />
25-
<div class="flex flex-row w-2/12 px-2 my-2 lg:hidden">
25+
<div class="flex flex-row w-2/12 px-2 py-2 ml-8 lg:hidden">
2626
<div class="self-center block w-full mr-4">
2727
<button
2828
id="nav-toggle"

resources/js/components/Header/Navbar.vue

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
role="banner"
44
class="container flex flex-col justify-center px-0 pt-6 mx-auto mb-6"
55
>
6-
<div class="flex flex-wrap">
7-
<div class="w-9/12 pr-2 my-2 overflow-hidden lg:w-3/12 md:w-10/12 flex flex-wrap">
6+
<div class="flex flex-wrap justify-between">
7+
<div class="pr-2 my-2 overflow-hidden">
88
<div class="ml-4 lg:ml-0 hidden md:block">
99
<img
1010
alt="Logo"
@@ -19,11 +19,19 @@
1919
aria-label="Nettbutikk logo"
2020
src="../../../img/svg/MobileLogo.svg"
2121
/>
22-
<div class="lg:hidden block">
22+
23+
</div>
24+
25+
26+
27+
<div class="lg:hidden block">
2328
<cart-component />
2429
</div>
25-
</div>
30+
2631
<mobile-menu />
32+
33+
34+
2735
<div class="hidden lg:w-1/12 lg:block" />
2836
<div
2937
id="nav-content"

0 commit comments

Comments
 (0)