HOT-FIX. Поправлена картинка not found, поправил меню

This commit is contained in:
2020-08-01 23:43:12 +03:00
parent 30545ab960
commit edc493f0a2
4 changed files with 23 additions and 18 deletions

View File

@ -6,11 +6,6 @@ textarea {
resize: none;
}
.Logo {
width: 50px;
margin: 0 20px;
}
.overflow-auto::-webkit-scrollbar {
width: 0px;
background: transparent;

View File

@ -12,15 +12,16 @@
<!-- Шаблон верхнего меню -->
<template id="main-menu">
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<div class="Logo__box">
<div class="container-fluid d-flex">
<div class="Logo__box d-flex align-items-center">
<img src="./img/logo.svg" alt="logo" class="Logo mr-2">
<a class="h3 text-light navbar-brand text-wrap m-0">Storage Service</a>
</div>
<a class="h3 text-light navbar-brand text-wrap m-0" href="/">Storage Service</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavDropdown"
<button class="navbar-toggler ml-auto" type="button" data-toggle="collapse" data-target="#navbarNavDropdown"
aria-controls="navbarNavDropdown" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<div class="collapse navbar-collapse ml-5" id="navbarNavDropdown">
<ul class="navbar-nav"></ul>
</div>
</nav>
@ -91,7 +92,7 @@
<!-- Шаблон содержимого страницы 404-->
<template id="not-found-content">
<div class="d-flex row justify-content-center">
<img src="/src/img/error-404.svg" class="NotFound__image" alt="404">
<img src="./img/error-404.svg" class="NotFound__image" alt="404">
<div class="h5 m-3">
<div class="m-0 text-center">404. Страница не найдена</div>
<div class="NotFound__text"></div>
@ -386,7 +387,8 @@
<div class="toast-header">
<img class="rounded mr-2 Notify__icon" alt="toast_icon">
<strong class="mr-auto Notify__title"></strong>
<button type="button" class="ml-2 mb-1 close Notify__closeButton" data-dismiss="toast" aria-label="Close">
<button type="button" class="ml-2 mb-1 close Notify__closeButton" data-dismiss="toast"
aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>

View File

@ -1,3 +1,13 @@
.Logo {
width: 50px;
margin: 0 20px;
}
.Logo__box {
width: 170px;
cursor: pointer;
}
.Buttons__container {
margin: 0 20px;
display: flex;

View File

@ -1,6 +1,5 @@
import Component from '../component/index';
import routeService from '../../services/RouteService';
import Image from '../../img/logo.svg';
import './MainMenu.css';
import {createElement} from '../../utils/elementUtils';
@ -28,12 +27,11 @@ class MainMenu extends Component {
super('#main-menu', document.body);
this.buttonsContainer = this.mainNode.querySelector('.navbar-nav');
this.logoImg = document.createElement('img');
this.logoImg.src = Image;
this.logoImg.alt = 'logo';
this.logoImg.className = 'Logo mr-2';
this.logoBox = this.mainNode.querySelector('.Logo__box');
this.logoBox.appendChild(this.logoImg);
this.addEventListener(this.logoBox, 'click', () => {
routeService.goTo('/');
});
this.addSubscribe(routeService, EVENTS.ROUTE_CHANGE, (route) => {
this.menuItems.forEach(({url, link}) => {