mirror of
https://github.com/2ec0b4/kaamelott-soundboard.git
synced 2025-12-08 15:43:24 +00:00
Compare commits
257 Commits
historique
...
petosorus-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
561d477e51 | ||
|
|
a102c7b9e3 | ||
|
|
8c38fde4b2 | ||
|
|
3190ad6dda | ||
|
|
aab98d7e8d | ||
|
|
058e5225c1 | ||
|
|
e836219021 | ||
|
|
aa163e62e1 | ||
|
|
34197e0148 | ||
|
|
47e44596bd | ||
|
|
6cf48733e4 | ||
|
|
2219ea4873 | ||
|
|
3e444211f3 | ||
|
|
2cb1480ddd | ||
|
|
0261f2b86b | ||
|
|
1844cebf87 | ||
|
|
01da2203b4 | ||
|
|
466be1997c | ||
|
|
dc41717ed4 | ||
|
|
e82cd4b427 | ||
|
|
2dbc4d017f | ||
|
|
f7ba3f75a7 | ||
|
|
5286cfd507 | ||
|
|
c06e76bfd3 | ||
|
|
22641d70b0 | ||
|
|
f3b777a2bd | ||
|
|
293022a587 | ||
|
|
5dfb1e5159 | ||
|
|
d5290101f4 | ||
|
|
7c987d59f2 | ||
|
|
c005e1e18e | ||
|
|
9085bf4d5d | ||
|
|
0293a47283 | ||
|
|
c655a69c34 | ||
|
|
cfee4e93ff | ||
|
|
88c6a9ba7b | ||
|
|
bf5cfe61d9 | ||
|
|
ca779a8795 | ||
|
|
6bd4ceee1a | ||
|
|
500159e523 | ||
|
|
17ab0d72aa | ||
|
|
39f456599a | ||
|
|
66225bc191 | ||
|
|
b5954672ad | ||
|
|
c51457823f | ||
|
|
a9cadd2033 | ||
|
|
0bc22fd5c7 | ||
|
|
7e9580a288 | ||
|
|
c7f897d97f | ||
|
|
e4bfb049f6 | ||
|
|
14b449c09b | ||
|
|
5b57fffb74 | ||
|
|
bd69726be3 | ||
|
|
eeb9219ffd | ||
|
|
c3f17073cf | ||
|
|
e9f8fe7c2a | ||
|
|
33b868395b | ||
|
|
e4ea64dede | ||
|
|
f03a26455d | ||
|
|
1cc42cdd39 | ||
|
|
449f51bd54 | ||
|
|
c744d38cf6 | ||
|
|
a89cba4e7c | ||
|
|
c654fc1ce6 | ||
|
|
1692107b7e | ||
|
|
91554ae79e | ||
|
|
881a7603dd | ||
|
|
5cfee7fd2a | ||
|
|
4b6897cbb5 | ||
|
|
0be67b1cbc | ||
|
|
d2e3a14d9b | ||
|
|
7484205e54 | ||
|
|
83c423be49 | ||
|
|
db7df41147 | ||
|
|
df8301e948 | ||
|
|
90e61d298e | ||
|
|
8eac03d513 | ||
|
|
9632f0040a | ||
|
|
7b9bedeea5 | ||
|
|
5bf5c0f5c7 | ||
|
|
d9cf19f0e6 | ||
|
|
c23565bf29 | ||
|
|
ba3f5f1dba | ||
|
|
772b4c46fb | ||
| cb8bf98d03 | |||
|
|
5c342debc7 | ||
|
|
cf95f071b1 | ||
|
|
ccbbf8743d | ||
|
|
b17aa1b64e | ||
|
|
6cd4f0eab1 | ||
|
|
4252cb7f09 | ||
|
|
55e9fc4343 | ||
|
|
037a1fa1a7 | ||
|
|
f009c783c5 | ||
|
|
77017cfa67 | ||
|
|
7a9755bc50 | ||
|
|
06f4322c9a | ||
|
|
4eed2cfff6 | ||
|
|
d2e5a8fc1b | ||
|
|
8e5da01d83 | ||
|
|
f865cf0a86 | ||
|
|
e639e0c14f | ||
|
|
6c0d0c80ea | ||
|
|
4898a3347f | ||
|
|
dabed7a1c3 | ||
|
|
0cd5d90217 | ||
|
|
9e6c824d07 | ||
|
|
21e6bc0a98 | ||
|
|
06c3dbd655 | ||
|
|
dde82176ae | ||
|
|
d751b3d6d1 | ||
|
|
2af099efcf | ||
|
|
17b0672094 | ||
|
|
154f554f20 | ||
|
|
c10a9561e2 | ||
|
|
22e98c1a52 | ||
|
|
68bbbc7087 | ||
|
|
e35d866985 | ||
|
|
881b328914 | ||
|
|
9c72adb9f5 | ||
|
|
20c81abdec | ||
|
|
79000a4aa8 | ||
|
|
25667f1cd8 | ||
|
|
cdeda732de | ||
|
|
82abf96564 | ||
|
|
da701623f5 | ||
|
|
f06e575be5 | ||
|
|
bef5d082a9 | ||
|
|
cb17efb9e3 | ||
|
|
ac0692deba | ||
|
|
520e0faa32 | ||
|
|
e9c39ff48b | ||
|
|
b8d1d42939 | ||
|
|
2e1546c7f1 | ||
|
|
5808676ca5 | ||
|
|
639c316408 | ||
|
|
6b5605d47f | ||
|
|
443070929c | ||
|
|
729857988c | ||
|
|
c952b3bf13 | ||
|
|
cb8318abe8 | ||
|
|
40d96c059b | ||
|
|
ae3d30d7d5 | ||
|
|
886acef277 | ||
|
|
6772bb2ece | ||
|
|
b7fbafa4fd | ||
|
|
3bb9a03365 | ||
|
|
b6077bff64 | ||
|
|
05a0fce8a6 | ||
|
|
d802229757 | ||
|
|
e24a274b4b | ||
|
|
c3175f4ba6 | ||
|
|
4744c6599f | ||
|
|
8f2f9acdc0 | ||
|
|
b9c943328e | ||
|
|
80d001ee63 | ||
|
|
ff2340b649 | ||
|
|
0b646090be | ||
|
|
a4fdd408bb | ||
|
|
f745cfeb40 | ||
|
|
c7708b7e6f | ||
|
|
f87497973f | ||
|
|
966c986194 | ||
|
|
f501f21360 | ||
|
|
3bdbd332cf | ||
|
|
ab1cce33ab | ||
|
|
9edcbb47a3 | ||
|
|
a7e4db592b | ||
|
|
4c0ff24611 | ||
|
|
ffa74c45a2 | ||
|
|
a6f4f26f0c | ||
|
|
60a9134c7c | ||
|
|
321bf6af69 | ||
|
|
406a5c1792 | ||
|
|
bc781fbc71 | ||
|
|
236f00709c | ||
|
|
38dfc13f1d | ||
|
|
1912c63f4c | ||
|
|
006a52b5e6 | ||
|
|
a4d331507d | ||
|
|
284be077b7 | ||
|
|
9f86e749cb | ||
|
|
286fc3993e | ||
|
|
98e80ab981 | ||
|
|
bc7606eef2 | ||
|
|
3145b145ef | ||
|
|
7ae1d5a6fb | ||
|
|
7eaf726e5b | ||
|
|
301df8e4ff | ||
|
|
ee6be8630b | ||
|
|
5c0fb377b9 | ||
|
|
da9293fa37 | ||
|
|
968d635bff | ||
|
|
e25228ebc5 | ||
|
|
b8db80a368 | ||
|
|
41b833be3a | ||
|
|
03f54da317 | ||
|
|
6ca3bfdbf1 | ||
|
|
9295217862 | ||
|
|
36360ee9ab | ||
|
|
1188b52144 | ||
|
|
5e2fa7683d | ||
|
|
86af353ad9 | ||
|
|
a0d801a305 | ||
|
|
acc9a468d3 | ||
|
|
cb2076b2af | ||
|
|
c5f2f0c135 | ||
|
|
b902fa6132 | ||
|
|
962ac7ecd7 | ||
|
|
7ca5579740 | ||
|
|
6ca9d63ffc | ||
|
|
05c34121fb | ||
|
|
d3904c04d7 | ||
|
|
28f31b9469 | ||
|
|
600a65a923 | ||
|
|
239047d218 | ||
|
|
3a16437bb1 | ||
|
|
e676dc4301 | ||
|
|
9e3cea48dd | ||
|
|
afd4cc6752 | ||
|
|
14162cecce | ||
|
|
dc7f24657f | ||
|
|
89361f818b | ||
|
|
72e56e7657 | ||
|
|
44977952fb | ||
|
|
4ac3a634d0 | ||
|
|
db1b94035c | ||
|
|
b01809431c | ||
|
|
77419dccb4 | ||
|
|
ff4d655c01 | ||
|
|
ef1cb407ba | ||
|
|
dc4d1d6661 | ||
|
|
2f2d2c5427 | ||
|
|
12bade7fbe | ||
|
|
3e5097ab8c | ||
|
|
585a88d8f1 | ||
|
|
0240eea129 | ||
|
|
10e7541c68 | ||
|
|
ef9f91df5f | ||
|
|
ba7bc123ac | ||
|
|
e25e5af98d | ||
|
|
ac71666437 | ||
|
|
48ddac2ae4 | ||
|
|
99c0389ed6 | ||
|
|
a7e774fb90 | ||
|
|
a7341dace4 | ||
|
|
bc4b67d935 | ||
|
|
1e91c92ce0 | ||
|
|
3260295fab | ||
|
|
53c4800007 | ||
|
|
4f9524a1cf | ||
|
|
25ab01871a | ||
|
|
7d876cee05 | ||
|
|
aafd2a8b0d | ||
|
|
1465c46f1f | ||
|
|
b7ed76acf9 | ||
|
|
88a4d976ed |
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,3 +1,5 @@
|
||||
bower_components
|
||||
dist
|
||||
node_modules
|
||||
.gitconfig
|
||||
*.swp
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
TrimSilence...: threshold=-48.000000 min-start-silence=0.000000 min-end-silence=0.000000
|
||||
TrimSilence: threshold=-48.000000 min-start-silence=0.000000 min-end-silence=0.000000
|
||||
Normalize: ApplyGain=yes RemoveDcOffset=yes Level=-1.000000 StereoIndependent=no
|
||||
ExportMp3:
|
||||
|
||||
2
Dockerfile
Normal file
2
Dockerfile
Normal file
@@ -0,0 +1,2 @@
|
||||
FROM httpd:2.4
|
||||
COPY . /usr/local/apache2/htdocs/
|
||||
16
README.md
16
README.md
@@ -8,7 +8,15 @@ Alors, c'est classe ou c'est pas classe ? Ou c'est classe ?
|
||||
|
||||
## Lancer le projet ##
|
||||
|
||||
Pour faire fonctionner le projet sur votre machine, vous devrez tout d'abord, depuis la racine, exécuter la commande `bower install` puis accéder au fichier `index.html` via le serveur Web de votre choix (Apache pour moi, quand je ne suis pas sioux et que je ne m'y prends pas comme un commanche).
|
||||
Pour faire fonctionner le projet sur votre machine, vous devrez tout d'abord, depuis la racine, exécuter la commande `bower install` puis accéder au fichier `index.html` via le serveur Web de votre choix (Apache pour moi, quand je ne suis pas sioux et que je ne m'y prends pas comme un commanche). Pour cela vous pouvez utiliser [Docker](https://www.docker.com/) avec les 2 commandes suivantes :
|
||||
```bash
|
||||
docker build -t 2ec0b4/kaamelott-soundboard .
|
||||
docker run -it --rm --name kaamelott-soundboard -p 80:80 -t 2ec0b4/kaamelott-soundboard
|
||||
```
|
||||
+ Pour les utilisateurs Windows 10 : Rendez-vous sur la page [http://localhost]()
|
||||
+ Pour les utilisateurs Windows 7 : Rendez-vous sur la page [http://192.168.99.100]()
|
||||
|
||||
Whoooohoooo woa c'est mortel !
|
||||
|
||||
## Contribuer ##
|
||||
|
||||
@@ -20,4 +28,10 @@ Pour faire fonctionner le projet sur votre machine, vous devrez tout d'abord, de
|
||||
6. Poussez vos modifications (`git push origin head`)
|
||||
7. Créez une [fusiodemande](https://github.com/2ec0b4/kaamelott-soundboard/pulls)
|
||||
|
||||
## Liens ##
|
||||
|
||||
* [Reddit](https://www.reddit.com/r/france/comments/5orvyf/kaamelott_soundboard_3/)
|
||||
* [Application iOS](https://github.com/tnducrocq/kaamelott-sound-board-ios)
|
||||
* [Visualisation graphique des répliques du _soundboard_](https://github.com/aluriak/kaamelott-soundboard-viz)
|
||||
|
||||
Merci, de rien, au revoir m'sieur dame
|
||||
|
||||
@@ -548,19 +548,46 @@ a.btn-share, a.btn-share:hover, a.btn-share:focus {
|
||||
}
|
||||
a.btn-share:before {
|
||||
content: "";
|
||||
background: url('../img/share.svg') no-repeat center center;
|
||||
background: url('../img/share-arrow.svg') no-repeat center center;
|
||||
font-size: 1em;
|
||||
height: 43px;
|
||||
left: 12px;
|
||||
height: 24px;
|
||||
left: 10px;
|
||||
position: absolute;
|
||||
top: 7px;
|
||||
width: 43px;
|
||||
top: 8px;
|
||||
width: 24px;
|
||||
}
|
||||
.btn:active,
|
||||
a.btn:active {
|
||||
top:3px;
|
||||
border-bottom: 0;
|
||||
}
|
||||
.reset, .reset:hover, .reset:focus,
|
||||
a.reset, a.reset:hover, a.reset:focus {
|
||||
background-color: #CB4D59;
|
||||
background-image: none;
|
||||
border: 0;
|
||||
border-bottom: 3px solid #8B121E;
|
||||
border-radius: 0;
|
||||
color: #FEFDFD;
|
||||
cursor: pointer;
|
||||
display: inline-block;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
line-height: 1.42857;
|
||||
outline: none;
|
||||
padding: 5px 20px;
|
||||
position: relative;
|
||||
text-decoration: none;
|
||||
vertical-align: top;
|
||||
white-space: nowrap;
|
||||
-moz-user-select: none;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
.btn[disabled], .btn[disabled]:hover, .btn[disabled]:focus {
|
||||
background-color: #CCCCCC;
|
||||
border-bottom: 3px solid #777777;
|
||||
color: #777777;
|
||||
}
|
||||
/**
|
||||
* GENERAL
|
||||
* -----------------------------------------------------------------------------
|
||||
@@ -585,6 +612,9 @@ noscript p {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
.invisible {
|
||||
visibility: hidden;
|
||||
}
|
||||
@@ -611,6 +641,21 @@ noscript p {
|
||||
width: 100%;
|
||||
z-index: 10000;
|
||||
}
|
||||
#random > div {
|
||||
margin-top: 2em;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
#random > div > .btn {
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
width: 120px;
|
||||
}
|
||||
#random > div > .btn + .btn {
|
||||
margin-left: 20px;
|
||||
}
|
||||
#filter {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
6
img/share-arrow.svg
Normal file
6
img/share-arrow.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<g transform="translate(-96.000000, -336.000000)">
|
||||
<path fill="#FDFEFE" d="M112,344l-6-5v3c-4.5,0-8,1-10,6c3-2.5,6-3,10-2v3L112,344L112,344z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 276 B |
@@ -1 +0,0 @@
|
||||
<?xml version="1.0" ?><svg version="1.1" viewBox="0 0 45 45" xmlns="http://www.w3.org/2000/svg" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns" xmlns:xlink="http://www.w3.org/1999/xlink"><title/><desc/><defs/><g fill="none" fill-rule="evenodd" id="miu" stroke="none" stroke-width="1"><g id="Artboard-1" transform="translate(-290.000000, -406.000000)"><g id="slice" transform="translate(215.000000, 119.000000)"/><path d="M291,414 L291,430 L307,430 L307,414 L302.5,414 L302.5,415 L306,415 L306,429 L292,429 L292,415 L295.5,415 L295.5,414 L291,414 Z M295.464466,411.954468 L294.757359,411.247361 L299,407.00472 L303.242641,411.247361 L302.535534,411.954468 L299.498437,408.917371 L299.498437,422 L298.5,422 L298.5,408.918934 L295.464466,411.954468 Z" fill="#FDFEFE" id="common-share-action-outline-stroke"/></g></g></svg>
|
||||
|
Before Width: | Height: | Size: 827 B |
40
index.html
40
index.html
@@ -8,25 +8,25 @@
|
||||
|
||||
<title>Kaamelott Soundboard</title>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="/favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="/favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="/favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="/favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="/favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="/favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="/favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="/favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="/favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="/favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="/favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="/favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="/favicons/manifest.json">
|
||||
<link rel="mask-icon" href="/favicons/safari-pinned-tab.svg" color="#5bbad5">
|
||||
<link rel="shortcut icon" href="/favicons/favicon.ico">
|
||||
<link rel="apple-touch-icon" sizes="57x57" href="favicons/apple-touch-icon-57x57.png">
|
||||
<link rel="apple-touch-icon" sizes="60x60" href="favicons/apple-touch-icon-60x60.png">
|
||||
<link rel="apple-touch-icon" sizes="72x72" href="favicons/apple-touch-icon-72x72.png">
|
||||
<link rel="apple-touch-icon" sizes="76x76" href="favicons/apple-touch-icon-76x76.png">
|
||||
<link rel="apple-touch-icon" sizes="114x114" href="favicons/apple-touch-icon-114x114.png">
|
||||
<link rel="apple-touch-icon" sizes="120x120" href="favicons/apple-touch-icon-120x120.png">
|
||||
<link rel="apple-touch-icon" sizes="144x144" href="favicons/apple-touch-icon-144x144.png">
|
||||
<link rel="apple-touch-icon" sizes="152x152" href="favicons/apple-touch-icon-152x152.png">
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="favicons/apple-touch-icon-180x180.png">
|
||||
<link rel="icon" type="image/png" href="favicons/favicon-32x32.png" sizes="32x32">
|
||||
<link rel="icon" type="image/png" href="favicons/android-chrome-192x192.png" sizes="192x192">
|
||||
<link rel="icon" type="image/png" href="favicons/favicon-96x96.png" sizes="96x96">
|
||||
<link rel="icon" type="image/png" href="favicons/favicon-16x16.png" sizes="16x16">
|
||||
<link rel="manifest" href="favicons/manifest.json">
|
||||
<link rel="mask-icon" href="favicons/safari-pinned-tab.svg" color="#5bbad5">
|
||||
<link rel="shortcut icon" href="favicons/favicon.ico">
|
||||
<meta name="msapplication-TileColor" content="#da532c">
|
||||
<meta name="msapplication-TileImage" content="/favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="/favicons/browserconfig.xml">
|
||||
<meta name="msapplication-TileImage" content="favicons/mstile-144x144.png">
|
||||
<meta name="msapplication-config" content="favicons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#3f3552">
|
||||
|
||||
<meta property="og:url" content="http://kaamelott-soundboard.2ec0b4.fr/">
|
||||
@@ -45,7 +45,7 @@
|
||||
<meta itemprop="description" content="Quelques-unes des meilleures répliques sonores de Kaamelott. C'était ça ou chante Sloubi.">
|
||||
<meta itemprop="image" content="http://kaamelott-soundboard.2ec0b4.fr/img/ks.jpg">
|
||||
|
||||
<link rel="stylesheet" href="/css/style.css" media="screen">
|
||||
<link rel="stylesheet" href="css/style.css" media="screen">
|
||||
</head>
|
||||
<body>
|
||||
<a class="ribbon" href="https://github.com/2ec0b4/kaamelott-soundboard" title="Contribuer">Contribuer</a>
|
||||
@@ -74,6 +74,6 @@
|
||||
|
||||
<div id="modal"></div>
|
||||
|
||||
<script data-main="/js/app/main" src="/bower_components/requirejs/require.js"></script>
|
||||
<script data-main="js/app/main" src="bower_components/requirejs/require.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -20,6 +20,7 @@ define("app", function(require) {
|
||||
Radio.channel("App").reply("region:show", this.showRegion.bind(this));
|
||||
Radio.channel("App").reply("modal:show", this.showModal.bind(this));
|
||||
Radio.channel("Sounds").on("sound:play", this.changeUrl.bind(this));
|
||||
Radio.channel("Sounds").on("sound:stop", this.resetUrl.bind(this));
|
||||
|
||||
this.router = new Marionette.AppRouter();
|
||||
|
||||
@@ -46,6 +47,10 @@ define("app", function(require) {
|
||||
this.router.navigate("son/"+slug);
|
||||
},
|
||||
|
||||
resetUrl: function() {
|
||||
this.router.navigate("/");
|
||||
},
|
||||
|
||||
showRegion: function showRegion(params) {
|
||||
this.mainRegion.show(params.view);
|
||||
},
|
||||
|
||||
@@ -7,13 +7,22 @@ define("collections/sounds", function(require) {
|
||||
|
||||
Sounds = Backbone.Collection.extend({
|
||||
model: Sound,
|
||||
url: "/sounds/sounds.json",
|
||||
url: "sounds/sounds.json",
|
||||
comparator: function(a, b) {
|
||||
var str1 = a.get("title"),
|
||||
str2 = b.get("title");
|
||||
|
||||
return str1.localeCompare(str2);
|
||||
},
|
||||
filterByCid: function(cid) {
|
||||
if(cid == "") {
|
||||
return this;
|
||||
}
|
||||
|
||||
return new Sounds(this.filter(function(data) {
|
||||
return data.cid == cid;
|
||||
}));
|
||||
},
|
||||
filterByTitle: function(search){
|
||||
var that = this,
|
||||
pattern;
|
||||
@@ -25,9 +34,10 @@ define("collections/sounds", function(require) {
|
||||
pattern = new RegExp(this.removeDiacritics(search), "gi");
|
||||
return new Sounds(this.filter(function(data) {
|
||||
pattern.lastIndex = 0;
|
||||
|
||||
|
||||
return pattern.test(that.removeDiacritics(data.get("title")))
|
||||
|| pattern.test(that.removeDiacritics(data.get("character")));
|
||||
|| pattern.test(that.removeDiacritics(data.get("character")))
|
||||
|| pattern.test(that.removeDiacritics(data.get("episode")));
|
||||
}));
|
||||
},
|
||||
removeDiacritics: function(str) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
require.config({
|
||||
baseUrl: "/js/app",
|
||||
baseUrl: "js/app",
|
||||
paths: {
|
||||
backbone: "../../bower_components/backbone/backbone-min",
|
||||
"backbone.radio": "../../bower_components/backbone.radio/build/backbone.radio",
|
||||
|
||||
@@ -19,11 +19,20 @@ define("models/sound", function(require) {
|
||||
this.audio = new Audio("sounds/"+this.get("file"));
|
||||
}
|
||||
|
||||
this.audio.play();
|
||||
var that = this,
|
||||
promise = this.audio.play();
|
||||
|
||||
if (promise !== undefined) {
|
||||
promise.then(function(_) {
|
||||
that.set("playing", true);
|
||||
}).catch(function(error) {
|
||||
});
|
||||
} else {
|
||||
this.set("playing", true);
|
||||
}
|
||||
|
||||
this.audio.onended = this.stop.bind(this);
|
||||
this.audio.onpause = this.stop.bind(this);
|
||||
|
||||
this.set("playing", true);
|
||||
},
|
||||
stop: function() {
|
||||
if( this.audio && !this.audio.paused ) {
|
||||
|
||||
2
js/app/templates/random.hbs
Normal file
2
js/app/templates/random.hbs
Normal file
@@ -0,0 +1,2 @@
|
||||
<button id="random" class="btn">Aléatoire</button>
|
||||
<button id="reset" class="btn" disabled>Réinitialiser</button>
|
||||
@@ -2,6 +2,10 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div id="random">
|
||||
|
||||
</div>
|
||||
|
||||
<div id="list">
|
||||
|
||||
</div>
|
||||
|
||||
@@ -20,6 +20,7 @@ define("views/filter", function(require) {
|
||||
},
|
||||
initialize: function() {
|
||||
this.channel = Radio.channel("Sounds");
|
||||
this.channel.on("sounds:reset", this.resetFilter.bind(this));
|
||||
},
|
||||
filterSounds: function(e) {
|
||||
var value = this.$el.find(this.ui.searchField).val();
|
||||
@@ -35,10 +36,15 @@ define("views/filter", function(require) {
|
||||
this.channel.trigger("sounds:filter", value);
|
||||
},
|
||||
resetFilter: function(e) {
|
||||
e.preventDefault();
|
||||
if (e) {
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
this.$el.find(this.ui.searchField).val('');
|
||||
this.$el.find(this.ui.searchForm).submit();
|
||||
},
|
||||
onShow: function() {
|
||||
this.$el.find(this.ui.searchField).focus();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
43
js/app/views/random.js
Normal file
43
js/app/views/random.js
Normal file
@@ -0,0 +1,43 @@
|
||||
define("views/random", function(require) {
|
||||
"use strict";
|
||||
|
||||
var Marionette = require("marionette"),
|
||||
Radio = require("backbone.radio"),
|
||||
RandomTemplate = require("hbs!templates/random"),
|
||||
RandomView;
|
||||
|
||||
RandomView = Marionette.LayoutView.extend({
|
||||
template: RandomTemplate,
|
||||
ui: {
|
||||
randomButton: "#random",
|
||||
resetButton: "#reset"
|
||||
},
|
||||
events: {
|
||||
"click @ui.randomButton": "random",
|
||||
"click @ui.resetButton": "reset"
|
||||
},
|
||||
initialize: function() {
|
||||
var that = this;
|
||||
this.channel = Radio.channel("Sounds");
|
||||
this.channel.on("sounds:filter", function (value) {
|
||||
if (value == "") {
|
||||
return;
|
||||
}
|
||||
that.enableButton();
|
||||
});
|
||||
},
|
||||
random: function() {
|
||||
this.enableButton();
|
||||
this.channel.trigger("sounds:random");
|
||||
},
|
||||
reset: function() {
|
||||
this.$el.find(this.ui.resetButton).attr('disabled', 'disabled');
|
||||
this.channel.trigger("sounds:reset");
|
||||
},
|
||||
enableButton: function() {
|
||||
this.$el.find(this.ui.resetButton).removeAttr('disabled');
|
||||
}
|
||||
});
|
||||
|
||||
return RandomView;
|
||||
});
|
||||
@@ -3,6 +3,7 @@ define("views/soundboard", function(require) {
|
||||
|
||||
var Marionette = require("marionette"),
|
||||
SoundsFilterView = require("views/filter"),
|
||||
RandomView = require("views/random"),
|
||||
SoundsView = require("views/sounds"),
|
||||
SoundboardTemplate = require("hbs!templates/soundboard"),
|
||||
SoundboardView;
|
||||
@@ -11,6 +12,7 @@ define("views/soundboard", function(require) {
|
||||
template: SoundboardTemplate,
|
||||
regions: {
|
||||
regFilter: "#filter",
|
||||
regRandom: "#random",
|
||||
regList: "#list"
|
||||
},
|
||||
initialize: function(options) {
|
||||
@@ -18,6 +20,7 @@ define("views/soundboard", function(require) {
|
||||
},
|
||||
onShow: function() {
|
||||
this.showChildView("regFilter", new SoundsFilterView());
|
||||
this.showChildView("regRandom", new RandomView());
|
||||
this.showChildView("regList", new SoundsView({
|
||||
slug: this.slug
|
||||
}));
|
||||
|
||||
@@ -28,6 +28,8 @@ define("views/sounds", function(require) {
|
||||
this.channel = Radio.channel("Sounds");
|
||||
this.channel.request("getSounds").then(this.initCollection.bind(this));
|
||||
this.channel.on("sounds:filter", this.filterCollection.bind(this));
|
||||
this.channel.on("sounds:random", this.randomSound.bind(this));
|
||||
this.channel.on("sounds:reset", this.resetCollection.bind(this));
|
||||
},
|
||||
onBeforeRender: function() {
|
||||
var sound;
|
||||
@@ -52,11 +54,32 @@ define("views/sounds", function(require) {
|
||||
|
||||
this.render();
|
||||
},
|
||||
filterCollectionByCid: function(cid) {
|
||||
this.collection = this.data.collection.filterByCid(cid);
|
||||
|
||||
this.render();
|
||||
},
|
||||
manageSounds: function(args) {
|
||||
this.stopPlayingSound();
|
||||
|
||||
Radio.channel("Sounds").trigger("sound:play", args.model.getSlug());
|
||||
},
|
||||
randomSound: function() {
|
||||
this.stopPlayingSound();
|
||||
|
||||
this.filterCollection("");
|
||||
var index = Math.floor(Math.random() * Math.floor(this.collection.length));
|
||||
var sound = this.collection.models[index];
|
||||
this.filterCollectionByCid(sound.cid);
|
||||
|
||||
Radio.channel("Sounds").trigger("sound:play", sound.getSlug());
|
||||
sound.play();
|
||||
},
|
||||
resetCollection: function() {
|
||||
this.filterCollection("");
|
||||
|
||||
Radio.channel("Sounds").trigger("sound:stop");
|
||||
},
|
||||
stopPlayingSound: function() {
|
||||
var playingSound = this.collection.findWhere({playing: true});
|
||||
|
||||
|
||||
BIN
sounds/2_3_poils_de_Q.mp3
Normal file
BIN
sounds/2_3_poils_de_Q.mp3
Normal file
Binary file not shown.
BIN
sounds/A-titre-purement-informatif.mp3
Normal file
BIN
sounds/A-titre-purement-informatif.mp3
Normal file
Binary file not shown.
BIN
sounds/Comment_ca_on_bute_Karadoc.mp3
Normal file
BIN
sounds/Comment_ca_on_bute_Karadoc.mp3
Normal file
Binary file not shown.
BIN
sounds/Homme-sans-metier.mp3
Normal file
BIN
sounds/Homme-sans-metier.mp3
Normal file
Binary file not shown.
BIN
sounds/Les-petits-pedestres-dont-un-au-lion.mp3
Normal file
BIN
sounds/Les-petits-pedestres-dont-un-au-lion.mp3
Normal file
Binary file not shown.
BIN
sounds/Les-petits-pedestres.mp3
Normal file
BIN
sounds/Les-petits-pedestres.mp3
Normal file
Binary file not shown.
BIN
sounds/Ren_dez_vous_a_la_ta_verne_incognito.mp3
Normal file
BIN
sounds/Ren_dez_vous_a_la_ta_verne_incognito.mp3
Normal file
Binary file not shown.
BIN
sounds/Soyez-souple-un-peu.mp3
Normal file
BIN
sounds/Soyez-souple-un-peu.mp3
Normal file
Binary file not shown.
BIN
sounds/Tout-travail-merite-salaire.mp3
Normal file
BIN
sounds/Tout-travail-merite-salaire.mp3
Normal file
Binary file not shown.
BIN
sounds/a_kadoc.mp3
Normal file
BIN
sounds/a_kadoc.mp3
Normal file
Binary file not shown.
BIN
sounds/a_moi.mp3
Normal file
BIN
sounds/a_moi.mp3
Normal file
Binary file not shown.
BIN
sounds/a_mon_epoque_ca_se_faisait_pas.mp3
Normal file
BIN
sounds/a_mon_epoque_ca_se_faisait_pas.mp3
Normal file
Binary file not shown.
BIN
sounds/a_plus_tard.mp3
Normal file
BIN
sounds/a_plus_tard.mp3
Normal file
Binary file not shown.
BIN
sounds/a_voui_vous_avez_raison.mp3
Normal file
BIN
sounds/a_voui_vous_avez_raison.mp3
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
sounds/ah_bah_alors_la_je_les_attends_les_mecs.mp3
Normal file
BIN
sounds/ah_bah_alors_la_je_les_attends_les_mecs.mp3
Normal file
Binary file not shown.
BIN
sounds/ah_bah_ouais_mais_apres_il_faut_un_peu_de_technique.mp3
Normal file
BIN
sounds/ah_bah_ouais_mais_apres_il_faut_un_peu_de_technique.mp3
Normal file
Binary file not shown.
BIN
sounds/ah_bravo_bah_vous_parlez_d_un_hero.mp3
Normal file
BIN
sounds/ah_bravo_bah_vous_parlez_d_un_hero.mp3
Normal file
Binary file not shown.
BIN
sounds/ah_cest_ca.mp3
Normal file
BIN
sounds/ah_cest_ca.mp3
Normal file
Binary file not shown.
BIN
sounds/ah_mais_arretez_de_gueuler_comme_un_con.mp3
Normal file
BIN
sounds/ah_mais_arretez_de_gueuler_comme_un_con.mp3
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/ah_non_ca_c_est_que_nous.mp3
Normal file
BIN
sounds/ah_non_ca_c_est_que_nous.mp3
Normal file
Binary file not shown.
BIN
sounds/ah_non_la_aujourd_hui_ca_passera_pas.mp3
Normal file
BIN
sounds/ah_non_la_aujourd_hui_ca_passera_pas.mp3
Normal file
Binary file not shown.
BIN
sounds/ah_ouais_je_l_ai_fait_trop_fulgurant_la_ca_va.mp3
Normal file
BIN
sounds/ah_ouais_je_l_ai_fait_trop_fulgurant_la_ca_va.mp3
Normal file
Binary file not shown.
BIN
sounds/ah_ouais_vous_seriez_une_sorte_de_bi_taupe_en_fait.mp3
Normal file
BIN
sounds/ah_ouais_vous_seriez_une_sorte_de_bi_taupe_en_fait.mp3
Normal file
Binary file not shown.
BIN
sounds/ah_oui_bravo_une_belle_lecon_de_sport.mp3
Normal file
BIN
sounds/ah_oui_bravo_une_belle_lecon_de_sport.mp3
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/ah_qu_est_ce_que_vous_voulez_mon_petit_bohort.mp3
Normal file
BIN
sounds/ah_qu_est_ce_que_vous_voulez_mon_petit_bohort.mp3
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
sounds/allez_vous_reposer_vous_l_avez_bien_merite.mp3
Normal file
BIN
sounds/allez_vous_reposer_vous_l_avez_bien_merite.mp3
Normal file
Binary file not shown.
BIN
sounds/alors__a_qui_cest_quelle_est_morte_la_va_vache.mp3
Normal file
BIN
sounds/alors__a_qui_cest_quelle_est_morte_la_va_vache.mp3
Normal file
Binary file not shown.
BIN
sounds/alors_ca_vient_ptite_bite.mp3
Normal file
BIN
sounds/alors_ca_vient_ptite_bite.mp3
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/alors_le_ratichon_on_a_un_ptit_creux.mp3
Normal file
BIN
sounds/alors_le_ratichon_on_a_un_ptit_creux.mp3
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
sounds/animaux_de_la_foret.mp3
Normal file
BIN
sounds/animaux_de_la_foret.mp3
Normal file
Binary file not shown.
BIN
sounds/arretez_immediatement_de_me_prendre_pour_une_truite.mp3
Normal file
BIN
sounds/arretez_immediatement_de_me_prendre_pour_une_truite.mp3
Normal file
Binary file not shown.
BIN
sounds/assiette_fromage.mp3
Normal file
BIN
sounds/assiette_fromage.mp3
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
sounds/au_bout_dun_moment_on_a_prefere_plus_rien_dire.mp3
Normal file
BIN
sounds/au_bout_dun_moment_on_a_prefere_plus_rien_dire.mp3
Normal file
Binary file not shown.
BIN
sounds/au_bucher_demon_expie_tes_fautes.mp3
Normal file
BIN
sounds/au_bucher_demon_expie_tes_fautes.mp3
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/ave_cesar.mp3
Normal file
BIN
sounds/ave_cesar.mp3
Normal file
Binary file not shown.
BIN
sounds/avec_sa_couille.mp3
Normal file
BIN
sounds/avec_sa_couille.mp3
Normal file
Binary file not shown.
BIN
sounds/avez_de_la_chance.mp3
Normal file
BIN
sounds/avez_de_la_chance.mp3
Normal file
Binary file not shown.
BIN
sounds/bah_je_sais_pas_me_lacher_la_grappe_par_exemple.mp3
Normal file
BIN
sounds/bah_je_sais_pas_me_lacher_la_grappe_par_exemple.mp3
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/bataille_de_fions.mp3
Normal file
BIN
sounds/bataille_de_fions.mp3
Normal file
Binary file not shown.
BIN
sounds/bateau-nage.mp3
Normal file
BIN
sounds/bateau-nage.mp3
Normal file
Binary file not shown.
BIN
sounds/ben_nous_on_a_cru_que_cetait_la_pour_faire_joli.mp3
Normal file
BIN
sounds/ben_nous_on_a_cru_que_cetait_la_pour_faire_joli.mp3
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/bibelots-mongol-parthenon.mp3
Normal file
BIN
sounds/bibelots-mongol-parthenon.mp3
Normal file
Binary file not shown.
BIN
sounds/blaireau-peignecul-tarlouze.mp3
Normal file
BIN
sounds/blaireau-peignecul-tarlouze.mp3
Normal file
Binary file not shown.
BIN
sounds/bled-natal-fion.mp3
Normal file
BIN
sounds/bled-natal-fion.mp3
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/bon_bah_aller_on_demarre_et_ouvrez_les_echauguettes.mp3
Normal file
BIN
sounds/bon_bah_aller_on_demarre_et_ouvrez_les_echauguettes.mp3
Normal file
Binary file not shown.
BIN
sounds/bon_bah_ca_va_on_plaisante.mp3
Normal file
BIN
sounds/bon_bah_ca_va_on_plaisante.mp3
Normal file
Binary file not shown.
BIN
sounds/bon_bah_je_vais_voir_ce_que_je_peux_faire.mp3
Normal file
BIN
sounds/bon_bah_je_vais_voir_ce_que_je_peux_faire.mp3
Normal file
Binary file not shown.
BIN
sounds/bon_ben_revolte.mp3
Normal file
BIN
sounds/bon_ben_revolte.mp3
Normal file
Binary file not shown.
BIN
sounds/bon_cassez_vous.mp3
Normal file
BIN
sounds/bon_cassez_vous.mp3
Normal file
Binary file not shown.
BIN
sounds/bon_je_la_suis_parce_que_je_suis_tres_amoureux.mp3
Normal file
BIN
sounds/bon_je_la_suis_parce_que_je_suis_tres_amoureux.mp3
Normal file
Binary file not shown.
BIN
sounds/bon_je_peux_pas_penser_a_tout_la.mp3
Normal file
BIN
sounds/bon_je_peux_pas_penser_a_tout_la.mp3
Normal file
Binary file not shown.
BIN
sounds/bucher1.mp3
Normal file
BIN
sounds/bucher1.mp3
Normal file
Binary file not shown.
BIN
sounds/bucher2.mp3
Normal file
BIN
sounds/bucher2.mp3
Normal file
Binary file not shown.
BIN
sounds/bucher3.mp3
Normal file
BIN
sounds/bucher3.mp3
Normal file
Binary file not shown.
BIN
sounds/buffet_a_vaisselle.mp3
Normal file
BIN
sounds/buffet_a_vaisselle.mp3
Normal file
Binary file not shown.
BIN
sounds/c-est-les-autres-qui-sont-cons.mp3
Normal file
BIN
sounds/c-est-les-autres-qui-sont-cons.mp3
Normal file
Binary file not shown.
BIN
sounds/c_est_cotelette_que_vous_comprenez_pas.mp3
Normal file
BIN
sounds/c_est_cotelette_que_vous_comprenez_pas.mp3
Normal file
Binary file not shown.
BIN
sounds/c_est_maintenant_quil_faut_se_secouer.mp3
Normal file
BIN
sounds/c_est_maintenant_quil_faut_se_secouer.mp3
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/ca_me_fait_gerber.mp3
Normal file
BIN
sounds/ca_me_fait_gerber.mp3
Normal file
Binary file not shown.
BIN
sounds/ca_me_ferait_mal.mp3
Normal file
BIN
sounds/ca_me_ferait_mal.mp3
Normal file
Binary file not shown.
BIN
sounds/ca_me_plait_qu_a_moitie.mp3
Normal file
BIN
sounds/ca_me_plait_qu_a_moitie.mp3
Normal file
Binary file not shown.
BIN
sounds/ca_va_oui_ca_va_vous_etes_content.mp3
Normal file
BIN
sounds/ca_va_oui_ca_va_vous_etes_content.mp3
Normal file
Binary file not shown.
Binary file not shown.
BIN
sounds/ca_vous_regarde_pas_cest_secret_ok.mp3
Normal file
BIN
sounds/ca_vous_regarde_pas_cest_secret_ok.mp3
Normal file
Binary file not shown.
BIN
sounds/casuffit.mp3
Normal file
BIN
sounds/casuffit.mp3
Normal file
Binary file not shown.
BIN
sounds/catastrophe.mp3
Normal file
BIN
sounds/catastrophe.mp3
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user