link boxes, [conditionally] hide them, use localizable strings, raise modal to z index 3

This commit is contained in:
John Hess 2024-06-04 23:01:36 -05:00
parent d510942558
commit 399fb8005f
6 changed files with 31 additions and 14 deletions

View file

@ -20,6 +20,12 @@ modal:
You will need to enable downloads from unknown sources to install this app on your Android phone. You will need to enable downloads from unknown sources to install this app on your Android phone.
butter_box_title: 'Welcome to the Butter Box' butter_box_title: 'Welcome to the Butter Box'
explore: 'Explore'
message_board: "Message Board"
app_store: 'App Store'
offline_maps: 'Offline Maps'
# Some of these are disused.
apps_subtitle: 'Get Android Apps.' apps_subtitle: 'Get Android Apps.'
apps_text: 'Download the Butter app to view a collection of apps that use less internet and battery.' apps_text: 'Download the Butter app to view a collection of apps that use less internet and battery.'
fdroid_button_subtext: 'LESS THAN 10 MB' fdroid_button_subtext: 'LESS THAN 10 MB'

View file

@ -16,6 +16,6 @@
</div> </div>
<div class="header-content"> <div class="header-content">
<img src="/assets/images/paddy.svg" alt="Paddy, the Butter Box Mascot" class="header-image" /> <img src="/assets/images/paddy.svg" alt="Paddy, the Butter Box Mascot" class="header-image" />
<div class="header-title">Welcome to the Butter Box</div> <div class="header-title">{% t butter_box_title %}</div>
</div> </div>
</header> </header>

View file

@ -2,6 +2,7 @@
// Modal Styles // Modal Styles
// ------------------------- // -------------------------
.modal__overlay { .modal__overlay {
z-index: 3;
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;

View file

@ -39,6 +39,7 @@ const usbButter = document.querySelector('#usb-butter');
if (usbButter) { if (usbButter) {
fetch('/usb-butter') fetch('/usb-butter')
.then(response => { .then(response => {
console.log(response);
if (response.status === 200) { if (response.status === 200) {
usbButter.style.display = 'inherit'; usbButter.style.display = 'inherit';
} }

View file

@ -6,21 +6,29 @@ layout: default
<div class="container"> <div class="container">
<div class="content"> <div class="content">
<!-- Defaults to display: none; revealed via JS depending on USB insertion. -->
<a href="/usb-butter/" id="usb-butter" style="display: none;">
<div class="card"> <div class="card">
<img src="/assets/images/explore-icon.png" alt="Explore Icon" class="card-icon-big"> <img src="/assets/images/explore-icon.png" alt="Explore Icon" class="card-icon-big">
Explore {% t explore %}
</div> </div>
</a>
<a href="/chat/#/room/%23public%3A{{site.data.deployment.chat_server}}">
<div class="card"> <div class="card">
<img src="/assets/images/message-icon.png" alt="Message Icon" class="card-icon"> <img src="/assets/images/message-icon.png" alt="Message Icon" class="card-icon">
Message Board {% t message_board %}
</div> </div>
</a>
<a class="btn-modal" href="#" data-micromodal-trigger="product-modal">
<div class="card"> <div class="card">
<img src="/assets/images/appstore-icon.png" alt="App Store Icon" class="card-icon"> <img src="/assets/images/appstore-icon.png" alt="App Store Icon" class="card-icon">
App store {% t app_store %}
</div> </div>
<div class="card"> </a>
<!-- Hidden until we have a design ready to implement. -->
<div class="card" style="display: none;">
<img src="/assets/images/maps-icon.png" alt="Maps Icon" class="card-icon"> <img src="/assets/images/maps-icon.png" alt="Maps Icon" class="card-icon">
Offline maps {% t offline_maps %}
</div> </div>
</div> </div>
</div> </div>

View file

@ -0,0 +1 @@
<!-- This simulates a drive being plugged in. CI moves this into place as /usb-butter. You can too. -->