From ff553d3984e4def00d97f44bc075ec994216fada Mon Sep 17 00:00:00 2001
From: EpicMaze <alexrebrikme@gmail.com>
Date: Thu, 6 Oct 2022 00:27:50 +0300
Subject: [PATCH 1/2] Done:  - Basic sidebar functionalityes TO-DO:  - put
 sidebar styles in separate css file  - Make sidebar for universal for other
 pages Bugs:  - On hover animation resets after some time  - Anchor tags not
 leading to exact location on page

---
 wiki/pages/index.html | 162 ++++++++++++++++++++++++++++++------------
 1 file changed, 117 insertions(+), 45 deletions(-)

diff --git a/wiki/pages/index.html b/wiki/pages/index.html
index 81b658e..53fd609 100644
--- a/wiki/pages/index.html
+++ b/wiki/pages/index.html
@@ -4,55 +4,127 @@
 {% block lead %}<b>Welcome to iGEM 2022!</b> Your team has been approved and you are ready to start the iGEM season!{% endblock %}
 
 {% block page_content %}
+<!-- Side bar -->
+<style>
+  .sidebar {
+    position: fixed;
+    top: 20%;
+    right: 0;
+    width: 70px;
+    height: 50%;
+    background-color: rgba(0, 0, 0, 0.7);
+    border-radius: 20px;
+    display: flex;
+    flex-direction: column;
+    font-size: large;
+    color: white;
+    justify-content: space-evenly;
+    align-items: center;
+  }
+  
+  .sidebar:hover {
+    animation: expand_sidebar 300ms normal;
+  }
 
-<div class="row">
-  <div class="col">
-    <h2>Before you start</h2>
-    <hr>
-    <p>Please read the following pages:</p>
-    <ul>
-      <li><a href="https://competition.igem.org/">The Competition Page</a></li>
-      <li><a href="https://competition.igem.org/deliverables/team-wiki">Wiki Requirements page</a></li>
-    </ul>
-  </div>
+  @keyframes expand_sidebar {
+    from {
+      width: 70px;
+    }
+    to {
+      width: 170px;
+    }
+    
+  }
+
+  .sidebar a {
+    text-decoration: none;
+    color: white;
+  }
+
+  .sidebar .sidebar-chapter__text {
+    display: none;
+  }
+
+  .sidebar:hover .sidebar-default__text {
+    display: none;
+  }
+
+  .sidebar:hover .sidebar-chapter__text {
+    display: inline;
+  }
+
+  
+
+  /* smooth scrolling */
+
+  
+</style>
+
+
+<div class="sidebar">
+  <span class="sidebar-default__text"> &#8213; </span>
+  <span class="sidebar-default__text"> &#8213; </span>
+  <span class="sidebar-default__text"> &#8213; </span>
+  <span class="sidebar-default__text"> &#8213; </span> 
+  <span class="sidebar-default__text"> &#8213; </span>
+  <!-- Chapter text -->
+  <a href="#chapter1" class="sidebar-chapter__text"> Chapter 1 </a>
+  <a href="#chapter2" class="sidebar-chapter__text"> Chapter 2 </a>
+  <a href="#chapter3" class="sidebar-chapter__text"> Chapter 3 </a>
+  <a href="#chapter4" class="sidebar-chapter__text"> Chapter 4 </a> 
+  <a href="#chapter5" class="sidebar-chapter__text"> Chapter 5 </a>
 </div>
-<div class="row mt-4">
-  <div class="col">
-    <h2>Styling your wiki</h2>
-    <hr>
-    <p>You may style this page as you like or you can simply leave the style as it is. You can easily keep the styling and edit the content of these default wiki pages with your project information and completely fulfill the requirement to document your project.</p>
-    <p>While you may not win Best Wiki with this styling, your team is still eligible for all other awards. This default wiki meets the requirements, it improves navigability and ease of use for visitors, and you should not feel it is necessary to style beyond what has been provided.</p>
+
+
+  <div class="row" id="chapter1">
+    <div class="col">
+      <h2>Before you start</h2>
+      <hr>
+      <p>Please read the following pages:</p>
+      <ul>
+        <div></div>><a href="https://competition.igem.org/">The Competition Page</a>
+        <div></div>><a href="https://competition.igem.org/deliverables/team-wiki">Wiki Requirements page</a>
+      </ul>
+    </div>
   </div>
-</div>
-<div class="row mt-4">
-  <div class="col-lg-8">
-    <h2>Tips</h2>
-    <hr>
-    <p>This wiki will be your team's first interaction with the rest of the world, so here are a few tips to help you get started:</p>
-    <ul>
-      <li>State your accomplishments! Tell people what you have achieved from the start.</li>
-      <li>Be clear about what you are doing and how you plan to do this.</li>
-      <li>You have a global audience! Consider the different backgrounds that your users come from.</li>
-      <li>Make sure information is easy to find; nothing should be more than 3 clicks away.</li>
-      <li>Avoid using very small fonts and low contrast colors; information should be easy to read.</li>
-      <li>Start documenting your project as early as possible; don't leave anything to the last minute before the Wiki Freeze. For a complete list of deadlines visit the iGEM 2022 calendar</li>
-      <li>Have lots of fun!</li>
-    </ul>
+  <div class="row mt-4" id="chapter2">
+    <div class="col">
+      <h2>Styling your wiki</h2>
+      <hr>
+      <p>You may style this page as you like or you can simply leave the style as it is. You can easily keep the styling and edit the content of these default wiki pages with your project information and completely fulfill the requirement to document your project.</p>
+      <p>While you may not win Best Wiki with this styling, your team is still eligible for all other awards. This default wiki meets the requirements, it improves navigability and ease of use for visitors, and you should not feel it is necessary to style beyond what has been provided.</p>
+    </div>
   </div>
-  <div class="col-lg-4">
-    <h2>Inspiration</h2>
-    <hr>
-    <p>You can also view other team wikis for inspiration! Here are some examples:</p>
-    <ul>
-      <li><a href="https://2019.igem.org/Team:Vilnius-Lithuania">2019 Vilnius Lithuania</a></li>
-      <li><a href="https://2019.igem.org/Team:NUS_Singapore">2019 NUS Singapore</a></li>
-      <li><a href="https://2019.igem.org/Team:Lambert_GA">2019 Lambert GA</a></li>
-      <li><a href="https://2020.igem.org/Team:Waterloo">2020 Waterloo</a></li>
-      <li><a href="https://2020.igem.org/Team:TUDelft">2020 TUDelft</a></li>
-      <li><a href="https://2020.igem.org/Team:XMU-China">2020 XMU China </a></li>
-      <li><a href="https://2020.igem.org/Team:TAS_Taipei">2020 TAS Taipei </a></li>
-    </ul>
+  <div class="row mt-4" id="chapter3">
+    <div class="col-lg-8">
+      <h2>Tips</h2>
+      <hr>
+      <p>This wiki will be your team's first interaction with the rest of the world, so here are a few tips to help you get started:</p>
+      <ul>
+        <div></div>>State your accomplishments! Tell people what you have achieved from the start.
+        <div></div>>Be clear about what you are doing and how you plan to do this.
+        <div></div>>You have a global audience! Consider the different backgrounds that your users come from.
+        <div></div>>Make sure information is easy to find; nothing should be more than 3 clicks away.
+        <div></div>>Avoid using very small fonts and low contrast colors; information should be easy to read.
+        <div></div>>Start documenting your project as early as possible; don't leave anything to the last minute before the Wiki Freeze. For a complete list of deadlines visit the iGEM 2022 calendar
+        <div></div>>Have lots of fun!
+      </ul>
+    </div>
+    <div class="col-lg-4">
+      <h2>Inspiration</h2>
+      <hr>
+      <p>You can also view other team wikis for inspiration! Here are some examples:</p>
+      <ul>
+        <div></div>><a href="https://2019.igem.org/Team:Vilnius-Lithuania">2019 Vilnius Lithuania</a>
+        <div></div>><a href="https://2019.igem.org/Team:NUS_Singapore">2019 NUS Singapore</a>
+        <div></div>><a href="https://2019.igem.org/Team:Lambert_GA">2019 Lambert GA</a>
+        <div></div>><a href="https://2020.igem.org/Team:Waterloo">2020 Waterloo</a>
+        <div></div>><a href="https://2020.igem.org/Team:TUDelft">2020 TUDelft</a>
+        <div></div>><a href="https://2020.igem.org/Team:XMU-China">2020 XMU China </a>
+        <div></div>><a href="https://2020.igem.org/Team:TAS_Taipei">2020 TAS Taipei </a>
+      </ul>
+    </div>
   </div>
-</div>
+
 
 {% endblock %}
-- 
GitLab


From ca9afc28070ea97c1580470d97da985a30734ba2 Mon Sep 17 00:00:00 2001
From: EpicMaze <alexrebrikme@gmail.com>
Date: Thu, 6 Oct 2022 03:41:37 +0300
Subject: [PATCH 2/2] Done:  - Added sidebar styles - Added transition
 animation for all browsers - Sidebar css in different file TODO:  - Check for
 different windows sizes

---
 static/css/sidebar.css | 69 ++++++++++++++++++++++++++++++++++++++++++
 wiki/layout.html       |  3 ++
 wiki/pages/index.html  | 59 ++----------------------------------
 3 files changed, 74 insertions(+), 57 deletions(-)
 create mode 100644 static/css/sidebar.css

diff --git a/static/css/sidebar.css b/static/css/sidebar.css
new file mode 100644
index 0000000..e466fbe
--- /dev/null
+++ b/static/css/sidebar.css
@@ -0,0 +1,69 @@
+.sidebar {
+    position: fixed;
+    top: 50%;
+    right: 0;
+    width: 70px;
+    height: 350px;
+    margin-top: -175px;
+    background-color: rgba(0, 0, 0, 0.7);
+    border-radius: 20px;
+    display: flex;
+    flex-direction: column;
+    justify-content: space-evenly;
+    align-items: center;
+    -webkit-transition: width 300ms;
+    -moz-transition: width 300ms;
+    -ms-transition: width 300ms;
+    -o-transition: width 300ms;
+    transition: width 300ms;
+}
+
+.sidebar .sidebar-chapter__text {
+    display: none;
+    /* text */
+    text-decoration: none;
+    color: white;
+    font-size: large;
+    -webkit-transition: color 300ms;
+    -moz-transition: color 300ms;
+    -ms-transition: color 300ms;
+    -o-transition: color 300ms;
+    transition: color 300ms;
+}
+
+/* Hover on chapter text */
+.sidebar .sidebar-chapter__text:hover {
+    color:rgba(0, 0, 0, 0.6);
+}
+
+.sidebar .sidebar-default__text {
+    /* text */
+    text-decoration: none;
+    color: white;
+    font-size: large;
+}
+
+
+/* Sliding behaviour */
+/* 
+    TODO
+        - Check smooth scrolling on Safari.
+        - Check smooth scrolling on Mozilla firefox.
+
+ */
+.sidebar:hover {
+    width: 170px;
+}
+
+.sidebar .sidebar-chapter__text {
+    display: none;
+}
+
+.sidebar:hover .sidebar-default__text {
+    display: none;
+}
+
+.sidebar:hover .sidebar-chapter__text {
+    display: inline;
+}
+
diff --git a/wiki/layout.html b/wiki/layout.html
index 762ad8b..6423626 100644
--- a/wiki/layout.html
+++ b/wiki/layout.html
@@ -13,6 +13,9 @@
     <!-- Custom CSS -->
     <link href="{{ url_for('static', filename = 'style.css') }}" rel="stylesheet">
 
+    <!-- Sidebar CSS -->
+    <link href="{{ url_for('static', filename = 'css/sidebar.css') }}" rel="stylesheet">
+
     <title>{% block title %}{% endblock %} | Estonia_TUIT - iGEM 2022</title>
 
 </head>
diff --git a/wiki/pages/index.html b/wiki/pages/index.html
index 53fd609..2f8c69b 100644
--- a/wiki/pages/index.html
+++ b/wiki/pages/index.html
@@ -4,64 +4,9 @@
 {% block lead %}<b>Welcome to iGEM 2022!</b> Your team has been approved and you are ready to start the iGEM season!{% endblock %}
 
 {% block page_content %}
-<!-- Side bar -->
-<style>
-  .sidebar {
-    position: fixed;
-    top: 20%;
-    right: 0;
-    width: 70px;
-    height: 50%;
-    background-color: rgba(0, 0, 0, 0.7);
-    border-radius: 20px;
-    display: flex;
-    flex-direction: column;
-    font-size: large;
-    color: white;
-    justify-content: space-evenly;
-    align-items: center;
-  }
-  
-  .sidebar:hover {
-    animation: expand_sidebar 300ms normal;
-  }
-
-  @keyframes expand_sidebar {
-    from {
-      width: 70px;
-    }
-    to {
-      width: 170px;
-    }
-    
-  }
-
-  .sidebar a {
-    text-decoration: none;
-    color: white;
-  }
-
-  .sidebar .sidebar-chapter__text {
-    display: none;
-  }
-
-  .sidebar:hover .sidebar-default__text {
-    display: none;
-  }
-
-  .sidebar:hover .sidebar-chapter__text {
-    display: inline;
-  }
-
-  
-
-  /* smooth scrolling */
-
-  
-</style>
-
-
+<!-- Sidebar -->
 <div class="sidebar">
+  <!-- Dashes -->
   <span class="sidebar-default__text"> &#8213; </span>
   <span class="sidebar-default__text"> &#8213; </span>
   <span class="sidebar-default__text"> &#8213; </span>
-- 
GitLab