import cherrypy

import html_strings

import utils

class About(object):

    @cherrypy.expose
    def index(self):

        is_mobile = False

        if "User-Agent" in cherrypy.request.headers and ("Android" in cherrypy.request.headers['User-Agent'] or "iPhone" in cherrypy.request.headers['User-Agent'] or "iPad" in cherrypy.request.headers['User-Agent']):
            is_mobile = True

        if is_mobile:

            html_string = """
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

"""+html_strings.google_adsense_conversion_tracking_global_site_tag+"""

<title>
Ecommunicate
</title>
<style>

nav a, button {
    min-width: 48px;
    min-height: 48px;
}

html, body {
    height: 100%;
    width: 100%;
    margin-top:0;
    margin-left:0;
    margin-right:0;
}

a#menu svg {
    width: 40px;
    fill: #000;
}

main {
    width: 100%;
    height: 100%;
}

nav {
    width: 250px;
    height: 100%;
    position: fixed;
    transform: translate(-250px, 0);
    transition: transform 0.3s ease;
}

nav.open {
    transform: translate(0, 0);
}

.header {
    float : right
}

.content {
    padding-left:1em;
    padding-right:1em;
}

</style>
</head>
<body>
<nav id="drawer" style="background-color:LightGrey">
<center><h2 style="margin-top:0">Ecommunicate</h2></center>"""+(html_strings.authenticated_mobile_navigation_menu if utils.is_session_authenticated() else html_strings.not_authenticated_mobile_navigation_menu)+"""
</nav>
<main>
<div style = "width:100%;top:0;left:0;">
<a id="menu">
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
    <path d="M2 6h20v3H2zm0 5h20v3H2zm0 5h20v3H2z" />
  </svg>
</a>
<div class = "header">
<h1 style="margin-top:0;margin-bottom:0">Ecommunicate</h1>
</div>
</div>

<div class = "content">
<center><h2>About This Website</h2></center>
"""+html_strings.about_html_string+"""

</div></main>

<script type="text/javascript" src="https://code.jquery.com/jquery-3.1.0.js"></script>

<script type="text/javascript">

var menu = document.querySelector('#menu');

var main = document.querySelector('main');

var drawer = document.querySelector('#drawer');

menu.addEventListener('click', function(e) {
    drawer.classList.toggle('open');
    e.stopPropagation();
});

main.addEventListener('click', function() {
    drawer.classList.remove('open');
});

main.addEventListener('touchstart', function() {
    drawer.classList.remove('open');
});

</script>        

</body></html>

"""

        else:

            html_string = """
<html>
<head>

"""+html_strings.google_adsense_conversion_tracking_global_site_tag+"""

<title>
Ecommunicate
</title>
<style>
.nonheader { width:960px; margin: 80px auto 0px auto;  }     

"""+html_strings.header_style+"""
</style>
</head>
<body>
"""+(html_strings.authenticated_header if utils.is_session_authenticated() else html_strings.not_authenticated_header)+"""

<div class = "nonheader">

<center>
<h2>About This Website</h2>
</center>
"""+html_strings.about_html_string+"""

</div>

</body>
</html>
"""
        return html_string

aaa264c13f482e3df9e7da50083be3b776e7f1b7
<mask token>

<mask token>


class About(object):
    <mask token>

<mask token>


class About(object):

    @cherrypy.expose
    def index(self):
        is_mobile = False
        if 'User-Agent' in cherrypy.request.headers and ('Android' in
            cherrypy.request.headers['User-Agent'] or 'iPhone' in cherrypy.
            request.headers['User-Agent'] or 'iPad' in cherrypy.request.
            headers['User-Agent']):
            is_mobile = True
        if is_mobile:
            html_string = """
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

""" + html_strings.google_adsense_conversion_tracking_global_site_tag + """

<title>
Ecommunicate
</title>
<style>

nav a, button {
    min-width: 48px;
    min-height: 48px;
}

html, body {
    height: 100%;
    width: 100%;
    margin-top:0;
    margin-left:0;
    margin-right:0;
}

a#menu svg {
    width: 40px;
    fill: #000;
}

main {
    width: 100%;
    height: 100%;
}

nav {
    width: 250px;
    height: 100%;
    position: fixed;
    transform: translate(-250px, 0);
    transition: transform 0.3s ease;
}

nav.open {
    transform: translate(0, 0);
}

.header {
    float : right
}

.content {
    padding-left:1em;
    padding-right:1em;
}

</style>
</head>
<body>
<nav id="drawer" style="background-color:LightGrey">
<center><h2 style="margin-top:0">Ecommunicate</h2></center>""" + (html_strings.authenticated_mobile_navigation_menu if utils.is_session_authenticated() else html_strings.not_authenticated_mobile_navigation_menu) + """
</nav>
<main>
<div style = "width:100%;top:0;left:0;">
<a id="menu">
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
    <path d="M2 6h20v3H2zm0 5h20v3H2zm0 5h20v3H2z" />
  </svg>
</a>
<div class = "header">
<h1 style="margin-top:0;margin-bottom:0">Ecommunicate</h1>
</div>
</div>

<div class = "content">
<center><h2>About This Website</h2></center>
""" + html_strings.about_html_string + """

</div></main>

<script type="text/javascript" src="https://code.jquery.com/jquery-3.1.0.js"></script>

<script type="text/javascript">

var menu = document.querySelector('#menu');

var main = document.querySelector('main');

var drawer = document.querySelector('#drawer');

menu.addEventListener('click', function(e) {
    drawer.classList.toggle('open');
    e.stopPropagation();
});

main.addEventListener('click', function() {
    drawer.classList.remove('open');
});

main.addEventListener('touchstart', function() {
    drawer.classList.remove('open');
});

</script>        

</body></html>

"""
        else:
            html_string = '\n<html>\n<head>\n\n' + html_strings.google_adsense_conversion_tracking_global_site_tag + """

<title>
Ecommunicate
</title>
<style>
.nonheader { width:960px; margin: 80px auto 0px auto;  }     

""" + html_strings.header_style + """
</style>
</head>
<body>
""" + (html_strings.authenticated_header if utils.is_session_authenticated() else html_strings.not_authenticated_header) + """

<div class = "nonheader">

<center>
<h2>About This Website</h2>
</center>
""" + html_strings.about_html_string + """

</div>

</body>
</html>
"""
        return html_string

import cherrypy
import html_strings
import utils


class About(object):

    @cherrypy.expose
    def index(self):
        is_mobile = False
        if 'User-Agent' in cherrypy.request.headers and ('Android' in
            cherrypy.request.headers['User-Agent'] or 'iPhone' in cherrypy.
            request.headers['User-Agent'] or 'iPad' in cherrypy.request.
            headers['User-Agent']):
            is_mobile = True
        if is_mobile:
            html_string = """
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

""" + html_strings.google_adsense_conversion_tracking_global_site_tag + """

<title>
Ecommunicate
</title>
<style>

nav a, button {
    min-width: 48px;
    min-height: 48px;
}

html, body {
    height: 100%;
    width: 100%;
    margin-top:0;
    margin-left:0;
    margin-right:0;
}

a#menu svg {
    width: 40px;
    fill: #000;
}

main {
    width: 100%;
    height: 100%;
}

nav {
    width: 250px;
    height: 100%;
    position: fixed;
    transform: translate(-250px, 0);
    transition: transform 0.3s ease;
}

nav.open {
    transform: translate(0, 0);
}

.header {
    float : right
}

.content {
    padding-left:1em;
    padding-right:1em;
}

</style>
</head>
<body>
<nav id="drawer" style="background-color:LightGrey">
<center><h2 style="margin-top:0">Ecommunicate</h2></center>""" + (html_strings.authenticated_mobile_navigation_menu if utils.is_session_authenticated() else html_strings.not_authenticated_mobile_navigation_menu) + """
</nav>
<main>
<div style = "width:100%;top:0;left:0;">
<a id="menu">
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
    <path d="M2 6h20v3H2zm0 5h20v3H2zm0 5h20v3H2z" />
  </svg>
</a>
<div class = "header">
<h1 style="margin-top:0;margin-bottom:0">Ecommunicate</h1>
</div>
</div>

<div class = "content">
<center><h2>About This Website</h2></center>
""" + html_strings.about_html_string + """

</div></main>

<script type="text/javascript" src="https://code.jquery.com/jquery-3.1.0.js"></script>

<script type="text/javascript">

var menu = document.querySelector('#menu');

var main = document.querySelector('main');

var drawer = document.querySelector('#drawer');

menu.addEventListener('click', function(e) {
    drawer.classList.toggle('open');
    e.stopPropagation();
});

main.addEventListener('click', function() {
    drawer.classList.remove('open');
});

main.addEventListener('touchstart', function() {
    drawer.classList.remove('open');
});

</script>        

</body></html>

"""
        else:
            html_string = '\n<html>\n<head>\n\n' + html_strings.google_adsense_conversion_tracking_global_site_tag + """

<title>
Ecommunicate
</title>
<style>
.nonheader { width:960px; margin: 80px auto 0px auto;  }     

""" + html_strings.header_style + """
</style>
</head>
<body>
""" + (html_strings.authenticated_header if utils.is_session_authenticated() else html_strings.not_authenticated_header) + """

<div class = "nonheader">

<center>
<h2>About This Website</h2>
</center>
""" + html_strings.about_html_string + """

</div>

</body>
</html>
"""
        return html_string

import cherrypy

import html_strings

import utils

class About(object):

    @cherrypy.expose
    def index(self):

        is_mobile = False

        if "User-Agent" in cherrypy.request.headers and ("Android" in cherrypy.request.headers['User-Agent'] or "iPhone" in cherrypy.request.headers['User-Agent'] or "iPad" in cherrypy.request.headers['User-Agent']):
            is_mobile = True

        if is_mobile:

            html_string = """
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

"""+html_strings.google_adsense_conversion_tracking_global_site_tag+"""

<title>
Ecommunicate
</title>
<style>

nav a, button {
    min-width: 48px;
    min-height: 48px;
}

html, body {
    height: 100%;
    width: 100%;
    margin-top:0;
    margin-left:0;
    margin-right:0;
}

a#menu svg {
    width: 40px;
    fill: #000;
}

main {
    width: 100%;
    height: 100%;
}

nav {
    width: 250px;
    height: 100%;
    position: fixed;
    transform: translate(-250px, 0);
    transition: transform 0.3s ease;
}

nav.open {
    transform: translate(0, 0);
}

.header {
    float : right
}

.content {
    padding-left:1em;
    padding-right:1em;
}

</style>
</head>
<body>
<nav id="drawer" style="background-color:LightGrey">
<center><h2 style="margin-top:0">Ecommunicate</h2></center>"""+(html_strings.authenticated_mobile_navigation_menu if utils.is_session_authenticated() else html_strings.not_authenticated_mobile_navigation_menu)+"""
</nav>
<main>
<div style = "width:100%;top:0;left:0;">
<a id="menu">
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
    <path d="M2 6h20v3H2zm0 5h20v3H2zm0 5h20v3H2z" />
  </svg>
</a>
<div class = "header">
<h1 style="margin-top:0;margin-bottom:0">Ecommunicate</h1>
</div>
</div>

<div class = "content">
<center><h2>About This Website</h2></center>
"""+html_strings.about_html_string+"""

</div></main>

<script type="text/javascript" src="https://code.jquery.com/jquery-3.1.0.js"></script>

<script type="text/javascript">

var menu = document.querySelector('#menu');

var main = document.querySelector('main');

var drawer = document.querySelector('#drawer');

menu.addEventListener('click', function(e) {
    drawer.classList.toggle('open');
    e.stopPropagation();
});

main.addEventListener('click', function() {
    drawer.classList.remove('open');
});

main.addEventListener('touchstart', function() {
    drawer.classList.remove('open');
});

</script>        

</body></html>

"""

        else:

            html_string = """
<html>
<head>

"""+html_strings.google_adsense_conversion_tracking_global_site_tag+"""

<title>
Ecommunicate
</title>
<style>
.nonheader { width:960px; margin: 80px auto 0px auto;  }     

"""+html_strings.header_style+"""
</style>
</head>
<body>
"""+(html_strings.authenticated_header if utils.is_session_authenticated() else html_strings.not_authenticated_header)+"""

<div class = "nonheader">

<center>
<h2>About This Website</h2>
</center>
"""+html_strings.about_html_string+"""

</div>

</body>
</html>
"""
        return html_string
