Skip to content

Commit c57695e

Browse files
committed
styling adjusted
1 parent 4e38769 commit c57695e

3 files changed

Lines changed: 54 additions & 21 deletions

File tree

‎src/components/Animation/Animation.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Document } from "postcss";
33
class Animation {
44

55
constructor() {
6-
// SG 07/09/2022 15:11 singleton pattern
6+
// SG 07/09/2022 15:11 Singleton pattern
77
if(Animation._instance) {
88
return Animation._instance;
99
}
@@ -17,7 +17,7 @@ class Animation {
1717
/**
1818
* takes indecies to be swapped
1919
* @param {Integer} i
20-
* @param {Integer} j
20+
* @param {Integer} minBarIndex
2121
*/
2222
swap(i, minBarIndex) {
2323
let unSortedBars = document.querySelectorAll('.array-bars');

‎src/components/Page/partial/Navbar/navbar.css‎

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
.navbar {
2-
background: linear-gradient(90deg, rgb(28, 27, 27) 0%, rgb(26, 23, 23) 100%);
3-
height: 80px;
2+
/* background: linear-gradient(90deg, rgb(28, 27, 27) 0%, rgb(26, 23, 23) 100%); */
3+
height: 70px;
44
display: flex;
55
justify-content: center;
66
align-items: center;
77
font-size: 1.2rem;
8+
background-color: rgb(83, 83, 83);
89
}
910

1011
.navbar-logo {
@@ -63,6 +64,11 @@
6364
}
6465

6566
@media screen and (max-width: 960px) {
67+
68+
.navbar {
69+
height: 60px;
70+
}
71+
6672
.NavbarItems {
6773
position: relative;
6874
}
@@ -73,7 +79,7 @@
7379
width: 100%;
7480
height: 90vh;
7581
position: absolute;
76-
top: 80px;
82+
top: 60px;
7783
left: -100%;
7884
opacity: 1;
7985
transition: all 0.5s ease;
@@ -100,10 +106,11 @@
100106
}
101107

102108
.navbar-logo {
103-
position: absolute;
109+
font-size: 1.3em;
110+
/* position: absolute;
104111
top: 0;
105112
left: 0;
106-
transform: translate(25%, 50%);
113+
transform: translate(25%, 50%); */
107114
}
108115

109116
.menu-icon {
@@ -121,26 +128,16 @@
121128
font-size: 2rem;
122129
}
123130

124-
.nav-links-mobile {
125-
display: block;
126-
text-align: center;
127-
padding: 1.5rem;
128-
margin: 2rem auto;
129-
border-radius: 4px;
130-
width: 80%;
131-
background: #1888ff;
132-
text-decoration: none;
133-
color: #fff;
134-
font-size: 1.5rem;
135-
}
131+
136132

137133
.nav-links-mobile:hover {
138134
background: #fff;
139135
color: #1888ff;
140136
transition: 250ms;
141137
}
142138

143-
button {
139+
/* no global selector */
140+
/* button {
144141
display: none;
145-
}
142+
} */
146143
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import React, { Component } from 'react'
2+
3+
export default class MergeSort extends Component {
4+
constructor() {
5+
super(props);
6+
7+
}
8+
9+
merge (left, right) {
10+
let arr = []
11+
// Break out of loop if any one of the array gets empty
12+
while (left.length && right.length) {
13+
// Pick the smaller among the smallest element of left and right sub arrays
14+
if (left[0] < right[0]) {
15+
arr.push(left.shift())
16+
} else {
17+
arr.push(right.shift())
18+
}
19+
}
20+
21+
// Concatenating the leftover elements
22+
// (in case we didn't go through the entire left or right array)
23+
return [ ...arr, ...left, ...right ]
24+
}
25+
26+
perform(array) {
27+
28+
}
29+
30+
31+
render() {
32+
return (
33+
<div>MergeSort</div>
34+
)
35+
}
36+
}

0 commit comments

Comments
 (0)