mirror of
https://github.com/2ec0b4/kaamelott-soundboard.git
synced 2025-12-08 23:53:24 +00:00
WIP - Mise en place du soundboard
This commit is contained in:
213
css/style.css
213
css/style.css
@@ -0,0 +1,213 @@
|
|||||||
|
/**
|
||||||
|
* GLOBAL
|
||||||
|
* TEXT SELECT
|
||||||
|
* CLEARFIX
|
||||||
|
* FONT FACES
|
||||||
|
* ELEMENTS
|
||||||
|
* USEFUL CLASSES
|
||||||
|
* HEADER
|
||||||
|
* NAVIGATION
|
||||||
|
* FOOTER
|
||||||
|
* GENERAL
|
||||||
|
* MEDIA QUERIES
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GLOBAL
|
||||||
|
* -----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
* {
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
html {
|
||||||
|
font-size: 16px;
|
||||||
|
overflow-x: hidden;
|
||||||
|
}
|
||||||
|
body {
|
||||||
|
background: #fff;
|
||||||
|
color: #131313;
|
||||||
|
font-family: 'Helvetica Neue', Helvetica, sans-serif;
|
||||||
|
font-size: 100%;
|
||||||
|
font-weight: 300;
|
||||||
|
line-height: 1.3;
|
||||||
|
overflow-x: hidden;
|
||||||
|
position: relative;
|
||||||
|
/**/
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* TEXT SELECT
|
||||||
|
* -----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
::-moz-selection {
|
||||||
|
background: red;
|
||||||
|
color: #fff;
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
::selection {
|
||||||
|
background: red;
|
||||||
|
color: #fff;
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
::-moz-selection {
|
||||||
|
background: red;
|
||||||
|
color: #fff;
|
||||||
|
text-shadow: none;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* CLEARFIX
|
||||||
|
* -----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
.clearfix:after {
|
||||||
|
clear: both;
|
||||||
|
content: " ";
|
||||||
|
display: block;
|
||||||
|
font-size: 0;
|
||||||
|
height: 0;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
.clearfix {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
* html .clearfix {
|
||||||
|
height: 1%;
|
||||||
|
}
|
||||||
|
.clearfix {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* FONT FACES
|
||||||
|
* -----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* ELEMENTS
|
||||||
|
* -----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
p {
|
||||||
|
margin: 0 0 15px;
|
||||||
|
}
|
||||||
|
ul {
|
||||||
|
list-style: disc outside;
|
||||||
|
margin: 0 0 15px;
|
||||||
|
padding: 0 0 0 15px;
|
||||||
|
}
|
||||||
|
ol {
|
||||||
|
list-style: outside decimal;
|
||||||
|
margin: 0 0 15px 20px;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
img {
|
||||||
|
height: auto;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
em {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
|
strong {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
a:link {
|
||||||
|
color: red;
|
||||||
|
font-weight: 600;
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
a:visited {
|
||||||
|
color: red;
|
||||||
|
font-weight: 300;
|
||||||
|
}
|
||||||
|
a:hover,a:active,a:focus {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
::-webkit-input-placeholder {
|
||||||
|
opacity:1;
|
||||||
|
}
|
||||||
|
:-moz-placeholder {
|
||||||
|
opacity:1;
|
||||||
|
}
|
||||||
|
::-moz-placeholder {
|
||||||
|
opacity:1;
|
||||||
|
}
|
||||||
|
:-ms-input-placeholder {
|
||||||
|
opacity:1;
|
||||||
|
}
|
||||||
|
td {
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* USEFUL CLASSES
|
||||||
|
* -----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
STRUCTURE
|
||||||
|
*/
|
||||||
|
.centred {
|
||||||
|
margin: 0 auto;
|
||||||
|
max-width: 1200px;
|
||||||
|
padding: 0 15px;
|
||||||
|
}
|
||||||
|
.table {
|
||||||
|
display: table;
|
||||||
|
table-layout: fixed;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.table-row {
|
||||||
|
display: table-row;
|
||||||
|
}
|
||||||
|
.table-cell {
|
||||||
|
display: table-cell;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
.vmid {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
.relative {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
TEXT
|
||||||
|
*/
|
||||||
|
.font-light {
|
||||||
|
font-weight: 300;
|
||||||
|
}
|
||||||
|
.font-normal {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
.font-medium {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
.font-heavy {
|
||||||
|
font-weight: 900;
|
||||||
|
}
|
||||||
|
.font-bold {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.text-center {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.text-right {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* HEADER
|
||||||
|
* -----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* NAVIGATION
|
||||||
|
* -----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* FOOTER
|
||||||
|
* -----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* GENERAL
|
||||||
|
* -----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* MEDIA QUERIES
|
||||||
|
* -----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|||||||
@@ -1,14 +1,17 @@
|
|||||||
define(
|
define(
|
||||||
'controllers/soundboard',
|
'controllers/soundboard',
|
||||||
[
|
[
|
||||||
'marionette'
|
'marionette',
|
||||||
|
'views/soundboard'
|
||||||
],
|
],
|
||||||
function (Marionette) {
|
function (Marionette, SoundboardView) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var SoundboardController = Marionette.Controller.extend({
|
var SoundboardController = Marionette.Controller.extend({
|
||||||
index: function() {
|
index: function() {
|
||||||
|
var currentView = App.getRegion('app').currentView;
|
||||||
|
|
||||||
|
currentView.showChildView('main', new SoundboardView());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
<main>
|
<header class="site-header" role="banner">
|
||||||
|
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main class="site-main" role="main">
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
<footer class="site-footer" role="contentinfo">
|
||||||
|
|
||||||
|
</footer>
|
||||||
|
|||||||
4
js/app/templates/search.hbs
Normal file
4
js/app/templates/search.hbs
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
<form action="index.html" method="post">
|
||||||
|
<input type="text" name="s" value="">
|
||||||
|
<input type="submit" name="submit" value="Rechercher">
|
||||||
|
</form>
|
||||||
7
js/app/templates/soundboard.hbs
Normal file
7
js/app/templates/soundboard.hbs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<div id="search">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="list">
|
||||||
|
|
||||||
|
</div>
|
||||||
1
js/app/templates/sounds.hbs
Normal file
1
js/app/templates/sounds.hbs
Normal file
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
15
js/app/views/search.js
Normal file
15
js/app/views/search.js
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
define(
|
||||||
|
'views/search',
|
||||||
|
[
|
||||||
|
'marionette',
|
||||||
|
'hbs!templates/search'
|
||||||
|
],
|
||||||
|
function (Marionette, SoundSearchTemplate) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var SoundSearchView = Marionette.LayoutView.extend({
|
||||||
|
template: SoundSearchTemplate
|
||||||
|
});
|
||||||
|
|
||||||
|
return SoundSearchView;
|
||||||
|
});
|
||||||
27
js/app/views/soundboard.js
Normal file
27
js/app/views/soundboard.js
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
define(
|
||||||
|
'views/soundboard',
|
||||||
|
[
|
||||||
|
'marionette',
|
||||||
|
'views/search',
|
||||||
|
'views/sounds',
|
||||||
|
'hbs!templates/soundboard'
|
||||||
|
],
|
||||||
|
function (Marionette, SoundSearchView, SoundListView, SoundboardTemplate) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var SoundboardView = Marionette.LayoutView.extend({
|
||||||
|
template: SoundboardTemplate,
|
||||||
|
regions: {
|
||||||
|
'search': '#search',
|
||||||
|
'list': '#list'
|
||||||
|
},
|
||||||
|
onShow: function() {
|
||||||
|
|
||||||
|
this.showChildView('search', new SoundSearchView());
|
||||||
|
this.showChildView('list', new SoundListView());
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return SoundboardView;
|
||||||
|
});
|
||||||
15
js/app/views/sounds.js
Normal file
15
js/app/views/sounds.js
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
define(
|
||||||
|
'views/sounds',
|
||||||
|
[
|
||||||
|
'marionette',
|
||||||
|
'hbs!templates/sounds'
|
||||||
|
],
|
||||||
|
function (Marionette, SoundListTemplate) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var SoundListView = Marionette.LayoutView.extend({
|
||||||
|
template: SoundListTemplate
|
||||||
|
});
|
||||||
|
|
||||||
|
return SoundListView;
|
||||||
|
});
|
||||||
12
sounds.json
Normal file
12
sounds.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"title": "C'est pas faux",
|
||||||
|
"character": "Perceval",
|
||||||
|
"file": "cest_pas_faux.mp3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Cuillère",
|
||||||
|
"character": "Le Roi Burgonde",
|
||||||
|
"file": "cuillere.mp3"
|
||||||
|
}
|
||||||
|
]
|
||||||
0
sounds/empty
Normal file
0
sounds/empty
Normal file
Reference in New Issue
Block a user