• Edit
  • Download
  • <!DOCTYPE html>
    <html>
    
    <head>
      <meta charset="utf-8">
      <title>ZingGrid: Simple Grid</title>
      <script src="https://cdn.zinggrid.com/zinggrid.min.js" defer></script>
      <style>
        body {
          background: #e6e6e6;
        }
    
        :root {
          --zg-card-columns: 20%;
        }
    
        .headshot {
          max-width: 150px;
        }
    
        zing-grid[loading] {
          height: 437px;
        }
      </style>
    </head>
    
    <body>
      <zing-grid caption="Top LiverPool Forwards" layout="card" layout-controls="disabled" viewport-stop sort>
        <zg-data data='[
            {
              "firstName": "Mohamed",
              "lastName": "Salah",
              "number": 11,
              "position": "Forward",
              "playerImg": "https://storage.googleapis.com/zinggrid-pwa.appspot.com/salah.jpeg"
            },
            {
              "firstName": "Sadio",
              "lastName": "Mane",
              "number": 10,
              "position": "Forward",
              "playerImg": "https://storage.googleapis.com/zinggrid-pwa.appspot.com/mane.jpeg"
            },
            {
              "firstName": "Roberto",
              "lastName": "Firmino",
              "number": 9,
              "position": "Forward",
              "playerImg": "https://storage.googleapis.com/zinggrid-pwa.appspot.com/firmino.jpeg"
            },
            {
              "firstName": "Daniel",
              "lastName": "Sturridge",
              "number": 15,
              "position": "Forward",
              "playerImg": "https://storage.googleapis.com/zinggrid-pwa.appspot.com/sturridge.jpeg"
            }
          ]'></zg-data>
        <zg-colgroup>
          <zg-column index="playerImg" header=" " width="50" height="50" sort="disabled" cell-class="headshot" type="image" type-image-mask="circle" type-image-alt="Player Img N/A"></zg-column>
          <zg-column index="firstName, lastName" header="Name">
            <template>
              	[[index.firstName]] [[index.lastName]]
              </template>
          </zg-column>
          <zg-column index="number"></zg-column>
          <zg-column index="position" sort="disabled"></zg-column>
        </zg-colgroup>
      </zing-grid>
      <script></script>
    </body>
    
    </html>
    <!DOCTYPE html>
    <html>
    
    <head>
      <meta charset="utf-8">
      <title>ZingGrid: Simple Grid</title>
      <script src="https://cdn.zinggrid.com/zinggrid.min.js" defer></script>
    </head>
    
    <body>
      <zing-grid caption="Top LiverPool Forwards" layout="card" layout-controls="disabled" viewport-stop sort>
        <zg-data data='[
            {
              "firstName": "Mohamed",
              "lastName": "Salah",
              "number": 11,
              "position": "Forward",
              "playerImg": "https://storage.googleapis.com/zinggrid-pwa.appspot.com/salah.jpeg"
            },
            {
              "firstName": "Sadio",
              "lastName": "Mane",
              "number": 10,
              "position": "Forward",
              "playerImg": "https://storage.googleapis.com/zinggrid-pwa.appspot.com/mane.jpeg"
            },
            {
              "firstName": "Roberto",
              "lastName": "Firmino",
              "number": 9,
              "position": "Forward",
              "playerImg": "https://storage.googleapis.com/zinggrid-pwa.appspot.com/firmino.jpeg"
            },
            {
              "firstName": "Daniel",
              "lastName": "Sturridge",
              "number": 15,
              "position": "Forward",
              "playerImg": "https://storage.googleapis.com/zinggrid-pwa.appspot.com/sturridge.jpeg"
            }
          ]'></zg-data>
        <zg-colgroup>
          <zg-column index="playerImg" header=" " width="50" height="50" sort="disabled" cell-class="headshot" type="image" type-image-mask="circle" type-image-alt="Player Img N/A"></zg-column>
          <zg-column index="firstName, lastName" header="Name">
            <template>
              	[[index.firstName]] [[index.lastName]]
              </template>
          </zg-column>
          <zg-column index="number"></zg-column>
          <zg-column index="position" sort="disabled"></zg-column>
        </zg-colgroup>
      </zing-grid>
    </body>
    
    </html>
    body {
      background: #e6e6e6;
    }
    
    :root {
      --zg-card-columns: 20%;
    }
    
    .headshot {
      max-width: 150px;
    }