Skip to content

Commit 2951654

Browse files
committed
Fixing SVG scaling to clipping path object box.
1 parent 87931ea commit 2951654

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ your_city : Copenhagen
2222

2323
# Icon, screenshot and header image
2424
app_icon : # assets/appicon.png # Automatically populates if not set and if iOS app ID is set. Otherwise enter path to icon file manually.
25-
app_video : assets/yourvideo.mov # Uncomment and replace with path to app preview video. Optimal resolutions: 1242x2688 or 1125x2436.
25+
app_video : # assets/yourvideo.mov # Uncomment and replace with path to app preview video. Optimal resolutions: 1242x2688 or 1125x2436.
2626
app_screenshot : assets/yourscreenshot.png # Replace with alternateive image path. Does not automatically populate since Apple does not provide iPhone X/XS/XR screenshots in their iTunes lookup API.
2727
header_image : assets/headerimage.png # Replace with alternative image path.
2828
device_color : black # Set to blue, black, yellow, coral or white

_includes/appstoreimages.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
console.info("Image strings loaded from Apple API.");
1616
var appInfo = json.results[0];
1717

18-
// $(".headerIcon").attr("src", appInfo.artworkUrl512);
19-
// $(".iphoneScreen").attr("src", appInfo.screenshotUrls[0]); Uncommented since Apple does not provide iPhone X/XS/XR screenshots in their iTunes lookup API.
20-
2118
// Set large app icon using the iOS app ID if it is not set manually in _config.yml
2219
var $appIconLarge = $(".appIconLarge");
2320
if (!$appIconLarge.attr('src')) {

_layouts/default.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,20 @@
99
<div class="container">
1010
{% include header.html %}
1111
<div class="iphonePreview">
12-
<svg width="0" height="0">
12+
<!--<svg width="0" height="0">
1313
<defs>
1414
<clipPath id="screenMask">
1515
<path id="shape" class="cls-1" d="M6490.24,1234.36H6216.28c-2.57,0-10.55-.07-12.07-0.07a87.524,87.524,0,0,1-12-1.03,40.051,40.051,0,0,1-11.4-3.79,38.315,38.315,0,0,1-16.82-16.84,39.948,39.948,0,0,1-3.78-11.42,72.257,72.257,0,0,1-1.04-12.02c-0.06-1.83-.06-5.56-0.06-5.56V452.125h0s0.06-11.391.06-12.086a87.9,87.9,0,0,1,1.04-12.025,39.843,39.843,0,0,1,3.78-11.413,38.283,38.283,0,0,1,16.82-16.847,39.762,39.762,0,0,1,11.4-3.785,71.909,71.909,0,0,1,12-1.037c16.99-.567,36.32-0.061,34.51-0.061,5.02,0,6.5,3.439,6.63,6.962a35.611,35.611,0,0,0,1.2,8.156,21.326,21.326,0,0,0,19.18,15.592c2.28,0.192,6.78.355,6.78,0.355H6433.7s4.5-.059,6.79-0.251a21.348,21.348,0,0,0,19.18-15.591,35.582,35.582,0,0,0,1.19-8.154c0.13-3.523,1.61-6.962,6.64-6.962-1.81,0,17.52-.5,34.5.061a71.923,71.923,0,0,1,12.01,1.038,39.832,39.832,0,0,1,11.4,3.784,38.283,38.283,0,0,1,16.82,16.844,40.153,40.153,0,0,1,3.78,11.413,87.844,87.844,0,0,1,1.03,12.023c0,0.695.06,12.084,0.06,12.084h0V1183.64s0,3.72-.06,5.55a72.366,72.366,0,0,1-1.03,12.03,40.2,40.2,0,0,1-3.78,11.41,38.315,38.315,0,0,1-16.82,16.84,40.155,40.155,0,0,1-11.4,3.79,87.669,87.669,0,0,1-12.01,1.03c-1.52,0-9.5.07-12.07,0.07" transform="translate(-6159.12 -394.656)"/>
1616
</clipPath>
1717
</defs>
18+
</svg>-->
19+
20+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 0 0">
21+
<clipPath id="screenMask" clipPathUnits="objectBoundingBox" transform="scale(0.00257, 0.00119)">
22+
<path d="M6490.24,1234.36H6216.28c-2.57,0-10.55-.07-12.07-0.07a87.524,87.524,0,0,1-12-1.03,40.051,40.051,0,0,1-11.4-3.79,38.315,38.315,0,0,1-16.82-16.84,39.948,39.948,0,0,1-3.78-11.42,72.257,72.257,0,0,1-1.04-12.02c-0.06-1.83-.06-5.56-0.06-5.56V452.125h0s0.06-11.391.06-12.086a87.9,87.9,0,0,1,1.04-12.025,39.843,39.843,0,0,1,3.78-11.413,38.283,38.283,0,0,1,16.82-16.847,39.762,39.762,0,0,1,11.4-3.785,71.909,71.909,0,0,1,12-1.037c16.99-.567,36.32-0.061,34.51-0.061,5.02,0,6.5,3.439,6.63,6.962a35.611,35.611,0,0,0,1.2,8.156,21.326,21.326,0,0,0,19.18,15.592c2.28,0.192,6.78.355,6.78,0.355H6433.7s4.5-.059,6.79-0.251a21.348,21.348,0,0,0,19.18-15.591,35.582,35.582,0,0,0,1.19-8.154c0.13-3.523,1.61-6.962,6.64-6.962-1.81,0,17.52-.5,34.5.061a71.923,71.923,0,0,1,12.01,1.038,39.832,39.832,0,0,1,11.4,3.784,38.283,38.283,0,0,1,16.82,16.844,40.153,40.153,0,0,1,3.78,11.413,87.844,87.844,0,0,1,1.03,12.023c0,0.695.06,12.084,0.06,12.084h0V1183.64s0,3.72-.06,5.55a72.366,72.366,0,0,1-1.03,12.03,40.2,40.2,0,0,1-3.78,11.41,38.315,38.315,0,0,1-16.82,16.84,40.155,40.155,0,0,1-11.4,3.79,87.669,87.669,0,0,1-12.01,1.03c-1.52,0-9.5.07-12.07,0.07" transform="translate(-6159.12 -394.656)"/>
23+
</clipPath>
1824
</svg>
25+
1926
{% if site.app_video %}
2027
<div class="videoContainer">
2128
<video autoplay="autoplay" controls="controls">

_sass/layout.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,11 +249,10 @@ nav > ul li a:active {
249249

250250
.iphoneScreen {
251251
width: 388px;
252-
height: 839px;
253252
-webkit-clip-path: url(#screenMask);
254253
clip-path: url(#screenMask);
255-
margin-left: 22px;
256-
margin-top: 27px;
254+
margin-left: 29px;
255+
margin-top: -127px;
257256
}
258257

259258
.videoContainer {

assets/yourscreenshot.png

28.2 KB
Loading

0 commit comments

Comments
 (0)