parameters: (self)
return_statement: return widget
docstring: widget.add('''
  <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
          ''')
docstring_summary: widget.add('''
  <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
          ''')
docstring_tokens: widget . add ( <script src = https : // code . jquery . com / jquery - 3 . 4 . 1 . min . js > < / script > <script src = https : // cdnjs . cloudflare . com / ajax / libs / jqueryui / 1 . 11 . 4 / jquery - ui . min . js > < / script > <script src = https : // cdnjs . cloudflare . com / ajax / libs / popper . js / 1 . 14 . 7 / umd / popper . min . js integrity = sha384 - UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1 crossorigin = anonymous > < / script > )
function: def get_css_wdg(self):
  
          widget = Widget()
  
          web = WebContainer.get_web()
          context_url = web.get_context_url().to_string()
  
          skin = web.get_skin()
  
          version = Environment.get_release_version()
  
          ui_library = ProjectSetting.get_value_by_key("feature/ui_library") or "bootstrap_material"
          
          css_library = ProjectSetting.get_value_by_key("feature/css_library") or "bootstrap_material"
  
  
          widget.add('''
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
          ''')
  
          # JQuery
          """
          widget.add('''
  <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
          ''')
          """
          widget.add('''
  <script src="/context/spt_js/jquery/jquery-3.4.1.min.js"></script>
  <script src="/context/spt_js/jquery/jquery-ui.min.js"></script>
  <script src="/context/spt_js/jquery/popper.min.js"></script>
          ''')
   
          use_formio = True
          if use_formio:
              widget.add('''
      <!-- Form builder -->
      <link rel='stylesheet' href='/context/spt_js/formio/formio.full.min.css'>
      <script src='/context/spt_js/formio/formio.full.min.js'></script>
              ''')
   
  
  
          if ui_library == "bootstrap":
              widget.add('''
  <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
  ''')
  
          else:
              """
  <script src="https://unpkg.com/bootstrap-material-design@4.1.1/dist/js/bootstrap-material-design.js" integrity="sha384-CauSuKpEqAFajSpkdjv3z9t8E7RlpJ1UP0lKM/+NdtSarroVKu069AlsRPKkFBz9" crossorigin="anonymous"></script>
              """
  
              widget.add('''
  <!-- Material Design for Bootstrap fonts and icons -->
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons" />
  
  <!-- Material Design for Bootstrap JS -->
  <script src="/context/spt_js/bootstrap_material_design/bootstrap-material-design-4.1.1.js"></script>
  
  
  
             ''')
  
  
              self.body.add('''
  <script>$(document).ready(function() { $('body').bootstrapMaterialDesign(); });</script>
              ''')
  
              
          if css_library == "default":
              Container.append_seq("Page:css", "%s/spt_js/bootstrap/css/bootstrap.min.css?ver=%s" % (context_url, version))
              
          elif css_library == "bootstrap":
              widget.add('''
  <!-- Bootstrap CSS -->
  <link rel='stylesheet' href='https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css'>
              ''')
          
          elif css_library == "bootstrap_material":
              """
              widget.add('''
  <link rel="stylesheet" href="https://unpkg.com/bootstrap-material-design@4.1.1/dist/css/bootstrap-material-design.min.css" integrity="sha384-wXznGJNEXNG1NFsbm0ugrLFMQPWswR3lds2VeinahP8N0zJw9VWSopbjv2x7WCvX" crossorigin="anonymous" />
              ''')
              """
  
              # Right now, we have no way to determine a theme (just a palette), however, the
              # dark css file is able to accomodate both due to var(--palette...) ussge
              # We'll keep the file separate until there is more confidence that they
              # can be the same file
              theme = "DARK"
              if theme == "DARK":
                  bootstrap_material_css = "/context/spt_js/bootstrap_material_design/bmd-bs-dark.css"
                  widget.add('''<link rel="stylesheet" href="%s"/>''' % bootstrap_material_css)
              elif theme == "LIGHT":
                  bootstrap_material_css = "/context/spt_js/bootstrap_material_design/bmd-bs-light.css"
                  widget.add('''<link rel="stylesheet" href="%s"/>''' % bootstrap_material_css)
              else:
                  widget.add('''
                  <link rel="stylesheet" href="/context/spt_js/bootstrap_material_design/bootstrap-material-design-4.1.1.min.css"/>
                  ''')
  
  
  
          
          else:
              Container.append_seq("Page:css", css_library)
              
          Container.append_seq("Page:css", "%s/spt_js/font-awesome-5.12.0/css/all.css?ver=%s" % (context_url, version))
  
  
  
          # Test react
          include_react = True
          if include_react:
              widget.add('''
                <!-- Load React. -->
                <!-- Note: when deploying, replace "development.js" with "production.min.js". -->
                <script src="https://unpkg.com/react@17/umd/react.development.js" crossorigin></script>
                <script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js" crossorigin></script>
              ''')
  
          # add the color wheel css (DEPRECATED)
          #Container.append_seq("Page:css", "%s/spt_js/mooRainbow/Assets/mooRainbow.css" % context_url)
          Container.append_seq("Page:css", "%s/spt_js/mooDialog/css/MooDialog.css" % context_url)
          Container.append_seq("Page:css", "%s/spt_js/mooScrollable/Scrollable.css" % context_url)
  
          # first load context css
          Container.append_seq("Page:css", "%s/style/layout.css" % context_url)
  
  
  
          # video js
          Container.append_seq("Page:css", "%s/spt_js/video/video-js.css" % context_url)
  
  
          # get all of the registered css file
          css_files = Container.get_seq("Page:css")
          for css_file in css_files:
              widget.add('<link rel="stylesheet" href="%s" type="text/css" />\n' % css_file )
  
          # custom js files to include
          includes = Config.get_value("install", "include_css")
          includes = includes.split(",")
          for include in includes:
              include = include.strip()
              if include:
                  widget.add('<link rel="stylesheet" href="%s" type="text/css" />\n' % include )
  
  
  
          includes = ProjectSetting.get_value_by_key("css_libraries")
          includes = includes.split(",")
          for include in includes:
              include = include.strip()
              if include:
                  widget.add('<link rel="stylesheet" href="%s" type="text/css" />\n' % include )
  
  
          return widget
function_tokens: def get_css_wdg ( self ) : widget = Widget ( ) web = WebContainer . get_web ( ) context_url = web . get_context_url ( ) . to_string ( ) skin = web . get_skin ( ) version = Environment . get_release_version ( ) ui_library = ProjectSetting . get_value_by_key ( "feature/ui_library" ) or "bootstrap_material" css_library = ProjectSetting . get_value_by_key ( "feature/css_library" ) or "bootstrap_material" widget . add ( '''
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
          ''' ) # JQuery widget . add ( '''
  <script src="/context/spt_js/jquery/jquery-3.4.1.min.js"></script>
  <script src="/context/spt_js/jquery/jquery-ui.min.js"></script>
  <script src="/context/spt_js/jquery/popper.min.js"></script>
          ''' ) use_formio = True if use_formio : widget . add ( '''
      <!-- Form builder -->
      <link rel='stylesheet' href='/context/spt_js/formio/formio.full.min.css'>
      <script src='/context/spt_js/formio/formio.full.min.js'></script>
              ''' ) if ui_library == "bootstrap" : widget . add ( '''
  <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
  ''' ) else : """
  <script src="https://unpkg.com/bootstrap-material-design@4.1.1/dist/js/bootstrap-material-design.js" integrity="sha384-CauSuKpEqAFajSpkdjv3z9t8E7RlpJ1UP0lKM/+NdtSarroVKu069AlsRPKkFBz9" crossorigin="anonymous"></script>
              """ widget . add ( '''
  <!-- Material Design for Bootstrap fonts and icons -->
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Material+Icons" />
  
  <!-- Material Design for Bootstrap JS -->
  <script src="/context/spt_js/bootstrap_material_design/bootstrap-material-design-4.1.1.js"></script>
  
  
  
             ''' ) self . body . add ( '''
  <script>$(document).ready(function() { $('body').bootstrapMaterialDesign(); });</script>
              ''' ) if css_library == "default" : Container . append_seq ( "Page:css" , "%s/spt_js/bootstrap/css/bootstrap.min.css?ver=%s" % ( context_url , version ) ) elif css_library == "bootstrap" : widget . add ( '''
  <!-- Bootstrap CSS -->
  <link rel='stylesheet' href='https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css'>
              ''' ) elif css_library == "bootstrap_material" : """
              widget.add('''
  <link rel="stylesheet" href="https://unpkg.com/bootstrap-material-design@4.1.1/dist/css/bootstrap-material-design.min.css" integrity="sha384-wXznGJNEXNG1NFsbm0ugrLFMQPWswR3lds2VeinahP8N0zJw9VWSopbjv2x7WCvX" crossorigin="anonymous" />
              ''')
              """ # Right now, we have no way to determine a theme (just a palette), however, the # dark css file is able to accomodate both due to var(--palette...) ussge # We'll keep the file separate until there is more confidence that they # can be the same file theme = "DARK" if theme == "DARK" : bootstrap_material_css = "/context/spt_js/bootstrap_material_design/bmd-bs-dark.css" widget . add ( '''<link rel="stylesheet" href="%s"/>''' % bootstrap_material_css ) elif theme == "LIGHT" : bootstrap_material_css = "/context/spt_js/bootstrap_material_design/bmd-bs-light.css" widget . add ( '''<link rel="stylesheet" href="%s"/>''' % bootstrap_material_css ) else : widget . add ( '''
                  <link rel="stylesheet" href="/context/spt_js/bootstrap_material_design/bootstrap-material-design-4.1.1.min.css"/>
                  ''' ) else : Container . append_seq ( "Page:css" , css_library ) Container . append_seq ( "Page:css" , "%s/spt_js/font-awesome-5.12.0/css/all.css?ver=%s" % ( context_url , version ) ) # Test react include_react = True if include_react : widget . add ( '''
                <!-- Load React. -->
                <!-- Note: when deploying, replace "development.js" with "production.min.js". -->
                <script src="https://unpkg.com/react@17/umd/react.development.js" crossorigin></script>
                <script src="https://unpkg.com/react-dom@17/umd/react-dom.development.js" crossorigin></script>
              ''' ) # add the color wheel css (DEPRECATED) #Container.append_seq("Page:css", "%s/spt_js/mooRainbow/Assets/mooRainbow.css" % context_url) Container . append_seq ( "Page:css" , "%s/spt_js/mooDialog/css/MooDialog.css" % context_url ) Container . append_seq ( "Page:css" , "%s/spt_js/mooScrollable/Scrollable.css" % context_url ) # first load context css Container . append_seq ( "Page:css" , "%s/style/layout.css" % context_url ) # video js Container . append_seq ( "Page:css" , "%s/spt_js/video/video-js.css" % context_url ) # get all of the registered css file css_files = Container . get_seq ( "Page:css" ) for css_file in css_files : widget . add ( '<link rel="stylesheet" href="%s" type="text/css" />\n' % css_file ) # custom js files to include includes = Config . get_value ( "install" , "include_css" ) includes = includes . split ( "," ) for include in includes : include = include . strip ( ) if include : widget . add ( '<link rel="stylesheet" href="%s" type="text/css" />\n' % include ) includes = ProjectSetting . get_value_by_key ( "css_libraries" ) includes = includes . split ( "," ) for include in includes : include = include . strip ( ) if include : widget . add ( '<link rel="stylesheet" href="%s" type="text/css" />\n' % include ) return widget