Giter Site home page Giter Site logo

liksu / garage-sale Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.61 MB

Front-end for garage sales that allows to provide items to sale from external resources

Home Page: https://sale.liksu.com

License: MIT License

HTML 1.32% CSS 1.03% TypeScript 86.97% JavaScript 10.69%

garage-sale's Introduction

Garage Sale

Front-end for garage sales that allows to provide items to sale from external resources.

Set Products

Query parameter products should refer to the json with a list products.

?products=https://sale.liksu.com/data/products.json

Type of data:

Array<{
    id: string
    name: string
    price: number | Record<string, number>
    images: Array<string>
    condition?: string
    tags?: Array<string>
    shortDescription?: string
    description?: string
    urls?: Array<string>
    sold?: boolean
    booked?: boolean | string
}>

To correct display of a price, the price keys should be one of the currency code (ISO 4217).

The id should not contain any special characters that could be incorrectly escaped in URL and also should not contain commas (it used as cart list share separator).

Configuration

In the list of products you can add an configuration object this required "config": true. It is the place to set default currency and languages.

Type of configuration object:

{
    config: true
    defaultCurrency?: Currency
    defaultLanguage?: string
    languages?: Array<string>
}

Set translation

Query parameter lang should refer to json that contains translations for the site.

/?lang=https://sale.liksu.com/data/lang.en.json

Structure of translation:

{
  "empty cart": "The cart is empty",
  "total": "Total",
  "share cart": "Share cart",
  "share cart description": [
    "To send a request for booking - copy the selected products and send it to us by email or messenger.",
    "Also, you can share the selected products using the link."
  ],
  "copy text": "Copy text",
  "copy link": "Copy link",
  "copied": "Copied",
  "make a copy": "Make a copy",
  "selected products": "Selected products",
  "no products": "No products",
  "product categories": [
    "Available",
    "Booked",
    "Sold"
  ],
  "booked": "Booked",
  "sold": "Sold",
  "show more": "Show more",
  "hide": "Hide",
  "I want this": ["I want this", "Don't want it anymore"],
  "condition": "Condition"
}

TODO

  • Support different currencies
  • Support different languages
  • Support deep structure of products json like {"products": [...], "config": {...}, "total": 100, "page": 1...}
  • Add GA
  • Support of @user configurations

garage-sale's People

Contributors

liksu avatar

Watchers

 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.