Skip to content

Repositories

Wilson Styres edited this page May 1, 2020 · 5 revisions

Zebra supports a variety of customization options for reposotories to display to users.

Custom Section Icons

Zebra supports custom section icons that can be installed through a package for a Repository to display custom icons for custom sections. They work in a very similar way to Cydia's section icons.

Simply insert your custom icon into /Applications/Zebra.app/Sections/<Section Name>.png and replace with your section name. The Section name of the icon and the Section name of the package must match exactly in order to work. Now, build your package and install it and check Zebra to see your new custom icon!

Example package layout

- DEBIAN
  - control
- Applications
  - Zebra.app
    - Sections
      - Tweaks.png

Depictions

Zebra uses the Depiction tag in a package's control file to display package information. When requesting the depictions, it sends a few extra headers in case the repository would like to customize their depiction to fit Zebra's style.

Accept-Language

Zebra sends the user's current so that repositories may localize descriptions, screenshots, or payment information.

Example: Accept-Language: en-US

Payment-Provider

Zebra sends the Payment-Provider: API header to indicate that it supports the Modern Payment API. This can be used to hide redundent sales information from the user or possibly load current purchase status.

Theme

Repositories may customize their depictions to match Zebra's current theme. Zebra will send a Theme header that can contain Light, Dark, or Pure-Black to indicate the user's current theme choice. Zebra will also post the appropriate WebKit information for determining the user's current user interface styling.

For static sites, Github Pages for example, Zebra appends the user's current theme to its User Agent.

Example: Theme: Light

Tint-Color

If you so choose, you can implement colors that match Zebra's button and link tint color. This color is posted by the http header Tint-Color:. As an example, Zebra may post the header

Example: Tint-Color: #FA5732

User-Agent

Zebra's user agent contains information about the device as well as Zebra iteself. It is split up into 4 sections

Example: Cydia/1.1.33 Zebra/1.1 (iPhone; iOS/13.5) Light

  • Cydia/1.1.33: Indicates that Zebra supports up to Cydia 1.1.33's web APIs (mainly for outdated CSS customization that requires a Cydia header)
  • Zebra/1.1: Indicates the current version of Zebra is 1.1
  • (iPhone; iOS/13.5): Indicates the user's current device type (could also be iPad) and current iOS version
  • Light: Indicates the user's current theme (could be Light, Dark, or Pure-Black)

Featured Packages

Zebra supports displaying featuring packages from your repository as shown below. Depending on the user's preferences, the packages that are provided in the featured banner may be re-used on Zebra's homepage.

Your repository must have a file called sileo-featured.json in its root directory in order for the featured banner to be displayed within Zebra (for example, https://repo.chariz.com/sileo-featured.json).

JSON Structure

In order for the repo to have a featured package you must provide the following information in the json:

Root Structure
Key Type Description
itemSize String Size of the banner images
itemCornerRadius String Corner radius of banner images
banners Array An array of banner objects (see below)

Note: The recommended itemSize is {263, 148} and, recommended itemCornerRadius is 10.

Banner Structure
Key Type Description
url String URL of the image that should be displayed for this banner
title String Title of the banner
package String The bundle ID of the package
hideShadow Boolean Hide the shadow behind the title of the image

Note: hideShadow will default to false if not provided.

Example

{
   "class":"FeaturedBannersView",
   "itemSize":"{263, 148}",
   "itemCornerRadius":10,
   "banners":[
      {
         "title":"RuntimeBrowser",
         "package":"ws.hbang.runtimebrowser",
         "url":"https://chariz.com/cdn/icon/runtimebrowser/icon@3x.png"
      },
      {
         "title":"Siliqua Pro",
         "package":"com.laughingquoll.siliquapro",
         "url":"https://chariz.com/cdn/icon/siliqua-pro/icon@3x.png"
      },
      {
         "title":"Watermelon",
         "package":"com.laughingquoll.watermelon",
         "url":"https://chariz.com/cdn/icon/watermelon/icon@3x.png"
      },
      {
         "title":"Noctis Neo",
         "package":"com.laughingquoll.noctis13",
         "url":"https://chariz.com/cdn/icon/noctis-neo/icon@3x.png"
      },
      {
         "title":"Sunflower",
         "package":"com.laughingquoll.sunflower",
         "url":"https://chariz.com/cdn/icon/sunflower/icon@3x.png"
      },
      {
         "title":"Daisy",
         "package":"com.laughingquoll.daisy",
         "url":"https://chariz.com/cdn/icon/daisy/icon@3x.png"
      }
   ]
}

Taken from https://repo.chariz.com/sileo-featured.json

More information

You can learn more about displaying Featured Packages from the Sileo API Documentation

Modern Payment API

Zebra fully supports accounts and purchasing packages through the Modern Payment API. You can learn more about the Modern Payment API from the Sileo API Documentation