This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import '../styles/main.scss'; | |
| function listree() { | |
| const subMenuHeadings = document.getElementsByClassName("listree-submenu-heading"); | |
| Array.from(subMenuHeadings).forEach(function(subMenuHeading){ | |
| subMenuHeading.classList.add("collapsed"); | |
| subMenuHeading.nextElementSibling.style.display = "none"; | |
| subMenuHeading.addEventListener('click', function(event){ | |
| event.preventDefault(); | |
| const subMenuList = event.target.nextElementSibling; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .listree-submenu-heading { | |
| cursor: pointer; | |
| } | |
| ul.listree { | |
| list-style: none; | |
| } | |
| ul.listree-submenu-items { | |
| list-style: none; | |
| border-left: 1px dashed black; | |
| white-space: nowrap; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <style type="text/css"> | |
| .listree-submenu-heading { | |
| cursor: pointer; | |
| } | |
| ul.listree { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ul.listree-submenu-items { | |
| list-style: none; | |
| border-left: 1px dashed black; | |
| white-space: nowrap; | |
| margin-right: 4px; | |
| padding-left: 20px; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function listree() { | |
| const subMenuHeadings = document.getElementsByClassName("listree-submenu-heading"); | |
| Array.from(subMenuHeadings).forEach(function(subMenuHeading){ | |
| subMenuHeading.classList.add("collapsed"); | |
| subMenuHeading.nextElementSibling.style.display = "none"; | |
| subMenuHeading.addEventListener('click', function(event){ | |
| event.preventDefault(); | |
| const subMenuList = event.target.nextElementSibling; | |
| if(subMenuList.style.display=="none"){ | |
| subMenuHeading.classList.remove("collapsed"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| div.listree-submenu-heading.collapsed:before { | |
| content: "+"; | |
| margin-right: 4px; | |
| } | |
| div.listree-submenu-heading.expanded:before { | |
| content: "-"; | |
| margin-right: 4px; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function listree() { | |
| const subMenuHeadings = document.getElementsByClassName("listree-submenu-heading"); | |
| Array.from(subMenuHeadings).forEach(function(subMenuHeading){ | |
| subMenuHeading.nextElementSibling.style.display = "none"; | |
| subMenuHeading.addEventListener('click', function(event){ | |
| event.preventDefault(); | |
| const subMenuList = event.target.nextElementSibling; | |
| if(subMenuList.style.display=="none"){ | |
| subMenuList.style.display = "block"; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ul.listree { | |
| list-style: none; | |
| } | |
| ul.listree-submenu-items { | |
| list-style: none; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from flask import session, Flask | |
| from flask_security import current_user | |
| app = Flask(__name__) | |
| @app.after_request | |
| def inject_identifying_headers(response): | |
| if current_user.is_authenticated: | |
| response.headers['X-Userid'] = current_user.email |