layout.html 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <!DOCTYPE html>
  2. <html>
  3. {% block html_head %}
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <title>{% block html_title %}{% endblock %} {{ config.crowi['app:title']|default('Crowi') }}</title>
  8. <meta name="description" content="">
  9. <meta name="author" content="">
  10. <meta name="viewport" content="width=device-width,initial-scale=1">
  11. <link rel="stylesheet" href="/css/crowi{% if env == 'production' %}.min{% endif %}.css">
  12. <script src="/js/bundled{% if env == 'production' %}.min{% endif %}.js"></script>
  13. <link href='//fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
  14. </head>
  15. {% endblock %}
  16. {% block html_body %}
  17. <body
  18. class="crowi main-container {% block html_base_css %}{% endblock %}"
  19. data-me="{{ user._id.toString() }}"
  20. {% block html_base_attr %}{% endblock %}
  21. >
  22. <div id="fb-root"></div>
  23. <script>
  24. window.fbAsyncInit = function() {
  25. FB.init({
  26. appId : '{{ facebook.appId }}', // App ID
  27. //channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File
  28. status : true, // check login status
  29. cookie : true, // enable cookies to allow the server to access the session
  30. xfbml : true // parse XFBML
  31. });
  32. };
  33. (function(d){
  34. var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
  35. js = d.createElement('script'); js.id = id; js.async = true;
  36. js.src = "//connect.facebook.net/en_US/all.js";
  37. d.getElementsByTagName('head')[0].appendChild(js);
  38. }(document));
  39. </script>
  40. {% block layout_head_nav %}
  41. <nav class="crowi-header navbar navbar-default" role="navigation">
  42. <!-- Brand and toggle get grouped for better mobile display -->
  43. <div class="navbar-header">
  44. <a class="navbar-brand" href="/">
  45. <img alt="Crowi" src="/logo/32x32.png" width="16">
  46. {% block title %}{{ config.crowi['app:title']|default('Crowi') }}{% endblock %}
  47. </a>
  48. {% if searchConfigured() %}
  49. <div class="navbar-form navbar-left search-top visible-lg visible-md" role="search" id="search-top">
  50. </div>
  51. {% endif %}
  52. </div>
  53. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbarCollapse">
  54. <span class="sr-only">Toggle navigation</span>
  55. <span class="icon-bar"></span>
  56. <span class="icon-bar"></span>
  57. <span class="icon-bar"></span>
  58. </button>
  59. <!-- Collect the nav links, forms, and other content for toggling -->
  60. <div class="collapse navbar-collapse" id="navbarCollapse">
  61. <ul class="nav navbar-nav navbar-right">
  62. {% if user and user.admin %}
  63. <li id="">
  64. <a href="/admin" id="link-mypage">
  65. <i class="fa fa-cube"></i> 管理
  66. </a>
  67. </li>
  68. {% endif %}
  69. {#
  70. <li id="">
  71. <a href="#" id="createPage">
  72. <i class="fa fa-plus"> 新規</i>
  73. </a>
  74. </li>
  75. #}
  76. {% if user %}
  77. {#
  78. <li id="" class="notif">
  79. <a href="" id="notif-opener">
  80. <i class="fa fa-globe"></i> <span class="badge badge-danger">6</span>
  81. </a>
  82. </li>
  83. #}
  84. <li id="" class="dropdown">
  85. <button class="btn btn-default create-page-button" data-target="#create-page" data-toggle="modal">
  86. <i class="fa fa-pencil"></i> 作成
  87. </button>
  88. </li>
  89. <li id="login-user">
  90. <a href="/user/{{ user.username }}" id="link-mypage">
  91. <img src="{{ user|picture }}" class="picture picture-rounded" width="25" /> {{ user.name }}
  92. </a>
  93. </li>
  94. <li class="dropdown">
  95. <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-bars"></i> <label class="sr-only">メニュー</label></a>
  96. <ul class="dropdown-menu">
  97. <li><a href="/me"><i class="fa fa-gears"></i> ユーザー設定</a></li>
  98. <li class="divider"></li>
  99. <li><a href="/trash/"><i class="fa fa-trash-o"></i> 削除済みページ</a></li>
  100. <li class="divider"></li>
  101. <li><a href="/logout"><i class="fa fa-sign-out"></i> ログアウト</a></li>
  102. {# <li><a href="#">今日の日報を作成</a></li> #}
  103. {# <li class="divider"></li> #}
  104. {# <li class="divider"></li> #}
  105. {# <li><a href="#">ログアウト</a></li> #}
  106. </ul>
  107. </li>
  108. {% else %}
  109. <li id="login-user"><a href="/login" id="login"><i class="fa fa-user"></i> Login</a></li>
  110. {% endif %}
  111. {% if config.crowi['app:confidential'] && config.crowi['app:confidential'] != '' %}
  112. <li class="confidential"><a href="#">{{ config.crowi['app:confidential'] }}</a></li>
  113. {% endif %}
  114. </ul>
  115. </div><!-- /.navbar-collapse -->
  116. </nav>
  117. {% include '../modal/widget_create_page.html' %}
  118. {% endblock %} {# layout_head_nav #}
  119. <div class="container-fluid">
  120. <div class="row">
  121. {% block layout_sidebar %}
  122. {% endblock %} {# layout_sidebar #}
  123. {% block layout_main %}
  124. {% endblock %} {# layout_main #}
  125. {% block footer %}
  126. {% endblock %}
  127. </div> {# /.row #}
  128. </div> {# /.container-fluid #}
  129. {% block body_end %}
  130. {% endblock %}
  131. </body>
  132. {% endblock %}
  133. <script src="/js/app{% if env == 'production' %}.min{% endif %}.js"></script>
  134. <script src="/js/crowi{% if env == 'production' %}.min{% endif %}.js"></script>
  135. </html>