list.pug 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. extends ../layout
  2. block content
  3. //- We need to do .replace(/\//g, '\\/') do that '</script>' -> '<\/script>'
  4. //- and doesn't prematurely end the script tag.
  5. script#data(type="application/json").
  6. !{JSON.stringify({ projects: projects, tags: tags, notifications: notifications }).replace(/\//g, '\\/')}
  7. script(type="text/javascript").
  8. window.data = JSON.parse($("#data").text());
  9. window.algolia = {
  10. institutions: {
  11. app_id: '#{algolia_app_id}',
  12. api_key: '#{algolia_api_key}'
  13. }
  14. };
  15. .announcements(
  16. ng-controller="AnnouncementsController"
  17. ng-class="{ 'announcements-open': ui.isOpen }"
  18. ng-cloak
  19. )
  20. .announcements-backdrop(
  21. ng-if="ui.isOpen"
  22. ng-click="toggleAnnouncementsUI();"
  23. )
  24. a.announcements-btn(
  25. href
  26. ng-if="announcements.length"
  27. ng-click="toggleAnnouncementsUI();"
  28. ng-class="{ 'announcements-btn-open': ui.isOpen, 'announcements-btn-has-new': ui.newItems }"
  29. )
  30. span.announcements-badge(ng-if="ui.newItems") {{ ui.newItems }}
  31. .announcements-body(
  32. ng-if="ui.isOpen"
  33. )
  34. .announcements-scroller
  35. .announcement(
  36. ng-repeat="announcement in announcements | filter:(ui.newItems ? { read: false } : '') track by announcement.id"
  37. )
  38. h2.announcement-header {{ announcement.title }}
  39. p.announcement-description(ng-bind-html="announcement.excerpt")
  40. .announcement-meta
  41. p.announcement-date {{ announcement.date | date:"longDate" }}
  42. a.announcement-link(
  43. ng-href="{{ announcement.url }}"
  44. ng-click="logAnnouncementClick()",
  45. target="_blank"
  46. ) Read more
  47. div.text-center(
  48. ng-if="ui.newItems > 0 && ui.newItems < announcements.length"
  49. )
  50. a.btn.btn-default.btn-sm(
  51. href
  52. ng-click="showAll();"
  53. ) Show all
  54. .content.content-alt.project-list-page(ng-controller="ProjectPageController")
  55. .project-list-content
  56. .row.project-list-row(ng-cloak)
  57. .project-list-container(ng-if="projects.length > 0")
  58. aside.project-list-sidebar.col-md-2.col-xs-3
  59. include ./list/side-bar
  60. .project-list-main.col-md-10.col-xs-9
  61. include ./list/notifications
  62. include ./list/project-list
  63. .project-list-empty(ng-if="projects.length === 0")
  64. .col-md-offset-2.col-md-8.col-md-offset-2.col-xs-8
  65. include ./list/empty-project-list
  66. include ./list/modals