source: OpenWorkouts-current/ow/templates/base.pt @ 5ec3a0b

currentfeature/docs
Last change on this file since 5ec3a0b was 5ec3a0b, checked in by borja <borja@…>, 5 years ago

Imported sources from the old python2-only repository:

  • Modified the code so it is python 3.6 compatible
  • Fixed deprecation warnings, pyramid 1.10.x supported now
  • Fixed deprecation warnings about some libraries, like pyramid-simpleform
  • Added pytest-pycodestyle and pytest-flakes for automatic checks on the source code files when running tests.
  • Added default pytest.ini setup to enforce some default parameters when running tests.
  • Cleaned up the code a bit, catched up with tests coverage.
  • Property mode set to 100644
File size: 4.0 KB
Line 
1<!DOCTYPE html>
2
3<html xml:lang="en"
4      xmlns:tal="http://xml.zope.org/namespaces/tal"
5      xmlns:metal="http://xml.zope.org/namespaces/metal"
6      xmlns:i18n="http://xml.zope.org/namespaces/i18n"
7      i18n:domain="OpenWorkouts"
8      metal:define-macro="base"
9      tal:attributes="lang request.locale_name">
10
11  <head>
12
13    <meta charset="utf-8">
14    <meta http-equiv="X-UA-Compatible" content="IE=edge">
15    <meta name="viewport" content="width=device-width, initial-scale=1.0">
16    <meta name="description"
17          content="OpenWorkouts, tracking your workouts openly">
18    <meta name="author" content="The OpenWorkouts Project">
19
20    <metal:header-metas metal:define-slot="header-metas"></metal:header-metas>
21
22    <link rel="shortcut icon"
23          href="${request.static_url('ow:static/pyramid-16x16.png')}">
24
25    <!--! This should be 182x182px-->
26    <link rel="apple-touch-icon"
27          href="${request.static_url('ow:static/pyramid-16x16.png')}">
28
29    <title>
30      OpenWorkouts |
31      <metal:head-title metal:define-slot="head-title"></metal:head-title>
32    </title>
33
34    <link rel="stylesheet"
35          href="${request.static_url('ow:static/css/main.min.css')}" />
36
37    <link rel="stylesheet"
38          href="${request.static_url('ow:static/css/openworkouts.css')}" />
39
40    <metal:css metal:define-slot="css"></metal:css>
41
42    <metal:header-js metal:define-slot="header-js"></metal:header-js>
43
44  </head>
45
46  <body class="is-login">
47
48    <div class="page">
49
50      <header class="header-content">
51        <h1 class="logo">
52          <a href="" tal:attributes="href request.resource_url(request.root)">
53            <span class="logo-open">Open</span><span class="logo-work">work</span><span class="logo-outs">outs</span>
54          </a>
55          <!--! <metal:title metal:define-slot="title"></metal:title> -->
56        </h1>
57        <p class="description">tracking your workouts openly</p>
58
59        <metal:menu tal:condition="request.authenticated_userid"
60                    tal:define="current_user request.authenticated_userid">
61
62          <nav class="nav-site">
63            <!--! renderer_name contains the name of the template rendered at
64              view-level, so we can use that to know in which sections is the
65              current user now -->
66            <ul>
67              <li class=""
68                  tal:attributes="class 'is-active' if 'dashboard' in renderer_name else ''">
69                <a href="" i18n:translate=""
70                   tal:attributes="href request.resource_url(request.root)">
71                  Dashboard</a>
72              </li>
73              <li class=""
74                  tal:attributes="class 'is-active' if 'profile' in renderer_name else ''">
75                <a href="" i18n:translate=""
76                   tal:attributes="href request.resource_url(request.root, current_user, 'profile')">
77                  My profile</a>
78              </li>
79              <li class="add-workout">
80                <a href="#"><span i18n:translate="">Add Workout</span></a>
81                <ul>
82                  <li>
83                    <a href="" i18n:translate=""
84                       tal:attributes="href request.resource_url(request.root, current_user, 'add-workout')">
85                      Upload file</a>
86                  </li>
87                  <li>
88                    <a href="" i18n:translate=""
89                       tal:attributes="href request.resource_url(request.root, current_user, 'add-workout-manually')">
90                      Add manually</a>
91                  </li>
92                </ul>
93              </li>
94              <li>
95                <a href="" i18n:translate=""
96                   tal:attributes="href request.resource_url(request.root, 'logout')">
97                  Log out
98                </a>
99              </li>
100            </ul>
101          </nav>
102        </metal:menu>
103      </header>
104
105      <metal:content metal:define-slot="content"></metal:content>
106
107    </div>
108
109    <script src="${request.static_url('ow:static/components/jquery/jquery.js')}"></script>
110
111    <metal:body-js metal:define-slot="body-js"></metal:body-js>
112
113  </body>
114
115</html>
Note: See TracBrowser for help on using the repository browser.