Coder Social home page Coder Social logo

project-theme-config's Introduction

Project theme config

  • Using themeType change App colors and layout;
  • Using other params change App workflow and show/hidden components.
  • Anyone can easy change theme type.
{
  "themeType": "HKAA",
  "appName": "HKAA",
  "displayName": "HKAA",
  "isShowFloatButton": true,
  "isShowTabbar": true,
  "shippingMethod": ["dineIn", "pickUp", "delivery"],
  "isCanUseTouristSign": true,
  "pageTypes": {
    "homePageType": "HKAAHomePage",
    "orderListType": "HKAAOrderList"
  }
}
  • Using config params change App workflow and show/hidden components;
  • Using colors params change App theme colors;
  • Using units params change App layout, like button size, font size, cell height, navigation height;
  • Anyone can simply modify the basic style.
{
  "config": {
    "appName": "HKAA",
    "displayName": "HKAA",
    "isShowFloatButton": true,
    "isShowTabbar": true,
    "shippingMethod": ["dineIn", "pickUp", "delivery"],
    "isCanUseTouristSign": true,
    "pageTypes": {
      "homePageType": "HKAAHomePage",
      "orderListType": "HKAAOrderList"
    }
  },
  "colors": {
    "theme": {
      "fillPrimary": "#4F2B1A",
      "fillSecondary": "#4F2B1A",
      "fillPositive": "#4F2B1A",
      "fillNegative ": "#4F2B1A",
      "fillDark": "#4F2B1A",
      "fillSecondaryDark": "#4F2B1A",
      "fillLight": "#ffffff",
      "fillSecondaryLight": "#ece4d7",
      "textPrimary": "4F2B1A",
      "textSecondary": "4F2B1A",
      "textWeek": "4F2B1A",
      "textHint": "4F2B1A",
      "textDisabled": "4F2B1A"
    },
    "components": {
      "activityColor": "#7E46AA",
      "navigationBarBackground": "#7E46AA",
      "navigationBarIconFill": "#7E46AA",
      "navigationBarTilte": "#7E46AA",
      "navigationBarTextButton": "#7E46AA",
      "floatButtonBackground": "#7E46AA",
      "floatButtonIcon": "#ffffff"
    },
    "pages": {
      "storesList": {
        "navigationBarBackground": "#7E46AA",
        "headerTitle": "#7E46AA"
      },
      "sotreMenus": {
        "navigationBarBackground": "#7E46AA",
        "leftMenuTilte": "#7E46AA"
      }
    }
  },
  "units": {
    "theme": {
      "titleFontSize": 40,
      "textFontSize": 24,
      "infoFontSize": 16
    },
    "components": {
      "navigationBarHeight": 44,
      "tabBarHeight": 44,
      "tabBarIconSize": 22,
      "tabBarFontSize": 22,
      "floatButtonSize": 58,
      "floatButtonIconSize": 36
    },
    "pages": {
      "storesList": {
        "floatButtonSize": 58,
        "storesCellHeight": 110,
        "floatButtonIconSize": 36
      },
      "orderList": {
        "floatButtonSize": 40,
        "floatButtonIconSize": 20
      }
    }
  }
}
  • Using config params change App workflow and show/hidden components;
  • Using styles set all components and pages styles;
  • All static styles can hot update online, but only developers know how to modify them;
  • Need draw all page again.
{
  "config": {
    "appName": "HKAA",
    "displayName": "HKAA",
    "isShowFloatButton": true,
    "isShowTabbar": true,
    "shippingMethod": ["dineIn", "pickUp", "delivery"],
    "isCanUseTouristSign": true,
    "pageTypes": {
      "homePageType": "HKAAHomePage",
      "orderListType": "HKAAOrderList"
    }
  },
  "styles": {
    "components": {
      "input": {
        "paddingLeft": 8,
        "marginBottom": 8,
        "width": 200,
        "height": 44,
        "backgroundColor": "#f3f3f3",
        "borderRadius": 4
      },
      "button": {
        "borderRadius": 4,
        "justifyContent": "center",
        "alignItems": "center",
        "backgroundColor": "#f33",
        "width": 200,
        "height": 36
      }
    },
    "pages": {
      "homePage": {
        "naviagation": {
          "flexDirection": "column",
          "justifyContent": "center",
          "alignItems": "center",
          "width": "100%",
          "height": " 100%"
        }
      }
    }
  }
}

project-theme-config's People

Contributors

ymzuiku avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.