Exemplo n.º 1
0
def setup(app):
    app.add_directive('activecode', ActiveCode)
    app.add_directive('actex', ActiveExercise)
    app.add_role('textfield', textfield_role)
    app.add_config_value('activecode_div_class',
                         "runestone explainer ac_section alert alert-warning",
                         'html')
    app.add_config_value('activecode_hide_load_history', False, 'html')

    app.add_stylesheet('activecode.css')

    app.add_javascript('jquery.highlight.js')
    app.add_javascript('bookfuncs.js')
    add_codemirror_css_and_js(app, 'xml', 'css', 'python', 'htmlmixed',
                              'javascript')
    add_i18n_js(app, {"en", "sr-Cyrl"}, "activecode-i18n")
    add_skulpt_js(app)
    app.add_javascript('activecode.js')
    app.add_javascript('clike.js')
    app.add_javascript('timed_activecode.js')

    app.add_node(ActivcodeNode, html=(visit_ac_node, depart_ac_node))

    app.connect('doctree-resolved', process_activcode_nodes)
    app.connect('env-purge-doc', purge_activecodes)
Exemplo n.º 2
0
def setup(app):
    app.add_directive("activecode", ActiveCode)
    app.add_directive("actex", ActiveExercise)
    app.add_role("textfield", textfield_role)
    app.add_config_value(
        "activecode_div_class",
        "runestone explainer ac_section alert alert-warning",
        "html",
    )
    app.add_config_value("activecode_hide_load_history", False, "html")
    app.add_config_value("wasm_uri", "/_static", "html")
    app.add_autoversioned_stylesheet("activecode.css")

    app.add_autoversioned_javascript("jquery.highlight.js")
    app.add_autoversioned_javascript("bookfuncs.js")
    add_codemirror_css_and_js(app, "xml", "css", "python", "htmlmixed",
                              "javascript", "sql")
    add_i18n_js(app, {"en", "sr-Cyrl"}, "activecode-i18n")
    add_skulpt_js(app)
    app.add_autoversioned_javascript("activecode.js")
    app.add_autoversioned_javascript("clike.js")
    app.add_autoversioned_javascript("timed_activecode.js")
    app.add_autoversioned_javascript(
        "sql-wasm.js")  # todo: only load if we need it
    app.add_javascript(
        "https://cdn.jsdelivr.net/npm/[email protected]/dist/handsontable.full.js"
    )
    app.add_stylesheet(
        "https://cdn.jsdelivr.net/npm/[email protected]/dist/handsontable.full.min.css"
    )

    app.add_node(ActivcodeNode, html=(visit_ac_node, depart_ac_node))

    app.connect("doctree-resolved", process_activcode_nodes)
    app.connect("env-purge-doc", purge_activecodes)
Exemplo n.º 3
0
def setup(app):
    app.add_directive('activecode', ActiveCode)
    app.add_directive('actex', ActiveExercise)
    app.add_role('textfield',textfield_role)
    app.add_config_value('activecode_div_class', "runestone explainer ac_section alert alert-warning", 'html')
    app.add_config_value('activecode_hide_load_history', False, 'html')

    app.add_stylesheet('activecode.css')

    app.add_javascript('jquery.highlight.js')
    app.add_javascript('bookfuncs.js')
    add_codemirror_css_and_js(app,'xml','css','python','htmlmixed','javascript')
    add_i18n_js(app, {"en","sr-Cyrl"},"activecode-i18n")
    add_skulpt_js(app)
    app.add_javascript('activecode.js')
    app.add_javascript('clike.js')
    app.add_javascript('timed_activecode.js')



    

    app.add_node(ActivcodeNode, html=(visit_ac_node, depart_ac_node))

    app.connect('doctree-resolved', process_activcode_nodes)
    app.connect('env-purge-doc', purge_activecodes)
Exemplo n.º 4
0
def setup(app):
    app.add_directive('datafile',DataFile)
    add_skulpt_js(app)

    app.add_javascript('datafile.js')

    app.add_stylesheet('datafile.css')

    app.add_node(DataFileNode, html=(visit_df_node, depart_df_node))

    app.connect('doctree-resolved',process_datafile_nodes)
    app.connect('env-purge-doc', purge_datafiles)
Exemplo n.º 5
0
def setup(app):
    app.add_directive('datafile',DataFile)
    add_skulpt_js(app)

    app.add_javascript('datafile.js')

    app.add_stylesheet('datafile.css')

    app.add_node(DataFileNode, html=(visit_df_node, depart_df_node))

    app.connect('doctree-resolved',process_datafile_nodes)
    app.connect('env-purge-doc', purge_datafiles)
Exemplo n.º 6
0
def setup(app):
    app.add_directive("datafile", DataFile)
    add_skulpt_js(app)

    app.add_autoversioned_javascript("datafile.js")

    app.add_autoversioned_stylesheet("datafile.css")

    app.add_node(DataFileNode, html=(visit_df_node, depart_df_node))

    app.connect("doctree-resolved", process_datafile_nodes)
    app.connect("env-purge-doc", purge_datafiles)
Exemplo n.º 7
0
def setup(app):
    app.add_directive('karel', KarelDirective)

    # add_i18n_js(app, {"en","sr-Cyrl"},"codemirror-i18n")
    add_codemirror_css_and_js(app, 'python')
    add_skulpt_js(app)

    app.add_stylesheet('karel.css')

    app.add_javascript('karelCorner.js')
    app.add_javascript('karelRobot.js')
    app.add_javascript('karelWorld.js')
    app.add_javascript('karelRobotDrawer.js')
    app.add_javascript('karelUI.js')
    app.add_javascript('karel.js')
    add_i18n_js(app, {"en", "sr-Cyrl"}, "karel-i18n")

    app.add_node(KarelNode, html=(visit_karel_node, depart_karel_node))

    app.connect('doctree-resolved', process_karel_nodes)
    app.connect('env-purge-doc', purge_karel_nodes)