-
-
Notifications
You must be signed in to change notification settings - Fork 75
Refactor authentication pages: replaced Bootstrap with Tailwind CSS #99
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
farhannadim311
wants to merge
3
commits into
pyladies:main
Choose a base branch
from
farhannadim311:styling-auth-pages
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
3 commits
Select commit
Hold shift + click to select a range
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
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,285 @@ | ||
| /* Custom Fonts */ | ||
| @import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); | ||
| @import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap'); | ||
|
|
||
| :root { | ||
| --pyladies-purple: #2D1B2D; | ||
| --pyladies-pink: #FF3366; | ||
| --pyladies-pink-light: #FF6B93; | ||
| --dark-text: #1a0f1a; | ||
| --light-bg: #fff5f7; | ||
| --light-bg-gradient: linear-gradient(135deg, #fff5f7 0%, #ffe0e9 100%); | ||
| } | ||
|
|
||
| /* Common Styles */ | ||
| .retro-title { | ||
| font-family: 'Press Start 2P', cursive !important; | ||
| text-align: center; | ||
| font-size: 2.5rem !important; | ||
| margin-bottom: 2rem; | ||
| color: var(--pyladies-pink) !important; | ||
| text-shadow: 0 0 15px rgba(255, 51, 102, 0.6) !important; | ||
| letter-spacing: 2px; | ||
| line-height: 1.4 !important; | ||
| } | ||
|
|
||
| .tech-font { | ||
| font-family: 'Share Tech Mono', monospace !important; | ||
| font-size: 1rem !important; | ||
| letter-spacing: 0.5px; | ||
| } | ||
|
|
||
| /* Auth Container */ | ||
| .auth-container { | ||
| max-width: 400px; | ||
| margin: 2rem auto; | ||
| padding: 2.5rem !important; | ||
| border-radius: 12px !important; | ||
| transition: all 0.3s ease; | ||
| } | ||
|
|
||
| /* Dark mode styles */ | ||
| .dark-mode .auth-container { | ||
| background: rgba(0, 0, 0, 0.5) !important; | ||
| backdrop-filter: blur(15px) !important; | ||
| border: 2px solid rgba(255, 51, 102, 0.3) !important; | ||
| box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important; | ||
| } | ||
|
|
||
| .dark-mode .tech-font { | ||
| color: rgba(255, 255, 255, 0.8) !important; | ||
| } | ||
|
|
||
| .dark-mode .form-label { | ||
| color: rgba(255, 255, 255, 0.9) !important; | ||
| } | ||
|
|
||
| .dark-mode .form-input { | ||
| background: rgba(0, 0, 0, 0.4) !important; | ||
| border: 2px solid rgba(255, 51, 102, 0.3) !important; | ||
| color: white !important; | ||
| } | ||
|
|
||
| .dark-mode .form-input::placeholder { | ||
| color: rgba(255, 255, 255, 0.4) !important; | ||
| } | ||
|
|
||
| /* Light mode styles */ | ||
| .light-mode .auth-container { | ||
| background: rgba(255, 255, 255, 0.95) !important; | ||
| backdrop-filter: blur(15px) !important; | ||
| border: 2px solid rgba(255, 51, 102, 0.2) !important; | ||
| box-shadow: 0 8px 32px rgba(255, 51, 102, 0.15) !important; | ||
| } | ||
|
|
||
| .light-mode .tech-font { | ||
| color: var(--dark-text) !important; | ||
| } | ||
|
|
||
| .light-mode .form-label { | ||
| color: var(--dark-text) !important; | ||
| } | ||
|
|
||
| .light-mode .form-input { | ||
| background: rgba(255, 255, 255, 0.95) !important; | ||
| border: 2px solid rgba(255, 51, 102, 0.3) !important; | ||
| color: var(--dark-text) !important; | ||
| } | ||
|
|
||
| .light-mode .form-input::placeholder { | ||
| color: rgba(45, 27, 45, 0.5) !important; | ||
| } | ||
|
|
||
| /* Form Styles */ | ||
| .form-group { | ||
| margin-bottom: 1.5rem !important; | ||
| text-align: left; | ||
| } | ||
|
|
||
| .form-label { | ||
| display: block; | ||
| margin-bottom: 0.75rem !important; | ||
| font-family: 'Share Tech Mono', monospace !important; | ||
| font-size: 1rem !important; | ||
| letter-spacing: 0.5px; | ||
| font-weight: 500 !important; | ||
| } | ||
|
|
||
| .form-input { | ||
| width: 100%; | ||
| padding: 1rem !important; | ||
| border-radius: 8px !important; | ||
| font-family: 'Share Tech Mono', monospace !important; | ||
| font-size: 1rem !important; | ||
| letter-spacing: 1px; | ||
| transition: all 0.3s ease; | ||
| } | ||
|
|
||
| .form-input:focus { | ||
| outline: none !important; | ||
| border-color: var(--pyladies-pink) !important; | ||
| box-shadow: 0 0 15px rgba(255, 51, 102, 0.3) !important; | ||
| } | ||
|
|
||
| /* Button Styles */ | ||
| .auth-button { | ||
| width: 100%; | ||
| padding: 1rem !important; | ||
| background: var(--pyladies-pink) !important; | ||
| color: white !important; | ||
| border: none; | ||
| border-radius: 8px !important; | ||
| font-family: 'Press Start 2P', cursive !important; | ||
| font-size: 1rem !important; | ||
| cursor: pointer; | ||
| margin-top: 1.5rem !important; | ||
| transition: all 0.3s ease; | ||
| text-transform: uppercase; | ||
| letter-spacing: 2px !important; | ||
| box-shadow: 0 4px 15px rgba(255, 51, 102, 0.3) !important; | ||
| } | ||
|
|
||
| .auth-button:hover { | ||
| background: var(--pyladies-pink-light) !important; | ||
| transform: translateY(-2px); | ||
| box-shadow: 0 6px 20px rgba(255, 51, 102, 0.4) !important; | ||
| } | ||
|
|
||
| /* Links */ | ||
| .auth-link { | ||
| color: var(--pyladies-pink) !important; | ||
| text-decoration: none !important; | ||
| font-family: 'Share Tech Mono', monospace !important; | ||
| transition: all 0.3s ease; | ||
| font-weight: 600 !important; | ||
| } | ||
|
|
||
| .auth-link:hover { | ||
| color: var(--pyladies-pink-light) !important; | ||
| text-decoration: none !important; | ||
| text-shadow: 0 0 10px rgba(255, 51, 102, 0.5); | ||
| } | ||
|
|
||
| /* Remember Checkbox */ | ||
| .remember-checkbox { | ||
| margin-right: 0.75rem !important; | ||
| transform: scale(1.2); | ||
| } | ||
|
|
||
| /* Error List */ | ||
| .errorlist { | ||
| color: var(--pyladies-pink) !important; | ||
| margin: 0.5rem 0 !important; | ||
| padding: 0; | ||
| list-style: none; | ||
| font-size: 0.9rem !important; | ||
| font-family: 'Share Tech Mono', monospace !important; | ||
| } | ||
|
|
||
| /* Password Requirements */ | ||
| .password-requirements { | ||
| font-family: 'Share Tech Mono', monospace !important; | ||
| font-size: 0.85rem !important; | ||
| margin-top: 0.5rem !important; | ||
| color: inherit !important; | ||
| opacity: 0.8; | ||
| } | ||
|
|
||
| /* Text Utilities */ | ||
| .text-center { text-align: center !important; } | ||
| .mt-4 { margin-top: 1rem !important; } | ||
| .mt-2 { margin-top: 0.5rem !important; } | ||
| .mb-4 { margin-bottom: 1rem !important; } | ||
| .mb-8 { margin-bottom: 2rem !important; } | ||
| .space-y-2 > * + * { margin-top: 0.5rem !important; } | ||
| .space-y-6 > * + * { margin-top: 1.5rem !important; } | ||
|
|
||
| /* Social account section */ | ||
| .socialaccount_ballot { | ||
| margin: 1.5rem 0; | ||
| padding: 1rem; | ||
| border: 1px solid var(--pyladies-pink); | ||
| border-radius: 6px; | ||
| background: rgba(255, 51, 102, 0.1); | ||
| } | ||
|
|
||
| .socialaccount_providers { | ||
| list-style: none; | ||
| padding: 0; | ||
| margin: 0; | ||
| } | ||
|
|
||
| .login-or { | ||
| text-align: center; | ||
| margin: 1rem 0; | ||
| color: rgba(255, 255, 255, 0.7); | ||
| position: relative; | ||
| } | ||
|
|
||
| .login-or::before, | ||
| .login-or::after { | ||
| content: ''; | ||
| position: absolute; | ||
| top: 50%; | ||
| width: 45%; | ||
| height: 1px; | ||
| background: var(--pyladies-pink); | ||
| } | ||
|
|
||
| .login-or::before { | ||
| left: 0; | ||
| } | ||
|
|
||
| .login-or::after { | ||
| right: 0; | ||
| } | ||
|
|
||
| /* Theme Toggle */ | ||
| .theme-toggle { | ||
| position: fixed; | ||
| top: 1rem; | ||
| right: 1rem; | ||
| padding: 0.7rem 1.2rem; | ||
| border-radius: 8px; | ||
| background-color: var(--pyladies-pink); | ||
| color: white; | ||
| border: none; | ||
| cursor: pointer; | ||
| font-family: 'Share Tech Mono', monospace; | ||
| z-index: 1000; | ||
| box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); | ||
| transition: all 0.2s ease; | ||
| text-transform: uppercase; | ||
| font-weight: bold; | ||
| font-size: 0.85rem; | ||
| display: flex; | ||
| align-items: center; | ||
| gap: 8px; | ||
| } | ||
|
|
||
| .theme-toggle:hover { | ||
| background-color: var(--pyladies-pink-light); | ||
| transform: translateY(-2px); | ||
| box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2); | ||
| } | ||
|
|
||
| .theme-toggle i { | ||
| font-size: 1rem; | ||
| } | ||
|
|
||
| /* Autofill styling */ | ||
| input:-webkit-autofill, | ||
| input:-webkit-autofill:hover, | ||
| input:-webkit-autofill:focus { | ||
| -webkit-text-fill-color: white !important; | ||
| -webkit-box-shadow: 0 0 0 30px rgba(26, 15, 26, 0.8) inset !important; | ||
| transition: background-color 5000s ease-in-out 0s; | ||
| } | ||
|
|
||
| /* Development Notice */ | ||
| .dev-notice { | ||
| font-family: 'Share Tech Mono', monospace; | ||
| color: rgba(255, 255, 255, 0.7); | ||
| font-size: 0.9rem; | ||
| margin-bottom: 2rem; | ||
| } |
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,89 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <title>{% block head_title %}{% endblock %} | PyLadiesCon</title> | ||
| <!-- Tailwind CSS via CDN --> | ||
| <script src="https://cdn.tailwindcss.com"></script> | ||
| <script> | ||
| tailwind.config = { | ||
| theme: { | ||
| extend: { | ||
| colors: { | ||
| 'pyladies-pink': '#FF3E72', | ||
| 'pyladies-purple': '#2D1B2D' | ||
| } | ||
| } | ||
| } | ||
| } | ||
| </script> | ||
| <!-- Custom Fonts --> | ||
| <link href="https://fonts.googleapis.com/css2?family=Press+Start+2P&family=Share+Tech+Mono&display=swap" rel="stylesheet"> | ||
| {% block extra_head %}{% endblock %} | ||
| </head> | ||
| <body class="min-h-screen light-mode"> | ||
| <div class="fixed top-0 right-0 m-4 z-50"> | ||
| <button id="mode-toggle" class="p-2 rounded-full bg-gray-200 dark:bg-gray-700"> | ||
| <svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 text-gray-800 dark:text-gray-200" fill="none" viewBox="0 0 24 24" stroke="currentColor"> | ||
| <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z" /> | ||
| </svg> | ||
| </button> | ||
| </div> | ||
|
|
||
| {% if messages %} | ||
| <div class="fixed top-4 right-4 z-40"> | ||
| {% for message in messages %} | ||
| <div class="bg-opacity-90 px-6 py-4 rounded-lg shadow-lg mb-4 tech-font | ||
| dark:bg-gray-800 dark:text-white | ||
| light:bg-white light:text-gray-800"> | ||
| {{ message }} | ||
| </div> | ||
| {% endfor %} | ||
| </div> | ||
| {% endif %} | ||
|
|
||
| <main class="container mx-auto px-4"> | ||
| {% block content %}{% endblock %} | ||
| </main> | ||
|
|
||
| <script> | ||
| // Dark/Light mode toggle | ||
| const modeToggle = document.getElementById('mode-toggle'); | ||
| const body = document.body; | ||
|
|
||
| // Check for saved theme preference or use the default (light-mode) | ||
| const savedTheme = localStorage.getItem('theme') || 'light-mode'; | ||
| body.classList.add(savedTheme); | ||
|
|
||
| // Update the toggle button icon based on current theme | ||
| updateToggleIcon(); | ||
|
|
||
| modeToggle.addEventListener('click', () => { | ||
| if (body.classList.contains('light-mode')) { | ||
| body.classList.remove('light-mode'); | ||
| body.classList.add('dark-mode'); | ||
| localStorage.setItem('theme', 'dark-mode'); | ||
| } else { | ||
| body.classList.remove('dark-mode'); | ||
| body.classList.add('light-mode'); | ||
| localStorage.setItem('theme', 'light-mode'); | ||
| } | ||
| updateToggleIcon(); | ||
| }); | ||
|
|
||
| function updateToggleIcon() { | ||
| const icon = modeToggle.querySelector('svg'); | ||
| if (body.classList.contains('dark-mode')) { | ||
| // Show sun icon for dark mode | ||
| icon.innerHTML = '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z" />'; | ||
| } else { | ||
| // Show moon icon for light mode | ||
| icon.innerHTML = '<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z" />'; | ||
| } | ||
| } | ||
| </script> | ||
|
|
||
| {% block extra_body %}{% endblock %} | ||
| </body> | ||
| </html> | ||
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.
Great start. Is this something that can be stored in a separate css file?