Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes:#220 - Jashwanth/multi #276

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ DB_URL="your_mongo_db_url"
SESSION_SECRET="your_session_secret"
CLOUDINARY_CLOUD_NAME="your_cloudinary_cloud_name"
CLOUDINARY_API_KEY="your_cloudinary_api_key"
CLOUDINARY_API_SECRET="your_cloudinary_api_secret"
CLOUDINARY_API_SECRET="your_cloudinary_api_secret"

138 changes: 138 additions & 0 deletions views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,144 @@
document.getElementById("progress-bar").style.width = scrolled + "%";
};
</script>
<script>
const scrollButton = document.getElementById('scrollToTopBtn');
const updatesList = document.getElementById('updatesList');

// Scroll-to-top button logic
window.addEventListener('scroll', () => {
window.pageYOffset > 100
? scrollButton.classList.add('show-btn')
: scrollButton.classList.remove('show-btn');
});

function smoothScrollToTop() {
const scrollY = window.pageYOffset;

if (scrollY > 0) {
window.scrollBy(0, -Math.min(scrollY, 70));
requestAnimationFrame(smoothScrollToTop);
}
}

scrollButton.addEventListener('click', () => {
smoothScrollToTop();
});



</script>
<div class="gtranslate_wrapper"></div>


<script>
document.addEventListener('DOMContentLoaded', () => {
const gtranslateWrapper = document.querySelector('.gtranslate_wrapper');
if (!gtranslateWrapper) {
console.error('GTranslate wrapper not found.');
} else {
console.log('GTranslate wrapper loaded successfully.');
}
});
</script>

<script>
window.gtranslateSettings = {
"default_language": "en",
"detect_browser_language": true,
"wrapper_selector": ".gtranslate_wrapper",
"flag_style": "2d",
"switcher_horizontal_position": "left",
"switcher_vertical_position": "bottom",
"float_switcher_open_direction": "top",
"float_switching_button_width": "200px",
"float_switching_button_height": "40px",
"float_switching_button_radius": "0px",
"float_switching_button_margin": "0 0 10px 10px",
"alt_flags": {"en": "usa", "pt": "brazil"}
}
</script>
<script src="https://cdn.gtranslate.net/widgets/latest/float.js" defer></script>


<!-- Add custom CSS for GTranslate -->
<style>
.gtranslate_wrapper {
position: fixed !important;
left: 10px !important;
bottom: 10px !important;
z-index: 1000;
}
.gt_float_switcher {
font-family: Arial, sans-serif !important;
border: none !important;
box-shadow: 0 4px 12px rgba(212, 147, 29, 0.3) !important;
border-radius: 25px !important;
overflow: hidden !important;
transition: all 0.3s ease !important;
}
.gt_float_switcher:hover {
box-shadow: 0 6px 16px rgba(212, 147, 29, 0.4) !important;
transform: translateY(-2px) !important;
}
.gt_float_switcher .gt_selected {
background: linear-gradient(135deg, #D4931D, #F2B544) !important;
color: white !important;
padding: 12px 20px !important;
font-weight: bold !important;
text-transform: uppercase !important;
letter-spacing: 1px !important;
text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1) !important;
}
.gt_float_switcher .gt_selected a {
color: white !important;
}
.gt_float_switcher .gt_options {
max-height: 300px !important;
overflow-y: auto !important;
scrollbar-width: thin;
scrollbar-color: #D4931D #f0f0f0;
background-color: #ffffff !important;
border-top: 2px solid #F2B544 !important;
}
.gt_float_switcher .gt_options::-webkit-scrollbar {
width: 8px;
}
.gt_float_switcher .gt_options::-webkit-scrollbar-track {
background: #f0f0f0;
}
.gt_float_switcher .gt_options::-webkit-scrollbar-thumb {
background-color: #D4931D;
border-radius: 4px;
}
.gt_float_switcher .gt_options a {
color: #333 !important;
padding: 10px 20px !important;
transition: all 0.2s ease !important;
}
.gt_float_switcher .gt_options a:hover {
background-color: #FFF5E6 !important;
color: #D4931D !important;
}
/* Add an icon to the toggle button */
.gt_float_switcher .gt_selected:before {
content: "\1F310"; /* Unicode for a globe icon */
margin-right: 8px;
}
/* Pulsating effect for the button */
@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.05); }
100% { transform: scale(1); }
}
.gt_float_switcher {
animation: pulse 2s infinite;
}
.gt_float_switcher:hover {
animation: none;
}
</style>


</body>

Expand Down