Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .github/workflows/launchdarkly-code-refs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
types: [opened, synchronize, reopened]
branches: [main]

permissions:
contents: read
pull-requests: write
issues: write

jobs:
find-feature-flags:
runs-on: ubuntu-latest
Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -207,4 +207,9 @@ marimo/_lsp/
__marimo__/

# Mac stuff
.DS_Store
.DS_Store

# swisseph stuff
swisseph/sepl_18.se1.*
swisseph/semo_18.se1.*
swisseph/seas_18.se1.*
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
10: "10th House (Career/Reputation) 🏆",
11: "11th House (Friends/Hopes) 👥",
12: "12th House (Spirituality/Subconscious) 🔮"
}
}
75 changes: 61 additions & 14 deletions static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -110,24 +110,25 @@ input:focus, select:focus {

button {
font-family: 'Space Mono', monospace;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
background: transparent;
color: #667eea;
padding: 15px 30px;
border: none;
border: 2px solid #667eea;
border-radius: 25px;
font-size: 18px;
font-weight: bold;
cursor: pointer;
width: 100%;
margin-top: 10px;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
box-shadow: none;
}

button:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
background: rgba(102, 126, 234, 0.1);
border-color: #5a67d8;
color: #5a67d8;
}

button:disabled,
Expand All @@ -140,7 +141,7 @@ button.loading {
button:disabled:hover,
button.loading:hover {
transform: none;
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
background: transparent;
}

/* Spinner Animation */
Expand Down Expand Up @@ -386,10 +387,10 @@ button.loading:hover {

.location-search button {
font-family: 'Space Mono', monospace;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
background: transparent;
color: #667eea;
padding: 12px 24px;
border: none;
border: 2px solid #667eea;
border-radius: 25px;
font-size: 16px;
font-weight: bold;
Expand All @@ -398,14 +399,15 @@ button.loading:hover {
width: auto;
min-width: auto;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
box-shadow: none;
margin-top: 0;
}

.location-search button:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
background: rgba(102, 126, 234, 0.1);
border-color: #5a67d8;
color: #5a67d8;
}

.location-search button:disabled {
Expand All @@ -416,7 +418,7 @@ button.loading:hover {

.location-search button:disabled:hover {
transform: none;
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
background: transparent;
}

#locationMap {
Expand Down Expand Up @@ -458,6 +460,51 @@ input[readonly] {
min-width: 180px;
}

/* Main CTA Button - Experiment Variant */
.button-group button.main-cta {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: #ffffff;
font-size: 1.1em;
font-weight: 700;
padding: 18px 32px;
border: 2px solid transparent;
box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
transform: scale(1);
transition: all 0.3s ease;
}

.button-group button.main-cta:hover {
transform: scale(1.05);
box-shadow: 0 12px 28px rgba(102, 126, 234, 0.5);
background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.button-group button.main-cta:active {
transform: scale(0.98);
}

.dark-mode .button-group button.main-cta {
background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
box-shadow: 0 8px 20px rgba(124, 58, 237, 0.4);
}

.dark-mode .button-group button.main-cta:hover {
background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
box-shadow: 0 12px 28px rgba(124, 58, 237, 0.5);
}

/* Dark mode outline buttons */
.dark-mode button:not(.main-cta) {
color: #a78bfa;
border-color: #a78bfa;
}

.dark-mode button:not(.main-cta):hover {
background: rgba(167, 139, 250, 0.1);
border-color: #c4b5fd;
color: #c4b5fd;
}

/* Responsive design for location search */
@media (max-width: 600px) {
.location-search {
Expand Down
44 changes: 44 additions & 0 deletions static/js/ld-experiment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// LaunchDarkly Experiment - Main CTA Button
(function() {
const ldClientId = "692742d0a95e1a0ac789ca56";

// Wait for LaunchDarkly SDK to be available
if (typeof window.LDClient === 'undefined') {
console.warn('LaunchDarkly SDK not loaded');
return;
}

const context = {
kind: 'user',
key: 'anonymous-' + Math.random().toString(36).substring(7),
anonymous: true
};

const ldClient = window.LDClient.initialize(ldClientId, context);





ldClient.on('ready', () => {
const showMainCta = ldClient.variation('get-horoscope-main-button-experiment', false);

if (showMainCta) {
const horoscopeButton = document.querySelector('button[formaction="/chart"]');
if (horoscopeButton) {
horoscopeButton.classList.add('main-cta');
}
}
});

ldClient.on('change:get-horoscope-main-button-experiment', (value) => {
const horoscopeButton = document.querySelector('button[formaction="/chart"]');
if (horoscopeButton) {
if (value) {
horoscopeButton.classList.add('main-cta');
} else {
horoscopeButton.classList.remove('main-cta');
}
}
});
})();
4 changes: 4 additions & 0 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
<script src="{{ url_for('static', filename='js/timezone-select.js') }}"></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>

<!-- LaunchDarkly JS SDK -->
<script src="https://unpkg.com/launchdarkly-js-client-sdk@3"></script>
<script src="{{ url_for('static', filename='js/ld-experiment.js') }}"></script>
{% endblock %}

{% block content %}
Expand Down