Commit 2e147ce8ad
Unsigned
Layout: unified · split
AppStore/header-16x9.png added
Binary file not shown.
AppStore/header-21x9.png added
Binary file not shown.
AppStore/header.html added +39
| @@ -0,0 +1,39 @@ | ||
| 1 | <!doctype html> | |
| 2 | <!-- Product page header: three iPhones fanned over the app icon's sun yellow and the Today banner's orange. | |
| 3 | header.html renders the 21:9 header (3840x1646), header.html#wide the 16:9 one (5244x2950), | |
| 4 | with headless Chromium, then the alpha channel is removed (scripts/render-header.sh). --> | |
| 5 | <html> | |
| 6 | <head> | |
| 7 | <meta charset="utf-8"> | |
| 8 | <style> | |
| 9 | :root { --u: 1px; --top: 180px; } | |
| 10 | * { box-sizing: border-box; } | |
| 11 | html, body { margin: 0; width: 3840px; height: 1646px; overflow: hidden; } | |
| 12 | body { | |
| 13 | position: relative; | |
| 14 | background: | |
| 15 | radial-gradient(ellipse 55% 75% at 50% 30%, #ffd65a 0%, #f7a928 35%, #d6661a 70%, #8a3a0c 100%); | |
| 16 | } | |
| 17 | .iphone { | |
| 18 | position: absolute; left: 50%; top: var(--top); | |
| 19 | width: calc(860 * var(--u)); height: calc(1868 * var(--u)); | |
| 20 | padding: calc(24 * var(--u)); border-radius: calc(140 * var(--u)); background: #0c0c12; | |
| 21 | box-shadow: 0 calc(50 * var(--u)) calc(120 * var(--u)) rgba(60, 20, 0, 0.45); | |
| 22 | } | |
| 23 | .iphone img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: calc(116 * var(--u)); } | |
| 24 | .center { transform: translateX(-50%); z-index: 2; } | |
| 25 | .left { transform: translate(calc(-50% - 760 * var(--u)), calc(120 * var(--u))) rotate(-8deg); } | |
| 26 | .right { transform: translate(calc(-50% + 760 * var(--u)), calc(120 * var(--u))) rotate(8deg); } | |
| 27 | ||
| 28 | /* 16:9, 5244x2950. */ | |
| 29 | html.wide { --u: 1.6px; --top: 420px; } | |
| 30 | html.wide, .wide body { width: 5244px; height: 2950px; } | |
| 31 | </style> | |
| 32 | <script>if (location.hash === "#wide") document.documentElement.className = "wide";</script> | |
| 33 | </head> | |
| 34 | <body> | |
| 35 | <div class="iphone left"><img src="screenshots/iphone-6.9/03-animals.png"></div> | |
| 36 | <div class="iphone right"><img src="screenshots/iphone-6.9/04-train.png"></div> | |
| 37 | <div class="iphone center"><img src="screenshots/iphone-6.9/01-home.png"></div> | |
| 38 | </body> | |
| 39 | </html> | |
README.org +3
| @@ -26,5 +26,8 @@ commit count, so each upload needs a new commit. =DAYBYDAY_PUBLISH=0= exports th | ||
| 26 | 26 | =.ipa= to =.build/ios-release= without uploading. Release notes are in |
| 27 | 27 | =AppStore/whats-new.md=. |
| 28 | 28 | |
| 29 | =scripts/render-header.sh= renders the product page headers (21:9 and 16:9) | |
| 30 | from =AppStore/header.html= and the iPhone screenshots, with Chromium and ImageMagick. | |
| 31 | ||
| 29 | 32 | * license |
| 30 | 33 | 0bsd. see LICENSE. |
scripts/render-header.sh added +15
| @@ -0,0 +1,15 @@ | ||
| 1 | #!/bin/sh | |
| 2 | # Renders AppStore/header.html to the 21:9 (3840x1646) and 16:9 (5244x2950) App Store | |
| 3 | # product page headers with headless Chromium, then removes the alpha channel. | |
| 4 | # Needs Chromium.app and ImageMagick. Usage: scripts/render-header.sh | |
| 5 | set -eu | |
| 6 | ||
| 7 | cd "$(dirname "$0")/../AppStore" | |
| 8 | chromium=/Applications/Chromium.app/Contents/MacOS/Chromium | |
| 9 | "$chromium" --headless --hide-scrollbars --force-device-scale-factor=1 --window-size=3840,1646 \ | |
| 10 | --screenshot=header-21x9.png "file://$PWD/header.html" 2>/dev/null | |
| 11 | "$chromium" --headless --hide-scrollbars --force-device-scale-factor=1 --window-size=5244,2950 \ | |
| 12 | --screenshot=header-16x9.png "file://$PWD/header.html#wide" 2>/dev/null | |
| 13 | for f in header-21x9.png header-16x9.png; do | |
| 14 | magick "$f" -alpha off "PNG24:$f" | |
| 15 | done | |