Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <script type="text/javascript" src="https://snxd.akamaized.net/js/stamp-1.0.14.js"></script>
<div class="download-app">
  <table class="download-list">
    <thead>
    <tr>
      <th><h4>Name</h4></th>
      <th><h4>Sample</h4></th>
      <th><h4>Description</h4></th>
      <th><h4>Size</h4></th>
      <th><h4>Download</h4></th>
    </tr>
    </thead>
    <tbody>
    <tr>
      <td><b>Earth Rise</b></td>
      <td>
        <img src="https://snxd.akamaized.net/demoassets/moon/Earth_and_Limb_M1199291564L_color_2stretch.png" width="150" align="center" />
      </td>
      <td>High resolution image of the Earth from NASA's LRO spacecraft vantage point in orbit around the moon. <br><a href="https://www.nasa.gov/image-feature/goddard/lro-earthrise-2015" target="_blank">Read more..</a></td>
      <td>301MB</td>
      <td>
        <center>
          <button onclick="downloadItem('Earth Rise', 'Earth_and_Limb_M1199291564L_color_2stretch')">
            <i class="fa fa-download"></i> Download</button>
        </center>
      </td>
    </tr>
    <tr>
      <td><b>Moon Crater</b></td>
      <td>
        <img src="https://snxd.akamaized.net/demoassets/moon/M1265532953_LRmos.warp.str01.crop.24in_20180213_110016.png" width="150" align="center" />
      </td>
      <td>High resolution image of one of the craters on the moon's surface.</td>
      <td>97MB</td>
      <td>
        <center>
          <button onclick="downloadItem('Moon Crater', 'M1265532953_LRmos.warp.str01.crop.24in_20180213_110016')">
            <i class="fa fa-download"></i> Download</button>
        </center>
      </td>
    </tr>
    </tbody>
  </table>
</div>
              
            
!

CSS

              
                .download-popup {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
}

.download-list {
  border-collapse: collapse;
  background-color: white;
}
.download-list a {
  color: #aa2828;
}
.download-list td,
.download-list th {
  font-family: Open Sans;
  font-size: 15px;
  color: #535353;
  vertical-align: top;
  line-height: 1.6;
  border: 0px solid lightgray;
}
.download-list td { 
  padding: 10px;
}
.download-list td:nth-child(1) {
  width: 100px;
  text-align: center;
}
.download-list td:nth-child(2) {
  width: 170px;
  text-align: center;
}
.download-list td:nth-child(5) {
  width: 170px;
  text-align: center;
}
.download-list td img {
  padding-right: 6px;
  padding-bottom: 6px;
}
.download-list th {
  background-color: #e7e2e2;
}
.download-list th h4 {
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  margin: 6px;
}

.download-app button {
  font-family: Raleway, Open Sans;
  font-weight: 600;
  text-transform: uppercase;
  border-width: 0px;
  border-bottom: 3px;
  border-color: #73353f;
  border-style: solid;
  border-radius: 4px;
  padding: 8px;
  padding-left: 16px;
  padding-right: 16px;
  background-color: #a24d4f;
  color: white;
}
.download-app button:hover {
  color: #f8f1d1;
  cursor: pointer;
}
.download-app button:disabled {
  background-color: #e0e0e0 !important;
  border-color: lightgray !important;
  color: #909090 !important;
}
.download-app button.alignright {
  float: right;
}

              
            
!

JS

              
                function downloadItem(name, img) {
    var url = "https://snxd.akamaized.net/demoassets/moon/" + img + ".tif";
  
    var directDlm = createDirectDlm();      
  directDlm.setIdWin("9ae589e4-58e9-4831-9a4f-9570110e0514");  
  directDlm.setIdMac("5c0635ec-3d1e-4c89-aa74-c6c580b8ea2f");
    directDlm.setFilename("SingleDownloadDLM");
    directDlm.addItem(url, name);
    directDlm.download();
}
              
            
!
999px

Console