-
Notifications
You must be signed in to change notification settings - Fork 32
Add Dark/Light Mode Toggle to Writers Program site #43
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
Open
AmanKashyap0807
wants to merge
7
commits into
keploy:main
Choose a base branch
from
AmanKashyap0807:feature/dark-light-mode
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
03d25b7
postcss build completed
AmanKashyap0807 fac4b84
dark mode implemented (now need to fix some more things)
AmanKashyap0807 7587934
transparent bunny added and some minor fixes
AmanKashyap0807 aa8c515
footer 2 section corrected, copyright section left
AmanKashyap0807 ef29143
footer is compatible with dark theme
AmanKashyap0807 97cc339
tailwind corrected for footer
AmanKashyap0807 ddaeb75
resolved issues recommended by copilot agent during pull request
AmanKashyap0807 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,112 @@ | ||
| @tailwind base; | ||
| @tailwind components; | ||
| @tailwind utilities; | ||
|
|
||
| /* Dark mode overrides - scoped to body and specific elements */ | ||
| .dark body { | ||
| background-color: #0b1220 !important; | ||
| color: #e5e7eb !important; | ||
| } | ||
|
|
||
| /* Dark mode for sections and major containers */ | ||
| .dark .s-home, | ||
| .dark .s-about, | ||
| .dark .s-services, | ||
| .dark .s-contact { | ||
| background-color: #0b1220 !important; | ||
| color: #e5e7eb !important; | ||
| } | ||
|
|
||
| .dark .s-header { | ||
| background-color: rgba(11, 18, 32, 0.95) !important; | ||
| } | ||
|
|
||
| /* Override inline dark text colors for readability in dark mode */ | ||
| .dark [style*="color: #00163D"], | ||
| .dark [style*="color:#00163D"], | ||
| .dark [style*="color: #121212"], | ||
| .dark [style*="color:#121212"], | ||
| .dark [style*="color: #000000"], | ||
| .dark [style*="color:#000000"] { | ||
| color: #e5e7eb !important; | ||
| } | ||
|
|
||
| /* Headings in dark mode */ | ||
| .dark h1, | ||
| .dark h2, | ||
| .dark h3, | ||
| .dark h4, | ||
| .dark h5, | ||
| .dark h6 { | ||
| color: #e5e7eb !important; | ||
| } | ||
|
|
||
| /* Paragraphs without specific classes */ | ||
| .dark p { | ||
| color: #d1d5db !important; | ||
| } | ||
|
|
||
| /* Make sure links are visible in dark mode */ | ||
| .dark a:not(.btn) { | ||
| color: #93c5fd !important; | ||
| } | ||
|
|
||
| .dark a:not(.btn):hover { | ||
| color: #bfdbfe !important; | ||
| } | ||
|
|
||
| /* Buttons in dark mode */ | ||
| .dark .btn--stroke { | ||
| background: transparent !important; | ||
| border-color: #e5e7eb !important; | ||
| color: #e5e7eb !important; | ||
| } | ||
|
|
||
| .dark .btn--stroke:hover { | ||
| background-color: #e5e7eb !important; | ||
| color: #0b1220 !important; | ||
| } | ||
|
|
||
| /* Keep hero overlay adjusted for dark mode */ | ||
| .dark .overlay { | ||
| background: rgba(0, 0, 0, 0.85) !important; | ||
| } | ||
|
|
||
| /* Footer in dark mode */ | ||
| .dark .footer_area { | ||
| background-color: #050a14 !important; | ||
| color: #e5e7eb !important; | ||
| } | ||
|
|
||
| /* Custom footer tweaks (kept here so they survive Tailwind builds) | ||
| - Structure, newsletter styling, horizontal social icons */ | ||
| @layer components { | ||
| .footer_area .f_widget.ab_widget .f_title h3 { margin: 0 0 0.25rem 0; font-size: 2rem; } | ||
| .footer_area .f_widget.ab_widget p { margin: 0; color: rgba(255,255,255,0.8); font-size: 1.2rem; } | ||
|
|
||
| .footer_area .news_widget .input-group { position: relative; display: block; max-width: 28rem; width: 100%; margin: 0 auto; } | ||
| .footer_area .news_widget .input-group input[type="email"] { | ||
| width: 100%; min-height: 42px; padding: 0.8rem 1.2rem; padding-right: 4.2rem; border-radius: 9999px; border: 1px solid rgba(0,22,61,0.20); | ||
| background: rgba(0,22,61,0.06); color: #00163D; font-size: 1.4rem; | ||
| } | ||
| .footer_area .news_widget .input-group input[type="email"]::placeholder { color: rgba(0,22,61,0.55); } | ||
| .footer_area .news_widget .input-group .submit-btn { | ||
| width: 44px; height: 44px; padding: 0; border-radius: 9999px; border: none; background: #ff904d; color: #00163D; | ||
| display: inline-flex; align-items: center; justify-content: center; position: absolute; top: 50%; right: 0.6rem; transform: translateY(-50%); | ||
| } | ||
| .footer_area .news_widget .input-group .submit-btn i, | ||
| .footer_area .news_widget .input-group .submit-btn span { color: inherit; font-size: 1.4rem; } | ||
|
|
||
| .footer_area .social_widget .list { display: flex; gap: 0.8rem; padding: 0; margin: 0; align-items: center; } | ||
| .footer_area .social_widget .list li { display: inline-block; margin: 0; } | ||
| .footer_area .social_widget .list li a { color: inherit; font-size: 1.6rem; display: inline-flex; align-items: center; justify-content: center; } | ||
|
|
||
| .dark .footer_area .news_widget .input-group input[type="email"] { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.18); color: #e5e7eb; } | ||
| .dark .footer_area .news_widget .input-group input[type="email"]::placeholder { color: rgba(229,231,235,0.6); } | ||
| .dark .footer_area .news_widget .input-group .submit-btn { background: #ff904d; color: #00163D; } | ||
|
|
||
| @media (max-width: 420px) { | ||
| .footer_area .news_widget .input-group { display: flex !important; flex-direction: column; align-items: stretch; gap: 0.6rem; max-width: 100%; } | ||
| .footer_area .news_widget .input-group .submit-btn { position: static; transform: none; width: 100%; height: 44px; } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,247 @@ | ||
| .container { | ||
| width: 100%; | ||
| } | ||
| @media (min-width: 640px) { | ||
| .container { | ||
| max-width: 640px; | ||
| } | ||
| } | ||
| @media (min-width: 768px) { | ||
| .container { | ||
| max-width: 768px; | ||
| } | ||
| } | ||
| @media (min-width: 1024px) { | ||
| .container { | ||
| max-width: 1024px; | ||
| } | ||
| } | ||
| @media (min-width: 1280px) { | ||
| .container { | ||
| max-width: 1280px; | ||
| } | ||
| } | ||
| @media (min-width: 1536px) { | ||
| .container { | ||
| max-width: 1536px; | ||
| } | ||
| } | ||
| .sr-only { | ||
| position: absolute; | ||
| width: 1px; | ||
| height: 1px; | ||
| padding: 0; | ||
| margin: -1px; | ||
| overflow: hidden; | ||
| clip: rect(0, 0, 0, 0); | ||
| white-space: nowrap; | ||
| border-width: 0; | ||
| } | ||
| .visible { | ||
| visibility: visible; | ||
| } | ||
| .static { | ||
| position: static; | ||
| } | ||
| .fixed { | ||
| position: fixed; | ||
| } | ||
| .absolute { | ||
| position: absolute; | ||
| } | ||
| .relative { | ||
| position: relative; | ||
| } | ||
| .sticky { | ||
| position: sticky; | ||
| } | ||
| .m-1 { | ||
| margin: 0.25rem; | ||
| } | ||
| .mt-10 { | ||
| margin-top: 2.5rem; | ||
| } | ||
| .block { | ||
| display: block; | ||
| } | ||
| .inline-block { | ||
| display: inline-block; | ||
| } | ||
| .inline { | ||
| display: inline; | ||
| } | ||
| .flex { | ||
| display: flex; | ||
| } | ||
| .inline-flex { | ||
| display: inline-flex; | ||
| } | ||
| .table { | ||
| display: table; | ||
| } | ||
| .grid { | ||
| display: grid; | ||
| } | ||
| .contents { | ||
| display: contents; | ||
| } | ||
| .hidden { | ||
| display: none; | ||
| } | ||
| .h-1 { | ||
| height: 0.25rem; | ||
| } | ||
| .flex-shrink { | ||
| flex-shrink: 1; | ||
| } | ||
| .transform { | ||
| transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y)); | ||
| } | ||
| .resize { | ||
| resize: both; | ||
| } | ||
| .flex-row { | ||
| flex-direction: row; | ||
| } | ||
| .flex-wrap { | ||
| flex-wrap: wrap; | ||
| } | ||
| .items-center { | ||
| align-items: center; | ||
| } | ||
| .gap-2 { | ||
| gap: 0.5rem; | ||
| } | ||
| .rounded { | ||
| border-radius: 0.25rem; | ||
| } | ||
| .border { | ||
| border-width: 1px; | ||
| } | ||
| .border-transparent { | ||
| border-color: transparent; | ||
| } | ||
| .bg-transparent { | ||
| background-color: transparent; | ||
| } | ||
| .px-3 { | ||
| padding-left: 0.75rem; | ||
| padding-right: 0.75rem; | ||
| } | ||
| .py-2 { | ||
| padding-top: 0.5rem; | ||
| padding-bottom: 0.5rem; | ||
| } | ||
| .text-center { | ||
| text-align: center; | ||
| } | ||
| .text-slate-700 { | ||
| --tw-text-opacity: 1; | ||
| color: rgb(51 65 85 / var(--tw-text-opacity, 1)); | ||
| } | ||
| .blur { | ||
| --tw-blur: blur(8px); | ||
| filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); | ||
| } | ||
| .filter { | ||
| filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow); | ||
| } | ||
| .transition { | ||
| transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; | ||
| transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); | ||
| transition-duration: 150ms; | ||
| } | ||
|
|
||
| /* Dark mode overrides - scoped to body and specific elements */ | ||
| .dark body { | ||
| background-color: #0b1220 !important; | ||
| color: #e5e7eb !important; | ||
| } | ||
|
|
||
| /* Dark mode for sections and major containers */ | ||
| .dark .s-home, | ||
| .dark .s-about, | ||
| .dark .s-services, | ||
| .dark .s-contact { | ||
| background-color: #0b1220 !important; | ||
| color: #e5e7eb !important; | ||
| } | ||
|
|
||
| .dark .s-header { | ||
| background-color: rgba(11, 18, 32, 0.95) !important; | ||
| } | ||
|
|
||
| /* Override inline dark text colors for readability in dark mode */ | ||
| .dark [style*="color: #00163D"], | ||
| .dark [style*="color:#00163D"], | ||
| .dark [style*="color: #121212"], | ||
| .dark [style*="color:#121212"], | ||
| .dark [style*="color: #000000"], | ||
| .dark [style*="color:#000000"] { | ||
| color: #e5e7eb !important; | ||
| } | ||
|
|
||
| /* Headings in dark mode */ | ||
| .dark h1, | ||
| .dark h2, | ||
| .dark h3, | ||
| .dark h4, | ||
| .dark h5, | ||
| .dark h6 { | ||
| color: #e5e7eb !important; | ||
| } | ||
|
|
||
| /* Paragraphs without specific classes */ | ||
| .dark p { | ||
| color: #d1d5db !important; | ||
| } | ||
|
|
||
| /* Make sure links are visible in dark mode */ | ||
| .dark a:not(.btn) { | ||
| color: #93c5fd !important; | ||
| } | ||
|
|
||
| .dark a:not(.btn):hover { | ||
| color: #bfdbfe !important; | ||
| } | ||
|
|
||
| /* Buttons in dark mode */ | ||
| .dark .btn--stroke { | ||
| background: transparent !important; | ||
| border-color: #e5e7eb !important; | ||
| color: #e5e7eb !important; | ||
| } | ||
|
|
||
| .dark .btn--stroke:hover { | ||
| background-color: #e5e7eb !important; | ||
| color: #0b1220 !important; | ||
| } | ||
|
|
||
| /* Keep hero overlay adjusted for dark mode */ | ||
| .dark .overlay { | ||
| background: rgba(0, 0, 0, 0.85) !important; | ||
| } | ||
|
|
||
| /* Footer in dark mode */ | ||
| .dark .footer_area { | ||
| background-color: #050a14 !important; | ||
| color: #e5e7eb !important; | ||
| } | ||
| .hover\:border-slate-300:hover { | ||
| --tw-border-opacity: 1; | ||
| border-color: rgb(203 213 225 / var(--tw-border-opacity, 1)); | ||
| } | ||
| .dark\:inline:is(.dark *) { | ||
| display: inline; | ||
| } | ||
| .dark\:hidden:is(.dark *) { | ||
| display: none; | ||
| } | ||
| .dark\:text-slate-200:is(.dark *) { | ||
| --tw-text-opacity: 1; | ||
| color: rgb(226 232 240 / var(--tw-text-opacity, 1)); | ||
| } | ||
| .dark\:hover\:border-slate-600:hover:is(.dark *) { | ||
| --tw-border-opacity: 1; | ||
| border-color: rgb(71 85 105 / var(--tw-border-opacity, 1)); | ||
| } |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing
@tailwind base;directive. Tailwind CSS typically requires all three directives (base, components, utilities) for proper functionality. Without the base layer, CSS resets and default styles won't be applied, which may lead to inconsistent styling across browsers.