Skip to content

Commit e5a009a

Browse files
authored
Merge pull request #192 from codeharborhub/dev-1
drop-down items updated
2 parents 086594c + b310973 commit e5a009a

2 files changed

Lines changed: 68 additions & 57 deletions

File tree

docusaurus.config.js

Lines changed: 40 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -134,41 +134,55 @@ const config = {
134134
items: [
135135
{
136136
type: "html",
137-
value: `
138-
<div class="dropdown_grid">
139-
<a class="dropbtn" href="/tutorial/">Web Development</a>
140-
<div class="dropdown-content">
141-
<a href="/tutorial/category/html/" class="nav__icons"> <img src="/tutorial/icons/html-5.svg" title="HTML" alt="HTML" /> </a>
142-
<a href="/tutorial/css/introduction" class="nav__icons"> <img src="/tutorial/icons/css.svg" title="CSS" alt="CSS" /> </a>
143-
<a href="/tutorial/javascript/introduction-to-javascript/what-is-js" class="nav__icons"> <img src="/tutorial/icons/js.svg" title="JavaScript" alt="JS" /> </a>
144-
<a href="/tutorial/react/react-intro" class="nav__icons"> <img src="/tutorial/icons/jsx.svg" title="React" alt="React" /> </a>
145-
</div>
146-
</div>`,
137+
value: `<div class="dropdown_grid">
138+
<a class="dropbtn" href="/tutorial/">Docs</a>
139+
<div class="dropdown-content">
140+
<a href="#" class="nav__icons"> <img src="/tutorial/icons/html-5.svg" title="HTML5" alt="HTML" /> </a>
141+
<a href="#" class="nav__icons"> <img src="/tutorial/icons/css.svg" title="CSS" alt="CSS" /> </a>
142+
<a href="#" class="nav__icons"> <img src="/tutorial/icons/js.svg" title="JavaScript" alt="JavaScript" /> </a>
143+
<a href="#" class="nav__icons"> <img src="/tutorial/icons/jsx.svg" title="React.Js" alt="React" /> </a>
144+
<a href="#" class="nav__icons"> <img src="/tutorial/icons/ts.svg" title="TypeScript" alt="TypeScript" /> </a>
145+
<a href="#" class="nav__icons"> <img src="/tutorial/icons/py.svg" title="Python" alt="Python" /> </a>
146+
<a href="#" class="nav__icons"> <img src="/tutorial/icons/tailwind-css.svg" title="Tailwind CSS" alt="Tailwind" /> </a>
147+
<a href="#" class="nav__icons"> <img src="/tutorial/icons/next-js.svg" title="NextJs" alt="Next" /> </a>
148+
</div>
149+
</div>`,
147150
},
151+
152+
{
153+
type: "html",
154+
value: '<hr style="margin: 0.3rem 0;">',
155+
},
156+
148157
{
149158
type: "html",
150-
value:
151-
'<hr style="margin: 0.3rem 0; border: none; border-top: 1px solid var(--ifm-color-emphasis-200);">',
159+
value: `<div class="dropdown_grid">
160+
<a class="dropbtn" href="#"> Courses </a>
161+
<div class="dropdown-content">
162+
<a href="#" class="nav__icons"> <img src="/tutorial/icons/html-5.svg" alt="HTML" /> </a>
163+
<a href="#" class="nav__icons"> <img src="/tutorial/icons/jsx.svg" alt="React" /> </a>
164+
</div>
165+
</div>`,
152166
},
167+
168+
{
169+
type: "html",
170+
value: '<hr style="margin: 0.3rem 0;">',
171+
},
172+
153173
{
154174
type: "html",
155-
value: `
156-
<div class="dropdown_grid">
157-
<a class="dropbtn" href="#">Core Skills & Tech</a>
158-
<div class="dropdown-content">
159-
<a href="/tutorial/git/introduction" class="nav__icons"> <img src="/tutorial/icons/git.svg" title="Git" alt="Git" /> </a>
160-
<a href="/tutorial/github/introduction-to-github" class="nav__icons"> <img src="/tutorial/icons/github.svg" title="GitHub" alt="GitHub" /> </a>
161-
<a href="/tutorial/cybersecurity" class="nav__icons"> <img src="/tutorial/icons/cyber-security.png" title="Cyber Security" alt="Cyber" /> </a>
162-
<a href="/tutorial/machine-learning" class="nav__icons"> <img src="/tutorial/icons/ai-chat.svg" title="Machine Learning" alt="ML" /> </a>
163-
<a href="/tutorial/internet/introduction" class="nav__icons"> <img src="/tutorial/icons/internet.svg" title="Internet" alt="Internet" /> </a>
164-
<a href="/tutorial/technical-writer" class="nav__icons"> <img src="/tutorial/icons/writer.png" title="Technical Writing" alt="Writing" /> </a>
165-
</div>
166-
</div>`,
175+
value: `<div class="dropdown_grid">
176+
<a class="dropbtn" href="#" target="_self"> DSA </a>
177+
<div class="dropdown-content dsa-content ">
178+
<a href="#" target="_self" class="nav__icons"> 🧩Problems </a> <br />
179+
<a href="#" target="_self" class="nav__icons "> 💡Solutions </a>
180+
</div>
181+
</div>`,
167182
},
168183
{
169184
type: "html",
170-
value:
171-
'<hr style="margin: 0.3rem 0; border: none; border-top: 1px solid var(--ifm-color-emphasis-200);">',
185+
value: '<hr style="margin: 0.3rem 0;">',
172186
},
173187
{
174188
to: "/tutorial/",

src/css/custom.css

Lines changed: 28 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -240,47 +240,44 @@ mark {
240240
-webkit-text-fill-color: transparent;
241241
}
242242

243-
.dropdown_grid {
244-
display: grid;
245-
grid-template-columns: repeat(2, auto);
246-
gap: 4px;
247-
}
248-
249-
.dropdown_grid .dropbtn {
243+
.dropbtn {
244+
width: 110px;
250245
background-color: transparent;
251246
color: var(--ifm-color-primary);
252-
padding: 8px 16px;
253-
font-size: 16px;
247+
padding: 14px;
248+
font-size: 18px;
254249
border: none;
255-
transition: background-color 0.3s, color 0.3s;
250+
cursor: pointer;
251+
border-right: 1px solid #4e8da0db;
252+
margin: 2px;
256253
}
257254

258-
.dropdown-content {
259-
position: relative;
260-
min-width: 180px;
255+
.dropdown_grid {
261256
display: grid;
262-
grid-template-columns: repeat(4, 1fr);
263-
gap: 6px;
264-
padding: 5px 0;
257+
grid-template-columns: repeat(3, 1fr);
258+
gap: 10px;
265259
}
266260

267-
.dropdown-content a {
268-
display: flex;
269-
justify-content: center;
270-
align-items: center;
271-
padding: 5px;
272-
border-radius: 8px;
273-
transition: background-color 0.3s, transform 0.3s;
261+
.dropdown-content {
262+
position: relative;
263+
min-width: 180px;
264+
}
265+
@media (max-width: 400px) {
266+
.dsa-content {
267+
flex-direction: column;
268+
}
269+
}
270+
.dropdown-content a:hover {
271+
text-decoration: none;
272+
background: linear-gradient(
273+
90deg,
274+
transparent 0%,
275+
rgba(252, 176, 69, 0.285) 50%,
276+
rgba(253, 29, 29, 0.33) 100%
277+
);
278+
border-radius: 50% 40%;
274279
}
275280

276-
/* .dropdown_grid .dropdown-content::before {
277-
content: "";
278-
position: absolute;
279-
left: 1px;
280-
top: 10%;
281-
height: 80%;
282-
border: 1px solid #cccccc60;
283-
} */
284281

285282
.nav__icons img {
286283
width: 35px;

0 commit comments

Comments
 (0)