Skip to content

Commit

Permalink
Merge pull request #352 from Microsoft/zhiqing-samplegallery
Browse files Browse the repository at this point in the history
sample gallery
  • Loading branch information
SLdragon authored Feb 2, 2019
2 parents 3ba0d57 + 99c2f18 commit 658b828
Show file tree
Hide file tree
Showing 15 changed files with 12,159 additions and 5 deletions.
574 changes: 574 additions & 0 deletions assets/views/gallery.css

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions assets/views/gallery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!doctype html>
<html>
<head>
<link href="gallery.css" rel="stylesheet">
<script src="vue.js"></script>
<script src="vue-select.js"></script>
<script src="velocity.min.js"></script>
</head>
<body>
<div id="example">
<div id="main" v-cloak>
<div id="filter">
<v-select ref="filter" placeholder="Choose a Device" v-model="selectedLogicalDevice" :options="logicalDeviceOptions"></v-select>
</div>
<div id="featured" v-if="featuredExample">
<span v-if="featuredExample.difficulty" v-bind:class="'difficulty ' + featuredExample.difficulty"></span>
<img v-bind:src="featuredExample.image || '/images/no-image.jpg'">
<div class="body">
<h2>{{ featuredExample.name }}</h2>
<div class="description" v-bind:title="featuredExample.description" v-if="featuredExample.description">{{ featuredExample.description }}</div>
<div class="buttons">
<button v-on:click="openLink(featuredExample.tutorial)" v-if="featuredExample.tutorial">View Tutorial</button>
<button v-on:click.left="openSample(featuredExample, featuredExample.url, boardId, $event)">Open Sample</button>
</div>
</div>
</div>
<transition-group name="elist" ref="elist" tag="ul" class="example-list">
<li v-for="(example, index) in selectedExamples" v-bind:data-index="index" :key="example.name" v-on:click="openLink(example.tutorial)" class="elist-item">
<div class="header">
<span v-if="example.difficulty" v-bind:class="'difficulty ' + example.difficulty"></span>
<img v-bind:src="example.image || '/images/no-image.jpg'">
</div>
<div class="body">
<h2 v-bind:class="{'example-link': example.tutorial}">{{ example.name }}</h2>
<div class="description" v-bind:title="example.description" v-if="example.description">{{ example.description.length > 80 ? example.description.substr(0, 77) + '...' : example.description }}</div>
<div class="buttons">
<!-- Fake button. The entire block is clickable. -->
<div v-if="example.tutorial" class="example-link tutorial">View Tutorial</div>
<button v-on:click.left.stop="openSample(example, example.url, boardId, $event)">Open Sample</button>
</div>
</div>
</li>
</transition-group>
</div>
<aside id="aside"></aside>
</div>
<script src="gallery.js"></script>
</body>
</html>
Loading

0 comments on commit 658b828

Please sign in to comment.