Skip to content

Commit

Permalink
Merge branch 'main' into gane
Browse files Browse the repository at this point in the history
  • Loading branch information
swaraj-das authored Oct 13, 2024
2 parents c3d41fd + 220494c commit bb7707a
Show file tree
Hide file tree
Showing 11 changed files with 300 additions and 73 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/auto-assign-action.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: Assign to Author
#name: Assign to Author

on:
issues:
types: [opened]
#on:
#issues:
#types: [opened]

jobs:
auto-assign:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: 'Auto-assign issue creator'
uses: pozil/auto-assign-issue@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }} # Required token for authentication
assignees: ${{ github.event.issue.user.login }} # Auto-assign the issue creator
#jobs:
#auto-assign:
#runs-on: ubuntu-latest
#permissions:
#issues: write
#steps:
#- name: 'Auto-assign issue creator'
#uses: pozil/auto-assign-issue@v2
#with:
#repo-token: ${{ secrets.GITHUB_TOKEN }} # Required token for authentication
#assignees: ${{ github.event.issue.user.login }} # Auto-assign the issue creator
21 changes: 21 additions & 0 deletions .github/workflows/auto-comment-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Auto Comment on Issue
on:
issues:
types: [opened]
permissions:
issues: write
jobs:
comment:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Add Comment to Issue
run: |
COMMENT=$(cat <<EOF
{
"body": "Thank you for creating this issue! 🎉 We'll look into it as soon as possible. In the meantime, please make sure to provide all the necessary details and context. If you have any questions or additional information, feel free to add them here. Your contributions are highly appreciated! 😊\n\nYou can also check our [CONTRIBUTING.md](https://github.com/sujaltangde/JobLane/blob/main/CONTRIBUTING.md) for guidelines on contributing to this project."
"body": "Thank you for creating this issue! 🎉 We'll look into it as soon as possible. In the meantime, please make sure to provide all the necessary details and context. If you have any questions or additional information, feel free to add them here. Your contributions are highly appreciated! 😊\n\nYou can also check our [CONTRIBUTING.md](https://github.com/recodehive/Scrape-ML/blob/main/CONTRIBUTING.md) for guidelines on contributing to this project."
}
EOF
)
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"liveServer.settings.port": 5502
"liveServer.settings.port": 5503
}
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Step 1: Use an official Nginx image from Docker Hub
FROM nginx:alpine

# Step 2: Copy your local files (frontend) to the Nginx html folder
COPY . /usr/share/nginx/html

# Step 3: Start Nginx server
CMD ["nginx", "-g", "daemon off;"]
18 changes: 18 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Step 1: Use an official Node.js image from Docker Hub
FROM node:14-alpine

# Step 2: Set working directory in container
WORKDIR /usr/src/app

# Step 3: Copy package.json and install dependencies
COPY backend/package*.json ./
RUN npm install

# Step 4: Copy the backend code to the container
COPY backend/ .

# Step 5: Expose the backend's port (if your backend runs on port 3000, adjust as needed)
EXPOSE 3000

# Step 6: Start the backend server
CMD ["npm", "start"]
41 changes: 41 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
services:
frontend:
build:
context: .
dockerfile: Dockerfile
ports:
- "80:80"
depends_on:
- backend
networks:
- app-network

backend:
build:
context: .
dockerfile: backend/Dockerfile
ports:
- "3000:3000"
networks:
- app-network
environment:
- NODE_ENV=production
- MONGODB_URI=mongodb://mongo:27017/mydatabase
depends_on:
- mongo

mongo:
image: mongo:latest
ports:
- "27017:27017"
volumes:
- mongo_data:/data/db
networks:
- app-network

networks:
app-network:
driver: bridge

volumes:
mongo_data:
19 changes: 14 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -368,30 +368,34 @@ <h1 class="faq-title" data-aos="fade-right">Frequently Asked Questions</h1>
<div class="faq">
<input type="checkbox" id="faq1" >
<label for="faq1" class="faq-question" data-aos="fade-right">1. Does your website consist of all types of gaming tools?</label>
<input type="checkbox" id="faq1">
<label for="faq1" class="faq-question">1. Does your website consist of all types of gaming tools? <span class="arrow"></span></label>
<div class="faq-answer">
We have tried our best to make all the tools available for enthusiastic gamers.
</div>
</div>

<div class="faq" data-aos="fade-right">
<input type="checkbox" id="faq2" >
<label for="faq2" class="faq-question">2. If I'm having some purchased-product related issues, can the product be replaced as per my need?</label>
<div class="faq">
<input type="checkbox" id="faq2">
<label for="faq2" class="faq-question">2. If I'm having some purchased-product related issues, can the product be replaced as per my need? <span class="arrow"></span></label>
<div class="faq-answer">
By considering our terms and conditions, further actions will be taken.
</div>
</div>

<div class="faq" data-aos="fade-right">
<input type="checkbox" id="faq3">
<label for="faq3" class="faq-question">3. Can I buy multiple products at once?</label>
<label for="faq3" class="faq-question">3. Can I buy multiple products at once? <span class="arrow"></span></label>
<div class="faq-answer">
Yes, you are welcomed to buy multiple products at one time.
</div>
</div>

<div class="faq" data-aos="fade-right">
<input type="checkbox" id="faq4">
<label for="faq4" class="faq-question">4. Do you have any free courier services or is it paid?</label>
<label for="faq4" class="faq-question">4. Do you have any free courier services or is it paid? <span class="arrow"></span></label>
<div class="faq-answer">
Currently that option is unavailable. Sorry for the inconvenience.
</div>
Expand Down Expand Up @@ -533,9 +537,14 @@ <h2>Contact Us</h2>


<!-- Scroll to Top Button -->
<div class="scroll-top" onclick="scrollToTop()">
<button id="scrollToTopBtn" class="scroll-top" aria-label="Scroll to top">
<div class="scroll-top-icon">
<ion-icon name="arrow-up-outline"></ion-icon>
</div>
</div>
<svg class="progress-ring" width="60" height="60">
<circle class="progress-ring__circle" stroke="#ffffff" stroke-width="4" fill="transparent" r="28" cx="30" cy="30"></circle>
</svg>
</button>

<!-- this script is for twitter icon starts -->
<script src="https://kit.fontawesome.com/856f4a44d7.js" crossorigin="anonymous"></script>
Expand Down
3 changes: 2 additions & 1 deletion login/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ <h1>Login to Your Account</h1>
<ion-icon name="logo-facebook"></ion-icon>
</a></li>
<li class="social-icon__item"><a class="social-icon__link" href="#">
<ion-icon name="logo-twitter"></ion-icon>
<i class="fa-brands fa-x-twitter"></i>
</a></li>
<li class="social-icon__item"><a class="social-icon__link" href="#">
<ion-icon name="logo-linkedin"></ion-icon>
Expand Down Expand Up @@ -112,4 +112,5 @@ <h1>Login to Your Account</h1>
}
}
</script>
<script src="https://kit.fontawesome.com/856f4a44d7.js" crossorigin="anonymous"></script>
</html>
6 changes: 0 additions & 6 deletions package-lock.json

This file was deleted.

90 changes: 62 additions & 28 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,63 @@ function toggleMenu() {
menuList.style.paddingTop = "0px";
}
}
window.onscroll = function() {
updateProgressBar();
};

function updateProgressBar() {
var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
var scrollHeight =
document.documentElement.scrollHeight -
document.documentElement.clientHeight;
var scrollPercent = (scrollTop / scrollHeight) * 100;

document.getElementById("progressBar").style.width = scrollPercent + "%";
}

document.addEventListener("DOMContentLoaded", () => {
console.log("Website loaded successfully!");
});

// Show or hide the scroll-top button based on scroll position
window.addEventListener("scroll", function () {
const scrollTopButton = document.querySelector(".scroll-top");
window.addEventListener('scroll', function() {
const scrollTopButton = document.querySelector('.scroll-top');
if (window.pageYOffset > 300) {
scrollTopButton.style.display = "block";
scrollTopButton.style.display = 'block';
} else {
scrollTopButton.style.display = "none";
scrollTopButton.style.display = 'none';
}
});

// Smooth scroll to top when the button is clicked
function scrollToTop() {
window.scrollTo({
top: 0,
behavior: "smooth",
});
}
document.addEventListener('DOMContentLoaded', function() {
const scrollToTopBtn = document.getElementById('scrollToTopBtn');
const progressRing = scrollToTopBtn.querySelector('circle');
const rootElement = document.documentElement;

const radius = progressRing.r.baseVal.value;
const circumference = radius * 2 * Math.PI;

progressRing.style.strokeDasharray = `${circumference} ${circumference}`;
progressRing.style.strokeDashoffset = circumference;

function setProgress(percent) {
const offset = circumference - percent / 100 * circumference;
progressRing.style.strokeDashoffset = offset;
}

function handleScroll() {
const scrollTotal = rootElement.scrollHeight - rootElement.clientHeight;
const scrolled = (rootElement.scrollTop / scrollTotal) * 100;

// Show or hide the scroll-to-top button based on scroll position
if (window.pageYOffset > 300) {
scrollToTopBtn.classList.add('show');
} else {
scrollToTopBtn.classList.remove('show');
}

// Update progress circle
requestAnimationFrame(() => {
setProgress(scrolled);
});
}

function scrollToTop() {
rootElement.scrollTo({
top: 0,
behavior: 'smooth'
});
}

scrollToTopBtn.addEventListener('click', scrollToTop);
window.addEventListener('scroll', handleScroll);

// Initial check in case the page is already scrolled on load
handleScroll();
});

function toggleTheme() {
const body = document.body;
Expand Down Expand Up @@ -130,3 +152,15 @@ async function SendEmail(e) {
alert("An error occurred while sending the email.");
}
}

// faq
document.querySelectorAll('.faq input[type="checkbox"]').forEach((checkbox) => {
checkbox.addEventListener('change', function () {
const answer = this.nextElementSibling.nextElementSibling; // FAQ answer div
if (this.checked) {
answer.style.maxHeight = answer.scrollHeight + 'px';
} else {
answer.style.maxHeight = '0px';
}
});
});
Loading

0 comments on commit bb7707a

Please sign in to comment.