Materialize Bridge Docs
v1
v1
  • Intro
  • 1. About this application
    • 1.1 Introduction
    • 1.2 Navigation guide
    • 1.3 Components catalog
    • 1.4 Internal Structure
    • 1.5 Installation
    • 1.6 Project status
    • 1.7 Color switcher
  • 2. Installation
    • Webpack, Aurelia-CLI (Webpack)
    • JSPM
    • Aurelia-CLI (require)
    • Fuse-box 2.x
  • 3. App developers tutorial
    • 3.1 Introduction
    • 3.2 Setup
    • 3.3 Select component
    • 3.4 Button component
    • 3.5 Slider component
    • 3.6 Collapsible component
    • 3.7 What you need to know
  • 4. App developers notes
    • 4.1 On bundling
    • 4.2 Using your own SASS with JSPM
  • 5. Contributing (bridge developers notes)
    • Cloning and running the code
    • Creating samples
  • 6. About Aurelia
    • 5.1 Key Features
  • 7. About Materialize
    • 7.1 Integrated with Aurelia
    • 7.2 Why choose Materialize
Powered by GitBook
On this page
  • Creating a new sample
  • Adding the sample to the catalog
  1. 5. Contributing (bridge developers notes)

Creating samples

PreviousCloning and running the codeNext6. About Aurelia

Last updated 7 years ago

The consists of usage samples for each component. These samples are created using a GitHub Gist running in .

When you create a sample, you actually create a Gist.

In the top right corner of the example you find a "Play" button. When you click the "Play" button, a gist.run instance will open in a new tab. A very convenient feature of gist.run is the ability to create a fork. A fork is basically a copy of the current gist with a new ID.

Creating a new sample

Probably the easiest way to crate a new sample is to fork an existing one.

Assign a meaningful name to the gist (to better find it later) and click the button "fork to public gist"

Adding the sample to the catalog

The button configuration in this file looks like this:

"Button": {
      "status": "done",
      "samples": {
        "basic-use": {
          "default": true,
          "gist": "09534739133e8f53bbf5ad3fff6fa75a"
        },
        "fab": "8c5bcfc325dcced715e2ea5d70ff1b44",
        "fab-fixed": "94c6cf6fd564e68dc2cac0952261b320",
        "fab-fixed-toolbar": "1dd0131d47642edadf583e946e256f0b"
      }
    },

Note there's a samples property with a default entry basic-use and three other properties which have gist IDs as their value.

To add a sample here, create a new property as a child of the samples property and copy the ID of your gist from the previous section here.

If you refresh your catalog fork now, you should see a new entry on the buttons component page and when you click on it the app should load your gist along with its source files.

The components and gist IDs of the catalog app are stored in a file names .

components.json
components section of the bridge catalog app
gist.run