Skip to content

Commit

Permalink
💄 Replaced Capacitor splash and icons with Itchy brand
Browse files Browse the repository at this point in the history
  • Loading branch information
micahlt committed Feb 6, 2021
1 parent e990d43 commit c6b6f45
Show file tree
Hide file tree
Showing 148 changed files with 73 additions and 216 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ npm-debug.log*
/platforms
/plugins
/www

.vercel
39 changes: 38 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,43 @@ Then run the build script:
```
npm run production
```
To run on an emulator, press the "Play" icon in the top toolbar or use `Shift+F10`.
To run on an emulator, press the "Play" icon in the top toolbar or use `Shift+F10`.

To build APK's for production, open the "Build" menu, hover over "Build Bundle(s) / APK(s)", and select "Build APK(s)".

## Building assets
As a mobile app, there are several assets that are required to be built for different screen sizes. All asset builds use `cordova-res`, which you can install with:

```bash
npm install -g cordova-res
```

### Generating icons
Itchy uses the new standard of [Android Adaptive Icons](https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive), which means that any icon updates must:

- Be high-resolution
- Be made up of foreground and background components
- Fit the size limits of adaptive icons outlined in the [requirements](https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive)

Building icons is as simple as this:
```bash
cordova-res --type adaptive-icon
cordova-res --type icon
```

The icons are placed in `./resources/android/icon` where they can be referenced by the `config.xml` file.

### Generating splash screens
The splash screen displays when the app is opened but still loading. It must be simple and also follow the [Cordova splashscreen guidelines](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-splashscreen/). Splash generation is slightly tricky since we have to build for both light and dark mode. Light mode is easy enough:

```bash
cordova-res --type splash
```

However, dark mode is not explicitly supported by `cordova-res`, so the team created a custom build script for dark splashes, which **must** be run from the root of the project:

```bash
npm run-script genDarkSplashes
```

Take note that this script is _only designed for Unix-based operating systems_ such as Mac and Linux. The [forward slashes will break the script on Windows](https://www.howtogeek.com/181774/why-windows-uses-backslashes-and-everything-else-uses-forward-slashes/). The easiest way to get around this when trying to build on Windows is to temporarily replace the forward slashes (`/`) with escaped backslashes (`\\`).
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ android {
applicationId "org.scratchclient4.itchy"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 2
versionName "0.0.2"
versionCode 3
versionName "0.0.3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-land-hdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-land-mdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-land-xhdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-land-xxhdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-land-xxxhdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-port-hdpi/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified android/app/src/main/res/drawable-port-mdpi/splash.png
Binary file modified android/app/src/main/res/drawable-port-xhdpi/splash.png
Binary file modified android/app/src/main/res/drawable-port-xxhdpi/splash.png
Binary file modified android/app/src/main/res/drawable-port-xxxhdpi/splash.png
34 changes: 0 additions & 34 deletions android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml

This file was deleted.

170 changes: 0 additions & 170 deletions android/app/src/main/res/drawable/ic_launcher_background.xml

This file was deleted.

Binary file modified android/app/src/main/res/drawable/splash.png
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<background android:drawable="@mipmap/ic_launcher_background" />
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
</adaptive-icon>
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
Binary file modified android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
<background android:drawable="@mipmap/ic_launcher_background" />
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
</adaptive-icon>
5 changes: 5 additions & 0 deletions android/app/src/main/res/mipmap-mdpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_background" />
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
</adaptive-icon>
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
Binary file modified android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
5 changes: 5 additions & 0 deletions android/app/src/main/res/mipmap-xhdpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_background" />
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
</adaptive-icon>
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
Binary file modified android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
5 changes: 5 additions & 0 deletions android/app/src/main/res/mipmap-xxhdpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_background" />
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
</adaptive-icon>
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Binary file modified android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
5 changes: 5 additions & 0 deletions android/app/src/main/res/mipmap-xxxhdpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_background" />
<foreground android:drawable="@mipmap/ic_launcher_foreground" />
</adaptive-icon>
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Binary file modified android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
4 changes: 2 additions & 2 deletions android/app/src/main/res/values/ic_launcher_background.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
</resources>
<color name="ic_launcher_background">#15A3FF</color>
</resources>
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{
"name": "itchy-ionic",
"version": "0.0.2",
"version": "0.0.3",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"test:unit": "vue-cli-service test:unit",
"test:e2e": "vue-cli-service test:e2e",
"lint": "vue-cli-service lint",
"production": "vue-cli-service build && npx cap copy && ionic capacitor update && npx cap open android"
"production": "vue-cli-service build && npx cap copy && ionic capacitor update && npx cap open android",
"genDarkSplashes": "cordova-res android --skip-config --splash-source ./resources/android/splash-night.jpg --type splash --resources ./resources/android/splash && mv ./resources/android/splash/android/splash/* ./resources/android/splash/night && rmdir ./resources/android/splash/android/splash && rmdir ./resources/android/splash/android && cordova-res android --skip-config --copy",
"genIcons": "cordova-res android --icon-background-source '#15a3ff' --copy"
},
"dependencies": {
"@capacitor/android": "^2.4.6",
Expand Down
Binary file added resources/android/icon-background.png
Binary file added resources/android/icon-foreground.png
Binary file added resources/android/icon.png
Binary file added resources/android/icon/drawable-hdpi-icon.png
Binary file added resources/android/icon/drawable-ldpi-icon.png
Binary file added resources/android/icon/drawable-mdpi-icon.png
Binary file added resources/android/icon/drawable-xhdpi-icon.png
Binary file added resources/android/icon/drawable-xxhdpi-icon.png
Binary file added resources/android/icon/drawable-xxxhdpi-icon.png
Binary file added resources/android/icon/hdpi-background.png
Binary file added resources/android/icon/hdpi-foreground.png
Binary file added resources/android/icon/ldpi-background.png
Binary file added resources/android/icon/ldpi-foreground.png
Binary file added resources/android/icon/mdpi-background.png
Binary file added resources/android/icon/mdpi-foreground.png
Binary file added resources/android/icon/xhdpi-background.png
Binary file added resources/android/icon/xhdpi-foreground.png
Binary file added resources/android/icon/xxhdpi-background.png
Binary file added resources/android/icon/xxhdpi-foreground.png
Binary file added resources/android/icon/xxxhdpi-background.png
Binary file added resources/android/icon/xxxhdpi-foreground.png
Binary file added resources/android/splash-night.jpg
Binary file added resources/android/splash.jpg
2 changes: 1 addition & 1 deletion src/views/Tab4.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</ion-item-divider>
<ion-item>
<ion-label>
Itchy v0.0.2
Itchy v0.0.3
</ion-label>
</ion-item>
<ion-item>
Expand Down

0 comments on commit c6b6f45

Please sign in to comment.