Skip to content

Commit

Permalink
Layout.html for C2WEB and CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
Snicker7 committed Sep 13, 2022
1 parent 290d829 commit 8f5d8a1
Showing 1 changed file with 50 additions and 43 deletions.
93 changes: 50 additions & 43 deletions templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
<meta name="description" content="CRISPResso2: Analysis of genome editing outcomes from deep sequencing data">
<meta name="author" content="Kendell Clement and Luca Pinello">
<link href='https://fonts.googleapis.com/css?family=Montserrat|Ranga:700' rel='stylesheet' type='text/css'>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.3.5/jquery.fancybox.min.css" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.3.5/jquery.fancybox.min.css" />
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.13/css/all.css" integrity="sha384-DNOHZ68U8hZfKXOrtjWvjxusGo9WQnrNx2sqG0tfsghAvtVlRW3tvkXWZh58N9jp" crossorigin="anonymous">
<link rel="stylesheet" href="/static/css/main.css">

Expand All @@ -22,12 +23,14 @@
</script>

<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>

<script src="https://cdn.plot.ly/plotly-2.11.1.min.js"></script>
<style>
body {
font-family: 'Montserrat', sans-serif !important;
{% if current_user == null or current_user.is_anonymous or current_user.username != "DEFAULTUSER" %}
padding-top:60px;
{% if current_user is defined %}
{% if current_user.is_anonymous or current_user.username != "DEFAULTUSER" %}
padding-top:60px;
{% endif %}
{% endif %}
}
@media (max-width:1015px)
Expand Down Expand Up @@ -72,7 +75,11 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">

<!-- Replace favicon.ico & apple-touch-icon.png in the root of your domain and delete these references -->
{% if current_user is defined %}
<link rel="shortcut icon" href="/favicon.ico">
{% else %}
<link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAQAABILAAASCwAAAAAAAAAAAAD//////////////////////v7+//v7+//7+vr/8/Ly//v6+v/7+/v//v7+/////////////////////////////////////////////v7+///////AwcH/gYSE/3t+fv9+gYD/paWl//39/f/+/v7//v7+/////////////////////////////v7+///////z8/P/hYiI/5adnP+Xn57/lZ6d/42Tk//X19f///////39/f/+/v7///////////////////////39/f//////ury7/5GWlv+psK//nqWk/6Cnpv+osa//kpeW/8rMy//+/v7//////////////////////////////////////5ibm/+orq3/o6mo/5+mpf+gpqT/rLOx/5Wbmf95fnz/oKSj/+7u7v///////v7+///////+/v7///////Hy8v+boKD/s7q5/6yzsf+qsbD/q7Gw/7K5uP+gpqT/mZub/7i7u/+mqan///////7+/v///////v7+///////d3t7/lpyb/5abmv90enn/cXZ2/3N4d/+Ijo7/pKup/4uQj/+Znpz/s7W0///////+/v7///////7+/v//////4+Pj/4aKh/+Ahn//a3Fq/2dtZv9tcmz/i5GK/42Sjv+goaH/5Obl//b29v///////////////////////v7+///////t7u7/1tfW/8nMyf/Ex8T/yczJ/83Qzf/a29r/+fn5///////+/v7/////////////////////////////////+fn5//z8/P/m5ub/9vb2//n5+f/y8vL//f39///////9/f3////////////////////////////4+Pj/5+fn/+np6f//////5OTk/+/v7//k5OT/+vr6/+fn5//l5eX/+vr6//////////////////7+/v//////5ubm//X19f///////f39/+Tk5P//////5eXl//j4+P//////8fHx/+Tk5P///////v7+////////////2dnZ/8nJyf///////////+/v7//IyMj///////Pz8//m5ub///////////+9vb3/09PT////////////+fn5/9DQ0P/39/f////////////c3Nz/sLCw///////7+/v/sLCw//n5+f//////+Pj4/+Hh4f/+/v7/////////////////////////////////8/Pz//X19f///////////8/Pz//o6Oj///////39/f///////////////////////f39///////////////////////+/v7////////////+/v7//v7+/////////////v7+////////////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==" />
{% endif %}
<link rel="apple-touch-icon" href="/apple-touch-icon.png">


Expand All @@ -82,41 +89,46 @@
</head>

<body>
{% if current_user is defined %}
<div id='left_help_div' style='position:fixed;top:50%;transform:translateY(-50%);left:1%;width:290px;z-index:99'>
{{ self.help_block() }}
{{ self.help_block() }}
</div>
{% if get_flashed_messages != null %}
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
{% if category == "error" %}
<div class="alert alert-danger alert-dismissible fade show m-2" role="alert">
{{ message }}
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
{% else %}
<div class="alert alert-warning alert-dismissible fade show m-2" role="alert">
{{ message }}
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
{% endif %}
{% endfor %}
{% endif %}
{% endwith %}

{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
{% if category == "error" %}
<div class="alert alert-danger alert-dismissible fade show m-2" role="alert">
{{ message }}
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
{% else %}
<div class="alert alert-warning alert-dismissible fade show m-2" role="alert">
{{ message }}
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
{% endif %}
{% endfor %}
{% endif %}
{% endwith %}
{% endif %}

{# if default user (normal crispresso mode) #}
{% if current_user != null and not current_user.is_anonymous and current_user.username == "DEFAULTUSER" %}
{% if current_user == null or not current_user.is_anonymous and current_user.username == "DEFAULTUSER" %}

<div class="container">
<div class="row pb-2">
<div class="col-sm-1"></div>
<div class="col-sm-3 crispresso_cup"> <a href='/'><img class='img-fluid' src="/static/imgs/CRISPResso_justcup.png" width="80%"></a>
</div>
{% if current_user is defined %}
<div class="col-sm-3 crispresso_cup"> <a href='/'><img class='img-fluid' src="/static/imgs/CRISPResso_justcup.png" width="80%"></a>
{% else %}
<div class="col-sm-3 crispresso_cup"> <a href='https://crispresso2.pinellolab.org'><img class='img-fluid' src="https://crispresso.pinellolab.partners.org/static/imgs/CRISPResso_justcup.png" width="80%"></a>
{% endif %}
</div>
<div class="col-sm-7" >
<a href='/' style="text-decoration:none !important; color:rgb(33, 37, 41)"><h1 id='crispresso_h' style="font-family:'Ranga', sans-serif">CRISPResso2 </h1></a>
<h3 style="margin-top: -0.5em;padding-right: 2em;">Analysis of genome editing outcomes from deep sequencing data</h3>
Expand All @@ -129,22 +141,20 @@ <h3 style="margin-top: -0.5em;padding-right: 2em;">Analysis of genome editing ou
{% else %}
{# if doing user sessions #}
<nav class="navbar fixed-top navbar-expand-md bg-light navbar-light">
{% if current_user != null %}
<!-- Brand -->
<a class="navbar-brand" href="/">
{# <img src="/static/imgs/CRISPResso_justcup.png" width="30" height="30" class="d-inline-block align-top" alt=""> #}
{# <span style="font-family:'Ranga'">CRISPResso2</span></a> #}
{{config['BANNER_TEXT']}}</a>
{% endif %}

<!-- Toggler/collapsibe Button -->
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#collapsibleNavbar">
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
<span class="navbar-toggler-icon"></span>
</button>
<!-- Navbar links -->
<div class="collapse navbar-collapse" id="collapsibleNavbar">
<ul class="navbar-nav ml-auto">
{% if current_user != null and not current_user.is_anonymous %}
{% if not current_user.is_anonymous %}
<li class="nav-item">
<a class="nav-link" href="{{url_for('home')}}">
<i class="fas fa-user"></i> {{ current_user.username}}
Expand All @@ -157,17 +167,16 @@ <h3 style="margin-top: -0.5em;padding-right: 2em;">Analysis of genome editing ou
</li>
{% endif %}
{% block extranavs %}{% endblock %}
{% if current_user != null and current_user.role == "Admin" %}
{% if current_user.role == "Admin" %}
<li class="nav-item">
<a class="nav-link" href="{{url_for('admin.index')}}">Admin</a>
</li>
{% endif %}
{% if current_user != null and current_user.is_anonymous %}
{% if current_user.is_anonymous %}
<li class="nav-item">
<a class="nav-link" href="{{url_for('login')}}">Log in</a>
</li>
{% endif %}
{% if current_user != null and not current_user.is_anonymous %}
{% else %}
<li class="nav-item">
<a class="nav-link" href="{{url_for('logout')}}">Logout</a>
</li>
Expand All @@ -190,8 +199,7 @@ <h3 style="margin-top: -0.5em;padding-right: 2em;">Analysis of genome editing ou

{% block content %}{% endblock %}


{% if current_user != null and not current_user.is_anonymous and current_user.username == "DEFAULTUSER" %}
{% if current_user is defined and (not current_user.is_anonymous and current_user.username == "DEFAULTUSER") %}
<div class="row">
<div class="col-sm-1"></div>
<footer class="col-sm-10 crispresso_body_div" style='padding-bottom:3em'>
Expand Down Expand Up @@ -223,11 +231,10 @@ <h3 style="margin-top: -0.5em;padding-right: 2em;">Analysis of genome editing ou
{% endif %}



<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.3.5/jquery.fancybox.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.3.5/jquery.fancybox.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script>
{% block foot %}{% endblock %}
</body>

Expand Down

0 comments on commit 8f5d8a1

Please sign in to comment.