diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 0000000..0ba8230 --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,43 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["master"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + # Upload entire repository + path: '.' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/celestial.css b/celestial.css index c725b9c..0870946 100644 --- a/celestial.css +++ b/celestial.css @@ -1,6 +1,6 @@ /* Copyright 2015-16 Olaf Frohn https://github.com/ofrohn, see LICENSE */ -#celestial-map { width: 100%; height: auto; margin: 0; padding: 0; display: inline-block; position: relative; min-width:720px; overflow: visible; } +#celestial-map { width: 100%; height: auto; margin: 0; padding: 0; display: inline-block; position: relative; min-width: 320px; overflow: visible; } #celestial-map canvas { display: inline-block; position:relative; z-index:0; cursor:hand; cursor:grab; cursor:-moz-grab; cursor:-webkit-grab; } #celestial-map canvas:active { cursor:move; cursor: grabbing; cursor: -moz-grabbing; cursor: -webkit-grabbing; } #d3-celestial-footer { text-align:center; color:#666; font:10pt/1 'Arial Unicode MS', Arial, Helvetica, sans-serif; } @@ -69,9 +69,9 @@ input[type="number"]::-webkit-outer-spin-button { height: auto; } #celestial-form br + label { margin-left:0; } /* Zoom controls */ -#celestial-zoomin, -#celestial-zoomout { width:32px; height:32px; left:8px; top:12px; background: rgba(255,255,255,0.5); border:1px solid #000; border-radius:3px; position:absolute; font: normal bold 24px/1 Consolas, Courier, 'Courier New', monospace; cursor:pointer; } -#celestial-zoomout { top: 48px; } +#celestial-zoomin, +#celestial-zoomout { width:44px; height:44px; left:8px; top:12px; background: rgba(255,255,255,0.5); border:1px solid #000; border-radius:3px; position:absolute; font: normal bold 24px/1 Consolas, Courier, 'Courier New', monospace; cursor:pointer; display: flex; align-items: center; justify-content: center; } +#celestial-zoomout { top: 60px; } #celestial-zoomin:hover, #celestial-zoomout:hover { background: rgba(255,255,255,0.7); } #celestial-zoomin:disabled, @@ -103,6 +103,96 @@ input[type="number"]::-webkit-outer-spin-button { height: auto; } #celestial-zoomin, #celestial-zoomout, #celestial-form { display: none; } } +/* Mobile responsive styles */ +@media (max-width: 768px) { + /* Stack map and form vertically on tablets and mobile */ + #celestial-map { + display: block; + width: 100%; + min-width: 320px; + } + + #celestial-form { + display: block; + width: 100%; + margin-top: 10px; + } + + /* Make form inputs responsive */ + #celestial-form input[type='text'] { + width: calc(100% - 10px); + max-width: 300px; + } + + #celestial-form .col { + white-space: normal; + } + + /* Ensure zoom controls are accessible */ + #celestial-zoomin, + #celestial-zoomout { + width: 48px; + height: 48px; + font-size: 28px; + } + + #celestial-zoomout { + top: 64px; + } +} + +@media (max-width: 480px) { + /* Phone-specific adjustments */ + #celestial-map { + min-width: 100%; + } + + /* Adjust footer for small screens */ + #d3-celestial-footer { + font-size: 9pt; + padding: 5px; + } + + /* Make form elements more touch-friendly */ + #celestial-form input[type='button'], + #celestial-form select { + height: 32px; + font-size: 14px; + } + + #celestial-form input#download-png, + #celestial-form input#download-svg { + width: 100%; + max-width: 200px; + height: 32px; + } + + /* Date picker adjustments */ + #celestial-date { + width: 95%; + max-width: 300px; + } +} + +/* Touch device improvements */ +@media (hover: none) and (pointer: coarse) { + /* Increase tap target sizes for touch devices */ + #celestial-form input[type='checkbox'] { + width: 20px; + height: 20px; + } + + #celestial-form input[type='button'] { + min-height: 44px; + padding: 8px 12px; + } + + /* Disable hover effects on touch devices */ + #celestial-map canvas { + cursor: default; + } +} + /* SVG styles svg .constname { diff --git a/demo/altstars.html b/demo/altstars.html index c46fae8..fc19726 100644 --- a/demo/altstars.html +++ b/demo/altstars.html @@ -2,6 +2,7 @@ + D3-Celestial Alternative Stars diff --git a/demo/chinese.html b/demo/chinese.html index 8a4178e..340d7b6 100644 --- a/demo/chinese.html +++ b/demo/chinese.html @@ -2,6 +2,7 @@ + D3-Celestial Traditional Chinese Constellations diff --git a/demo/language.html b/demo/language.html index 22b3db0..4e613a3 100644 --- a/demo/language.html +++ b/demo/language.html @@ -2,6 +2,7 @@ + D3-Celestial Language Options diff --git a/demo/location.html b/demo/location.html index 99c1f51..7cf18a4 100644 --- a/demo/location.html +++ b/demo/location.html @@ -2,6 +2,7 @@ + D3-Celestial Starmap diff --git a/demo/map.html b/demo/map.html index 05af10a..863137a 100644 --- a/demo/map.html +++ b/demo/map.html @@ -2,6 +2,7 @@ + D3-Celestial Star Map diff --git a/demo/mobile.html b/demo/mobile.html new file mode 100644 index 0000000..521afd5 --- /dev/null +++ b/demo/mobile.html @@ -0,0 +1,525 @@ + + + + + + + + D3-Celestial Mobile Planetarium + + + + + + + + +
+
+
+
🌟
+

Welcome to the Planetarium!

+

Explore the night sky with an interactive star map. Let's show you how it works.

+
+ +
+
+ +
+
👆
+

Pan & Rotate

+

Drag your finger across the screen to rotate the sky and explore different regions.

+
+ +
+
+ +
+
🤏
+

Zoom In & Out

+

Pinch with two fingers to zoom in and see more detail, or spread to zoom out.

+
+ +
+
+ +
+
📱
+

Fullscreen Mode

+

Tap the fullscreen button below for an immersive experience. Rotate your device for the best view!

+
+ +
+
+
+
+ + +
+ +
+

✨ Night Sky

+ +
+ + +
+
+
+

Loading stars...

+
+
+
+ 👆 Drag to rotate • 🤏 Pinch to zoom +
+
+ + +
+ + + +
+
+ + + + diff --git a/demo/planets-animation.html b/demo/planets-animation.html index e38fa9d..d62f467 100644 --- a/demo/planets-animation.html +++ b/demo/planets-animation.html @@ -2,6 +2,7 @@ + D3-Celestial Starmap diff --git a/demo/sky.html b/demo/sky.html index 7fe2b9b..1d29cbf 100644 --- a/demo/sky.html +++ b/demo/sky.html @@ -2,6 +2,7 @@ + D3-Celestial Starry Sky Map diff --git a/demo/skyview.html b/demo/skyview.html index ad6b5c7..8d2cfba 100644 --- a/demo/skyview.html +++ b/demo/skyview.html @@ -2,6 +2,7 @@ + D3-Celestial Presets diff --git a/demo/snr.html b/demo/snr.html index f348318..3a51451 100644 --- a/demo/snr.html +++ b/demo/snr.html @@ -2,6 +2,7 @@ + D3-Celestial Supernova Remnants diff --git a/demo/triangle.html b/demo/triangle.html index 0e9536a..a0b4a02 100644 --- a/demo/triangle.html +++ b/demo/triangle.html @@ -2,6 +2,7 @@ + D3-Celestial Summer Triangle diff --git a/demo/viewer.html b/demo/viewer.html index 8b84a27..8a6e8f1 100644 --- a/demo/viewer.html +++ b/demo/viewer.html @@ -2,6 +2,7 @@ + D3-Celestial Starmap diff --git a/demo/wallmap.html b/demo/wallmap.html index 9d9cd8b..2385394 100644 --- a/demo/wallmap.html +++ b/demo/wallmap.html @@ -2,6 +2,7 @@ + D3-Celestial Wall Map