Commit bfe0d5bc authored by Alexis Brenon's avatar Alexis Brenon
Browse files

馃敤 Migrate to bootstrap v4 beta

parent 9f0c421e
......@@ -7,6 +7,7 @@ pages:
- tar xzf master.tgz
- lua stevedonovan-LDoc*/ldoc.lua .
- mv -f public/topics/README.md.html public/index.html
- cp -u assets/ldoc/bootstrap-4-navbar.* public
artifacts:
paths:
- public
......
--- Inferred graphic domus.
-- @classmod GraphicalAnnotatedSweetHome
-- @classmod environment.smarthome.sweethome.GraphicalAnnotatedSweetHome
-- @alias class
-- @author Alexis BRENON <alexis.brenon@imag.fr>
......
--- Sensor graphic domus.
-- @classmod GraphicalSensorSweetHome
-- @classmod environment.smarthome.sweethome.GraphicalSensorSweetHome
-- @alias class
-- @author Alexis BRENON <alexis.brenon@imag.fr>
......
......@@ -3,10 +3,12 @@
-- As an exception to confirm the rule, this package not only discover
-- sub-packages, modules and class, but also define its own class.
-- This behavior should be fixed.
-- The class defined by this package is a base class for any
-- The class defined by this package (`ArcadesComponent`)
-- is a base class for any
-- ARCADES class, providing default behavior for logging,
-- string representation, dumping and loading.
-- @package arcades
-- @classmod Arcades_Components
-- @author Alexis BRENON <alexis.brenon@imag.fr>
local torch = require('torch')
......
--- A preprocessing network to downsample a given image.
-- This preprocessing network will scale the image and convert it to Y color space
-- @classmod network.Downsample
-- @alias class
-- @author Alexis BRENON <alexis.brenon@imag.fr>
local nn = require('nn')
......
--- A convolutional neural network for image processing.
-- @classmod network.Convnet
-- @alias class
-- @author Alexis BRENON <alexis.brenon@imag.fr>
local nn = require('nn')
......
--- Package containing different neural network architectures.
--- A module to build neural network from a descrption.
--
-- List of the classes in this package:
-- <ul>
-- <li>@{network.DebugNetwork|DebugNetwork}</li>
-- <li>@{network.Downsample|Downsample}</li>
-- <li>@{network.Convnet|Convnet}</li>
-- </ul>
-- An example of description can be found in this file: @{Inference.lua}
-- @module network
-- @alias package
-- @alias module
-- @author Alexis BRENON <alexis.brenon@imag.fr>
local module = require('arcades.utils.package_loader')(...)
local torch = require('torch')
local nn = require('nn')
function module.create_network(args)
local net = nn.Sequential()
......
--- A set of different experiments which link an @{environment} and an @{agent}.
--
-- List of the classes in this package:
-- <ul>
-- <li>@{experiment.BaseExperiment|BaseExperiment}</li>
-- </ul>
-- @module experiment
-- @alias package
--- A set of utilities functions and classes.
-- @package utils
-- @author Alexis BRENON <alexis.brenon@imag.fr>
return require('arcades.utils.package_loader')(...)
/*//Copy this css*/
.navbar-light .navbar-nav .nav-link {
color: rgb(64, 64, 64);
}
.btco-menu li > a {
padding: 10px 15px;
color: #000;
}
.btco-menu .active a:focus,
.btco-menu li a:focus ,
.navbar > .show > a:focus{
background: transparent;
outline: 0;
}
.dropdown-menu .show > .dropdown-toggle::after{
transform: rotate(-90deg);
}
/*!
* Bootstrap 4 multi dropdown navbar ( https://bootstrapthemes.co/demo/resource/bootstrap-4-multi-dropdown-navbar/ )
* Copyright 2017.
* Licensed under the GPL license
*/
$( document ).ready( function () {
$( '.dropdown-menu a.dropdown-toggle' ).on( 'click', function ( e ) {
var $el = $( this );
var $parent = $( this ).offsetParent( ".dropdown-menu" );
if ( !$( this ).next().hasClass( 'show' ) ) {
$( this ).parents( '.dropdown-menu' ).first().find( '.show' ).removeClass( "show" );
}
var $subMenu = $( this ).next( ".dropdown-menu" );
$subMenu.toggleClass( 'show' );
$( this ).parent( "li" ).toggleClass( 'show' );
$( this ).parents( 'li.nav-item.dropdown.show' ).on( 'hidden.bs.dropdown', function ( e ) {
$( '.dropdown-menu .show' ).removeClass( "show" );
} );
if ( !$parent.parent().hasClass( 'navbar-nav' ) ) {
$el.next().css( { "top": $el[0].offsetTop, "left": $parent.outerWidth() - 4 } );
}
return false;
} );
} );
\ No newline at end of file
......@@ -7,6 +7,7 @@
# local nowrap = ldoc.wrap and '' or 'nowrap'
# local html_root = (not ldoc.single and module) and "../" or "./"
# local repository = "https://gricad-gitlab.univ-grenoble-alpes.fr/brenona/arcades"
# local show_return = not ldoc.no_return_or_parms
# local show_parms = show_return
......@@ -20,17 +21,85 @@
# end
# end
# local project_kinds = {"Scripts", "Packages", "Modules", "Classes", "Examples"}
# local project_hierarchy = {}
# for _, kind_name in ldoc.ipairs(project_kinds) do
# local hierarchy = {}
# local level_index = {}
# if ldoc.kinds[kind_name] then
# for k in ldoc.kinds[kind_name]() do
# local current_hierarchy = hierarchy
# for i, hierarchy_name in ldoc.ipairs(k.names_hierarchy) do
# level_index[i] = level_index[i] or 0
# if not current_hierarchy[level_index[i]] or
# current_hierarchy[level_index[i]].label ~= hierarchy_name then
# level_index[i] = level_index[i] + 1
# for j = i+1, #level_index do level_index[j] = 0 end
# current_hierarchy[level_index[i]] = {
# label = hierarchy_name,
# subs = {},
# }
# end
# if i == #(k.names_hierarchy) then
# current_hierarchy[level_index[i]].self = k
# end
# current_hierarchy = current_hierarchy[level_index[i]].subs
# end
# end
# end
# project_hierarchy[kind_name] = hierarchy
# end
# local build_dropdown
# build_dropdown = function(m, _nav_ID, classes)
# local nav_ID = _nav_ID .. "-" .. escape(no_spaces(m.label))
<!-- Module dropdown -->
<li class="$(classes[1])">
<a class="$(classes[2]) dropdown-toggle"
href="#"
id="project-nav-$(nav_ID)-dropdown-header"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false">
$(m.label)
</a>
<!-- Classes in module -->
<ul class="dropdown-menu"
aria-labelledby="project-nav-$(nav_ID)-dropdown-header">
# if m.self then
<li>
<a class="dropdown-item"
href="$(escape(ldoc.ref_to_module(m.self)))">
$(m.label)
</a>
</li>
<li class="dropdown-divider"></li>
# end
# for _, sub in ldoc.ipairs(m.subs) do
# if (#(sub.subs) > 0 or (not sub.self)) then
# build_dropdown(sub, nav_ID, {"", "dropdown-item"})
# else
<li>
<a class="dropdown-item"
href="$(escape(ldoc.ref_to_module(sub.self)))">
$(sub.label)
</a>
</li>
# end
# end -- For sub in subs
</ul> <!-- Classes in module -->
</li> <!-- Module dropdown -->
# end
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=$(escape(ldoc.doc_charset))"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>$(escape(ldoc.title))</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.4/css/bootstrap.min.css" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdn.materialdesignicons.com/1.7.22/css/materialdesignicons.min.css">
# if ldoc.custom_css then -- add custom CSS file if configured.
<link rel="stylesheet" href="$(escape(ldoc.custom_css))" type="text/css" />
# end
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="$(html_root)/bootstrap-4-navbar.css" rel="stylesheet">
</head>
<!-- **************************************************************** -->
......@@ -49,210 +118,115 @@
# -------- contents of project ----------
# local this_mod = module and module.name
# ldoc.log("##", this_mod, module and module.file, "##")
# ldoc.log("##", module and module.kind, this_mod, module and module.file, "##")
# -- ldoc.inspect(module or "nil")
<!-- Project navbar -->
<nav class="navbar navbar-full navbar-dark bg-primary">
<nav class="navbar navbar-expand-lg navbar-full navbar-dark bg-primary flex-column mb-2"
id="project-nav-accordion">
<div class="container">
<button class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#projectNavbar"
aria-controls="projectNavbar"
aria-expanded="false"
aria-label="Toggle project navigation">
<span class="navbar-toggler-icon"></span>
</button>
<a class="navbar-brand" href="$(escape(html_root))/$(escape(ldoc.output)).html">$(ldoc.project)</a>
<div class="nav navbar-nav">
# for _, kind_name in ldoc.ipairs({"Scripts", "Packages", "Modules", "Classes", "Examples"}) do
<div class="collapse navbar-collapse"
id="projectNavbar">
<ul class="navbar-nav mr-auto">
# for _, kind_name in ldoc.ipairs(project_kinds) do
# if ldoc.kinds[kind_name] then
<a class="nav-item nav-link"
id="project-nav-$(escape(no_spaces(kind_name)))-header"
data-toggle="collapse"
data-parent="#project-nav-accordion"
href="#project-nav-$(escape(no_spaces(kind_name)))-collapsing"
aria-controls="project-nav-$(escape(no_spaces(kind_name)))-collapsing"
aria-expanded="false"
aria-label="Show $(escape(kind_name))">
$(kind_name)
</a>
<li class="nav-item"
role="tab">
<a class="nav-link"
id="project-nav-$(escape(no_spaces(kind_name)))-header"
data-toggle="collapse"
href="#project-nav-$(escape(no_spaces(kind_name)))-collapsing"
aria-controls="project-nav-$(escape(no_spaces(kind_name)))-collapsing"
aria-expanded="false"
aria-label="Show $(escape(kind_name))">
$(kind_name)
</a>
</li>
# end
# end
</ul>
</div> <!-- Collapsible navbar -->
</div> <!-- Navbar content -->
<span class="navbar-nav">
<a class="nav-item nav-link push-right"
href="$(repository)">
<i class="material-icons">code</i> Repository
</a>
</span>
</div> <!-- Navbar content -->
</div> <!-- Container -->
<!-- Kinds sub-navbars -->
<div class="container panel"
id="project-nav-accordion"
<div class="container flex-column align-items-start"
role="navigation"
style="background-color: rgba(255, 255, 255, 0.25);">
# for _, kind_name in ldoc.ipairs({"Scripts", "Packages", "Modules", "Examples"}) do
# for _, kind_name in ldoc.ipairs(project_kinds) do
<!-- Kind navbar -->
<div class="panel-collapse collapse"
<div class="collapse"
role="tabpanel"
data-parent="#project-nav-accordion"
id="project-nav-$(escape(no_spaces(kind_name)))-collapsing">
<span class="navbar-brand">$(kind_name)</span>
<div class="nav navbar-nav">
# if ldoc.kinds[kind_name] then
# for mod in ldoc.kinds[kind_name]() do
<a class="nav-item nav-link"
href="$(escape(ldoc.ref_to_module(mod)))">
$(display_name(mod))
</a>
# end
<div class='d-flex'> <!-- flex container -->
<button class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#project-nav-$(escape(no_spaces(kind_name)))-bar"
aria-controls="project-nav-$(escape(no_spaces(kind_name)))-bar"
aria-expanded="false"
aria-label="Toggle $(escape(kind_name) navigation bar">
<span class="navbar-toggler-icon"></span>
</button>
<span class="navbar-brand">$(kind_name)</span>
<div class="collapse navbar-collapse"> <!-- Responsive collapsible sub-navbar -->
<ul class="navbar-nav">
# for _, mod in ldoc.ipairs(project_hierarchy[kind_name]) do
# if (#(mod.subs) > 0) or (not mod.self) then
# build_dropdown(mod, escape(no_spaces(kind_name)), {"nav-item dropdown", "nav-link"})
# else
<li class="nav-item"
role="tab">
<a class="nav-link"
href="$(escape(ldoc.ref_to_module(mod.self)))">
$(mod.label)
</a>
</li>
# end
# end
</div> <!-- Navbar content -->
</ul>
</div> <!-- responsive collapsible sub-navbar -->
</div> <!-- flex container -->
</div> <!-- Kind navbar -->
# end
<!-- Classes navbar -->
<div class="panel-collapse collapse"
id="project-nav-$(escape(no_spaces("Classes")))-collapsing">
<span class="navbar-brand">Classes</span>
<div class="nav navbar-nav">
<!-- Group classes under their package -->
# local all_classes = {}
# for mod in ldoc.kinds["Modules"]() do
# local classes = {}
# for class in ldoc.kinds.Classes() do
# if class.package == mod.mod_name then
# classes[#classes + 1] = class
# all_classes[#all_classes + 1] = class
# end
# end
# if #classes > 0 then
<!-- Module dropdown -->
<div class="nav-item nav-link dropdown">
<a class="dropdown-toggle"
id="project-nav-classes-$(escape(no_spaces(mod.name)))-dropdown-header"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false">
$(mod.name)
</a>
<!-- Classes in module -->
<div class="dropdown-menu"
aria-labelledby="project-nav-classes-$(escape(no_spaces(mod.name)))-dropdown-header">
# for _, class in ldoc.ipairs(classes) do
<a class="dropdown-item"
href="$(escape(ldoc.ref_to_module(class)))">
$(class.names_hierarchy[#class.names_hierarchy])
</a>
# end -- For classes in Module
</div> <!-- Classes in module -->
</div> <!-- Module dropdown -->
# end -- If classes in module
# end -- For modules
<!-- End package-grouped classes -->
<!-- Add classes not already listed -->
# for class in ldoc.kinds.Classes() do
# local listed = false
# for _, listed_class in ldoc.ipairs(all_classes) do
# if listed_class == class then
# listed = true
# break
# end
# end
# if not listed then
<a class="nav-item nav-link"
href="$(escape(ldoc.ref_to_module(class)))">
$(class.name)
</a>
# end
# end -- For classes not listed
</div> <!-- navbar content -->
</div> <!-- Classes navbar -->
</div> <!-- Kinds sub-navbars -->
</div> <!-- Kinds sub-navbar -->
</nav> <!-- Project navbar -->
<!-- **************************************************************** -->
<!-- -->
<!-- MODULE NAV BAR (SMALL SCREEN) -->
<!-- -->
<!-- **************************************************************** -->
# --------- contents of module -------------
# if need_module_nav then
# local one_column_nav_display = (ldoc.one) and "" or "hidden-md-up"
<!-- Module horizontal navbar -->
<nav class="navbar navbar-light bg-faded $(escape(one_column_nav_display))">
<div class="container">
<a class="navbar-brand" href="#">Contents</a>
<div class="nav navbar-nav">
# for kind,items in module.kinds() do
# if module.body then
<a class="nav-item nav-link"
id="module-horiz-nav-$(escape(no_spaces(kind)))-header"
data-parent="#module-horiz-nav-accordion"
href="#$(escape(no_spaces(kind)))">
$(kind)
</a>
# else
<a class="nav-item nav-link"
id="module-horiz-nav-$(escape(no_spaces(kind)))-header"
data-toggle="collapse"
data-parent="#module-horiz-nav-accordion"
href="#module-horiz-nav-$(escape(no_spaces(kind)))-collapsing"
aria-controls="module-horiz-nav-$(escape(no_spaces(kind)))-collapsing"
aria-expanded="false"
aria-label="Show $(escape(kind))">
$(kind)
</a>
# end
# end
</div> <!-- Navbar content -->
</div> <!-- container -->
# if not module.body then
<!-- Kinds sub-navbars -->
<div class="container panel"
id="module-horiz-nav-accordion"
role="navigation"
style="background-color: rgba(255, 255, 255, 0.25);">
<div class="container">
# for kind,items in module.kinds() do
<!-- Kind navbar -->
<div class="panel-collapse collapse"
id="module-horiz-nav-$(escape(no_spaces(kind)))-collapsing">
<span class="navbar-brand">$(kind)</span>
<div class="nav navbar-nav">
# for item in items() do
<a class="nav-item nav-link"
href="#$(escape(item.name))">
$(display_name(item))
</a>
# end
</div> <!-- Navbar content -->
</div> <!-- Kind navbar -->
# end -- for kind, items in module
</div> <!-- Kinds sub-navbars -->
# end -- if not module.body
</nav> <!-- Module horizontal navbar -->
# end -- if need_module_nav
<!-- **************************************************************** -->
<!-- -->
<!-- MODULE NAV BAR (LARGE SCREEN) -->
<!-- -->
<!-- **************************************************************** -->
<div class="container m-t-1">
<div class="row">
<!-- **************************************************************** -->
<!-- -->
<!-- MODULE NAV BAR (MEDIUM SCREEN) -->
<!-- -->
<!-- **************************************************************** -->
# local one_column_nav_display = ldoc.one and "hidden" or "hidden-sm-down"
<aside class="col-md-3 $(escape(one_column_nav_display))">
# local one_column_nav_display = ldoc.one and "[hidden]" or ""
<aside class="d-none d-lg-block col-lg-3" $(one_column_nav_display)>
# if need_module_nav then -- bang out the functions on the side
<!-- Vertical module navigation -->
<nav class="m-b-1">
<nav class="mb-1">
<h2>Contents</h2>
<!-- List group panel -->
<div role="tablist"
......@@ -262,14 +236,14 @@
# for kind,items in module.kinds() do
# if module.body then -- Just sections name
<a class="list-group-item list-group-item-action bg-primary"
<a class="list-group-item list-group-item-action active"
id="module-vert-nav-$(escape(no_spaces(kind)))-header"
data-parent="#module-vert-nav-accordion"
href="#$(escape(no_spaces(kind)))"
<strong>$(kind)</strong>
</a>
# else
<a class="list-group-item list-group-item-action bg-primary panel-heading panel-title"
<a class="list-group-item list-group-item-action active panel-heading panel-title"
id="module-vert-nav-$(escape(no_spaces(kind)))-header"
data-toggle="collapse"
data-parent="#module-vert-nav-accordion"
......@@ -314,11 +288,11 @@
# if module then
# if module.info or module.tags.include or module.see then
<!-- Module general info -->
<div class="card card-block card-info">
<div class="card bg-info mt-2">
# if module.info then
<!-- Module info -->
<div>
<div class="card-body">
<strong class="card-title">Info:</strong>
<ul class="card-text list-unstyled">
# for tag, value in module.info:iter() do
......@@ -326,7 +300,7 @@
# if tag == "Author" then icon_name = "mdi-pencil" end
# if icon_name then
<li>
<strong class="$(escape(icon_name)) m-r-1" title="$(escape(tag))"></strong>
<strong class="$(escape(icon_name)) mr-1" title="$(escape(tag))"></strong>
$(M(value,module))
</li>
# else
......@@ -342,7 +316,7 @@
# if module.tags.include then
<!-- Module include -->
<div>
<div class="card-body">
<strong class="card-title">References:</strong>
<p class="card-text">
$(M(ldoc.include_file(module.tags.include)))
......@@ -352,7 +326,7 @@
# if module.see then
<!-- Module sees -->
<div>
<div class="card-body">
<strong class="card-title">See also:</strong>
<ul class="card-text list-unstyled">
# for see in iter(module.see) do
......@@ -383,7 +357,7 @@
# elseif module then -- module documentation
<!-- Module informations -->
<header class="row module-header">
<header class="row module-header mb-3">
<!-- Module name and summary -->
<div class="col-xs-12">
......@@ -402,7 +376,7 @@
# local one_column_nav_display = ldoc.one and "" or "hidden-md-up"
<!-- Info and references -->
<div class="col-xs-12 card card-block card-info $(escape(one_column_nav_display)) module-info">
<div class="col-xs-12 d-lg-none card bg-info module-info">
<div class="row">
# local sub_col_width = 12 / (
......@@ -698,30 +672,26 @@
</main> <!-- Module documentation -->
</div> <!-- row -->
<footer class="row p-b-1">
<div class="col-xs-12">
<footer class="row pb-2">
<div class="col-12">
<hr/>
</div>
<div class="col-xs-4">
<div class="col-4">
Generated with <a href="http://github.com/stevedonovan/LDoc">LDoc $(escape(ldoc.version))</a>
</div>
<div class="col-xs-4 text-center">
<div class="col-4 text-center">
<span class="icon icon-clock"></span>Last updated $(escape(ldoc.updatetime))
</div>
<div class="col-xs-4 text-right">
<div class="col-4 text-right">
Template and style by <a href="https://AlexisBRENON.github.io">AlexisBRENON</a>
</div>
</footer>
</div> <!-- container -->
<script src="https://code.jquery.com/jquery-3.1.1.min.js"
integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.3.7/js/tether.min.js"