Skip to content

Commit

Permalink
website fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mguptahub committed Oct 28, 2024
1 parent 69af1e9 commit 1a6e227
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 11 deletions.
4 changes: 2 additions & 2 deletions docs/assets/css/mobile.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
}

.main-logo {
width: 140px; /* Slightly smaller logo */
width: 12rem;
margin-bottom: 1.5rem;
}

Expand Down Expand Up @@ -147,7 +147,7 @@
}

.main-logo {
width: 120px;
width: 8rem;
margin-bottom: 1rem;
}

Expand Down
10 changes: 9 additions & 1 deletion docs/assets/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ body {
.main-logo {
position: relative;
z-index: 1;
width: 180px;
width: 20rem;
height: auto;
margin-bottom: 2rem;
animation: float 6s ease-in-out infinite;
Expand Down Expand Up @@ -467,3 +467,11 @@ h2 {
color: var(--primary-color);
}


@media (prefers-reduced-motion: reduce) {
[data-aos] {
transition: none !important;
transform: none !important;
animation: none !important;
}
}
10 changes: 8 additions & 2 deletions docs/assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ function initModalFunctionality() {
// Close modal on escape key
document.addEventListener('keydown', (e) => {
if (e.key === 'Escape' && modalOverlay.style.display === 'flex') {
closeModal();
window.closeModal();
}
});

// Close modal when clicking outside
modalOverlay.addEventListener('click', (e) => {
if (e.target === modalOverlay) {
closeModal();
window.closeModal();
}
});
}
Expand Down Expand Up @@ -172,6 +172,12 @@ function initCodeCopy() {
setTimeout(() => {
copyButton.innerHTML = '<i class="fas fa-copy"></i>';
}, 2000);
}).catch((err) => {
console.error('Failed to copy text: ', err);
copyButton.innerHTML = '<i class="fas fa-exclamation-triangle"></i>';
setTimeout(() => {
copyButton.innerHTML = '<i class="fas fa-copy"></i>';
}, 2000);
});
});

Expand Down
10 changes: 6 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@
title="GitHub">
<i class="fab fa-github"></i>
</a>
<button id="themeToggle"
class="theme-toggle"
title="Toggle theme">
<i class="fas fa-moon"></i>
<button id="themeToggle"
class="theme-toggle"
title="Toggle theme"
aria-label="Toggle dark mode"
aria-pressed="false">
<i class="fas fa-moon" aria-hidden="true"></i>
</button>
</div>
</div>
Expand Down
11 changes: 9 additions & 2 deletions pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,18 @@ type RelayConfig struct {
}

func init() {
if err := godotenv.Load(); err != nil {
envFile := os.Getenv("ENV_FILE")
if envFile == "" {
envFile = ".env"
}

if err := godotenv.Load(envFile); err != nil {
// Only log if file exists but couldn't be loaded
if !os.IsNotExist(err) {
log.Printf("Error loading .env file: %v", err)
log.Printf("Error loading env file %s: %v", envFile, err)
}
} else {
log.Printf("Successfully loaded env file: %s", envFile)
}
}

Expand Down

0 comments on commit 1a6e227

Please sign in to comment.