Skip to content

Commit ccfe948

Browse files
Betrozovvalorkin
authored andcommitted
fix(header-component): fix style
1 parent 6ab3a07 commit ccfe948

File tree

2 files changed

+32
-70
lines changed

2 files changed

+32
-70
lines changed

demo/assets/css/style.css

Lines changed: 28 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ body {
1818
z-index: 2;
1919
}
2020

21-
#top-menu > div:not(.menu-right) {
21+
#top-menu > div:not(.logo) {
2222
float: left;
2323
}
2424

25-
#top-menu .menu-right {
25+
#top-menu .logo {
2626
float: right;
2727
}
2828

29-
#top-menu .menu-right > div {
29+
#top-menu .logo > div {
3030
float: left;
3131
}
3232

@@ -78,16 +78,6 @@ body {
7878
height: 50px;
7979
}
8080

81-
#top-menu .git-hub {
82-
margin: 22px 0;
83-
}
84-
85-
#top-menu .git-hub iframe {
86-
height: 20px;
87-
width: 95px;
88-
}
89-
90-
#mobile-top-menu,
9181
#mobile-main-menu {
9282
display: none;
9383
cursor: pointer;
@@ -97,12 +87,7 @@ body {
9787
padding: 24px 15px;
9888
}
9989

100-
#mobile-top-menu {
101-
padding: 24px 30px 24px 10px;
102-
}
103-
104-
#mobile-main-menu img,
105-
#mobile-top-menu img {
90+
#mobile-main-menu img {
10691
height: 16px;
10792
}
10893

@@ -132,7 +117,7 @@ body {
132117
position: fixed;
133118
bottom: 0;
134119
left: 0;
135-
z-index: 1;
120+
z-index: 999;
136121
-webkit-transition: left .5s ease;
137122
-moz-transition: left .5s ease;
138123
-ms-transition: left .5s ease;
@@ -512,11 +497,25 @@ body {
512497

513498
@media (max-width: 1020px) {
514499
#top-menu {
500+
display: flex;
501+
flex-wrap: nowrap;
502+
width: 100%;
515503
border-bottom: 1px solid #191924;
516504
}
517505

506+
#top-menu #mobile-main-menu {
507+
order: 0;
508+
}
509+
510+
#top-menu .title {
511+
order: 1;
512+
width: calc(100% - 95px);
513+
text-align: center;
514+
min-width: 1px;
515+
}
516+
518517
#top-menu .logo {
519-
display: none;
518+
order: 2;
520519
}
521520

522521
#top-menu .top-menu-container {
@@ -529,11 +528,6 @@ body {
529528
max-height: 0;
530529
}
531530

532-
#top-menu .title {
533-
max-width: 300px;
534-
min-width: 1px;
535-
}
536-
537531
#top-menu .top-menu-container ul {
538532
padding: 10px 0;
539533
}
@@ -547,13 +541,17 @@ body {
547541
padding: 10px 10px;
548542
}
549543

550-
#mobile-top-menu,
551544
#mobile-main-menu {
552545
display: inline-block;
553546
}
554547

555548
#main-menu {
556549
left: -100%;
550+
height: calc(100% - 69px);
551+
}
552+
553+
.isOpenMenu #main-menu {
554+
left: 0;
557555
}
558556

559557
#main {
@@ -563,35 +561,12 @@ body {
563561
}
564562

565563
@media (max-width: 600px) {
566-
#top-menu .title {
567-
width: 100%;
568-
max-width: 100%;
569-
text-align: center;
570-
}
571-
572564
#top-menu .title h2 {
573565
padding: 15px;
574566
}
575567

576-
#top-menu .menu-right {
577-
float: left;
578-
width: calc(100% - 50px);
579-
text-align: center;
580-
padding-right: 50px;
581-
box-sizing: border-box;
582-
}
583-
584-
#top-menu .git-hub {
585-
display: inline-block;
586-
float: none !important;
587-
margin: 15px 0;
588-
}
589-
590-
#top-menu #mobile-top-menu {
591-
position: absolute;
592-
bottom: 0;
593-
right: 0;
594-
padding: 15px 30px 15px 10px;
568+
#top-menu .logo {
569+
margin: 0 15px 0 0;
595570
}
596571

597572
#mobile-main-menu {
@@ -603,7 +578,7 @@ body {
603578
}
604579

605580
#main-menu {
606-
height: calc(100% - 105px);
581+
height: calc(100% - 55px);
607582
}
608583

609584
#main {

demo/components/top-menu/top-menu.template.html

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,9 @@ <h2>ng2-bootstrap</h2>
77
<img src="assets/images/menu-left.svg" alt="">
88
</div>
99

10-
<div class="menu-right">
11-
<div class="git-hub">
12-
<iframe frameborder="0" scrolling="0"
13-
src="https://ghbtns.com/github-btn.html?user=valor-software&repo=ng2-bootstrap&type=star&count=true"></iframe>
14-
<iframe frameborder="0" scrolling="0"
15-
src="https://ghbtns.com/github-btn.html?user=valor-software&repo=ng2-bootstrap&type=fork&count=true"></iframe>
16-
</div>
17-
18-
<div class="logo">
19-
<a href="">
20-
<img src="assets/images/logo.png" alt="">
21-
</a>
22-
</div>
23-
24-
<div id="mobile-top-menu">
25-
<img src="assets/images/menu-right.svg" alt="">
26-
</div>
10+
<div class="logo">
11+
<a href="">
12+
<img src="assets/images/logo.png" alt="">
13+
</a>
2714
</div>
2815
</div>

0 commit comments

Comments
 (0)