#149 added master template
Merged 7 years ago by ryanlerch. Opened 7 years ago by ryanlerch.
ryanlerch/fedora-hubs mastertemplate  into  develop

file modified
+5 -81
@@ -1,80 +1,8 @@ 

- <html>

- <head>

-   <title>Groups</title>

-   <link href="{{ url_for('static', filename='bootstrap/css/bootstrap.css') }}" rel="stylesheet" />

-   <link href="{{ url_for('static', filename='css/style.css') }}" rel="stylesheet" />

-   <link href="{{ url_for('static', filename='css/pace-theme-minimal.css') }}" rel="stylesheet" />

- </head>

- <script src="{{ url_for('static', filename='js/pace.min.js') }}"></script>

- <body>

- <div class="super-header">

-   <div class="row">

-     <div class="col-xs-4" id="logo">

-       <img src="{{ url_for('static', filename='img/logo-hubs.png') }}" alt="Fedora Hubs">

-     </div>

-     <div class="col-sm-4 col-sm-push-4 col-xs-8">

-       {% if g.auth.logged_in %}

-         <div class="dropdown pull-right">

-           <img class = "icon" src="{{ url_for('static', filename='img/irc_icon.png') }}" alt="IRC Chats">

-         <span class="dropdown-toggle" type="button" id="dropdownMenu1"

-             data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">

-           <img src="{{ g.auth.avatar }}" class="avatar" alt="User Icon"/>

-           {# Logged in as #} {{ g.auth.nickname }}

-           <span class="glyphicon glyphicon-chevron-down" aria-hidden="true"></span>

-         </span>

-         <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">

-           <li class="dropdown-header">Account Information</li>

-           <li><a href="#">Full Name: {{ g.auth.fullname }}</a></li>

-           <li><a href="#">Email: {{ g.auth.email }}</a></li>

-           <li role="separator" class="divider"></li>

-           <li><a href="#">Separated link</a></li>

-         </ul>

-       </div>

-       {% else %}

-         Not logged in.  Click to <a href="{{url_for('login_fedora')}}">login</a>.

-       {% endif %}

-     </div>

-     <div class="col-sm-4 col-sm-pull-4 col-xs-12">

-       <!-- NOT HOOKED UP TO ANYTHING XOXO -->

-       <div class="input-group">

-         <input type="search" placeholder="Search across all hubs ..."></input>

-         <span class="input-group-addon">

-           <span class="glyphicon glyphicon-search"></span>

-         </span>

-     </div>

-     </div>

-   </div>

- </div>

- <div class="bookmarks">

-   <nav class="navbar navbar-default">

-     <div class="container-fluid">

-       <div class="navbar-header">

-         <button type="button" class="navbar-toggle collapsed"

-             data-toggle="collapse"

-             data-target="#bs-example-navbar-collapse-1">

-           <span class="sr-only">Toggle navigation</span>

-           <span class="icon-bar"></span>

-           <span class="icon-bar"></span>

-           <span class="icon-bar"></span>

-         </button>

-       </div>

+ {% extends "master.html" %}

+ 

+ {% block title %}Groups{% endblock %}

+ {% block content %}

  

-       <!-- Collect the nav links, forms, and other content for toggling -->

-       <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">

-         <ul class="nav navbar-nav">

-           {% if g.auth.logged_in %}

-           <li {% if request.path.endswith('/' + g.auth.user.username + '/') %}class='active'{% endif %}>

-             <a href="/{{g.auth.user.username}}">me</a></li>

-           {% for hub in g.auth.user.bookmarks %}

-           <li class='idle-{{hub.activity_class}}{% if request.path.endswith('/' + hub.name + '/') %} active{% endif %}'>

-           <a href="/{{hub.name}}">{{hub.name}}</a></li>

-           {% endfor %}

-           {% endif %}

-         </ul>

-       </div><!-- /.navbar-collapse -->

-     </div><!-- /.container-fluid -->

-   </nav>

- </div>

  <div class="header">

    <div class="img-wrap">

      <img src="#" />
@@ -129,8 +57,4 @@ 

      </div>

    </div>

  </div>

- 

- <script src="{{ url_for('static', filename='js/jquery-1.10.2.min.js') }}"></script>

- <script src="{{ url_for('static', filename='bootstrap/js/bootstrap.min.js') }}"></script>

- </body>

- </html>

+ {% endblock %}

file modified
+7 -79
@@ -1,76 +1,7 @@ 

- <!DOCTYPE html>

- <html lang='en'>

- <head>

-   <title>{{ hub.name }}</title>

-   <link href="{{ url_for('static', filename='fedora-bootstrap/fedora-bootstrap.css') }}" rel="stylesheet" />

-   <link href="{{ url_for('static', filename='css/style.css') }}" rel="stylesheet" />

-   <link href="{{ url_for('static', filename='css/pace-theme-minimal.css') }}" rel="stylesheet" />

-   <script type="text/javascript"  src="{{ url_for('static', filename='js/pace.min.js') }}"></script>

-   <link href="{{ url_for('static', filename='open_iconic_1.1.0/css/open-iconic.min.css') }}"

-         type="text/css" rel="stylesheet" />

- </head>

- <body>

- <div class="masthead">

-   <div class="row p-a-0">

-     <div class="col-xs-4" id="logo">

-       <img src="{{ url_for('static', filename='img/logo-hubs.png') }}" alt="Fedora Hubs" height="40px" class="p-l-1">

-     </div>

-     <div class="col-sm-4 col-sm-push-4 col-xs-8">

-       {% if g.auth.logged_in %}

-         <div class="dropdown pull-xs-right showpointer">

-           <span class="dropdown-toggle m-r-1" type="button" id="dropdownMenu1"

-             data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">

-             <img src="{{ g.auth.avatar }}" id="avatar" alt="User Icon"/>

-           </span>

-           <div class="dropdown-menu dropdown-menu-right m-r-1" aria-labelledby="dropdownMenu1">

-             <h6 class="dropdown-header">Account Information</h6>

-             <a href="#" class="dropdown-item">Full Name: {{ g.auth.fullname }}</a>

-             <a href="#" class="dropdown-item">Email: {{ g.auth.email }}</a>

-             <div class="dropdown-divider"></div>

-             <a href="#" class="dropdown-item">Separated link</a>

-           </div>

-         </div>

-         <img id="chaticon" class="pull-xs-right m-r-2" src="{{ url_for('static', filename='img/irc_icon.png') }}" alt="IRC Chats">

-       {% else %}

-         Not logged in.  Click to <a href="{{url_for('login_fedora')}}">login</a>.

-       {% endif %}

-     </div>

-     <div class="col-sm-4 col-sm-pull-4 col-xs-12">

-       <!-- NOT HOOKED UP TO ANYTHING XOXO -->

-       <div class="input-group">

-         <input type="search" class="form-control" placeholder="Search across all hubs ..." aria-describedby="searchform-addon"></input>

-         <span class="input-group-addon" id="searchform-addon">

-           <span class="oi" data-glyph="magnifying-glass" / >

-         </span>

-     </div>

-     </div>

-   </div>

- </div>

- <div class="bodycontent">

- 

-   <nav class="navbar navbar-light navbar-underline p-t-0 p-b-0">

-         <button type="button" class="navbar-toggler hidden-sm-up"

-             data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">

-           <span class="sr-only">Toggle navigation</span>

-           <span class="oi" data-glyph="menu"></span>

-         </button>

+ {% extends "master.html" %}

  

-       <!-- Collect the nav links, forms, and other content for toggling -->

-       <div class="collapse navbar-toggleable-xs" id="bs-example-navbar-collapse-1">

-         <ul class="nav navbar-nav nav-underline">

-           {% if g.auth.logged_in %}

-           <li class="p-x-1 nav-item {% if request.path.endswith('/' + g.auth.user.username + '/') %}active{% endif %}">

-             <a class="nav-link" href="/{{g.auth.user.username}}">me</a></li>

-           {% for hub in g.auth.user.bookmarks %}

-           <li class='p-x-1 nav-item idle-{{hub.activity_class}}{% if request.path.endswith('/' + hub.name + '/') %} active{% endif %}'>

-           <a class="nav-link" href="/{{hub.name}}">{{hub.name}}</a></li>

-           {% endfor %}

-           <!-- At the end of the list, tack on a link to all groups -->

-           <li class="p-x-1 nav-item"><a class="nav-link" href="/groups">all</a></li>

-           {% endif %}

-         </ul>

-       </div><!-- /.navbar-collapse -->

-   </nav>

+ {% block title %}{{ hub.name }}{% endblock %}

+ {% block content %}

  <div class="header">

    {% if hub.user_hub %}

      <div class="padded center-block medium-wide">
@@ -229,12 +160,10 @@ 

    </div>

  </div>

  

- </div> <!--end bodycontent-->

+ {% endblock %}

  

- <script type="text/javascript" src="{{

-   url_for('static', filename='js/jquery-1.10.2.min.js') }}"></script>

-   <script type="text/javascript" src="{{

-   url_for('static',filename='fedora-bootstrap/fedora-bootstrap.js')}}"></script>

+ {% block jscripts %}

+ {{ super() }}

  <script type="text/javascript" src="{{

    url_for('static', filename='js/utils.js') }}"></script>

  
@@ -334,5 +263,4 @@ 

  setup_widgets();

  

  </script>

- </body>

- </html>

+ {% endblock %}

@@ -0,0 +1,85 @@ 

+ <!DOCTYPE html>

+ <html lang='en'>

+ <head>

+   <title>{% block title %}{% endblock %}</title>

+   <link href="{{ url_for('static', filename='fedora-bootstrap/fedora-bootstrap.css') }}" rel="stylesheet" />

+   <link href="{{ url_for('static', filename='css/style.css') }}" rel="stylesheet" />

+   <link href="{{ url_for('static', filename='css/pace-theme-minimal.css') }}" rel="stylesheet" />

+   <script type="text/javascript"  src="{{ url_for('static', filename='js/pace.min.js') }}"></script>

+   <link href="{{ url_for('static', filename='open_iconic_1.1.0/css/open-iconic.min.css') }}"

+         type="text/css" rel="stylesheet" />

+ </head>

+ <body>

+ <div class="masthead">

+   <div class="row p-a-0">

+     <div class="col-xs-4" id="logo">

+       <img src="{{ url_for('static', filename='img/logo-hubs.png') }}" alt="Fedora Hubs" height="40px" class="p-l-1">

+     </div>

+     <div class="col-sm-4 col-sm-push-4 col-xs-8">

+       {% if g.auth.logged_in %}

+         <div class="dropdown pull-xs-right showpointer">

+           <span class="dropdown-toggle m-r-1" type="button" id="dropdownMenu1"

+             data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">

+             <img src="{{ g.auth.avatar }}" id="avatar" alt="User Icon"/>

+           </span>

+           <div class="dropdown-menu dropdown-menu-right m-r-1" aria-labelledby="dropdownMenu1">

+             <h6 class="dropdown-header">Account Information</h6>

+             <a href="#" class="dropdown-item">Full Name: {{ g.auth.fullname }}</a>

+             <a href="#" class="dropdown-item">Email: {{ g.auth.email }}</a>

+             <div class="dropdown-divider"></div>

+             <a href="#" class="dropdown-item">Separated link</a>

+           </div>

+         </div>

+         <img id="chaticon" class="pull-xs-right m-r-2" src="{{ url_for('static', filename='img/irc_icon.png') }}" alt="IRC Chats">

+       {% else %}

+         Not logged in.  Click to <a href="{{url_for('login_fedora')}}">login</a>.

+       {% endif %}

+     </div>

+     <div class="col-sm-4 col-sm-pull-4 col-xs-12">

+       <!-- NOT HOOKED UP TO ANYTHING XOXO -->

+       <div class="input-group">

+         <input type="search" class="form-control" placeholder="Search across all hubs ..." aria-describedby="searchform-addon"></input>

+         <span class="input-group-addon" id="searchform-addon">

+           <span class="oi" data-glyph="magnifying-glass" / >

+         </span>

+     </div>

+     </div>

+   </div>

+ </div>

+ <div class="bodycontent">

+ 

+   <nav class="navbar navbar-light navbar-underline p-t-0 p-b-0">

+         <button type="button" class="navbar-toggler hidden-sm-up"

+             data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">

+           <span class="sr-only">Toggle navigation</span>

+           <span class="oi" data-glyph="menu"></span>

+         </button>

+ 

+       <!-- Collect the nav links, forms, and other content for toggling -->

+       <div class="collapse navbar-toggleable-xs" id="bs-example-navbar-collapse-1">

+         <ul class="nav navbar-nav nav-underline">

+           {% if g.auth.logged_in %}

+           <li class="p-x-1 nav-item {% if request.path.endswith('/' + g.auth.user.username + '/') %}active{% endif %}">

+             <a class="nav-link" href="/{{g.auth.user.username}}">me</a></li>

+           {% for hub in g.auth.user.bookmarks %}

+           <li class='p-x-1 nav-item idle-{{hub.activity_class}}{% if request.path.endswith('/' + hub.name + '/') %} active{% endif %}'>

+           <a class="nav-link" href="/{{hub.name}}">{{hub.name}}</a></li>

+           {% endfor %}

+           <!-- At the end of the list, tack on a link to all groups -->

+           <li class="p-x-1 nav-item"><a class="nav-link" href="/groups">all</a></li>

+           {% endif %}

+         </ul>

+       </div><!-- /.navbar-collapse -->

+   </nav>

+ {% block content %}{% endblock %}

+ 

+ </div> <!--end bodycontent-->

+ {% block jscripts %}

+ <script type="text/javascript" src="{{

+   url_for('static', filename='js/jquery-1.10.2.min.js') }}"></script>

+   <script type="text/javascript" src="{{

+   url_for('static',filename='fedora-bootstrap/fedora-bootstrap.js')}}"></script>

+ {% endblock %}

+ 

+ </body>

+ </html>

added a master template, and changed hub.html and groups.html
to use the new master tempate

Cool, :thumbsup: thanks :)

Pull-Request has been merged by ryanlerch

7 years ago