Skip to content

Commit

Permalink
added extra + updated in mobile view
Browse files Browse the repository at this point in the history
  • Loading branch information
SIDDHU123M committed Nov 21, 2024
1 parent f3bf7b4 commit b758194
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 21 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Overview
## Overview

## Introduction
### Introduction
The repository [**CodehubX**](https://github.com/SIDDHU123M/CodehubX) is a comprehensive resource hub for programmers, developers, and students. It includes a wide range of useful websites and resources, such as streaming platforms, torrents, cracked content, tools, repositories, piracy resources, movie links, and much more. 

#### The repository [**CodehubX**](https://github.com/SIDDHU123M/CodehubX) is a comprehensive resource hub for programmers, developers, and students. It includes a wide range of useful websites and resources, such as streaming platforms, torrents, cracked content, and much more. 

A collection of various useful resources which we can access for free, including streaming platforms, torrents, and cracked content and much more.
A collection of various useful resources which we can access for free, including streaming platforms, torrents, cracked content, tools, repositories, piracy resources, movie links, and much more.

### Tools and Tutorials for All Levels

Expand Down
8 changes: 3 additions & 5 deletions data/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
## Overview

---

### Introduction
The repository [**CodehubX**](https://github.com/SIDDHU123M/CodehubX) is a comprehensive resource hub for programmers, developers, and students. It includes a wide range of useful websites and resources, such as streaming platforms, torrents, cracked content, and much more. 
The repository [**CodehubX**](https://github.com/SIDDHU123M/CodehubX) is a comprehensive resource hub for programmers, developers, and students. It includes a wide range of useful websites and resources, such as streaming platforms, torrents, cracked content, tools, repositories, piracy resources, movie links, and much more. 

A collection of various useful resources which we can access for free, including streaming platforms, torrents, and cracked content and much more.
A collection of various useful resources which we can access for free, including streaming platforms, torrents, cracked content, tools, repositories, piracy resources, movie links, and much more.

### Tools and Tutorials for All Levels
Whether you are a beginner or an experienced programmer, our website has something for everyone. From coding tutorials and helpful tips to powerful development tools, we've got it all. Our comprehensive collection of programming resources includes everything from popular programming languages and frameworks to code editors and project management tools.

### Connecting Programmers and Developers
At CodeHubX, we believe that knowledge sharing is essential for growth, and we strive to provide our users with a platform to share and learn from one another. We have a dedicated community of programmers and developers who regularly contribute to our website, ensuring that we are always up-to-date with the latest trends and tools in the industry.
At CodeHubX, we believe that knowledge sharing is essential for growth, and we strive to provide our users with a platform to share and learn from one another. We have a dedicated community of programmers and developers who regularly contribute to our website, ensuring that we are always up-to-date with the latest trends and tools in the industry.
15 changes: 10 additions & 5 deletions data/github-repos.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@

---

### Data Scraping Tools
* [Web Scraping](https://github.com/scrapy/scrapy) - A popular framework for web scraping written in Python.
* [Pyppeteer](https://github.com/pyppeteer/pyppeteer) - A headless browser automation library based on Puppeteer in Python.
* [BeautifulSoup](https://github.com/wention/BeautifulSoup4) - A library for parsing HTML and XML documents for web scraping.

### Data Scraping Tools (Best and Limited)
* [Scrapy](https://github.com/scrapy/scrapy) - A robust, open-source framework for web scraping in Python, widely adopted for its scalability.
* [BeautifulSoup](https://github.com/wention/BeautifulSoup4) - A Python library for extracting information from HTML and XML documents efficiently.
* [Playwright](https://github.com/microsoft/playwright) - A modern automation library supporting multiple languages and ideal for scraping dynamic websites.
* [Puppeteer](https://github.com/puppeteer/puppeteer) - A Node.js library for controlling headless browsers, widely used for automating and scraping.
* [Cheerio](https://github.com/cheeriojs/cheerio) - A lightweight, server-side HTML parser inspired by jQuery, perfect for scraping static content in Node.js.

### CAPTCHA Bypassing Tools
* [anticaptcha](https://github.com/ad-m/python-anticaptcha) - Integrates Anti-Captcha service into Python projects for solving CAPTCHAs.
* [2Captcha Python](https://github.com/2captcha/2captcha-python) - Official Python SDK to interact with the 2Captcha service for CAPTCHA solving.

### Penetration Testing Tools
* [Hacking Tools](https://github.com/carpedm20/awesome-hacking) - A curated list of hacking tools for various purposes.
Expand Down
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ <h2>Table of Contents</h2>
<span id="menu-button" class="material-symbols-outlined">menu</span>
<h1 id="doc-title">CodeHubx </h1>
</header>
<hr>
<div id="content"></div>
</div>
<div id="right-nav">
Expand Down
25 changes: 21 additions & 4 deletions scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const iconMap = {
Piracy: "warning",
"Free Resources": "volunteer_activism",
"Github Repo's": "folder",
"tools" : "build",
tools: "build",
"Fake Identity": "person",
};

Expand Down Expand Up @@ -69,22 +69,26 @@ async function loadPage(file) {
const markdown = await response.text();
let htmlContent = converter.makeHtml(markdown);
document.getElementById("content").innerHTML = htmlContent;
createRightNav();
if (file !== "data/README.md") {
createRightNav();
}
// Remove or define updatePagination function
// updatePagination();
}

function createRightNav() {
const content = document.getElementById("content");
const headings = content.querySelectorAll("h3");
const firstH2 = content.querySelector("h2");
const navHeading = firstH2 ? firstH2.textContent : "Navigation";
const rightNavContent = Array.from(headings)
.map((heading) => {
const id = heading.textContent.toLowerCase().replace(/\s+/g, "-");
heading.id = id;
return `<a href="#${id}">${heading.textContent}</a>`;
return `<li><a href="#${id}" class="anchorNav">${heading.textContent}</a></li>`;
})
.join("");
document.getElementById("right-nav-content").innerHTML = rightNavContent;
document.getElementById("right-nav-content").innerHTML = `<ul>${rightNavContent}</ul>`;

document.querySelectorAll("#right-nav a").forEach((link) => {
link.addEventListener("click", (e) => {
Expand All @@ -94,6 +98,19 @@ function createRightNav() {
e.target.classList.add("active");
});
});

// Add navigation links after the first line of the content for mobile users
if (window.innerWidth <= 768) {
const mobileNav = `
<nav class="mobile-nav">
<ul>${rightNavContent}</ul>
</nav>`;
if (firstH2) {
firstH2.insertAdjacentHTML("afterend", mobileNav);
} else {
content.insertAdjacentHTML("afterbegin", mobileNav);
}
}
}

function addSidebarEventListeners() {
Expand Down
23 changes: 21 additions & 2 deletions styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ body {
#main-content {
flex: 1;
margin-left: 270px;
margin-right: 220px;
margin-right: 220px;
padding: 30px;
background-color: #fff;
overflow-y: auto;
overflow-y: auto;
}

header h1#doc-title {
Expand Down Expand Up @@ -246,4 +246,23 @@ h1#doc-title {
#right-nav {
display: none;
}
header {
display: flex;
/* justify-content: space-between; */
align-items: center;
padding: 10px 20px;
flex-direction: row;
}
hr {
margin: 5px 0px !important;
}
#doc-title {
/* put in center */
text-align: center;
}
#menu-button {
/* put at start without margin and padding*/
margin-left: 0;
margin-right: 30px;
}
}

0 comments on commit b758194

Please sign in to comment.