2
0

index.html 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Vue.js github commits example</title>
  5. <style>
  6. #demo {
  7. font-family: 'Helvetica', Arial, sans-serif;
  8. }
  9. a {
  10. text-decoration: none;
  11. color: #f66;
  12. }
  13. li {
  14. line-height: 1.5em;
  15. margin-bottom: 20px;
  16. }
  17. .author, .date {
  18. font-weight: bold;
  19. }
  20. </style>
  21. <!-- Delete ".min" for console warnings in development -->
  22. <script src="../../../dist/vue.min.js"></script>
  23. </head>
  24. <body>
  25. <div id="demo">
  26. <h1>Latest Vue.js Commits</h1>
  27. <template v-for="branch in branches">
  28. <input type="radio"
  29. :id="branch"
  30. :value="branch"
  31. name="branch"
  32. v-model="currentBranch">
  33. <label :for="branch">{{ branch }}</label>
  34. </template>
  35. <p>vuejs/vue@{{ currentBranch }}</p>
  36. <ul>
  37. <li v-for="record in commits">
  38. <a :href="record.html_url" target="_blank" class="commit">{{ record.sha.slice(0, 7) }}</a>
  39. - <span class="message">{{ record.commit.message | truncate }}</span><br>
  40. by <span class="author"><a :href="record.author.html_url" target="_blank">{{ record.commit.author.name }}</a></span>
  41. at <span class="date">{{ record.commit.author.date | formatDate }}</span>
  42. </li>
  43. </ul>
  44. </div>
  45. <script src="app.js"></script>
  46. </body>
  47. </html>