Skip to content

Commit 8a0ec3d

Browse files
committed
App name, icon, price now only loads via API if not set by user
1 parent 35344e6 commit 8a0ec3d

File tree

6 files changed

+97
-56
lines changed

6 files changed

+97
-56
lines changed

_config.yml

Lines changed: 62 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,81 @@
11
# Mobile App Landing Page Configuration
22

33
# App Info
4-
app_name : Landing
5-
app_description : Wherever some that and kiwi that well
6-
dolphin alas this the mindfully jeepers
7-
one aside canny one preparatory up less therefore
8-
hello oh amid goodness checked.
9-
app_price : 4.99
10-
ios_app_id : 718043190
11-
android_app_id :
4+
ios_app_id : 718043190 # Enter iOS app ID to automatically populate name, price and icons (e.g. 718043190).
5+
6+
appstore_link : # Automatically populates if not set and if iOS app ID is set. Otherwise enter manually.
7+
playstore_link : # Enter Google Play Store URL.
8+
9+
app_name : # Automatically populates if not set and if iOS app ID is set. Otherwise enter manually.
10+
app_price : # Automatically populates if not set and if iOS app ID is set. Otherwise enter manually.
11+
12+
app_description : Wherever some that and kiwi that well
13+
dolphin alas this the mindfully jeepers
14+
one aside canny one preparatory up less therefore
15+
hello oh amid goodness checked.
1216

1317
# Author Info
14-
your_name : Emil Baehr
15-
your_link : https://emilbaehr.com
16-
your_city : Copenhagen
18+
your_name : Emil Baehr # Your name. Will be shown in the footer.
19+
your_link : https://emilbaehr.com # Link to a website of your choice when your name is clicked.
20+
your_city : Copenhagen # Tell people where you're from.
1721

1822
# Icon, screenshot and header image
19-
app_icon : ../assets/appicon-1024px.png # Will automatically populate if you have set the iOS app id.
20-
app_video : # ../assets/video.mp4 # Uncomment and replace with path to app preview video. Optimal resolutions: 1242x2688 or 1125x2436.
21-
app_screenshot : ../assets/screenshot.png # Will automatically populate if you have set the iOS app id.
22-
header_image : ../assets/headerimage.png # Replace with custom background image or link to background image.
23-
24-
# Social Links
25-
facebook_username :
26-
twitter_username : ebaehr
27-
github_username : emilbaehr
28-
email_address : [email protected]
29-
30-
# Features
31-
features :
32-
- title : Feature 1
33-
description : Present the features of your app with the dynamic Jekyll theme
34-
fontawesome_icon_name : magic
35-
- title : Feature 2
36-
description : Show your app in the context of an iPhone
37-
fontawesome_icon_name : mobile
38-
- title : Feature 3
39-
description : Adjust colors, backgrounds and typography
40-
fontawesome_icon_name : adjust
23+
app_icon : # ../assets/appicon-1024px.png # Automatically populates if not set and if iOS app ID is set. Otherwise enter manually.
24+
app_video : # ../assets/video.mp4 # Uncomment and replace with path to app preview video. Optimal resolutions: 1242x2688 or 1125x2436.
25+
app_screenshot : ../assets/screenshot.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.
26+
header_image : ../assets/headerimage.png # Replace with alternative image path.
27+
28+
# Social Links # Enter usernames and email address. If set, they will be presented as links in the footer.
29+
facebook_username :
30+
instagram_username :
31+
twitter_username : ebaehr
32+
github_username : emilbaehr
33+
youtube_username :
34+
email_address : [email protected]
35+
36+
# Features # Edit, add or remove features to be presented.
37+
features :
38+
39+
- title : Feature 1
40+
description : Present the features of your app with the dynamic Jekyll theme
41+
fontawesome_icon_name : magic
42+
43+
- title : Feature 2
44+
description : Show your app in the context of an iPhone
45+
fontawesome_icon_name : mobile
46+
47+
- title : Feature 3
48+
description : Adjust colors, backgrounds and typography
49+
fontawesome_icon_name : adjust
50+
51+
- title : # New Feature Title
52+
description : # New Feature Description
53+
fontawesome_icon_name : # Enter Font Awesome icon name. Find icons on fontawesome.com/icons.
4154

4255
# Theme Settings
43-
accent_color : "#1d63ea"
44-
primary_text_color : "#000000"
45-
secondary_text_color : "#666666"
56+
accent_color : "#1d63ea"
57+
primary_text_color : "#000000"
58+
secondary_text_color : "#666666"
4659

47-
header_color : "#000000"
48-
header_transparency : 0.1
60+
header_color : "#000000"
61+
header_transparency : 0.1
4962

50-
image_overlay_color : "#363b3d"
51-
image_overlay_transparency : 0.6
63+
image_overlay_color : "#363b3d"
64+
image_overlay_transparency : 0.6
5265

53-
feature_icons_foreground_color : "#1d63ea"
54-
feature_icons_background_color : "#e6e6e6"
66+
feature_icons_foreground_color : "#1d63ea"
67+
feature_icons_background_color : "#e6e6e6"
5568

56-
social_icons_foreground_color : "#666666"
57-
social_icons_background_color : "#e6e6e6"
69+
social_icons_foreground_color : "#666666"
70+
social_icons_background_color : "#e6e6e6"
5871

5972

6073
# Analytics
61-
google_analytics : # Enter Google Analytics tracking code (e.g. UA-2110908-2)
74+
google_analytics : # Enter Google Analytics tracking code (e.g. UA-2110908-2).
75+
76+
77+
78+
6279

6380

6481

_includes/appstoreimages.html

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

18-
$(".headerIcon").attr("src", appInfo.artworkUrl512);
19-
$(".appIconLarge").attr("src", appInfo.artworkUrl512);
20-
// $(".iphoneScreen").attr("src", appInfo.screenshotUrls[0]); Uncommented since Apple does not provide iPhone X/XS/XR screenshots in their iTunes lookup API
21-
$(".appName, .headerName").html(appInfo.trackName);
22-
$(".appPrice").html(appInfo.formattedPrice);
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+
21+
// Set large app icon using the iOS app ID if it is not set manually in _config.yml
22+
var $appIconLarge = $('.appIconLarge');
23+
if (!$appIconLarge.attr('src')) {
24+
$($appIconLarge).attr("src", appInfo.artworkUrl512);
25+
}
26+
27+
// Set header app icon using the iOS app ID if it is not set manually in _config.yml
28+
var $appIconHeader = $('.headerIcon');
29+
if (!$appIconHeader.attr('src')) {
30+
$($appIconHeader).attr("src", appInfo.artworkUrl512);
31+
}
32+
33+
// Set app name using the iOS app ID if it is not set manually in _config.yml
34+
var $appName = $('.appName');
35+
if ($.trim($($appName).text()).length == 0) {
36+
$($appName).html(appInfo.trackName);
37+
}
38+
39+
// Set price using the iOS app ID if it is not set manually in _config.yml
40+
var $appPrice = $('.appPrice');
41+
if ($.trim($($appPrice).text()).length == 0) {
42+
$($appPrice).html(appInfo.formattedPrice);
43+
}
44+
2345
$(".appStoreLink").attr("href", appInfo.trackViewUrl);
2446

2547
console.info(appInfo);

_includes/head.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<meta http-equiv="x-ua-compatible" content="ie=edge">
44
<meta name="viewport" content="width=device-width, initial-scale=1">
55

6-
<title>{% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %}</title>
6+
<title>TITLE</title>
77

88
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
99
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}">

_sass/base.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ body {
1616
}
1717

1818
h1 {
19-
font-size: 6rem;
19+
font-size: 3rem;
2020
}
2121

2222
h2 {

_sass/layout.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,10 @@ nav > ul li a:active {
120120

121121
.appNamePriceContainer {
122122
display: flex;
123-
height: 120px;
124123
flex: 0 1 auto;
125-
align-items: center;
124+
flex-direction: column;
125+
align-items: start;
126+
justify-content: center;
126127
}
127128

128129
.appName {
@@ -132,6 +133,7 @@ nav > ul li a:active {
132133
.appPrice {
133134
color: #fff;
134135
font-weight: normal;
136+
margin-top: 13px;
135137
}
136138

137139
.appDescriptionContainer {

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Your App – Subtitle
2+
# Front matter comment to ensure Jekyll properly reads file.
33
---
44

55
<!DOCTYPE html>
@@ -45,7 +45,7 @@ <h1 class="appName">
4545
{{ site.app_name }}
4646
</h1>
4747
<h2 class="appPrice">
48-
${{ site.app_price }}
48+
{{ site.app_price }}
4949
</h2>
5050
</div>
5151
<div class="appDescriptionContainer">

0 commit comments

Comments
 (0)