layout.html 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. {% macro menu_item(name, endpoint=None) -%}
  2. <li{% if request.endpoint == endpoint %} class="active"{% endif %}><a href="{{ url_for(endpoint) if endpoint else "#" }}">{{ name }}</a></li>
  3. {%- endmacro -%}
  4. <!doctype html>
  5. <html lang="fr">
  6. <head>
  7. {% block head -%}
  8. <meta charset="utf-8">
  9. <title>FFDN ISP Database</title>
  10. <!-- meta -->
  11. <link type="text/plain" rel="author" href="/humans.txt" />
  12. <!-- icon
  13. <link rel="shortcut icon" href="favicon.ico"> -->
  14. <!-- css -->
  15. <link rel=stylesheet type=text/css href="{{ url_for('static', filename='css/bootstrap.css') }}">
  16. <link rel=stylesheet type=text/css href="{{ url_for('static', filename='css/bootstrap-responsive.css') }}">
  17. <link rel=stylesheet type=text/css href="{{ url_for('static', filename='css/jquery.ui.all.css') }}">
  18. <link rel=stylesheet type=text/css href="{{ url_for('static', filename='css/bootstrap-select.min.css') }}">
  19. <link rel=stylesheet type=text/css href="{{ url_for('static', filename='css/leaflet.css') }}">
  20. <link rel=stylesheet type=text/css href="{{ url_for('static', filename='css/flags.css') }}">
  21. <link rel=stylesheet type=text/css href="{{ url_for('static', filename='css/style.css') }}">
  22. {%- endblock %}
  23. </head>
  24. <body>
  25. <div id="wrap">
  26. <div class="navbar navbar-static-top">
  27. <div class="navbar-inner">
  28. <div class="container">
  29. <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
  30. <span class="icon-bar"></span>
  31. <span class="icon-bar"></span>
  32. <span class="icon-bar"></span>
  33. </a>
  34. <a class="brand" href="/"><span id="ffdn-header"><span>F</span><span>F</span><span>D</span><span>N</span></span> Database</a>
  35. <div class="nav-collapse collapse">
  36. <div id="locale-selector" data-target="#locale-modal" data-toggle="modal">
  37. <div class="flag flag-{{ current_locale()|locale_flag }}"></div>
  38. <div class="locale-name">{{ current_locale() }}</div>
  39. </div>
  40. <div class="pull-right divider-vertical locale-divider"></div>
  41. <form method="get" action="/search" class="navbar-search pull-right">
  42. <input type="text" id="search-input" class="search-query input-medium" name="q" placeholder="{{ _("Search") }}" />
  43. </form>
  44. <ul class="nav pull-right">
  45. {{ menu_item(_("Home"), 'ispdb.home') }}
  46. {{ menu_item(_("Project List"), 'ispdb.project_list') }}
  47. {{ menu_item(_("Format"), 'ispdb.format') }}
  48. {{ menu_item(_("API"), 'ispdb.api') }}
  49. <li class="divider-vertical"></li>
  50. </ul>
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. <div id="locale-modal" class="modal hide" data-remote="{{ url_for('ispdb.locale_selector') }}">
  56. <form method="post" action="{{ url_for('ispdb.locale_selector') }}">
  57. <div class="modal-header">
  58. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
  59. <h3>{{ _("Choose your language") }}</h3>
  60. </div>
  61. <div class="modal-body"></div>
  62. <div class="modal-footer">
  63. <button class="btn" data-dismiss="modal" aria-hidden="true">{{ _("Close") }}</button>
  64. <button class="btn btn-primary">{{ _("Confirm") }}</button>
  65. </div>
  66. </form>
  67. </div>
  68. <div id="main-container" class="container">
  69. {%- with messages = get_flashed_messages(with_categories="true") -%}
  70. {%- if messages -%}
  71. {%- for category, message in messages %}
  72. <div class="alert alert-{{ category }} fade in">
  73. <button class="close" data-dismiss="alert">×</button>
  74. {{ message }}
  75. </div>
  76. {%- endfor -%}
  77. {%- endif -%}
  78. {% endwith %}
  79. {%- block container %}
  80. <div class="page-header">
  81. {% block page_header -%}
  82. <h2>{% block page_title %}{% endblock %}</h2>
  83. {%- endblock %}
  84. </div>
  85. <div class="container">
  86. {%- block body %}{% endblock %}
  87. </div>
  88. {%- endblock container %}
  89. </div>
  90. <div id="push"></div>
  91. </div>
  92. <footer>
  93. <div class="container">
  94. <div class="bracket"></div>
  95. <p class="credit">Developed for the <a href="//ffdn.org">FDN Federation</a> by Gu1@<a href="https://www.cafai.fr">CAFAI</a> and <a href="/humans.txt">Many contributors</a>.</p>
  96. <p class="license"><a href="https://code.ffdn.org/FFDN/ffdn-db">Source code</a> licensed under the <a href="http://opensource.org/licenses/BSD-3-Clause">3-clause BSD license</a>.</p>
  97. <p class="contact">You can contact us at <a href="mailto:contact@ffdn.org">contact@ffdn.org</a>.</p>
  98. </div>
  99. </footer>
  100. {% block script -%}
  101. <script type="text/javascript" src="{{ url_for('static', filename='js/jquery.js') }}"></script>
  102. <script type="text/javascript" src="{{ url_for('static', filename='js/bootstrap.js') }}"></script>
  103. <script type="text/javascript" src="{{ url_for('static', filename='js/bootstrap-select.min.js') }}"></script>
  104. <script type="text/javascript" src="{{ url_for('static', filename='js/leaflet.js') }}"></script>
  105. <script type="text/javascript" src="{{ url_for('ispdb.site_js') }}"></script>
  106. {%- endblock %}
  107. </body>
  108. </html>