header.html 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <div class="header-wrap">
  2. <header id="page-header">
  3. <div class="d-flex align-items-center">
  4. <div class="title-logo-container hidden-xs hidden-sm">
  5. <a class="logo" href="/">
  6. <div class="light-logo">{% include '../../widget/logo.html' %}</div>
  7. </a>
  8. </div>
  9. <div class="title-container">
  10. <h1 class="title flex-item-title" id="revision-path"></h1>
  11. <div id="revision-url" class="url-line"></div>
  12. </div>
  13. {% if page %}
  14. <div>
  15. {% if user %}
  16. <button
  17. data-csrftoken="{{ csrf() }}"
  18. data-liked="{% if page.isLiked(user) %}1{% else %}0{% endif %}"
  19. class="like-button btn btn-default btn-outline btn-circle {% if page.isLiked(user) %}active{% endif %}"
  20. ><i class="icon-like"></i></button>
  21. {% endif %}
  22. </div>
  23. <div>
  24. {% if user %}
  25. <span id="bookmark-button"></span>
  26. {% endif %}
  27. </div>
  28. <ul class="authors hidden-sm hidden-xs">
  29. <li>
  30. <div class="d-flex align-items-center">
  31. <a class="m-r-5" href="{{ userPageRoot(page.creator) }}">
  32. <img src="{{ page.creator|default(author)|picture }}" class="picture img-circle">
  33. </a>
  34. <div>
  35. <div>Created by <a href="{{ userPageRoot(page.creator) }}">{{ page.creator.name|default(author.name) }}</a></div>
  36. <div class="text-muted">{{ page.createdAt|datetz('Y/m/d H:i:s') }}</div>
  37. </div>
  38. </div>
  39. </li>
  40. <li class="m-t-5">
  41. <div class="d-flex align-items-center">
  42. <a class="m-r-5" href="{{ userPageRoot(page.lastUpdateUser) }}">
  43. <img src="{{ page.lastUpdateUser|default(author)|picture }}" class="picture img-circle">
  44. </a>
  45. <div>
  46. <div>Updated by <a href="{{ userPageRoot(page.lastUpdateUser) }}">{{ page.lastUpdateUser.name|default(author.name) }}</a></div>
  47. <div class="text-muted">{{ page.updatedAt|datetz('Y/m/d H:i:s') }}</div>
  48. </div>
  49. </div>
  50. </li>
  51. </ul>
  52. {% endif %}
  53. {% if not page and ('/' === path or 'crowi' === behaviorType()) and not isUserPageList(path) and !isTrashPage() %}
  54. {% if '/' === path.slice(-1) %}
  55. {% include '../../widget/create_portal.html' %}
  56. {% endif %}
  57. {% endif %}
  58. </div>
  59. </header>
  60. </div>