~netlandish/django-wiki

0b2c4ca9418ad17764183a2e10b2bc947d0ce931 — Benjamin Balder Bach 4 years ago f5e08d5 + bb2b8cf
Merge pull request #6 from slinkymanbyday/boostrap4

Boostrap4
M src/wiki/templates/wiki/article.html => src/wiki/templates/wiki/article.html +1 -1
@@ 12,7 12,7 @@

  <div id="article-container">
   <nav id="article-menu" class="navbar navbar-expand-md nav-pills">
    <ul class="navbar-nav w-100">
    <ul class="navbar-nav w-75">
    <li class="float-left nav-item" id="article-title-li">
        <h1 id="article-title">
          {{ article.current_revision.title }}

M src/wiki/templates/wiki/base_site.html => src/wiki/templates/wiki/base_site.html +4 -2
@@ 95,14 95,16 @@
            {% endspaceless %}"
      >
      <div class="input-group">
        <input type="search" class="form-control mr-sm-2" aria-label="Search" name="q" placeholder="{% spaceless %}
        <input type="search" class="form-control" aria-label="Search" name="q" placeholder="{% spaceless %}
                {% if article or urlpath %}
                   {% trans "Search from current article..." %}
                {% else %}
                  {% trans "Search whole wiki..." %}
                {% endif %}
              {% endspaceless %}" />
        <button class="btn btn-outline-light my-sm-0" type="submit"><span class="fa fa-search"></span></button>
        <div class="input-group-append">
          <button class="btn btn-outline-light my-sm-0" type="submit"><span class="fa fa-search"></span></button>
        </div>
        </div>
      </form>
    </div>

M src/wiki/templates/wiki/includes/article_menu.html => src/wiki/templates/wiki/includes/article_menu.html +6 -6
@@ 3,7 3,7 @@
{% with selected_tab as selected %}

<li class="nav-item">
  <a href="{% url 'wiki:get' article_id=article.id path=urlpath.path %}" class="nav-link{% if selected == "view" %} active{% endif %}">
  <a href="{% url 'wiki:get' article_id=article.id path=urlpath.path %}" class="px-3 nav-link{% if selected == "view" %} active{% endif %}">
    <span class="fa fa-home"></span>
    <span class="hidden-xs">{% trans "View" %}</span>
  </a>


@@ 11,14 11,14 @@

{% if article|can_write:user and not article.current_revision.locked %}
<li class="nav-item">
  <a href="{% url 'wiki:edit' article_id=article.id path=urlpath.path %}" class="nav-link{% if selected == "edit" %} active{% endif %}">
  <a href="{% url 'wiki:edit' article_id=article.id path=urlpath.path %}" class="px-3 nav-link{% if selected == "edit" %} active{% endif %}">
    <span class="fa fa-edit"></span>
    <span class="hidden-xs">{% trans "Edit" %}</span>
  </a>
</li>
{% else %}
<li class="nav-item">
  <a href="{% url 'wiki:source' article_id=article.id path=urlpath.path %}" class="nav-link{% if selected == "source" %} active{% endif %}">
  <a href="{% url 'wiki:source' article_id=article.id path=urlpath.path %}" class="px-3 nav-link{% if selected == "source" %} active{% endif %}">
    <span class="fa fa-lock"></span>
    <span class="hidden-xs">{% trans "View Source" %}</span>
  </a>


@@ 26,7 26,7 @@
{% endif %}

<li class="nav-item">
  <a href="{% url 'wiki:history' article_id=article.id path=urlpath.path %}" class="nav-link{% if selected == "history" %} active{% endif %}">
  <a href="{% url 'wiki:history' article_id=article.id path=urlpath.path %}" class="px-3 nav-link{% if selected == "history" %} active{% endif %}">
    <span class="fa fa-clock"></span>
    <span class="hidden-xs">{% trans "Changes" %}</span>
  </a>


@@ 34,7 34,7 @@

{% for plugin in article_tabs %}
  <li class="nav-item">
    <a href="{% url 'wiki:plugin' slug=plugin.slug article_id=article.id path=urlpath.path %}" class="nav-link{% if selected == plugin.slug %} active{% endif %}">
    <a href="{% url 'wiki:plugin' slug=plugin.slug article_id=article.id path=urlpath.path %}" class="px-3 nav-link{% if selected == plugin.slug %} active{% endif %}">
      <span class="{{ plugin.article_tab.1 }}"></span>
      <span class="hidden-xs">{{ plugin.article_tab.0 }}</span>
    </a>


@@ 43,7 43,7 @@

{% if not user.is_anonymous %}
<li class="nav-item">
  <a href="{% url 'wiki:settings' article_id=article.id path=urlpath.path %}" class="nav-link{% if selected == "settings" %} active{% endif %}">
  <a href="{% url 'wiki:settings' article_id=article.id path=urlpath.path %}" class="px-3 nav-link{% if selected == "settings" %} active{% endif %}">
    <span class="fa fa-wrench"></span>
    <span class="hidden-xs">{% trans "Settings" %}</span>
  </a>

M src/wiki/templates/wiki/includes/breadcrumbs.html => src/wiki/templates/wiki/includes/breadcrumbs.html +4 -3
@@ 1,13 1,14 @@
{% load i18n %}
{% if urlpath %}
<div id="article-breadcrumbs">

<ol class="breadcrumb float-left">
<div id="article-breadcrumbs" class="row">
<nav aria-label="breadcrumb">
<ol class="breadcrumb my-0">
  {% for ancestor in urlpath.cached_ancestors %}
    <li class="breadcrumb-item"><a href="{% url 'wiki:get' path=ancestor.path %}">{{ ancestor.article.current_revision.title|truncatechars:25 }}</a></li>
  {% endfor %}
  <li class="breadcrumb-item active">{{ article.current_revision.title|truncatechars:25 }}</li>
</ol>
</nav>
  <div class="btn-group" style="margin-left: 10px;">
    <button class="btn btn-info dropdown-toggle" data-toggle="dropdown" href="#" style="padding: 7px;" type="button"
            title="{% trans "Sub-articles for" %} {{ article.current_revision.title }}"

M src/wiki/templates/wiki/search.html => src/wiki/templates/wiki/search.html +1 -1
@@ 18,7 18,7 @@
    {% endif %}
    <div class="input-group">
      <input type="search" class="form-control search-query" name="q" value="{{ search_query }}" />
      <span class="input-group-btn">
      <span class="input-group-append">
        <button class="btn btn-secondary" type="submit">
          <span class="fa fa-search"></span>
        </button>