Skip to content

Testing a different method to fix the csv download link #282

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
wants to merge 3 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
2 changes: 1 addition & 1 deletion authentication/sms.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sidebarTitle: "SMS"

SMS authentication is available to all Enterprise customers. To enable this feature, please reach out to the Turnkey team.

SMS pricing is usage-based and varies depending on the country of the destination phone number. A downloadable price list for all supported countries is available <a href="/assets/files/sms-prices.csv" download>here as a CSV</a>.
SMS pricing is usage-based and varies depending on the country of the destination phone number. A downloadable price list for all supported countries is available <a href="/assets/files/sms-prices" download>here as a CSV</a>.

## How It Works

Expand Down
5 changes: 5 additions & 0 deletions docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,11 @@
"source": "/networks/others",
"destination": "/networks/overview",
"permanent": true
},
{
"source": "/assets/files/sms-prices",
"destination": "/assets/files/sms-prices.csv",
"permanent": true
}
]
}
82 changes: 82 additions & 0 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,85 @@
Link: /home#feature-spotlight%3A-send-crypto-via-a-url */
display: none;
}

/* Custom Dropdown for SMS Price Lookup */
.sms-price-lookup-container {
/* Container needs relative positioning for absolute list */
position: relative;
margin-top: 1rem;
margin-bottom: 1rem;
}

.sms-country-trigger {
/* Make button look like a select input */
display: block;
width: 100%;
padding: 0.5rem 0.75rem;
font-size: 1rem;
font-family: inherit; /* Use site's font */
line-height: 1.5;
color: #495057; /* Standard text color */
background-color: #fff;
background-clip: padding-box;
border: 1px solid #ced4da; /* Standard border */
border-radius: 0.25rem;
text-align: left;
cursor: pointer;
/* Add space for a dropdown arrow indicator */
padding-right: 2rem;
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
background-repeat: no-repeat;
background-position: right 0.75rem center;
background-size: 16px 12px;
}

.sms-country-list {
/* Style the dropdown list */
display: none; /* Hidden by default */
position: absolute;
top: 100%; /* Position below trigger */
left: 0;
width: 100%;
max-height: 200px; /* Fixed height with scroll */
overflow-y: auto;
background-color: #fff;
border: 1px solid #ced4da;
border-top: none; /* Avoid double border with trigger */
border-radius: 0 0 0.25rem 0.25rem;
z-index: 1000; /* Ensure it's on top */
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
margin: 0;
padding: 0;
list-style: none;
}

.sms-country-item {
/* Style individual country items */
display: block;
width: 100%;
padding: 0.5rem 0.75rem;
font-size: 1rem;
font-family: inherit;
color: #495057;
text-align: left;
background-color: transparent;
border: none;
cursor: pointer;
white-space: nowrap; /* Prevent wrapping */
}

.sms-country-item:hover,
.sms-country-item:focus {
background-color: #f8f9fa; /* Subtle hover effect */
color: #16181b;
outline: none;
}

/* CSS to control visibility based on data-open attribute */
#hidden-content-simple[data-open="false"] {
display: none;
}

#hidden-content-simple[data-open="true"] {
display: block; /* Or inline, inline-block, etc., as needed */
}