news.html 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <template name="news">
  2. {{> header}}
  3. <main class="content-box row hack-container">
  4. <h3 class="black-text thin center">News</h3>
  5. {{#each articles}}
  6. <div class="card light-blue-text col m6 s12 l6 offset-m3 offset-l3">
  7. <div class="card-content">
  8. <h3 class="center">{{title}}</h3>
  9. <hr style="margin: 15px;">
  10. <p id="news-content" style="word-wrap:break-word;" class="black-text">
  11. {{content}}
  12. </p>
  13. </div>
  14. <div class="card-action">
  15. <span>Posted by: {{author}}.</span><br>
  16. <span>Created at: {{rtime time}}.</span>
  17. </div>
  18. </div>
  19. {{/each}}
  20. </main>
  21. <div class="fixed-action-btn" style="bottom: 45px; right: 24px;">
  22. <a class="btn-floating btn-large red modal-trigger" href="#createArticle"><i class="large material-icons">add</i></a>
  23. </div>
  24. <div id="createArticle" class="modal">
  25. <div class="modal-content musare white-text">
  26. <h4 class="center-align">Create Article</h4>
  27. <div class="row">
  28. <div class="input-field col l8 m8 s12 offset-l2 offset-m2">
  29. <label for="title" class="white-text">Title</label>
  30. <input class="validate" name="title" id="title" type="text"/>
  31. </div>
  32. <div class="input-field col l8 m8 s12 offset-l2 offset-m2">
  33. <textarea class="materialize-textarea validate" name="content" id="content" type="text"></textarea>
  34. <label for="content" class="white-text">Content</label>
  35. </div>
  36. <div class="col l8 m8 s12 offset-l2 offset-m2">
  37. <div class="switch">
  38. <label class="white-text">
  39. Post as myself
  40. <input id="anonymous" type="checkbox">
  41. <span class="lever"></span>
  42. Post anonymous
  43. </label>
  44. </div>
  45. </div>
  46. </div>
  47. <div class="row">
  48. <button type="button" id="createArticleButton" class="btn btn-large col l6 m6 s10 offset-l3 offset-m3 offset-s1 waves-effect waves-light">Create Article</button>
  49. </div>
  50. </div>
  51. <div class="modal-footer musare white-text">
  52. <a href="#!" class="modal-action modal-close waves-effect waves-light btn-flat white">X</a>
  53. </div>
  54. </div>
  55. <script>
  56. $(document).ready(function(){
  57. // the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered
  58. $('.modal-trigger').leanModal();
  59. });
  60. </script>
  61. {{> footer}}
  62. </template>