This commit is contained in:
HORVILLE 2023-03-28 10:23:46 +02:00
commit f520bdb529
5 changed files with 61 additions and 9 deletions

32
components/school.riot Normal file
View File

@ -0,0 +1,32 @@
<school>
<main class="container">
<div class="block control has-icons-left is-inline-block is-pulled-right">
<input class="input" type="search" placeholder="Établissement">
<span class="icon is-small is-left">
<i class="fas fa-search"></i>
</span>
</div>
<table class="table is-fullwidth is-hoverable">
<thead>
<tr>
<th><abbr title="name">Nom</abbr></th>
<th><abbr title="city">Ville</abbr></th>
<th><abbr title="dept">Dpt</abbr></th>
<th><abbr title="moyenne">Moyenne</abbr></th>
<th><abbr title="selectivite">Sélectivité</abbr></th>
</tr>
</thead>
<script>
export default {
onMounted() {
console.log("Test!")
}
}
</script>
</school>

View File

@ -7,19 +7,12 @@
<script src="riot.min.js"></script> <script src="riot.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.9.3/css/bulma.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.9.3/css/bulma.min.css">
<script src="loader.js" type="module"></script> <script src="loader.js" type="module"></script>
<!--<script src="components/search.riot" type="riot"></script>-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/riot/7.1.0/riot+compiler.min.js" integrity="sha512-sSGKGR9MvL0bUx3CScaBb56crXwspwDkL/JnB0IrLFQfw3uvSUlITQtsTtDZctshhv5wdwIt+qZeN8zThRF4Dw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/riot/7.1.0/riot+compiler.min.js" integrity="sha512-sSGKGR9MvL0bUx3CScaBb56crXwspwDkL/JnB0IrLFQfw3uvSUlITQtsTtDZctshhv5wdwIt+qZeN8zThRF4Dw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
</head> </head>
<body> <body>
<search></search> <search></search>
<line-graph style="height: 90px;"></line-graph> <line-graph style="height: 90px;"></line-graph>
<!--<school-info></school-info>--> <school></school>
<!--<script>
riot.compile().then(() => {
riot.mount('search', {
})
})
</script>-->
</body> </body>
</html> </html>

View File

@ -0,0 +1,12 @@
var school = {
css: null,
exports: {
onMounted() {
console.log("Test!");
}
},
template: (template, expressionTypes, bindingTypes, getComponent) => template('<main class="container"><div class="block control has-icons-left is-inline-block is-pulled-right"><input class="input" type="search" placeholder="Établissement"/><span class="icon is-small is-left"><i class="fas fa-search"></i></span></div><table class="table is-fullwidth is-hoverable"><thead><tr><th><abbr title="name">Nom</abbr></th><th><abbr title="city">Ville</abbr></th><th><abbr title="dept">Dpt</abbr></th><th><abbr title="moyenne">Moyenne</abbr></th><th><abbr title="selectivite">Sélectivité</abbr></th></tr></thead></table></main>', []),
name: 'school'
};
export { school as default };

12
javascript/school.js Normal file
View File

@ -0,0 +1,12 @@
var school = {
css: null,
exports: {
onMounted() {
console.log("Test!");
}
},
template: (template, expressionTypes, bindingTypes, getComponent) => template('<main class="container"><div class="block control has-icons-left is-inline-block is-pulled-right"><input class="input" type="search" placeholder="Établissement"/><span class="icon is-small is-left"><i class="fas fa-search"></i></span></div><table class="table is-fullwidth is-hoverable"><thead><tr><th><abbr title="name">Nom</abbr></th><th><abbr title="city">Ville</abbr></th><th><abbr title="dept">Dpt</abbr></th><th><abbr title="moyenne">Moyenne</abbr></th><th><abbr title="selectivite">Sélectivité</abbr></th></tr></thead></table></main>', []),
name: 'school'
};
export { school as default };

View File

@ -5,11 +5,14 @@
import SchoolInfo from './javascript/school-info.js' import SchoolInfo from './javascript/school-info.js'
import LineGraph from './javascript/line-graph.js' import LineGraph from './javascript/line-graph.js'
import Search from './javascript/search.js' import Search from './javascript/search.js'
import School from './javascript/school.js'
riot.register("school-info", SchoolInfo) riot.register("school-info", SchoolInfo)
riot.register("line-graph", LineGraph) riot.register("line-graph", LineGraph)
riot.register("search", Search) riot.register("search", Search)
riot.register("school", School)
riot.mount("school-info") riot.mount("school-info")
riot.mount("line-graph") riot.mount("line-graph")
riot.mount("search") riot.mount("search")
riot.mount("school")