Commit e97bc020 authored by Arnaud Bey's avatar Arnaud Bey
Browse files

WIP bootstrap 4

parent 93bd1cc9
......@@ -13,13 +13,12 @@ module.exports = function(grunt) {
less: {
dist: {
options: {
compress: true,
yuicompress: true,
compress: false,
yuicompress: false,
optimization: 2
},
files: {
"web/css/main.css": [
"bower_components/bootstrap/dist/css/bootstrap.css",
"bower_components/font-awesome/css/font-awesome.css",
'src/MagicWordBundle/Resources/public/css/main.css',
"bower_components/FlipClock/compiled/flipclock.css",
......@@ -41,7 +40,7 @@ module.exports = function(grunt) {
files: {
'web/js/main.js': [
"bower_components/jquery/dist/jquery.min.js",
"bower_components/bootstrap/dist/js/bootstrap.min.js",
"bower_components/bootstrap/dist/js/bootstrap.bundle.min.js",
'web/bundles/fosjsrouting/js/router.js',
'src/MagicWordBundle/Resources/public/js/wordbox.js',
'src/MagicWordBundle/Resources/public/js/wait.js',
......@@ -128,12 +127,15 @@ module.exports = function(grunt) {
files: {
src: ['CONTRIBUTORS.md'],
dest: 'web/files/'
},
bootstrap: {
src: ["bower_components/bootstrap/dist/css/bootstrap.css"],
dest: 'web/css/bootstrap.css'
}
},
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.registerTask('default', ["less", "uglify", "copy:fonts", "copy:files"]);
grunt.registerTask('default', ["less", "uglify", "copy:fonts", "copy:files","copy:bootstrap"]);
};
......@@ -12,6 +12,7 @@
<title>
{% block title %}MAGIC WORD{% endblock %}
</title>
<link rel="stylesheet" href="{{ asset('css/bootstrap.css')}}" type="text/css"/>
<link rel="stylesheet" href="{{ asset('css/main.css')}}" type="text/css"/>
{% block stylesheets %}{% endblock %}
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}"/>
......@@ -36,72 +37,65 @@
<body>
{% block topToHideWhilePlaying %}
<a href="{{ path('home') }}">
<div id="header-logo">
</div>
<div id="header-logo"></div>
</a>
<div class="header-buttons">
<div class="btn-group-sm btn-group-vertical">
{% if logged %}
<a href="{{ path('fos_user_security_logout') }}" class="btn btn-default btn-sm">
<a href="{{ path('fos_user_security_logout') }}" class="btn btn-primary btn-sm">
<i class="fa fa-sign-out" aria-hidden="true"></i>
<span class="hidden-xs">{{ 'logout' | trans }}</span>
</a>
{% else %}
{% if getGeneralParameters().selfRegistration %}
<a href="{{ path('fos_user_registration_register') }}" class="btn btn-default btn-sm">
<a href="{{ path('fos_user_registration_register') }}" class="btn btn-primary btn-sm">
<i class="fa fa-user-plus" aria-hidden="true"></i>
<span class="hidden-xs">{{ 'register' | trans }}</span>
</a>
{% endif %}
<a href="{{ path('fos_user_security_login') }}" class="btn btn-default btn-sm">
<a href="{{ path('fos_user_security_login') }}" class="btn btn-primary btn-sm">
<i class="fa fa-sign-in" aria-hidden="true"></i>
<span class="hidden-xs">{{ 'login' | trans }}</span>
</a>
{% endif %}
</div>
</div>
{% endblock %}
<div class="container">
{% for label, flashes in app.session.flashbag.all %}
{% for flash in flashes %}
<div class="alert alert-{{ label }}" role="alert">
{{ flash }}
</div>
{% endfor %}
{% endfor %}
{% block body %}{% endblock %}
</div>
{% block bottomToHideWhilePlaying %}
<div id="footer">
{{ generalParameters.footer | raw}}
</div>
</div>
{% endblock %}
<div class="container pb-4">
{% for label, flashes in app.session.flashbag.all %}
{% for flash in flashes %}
<div class="alert alert-{{ label }}" role="alert">{{ flash }}</div>
{% endfor %}
{% endfor %}
{% block body %}{% endblock %}
<div class="modal fade" data-keyboard="false" data-backdrop="static" id="please-wait" tabindex="-1" role="dialog" aria-labelledby="please-wait">
<div class="vertical-alignment-helper">
<div class="modal-dialog vertical-align-center" role="document">
<div class="modal-content">
<div class="modal-body noselect">
<img src="{{ asset('img/squares.gif')}}"/>
<h3 id="please-wait-message"></h3>
</div>
</div>
<div class="modal" tabindex="-1" id="please-wait" role="dialog" data-backdrop="static" data-keyboard=false>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body noselect">
<img src="{{ asset('img/squares.gif')}}"/>
<h3 id="please-wait-message"></h3>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="info-modal" tabindex="-1" role="dialog" aria-labelledby="info-modal">
<div class="vertical-alignment-helper">
<div class="modal-dialog vertical-align-center" role="document">
<div class="modal-content">
<div class="modal-body noselect">
<h3 id="info-modal-message"></h3>
</div>
</div>
<div class="modal" tabindex="-1" id="info-modal" role="dialog" data-backdrop="static" data-keyboard=false>
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body noselect">
<h3 id="info-modal-message"></h3>
</div>
</div>
</div>
</div>
</div>
{% block bottomToHideWhilePlaying %}
<div id="footer">
{{ generalParameters.footer | raw}}
</div>
{% endblock %}
<div id="users-device-size">
<div id="xs" class="visible-xs"></div>
......
......@@ -8,7 +8,7 @@
"tests"
],
"dependencies": {
"bootstrap": "3.3.*",
"bootstrap": "~4",
"font-awesome": "~4",
"FlipClock": "*",
"jquery": "~2.1.4",
......
This diff is collapsed.
......@@ -21,7 +21,7 @@ class ChallengeReplyType extends AbstractType
));
$builder->add('save', SubmitType::class, array(
'attr' => array('class' => 'btn btn-default please-wait', 'data-message' => 'Génération de la grille.'),
'attr' => array('class' => 'btn btn-outline-seconary please-wait', 'data-message' => 'Génération de la grille.'),
'label' => 'accept_challenge',
'translation_domain' => 'messages',
));
......
......@@ -51,7 +51,7 @@ class ChallengeType extends AbstractType
));
$builder->add('save', SubmitType::class, array(
'attr' => array('class' => 'btn btn-default'),
'attr' => array('class' => 'btn btn-outline-seconary'),
'label' => 'challenge!',
'translation_domain' => 'messages',
));
......
......@@ -21,7 +21,7 @@ class ComboPointsType extends AbstractType
));
$builder->add('save', SubmitType::class, array(
'attr' => array('class' => 'btn btn-default'),
'attr' => array('class' => 'btn btn-outline-seconary'),
'label' => 'save',
'translation_domain' => 'messages',
));
......
......@@ -49,7 +49,7 @@ class GeneralParametersType extends AbstractType
$builder->add('save', SubmitType::class, array(
'attr' => array('class' => 'btn btn-default'),
'attr' => array('class' => 'btn btn-outline-seconary'),
'label' => 'save',
'translation_domain' => 'messages',
));
......
......@@ -21,7 +21,7 @@ class LetterLanguagePointsType extends AbstractType
));
$builder->add('save', SubmitType::class, array(
'attr' => array('class' => 'btn btn-default'),
'attr' => array('class' => 'btn btn-outline-seconary'),
'label' => 'save',
'translation_domain' => 'messages',
));
......
......@@ -44,7 +44,7 @@ class MassiveType extends AbstractType
));
$builder->add('save', SubmitType::class, array(
'attr' => array('class' => 'btn btn-default btn-primary'),
'attr' => array('class' => 'btn btn-outline-seconary btn-primary'),
'label' => 'save',
'translation_domain' => 'messages',
));
......
......@@ -52,7 +52,7 @@ class PlayerType extends AbstractType
));
$builder->add('save', SubmitType::class, array(
'attr' => array('class' => 'btn btn-default'),
'attr' => array('class' => 'btn btn-outline-seconary'),
'label' => 'save',
'translation_domain' => 'messages',
));
......
......@@ -32,7 +32,7 @@ class ProfileType extends AbstractType
));
$builder->add('save', SubmitType::class, array(
'attr' => array('class' => 'btn btn-default'),
'attr' => array('class' => 'btn btn-outline-seconary'),
'label' => 'save',
'translation_domain' => 'messages',
));
......
......@@ -21,7 +21,7 @@ class WordLengthType extends AbstractType
));
$builder->add('save', SubmitType::class, array(
'attr' => array('class' => 'btn btn-default'),
'attr' => array('class' => 'btn btn-outline-seconary'),
'label' => 'save',
'translation_domain' => 'messages',
));
......
$(function() {
$('[data-toggle="tooltip"]').tooltip();
$('[data-toggle="popover"]').popover()
$('[data-toggle="popover"]').popover();
$(".dropdown-toggle").dropdown();
})
$('.please-wait').on("click",function(){
......
......@@ -11,7 +11,7 @@ var modalHandler = {
html += '<div class="modal-body">';
html += '</div>';
html += '<div class="modal-footer">';
html += '<button type="button" class="btn btn-default" data-dismiss="modal">'+ Translator.trans('close'); +'</button>';
html += '<button type="button" class="btn btn-outline-seconary" data-dismiss="modal">'+ Translator.trans('close'); +'</button>';
html += '</div>';
html += '</div>';
html += '</div>';
......
......@@ -32,7 +32,7 @@ var wiktionnary = {
html += '<div id="wiktionnary-body" class="modal-body">';
html += '</div>';
html += '<div class="modal-footer">';
html += '<button type="button" class="btn btn-default" data-dismiss="modal">'+ Translator.trans('close'); +'</button>';
html += '<button type="button" class="btn btn-outline-seconary" data-dismiss="modal">'+ Translator.trans('close'); +'</button>';
html += '</div>';
html += '</div>';
html += '</div>';
......
......@@ -3,14 +3,14 @@
{% block title %}{{ 'combopoints' | trans }}{% endblock %}
{% block body -%}
<div class="panel panel-default">
<div class="panel-heading">
<div class="card">
<div class="card-header">
<h4>
{% include "MagicWordBundle:Common:backtohome.html.twig" %}
{{ "combopoints" | trans }} - {{ combopoints.length }}
</h4>
</div>
<div class="panel-body">
<div class="card-body">
{{ form(form) }}
</div>
</div>
......
......@@ -2,19 +2,17 @@
{% block body -%}
<div class="panel panel-default">
<div class="panel-heading">
<h4>
{% include "MagicWordBundle:Common:backtohome.html.twig" %}
{{ "combopoints" | trans }}
</h4>
<div class="card">
<div class="card-header">
{% include "MagicWordBundle:Common:backtohome.html.twig" %}
{{ "combopoints" | trans }}
</div>
<ul class="list-group">
<ul class="list-group list-group-flush">
{% for combopoint in combopoints %}
<li class="list-group-item">
{{ combopoint.length }} {{'forms'| trans}} - {{ combopoint.points }}pts
<span class="pull-right">
<a href="{{ path('combopoint_edit', {"id": combopoint.id}) }}" class="btn btn-default btn-xs">
<a href="{{ path('combopoint_edit', {"id": combopoint.id}) }}" class="btn btn-outline-secondary btn-sm">
<i class="fa fa-pencil" aria-hidden="true"></i> Editer
</a>
</span>
......
......@@ -3,14 +3,12 @@
{% block title %}{{ 'letterlanguagepoints' | trans }}{% endblock %}
{% block body -%}
<div class="panel panel-default">
<div class="panel-heading">
<h4>
{% include "MagicWordBundle:Common:backtohome.html.twig" %}
{{ "general_parameters" | trans}}
</h4>
<div class="card">
<div class="card-header">
{% include "MagicWordBundle:Common:backtohome.html.twig" %}
{{ "general_parameters" | trans}}
</div>
<div class="panel-body">
<div class="card-body">
{{ form(form) }}
</div>
</div>
......
......@@ -3,20 +3,18 @@
{% block title %}{{ 'letterlanguagepoints' | trans }}{% endblock %}
{% block body -%}
<div class="panel panel-default">
<div class="panel-heading">
<h4>
{% include "MagicWordBundle:Common:backtohome.html.twig" %}
{{ "general_parameters" | trans}}
<span class="pull-right">
<a class="btn btn-default" href="{{ path('general_parameters_edit') }}">
<i class="fa fa-pencil" aria-hidden="true"></i>
{{ "edit" | trans }}
</a>
</span>
</h4>
<div class="card">
<div class="card-header">
{% include "MagicWordBundle:Common:backtohome.html.twig" %}
{{ "general_parameters" | trans}}
<span class="pull-right">
<a class="btn btn-sm btn-outline-secondary" href="{{ path('general_parameters_edit') }}">
<i class="fa fa-pencil" aria-hidden="true"></i>
{{ "edit" | trans }}
</a>
</span>
</div>
<div class="panel-body">
<div class="card-body">
<h4> {{ "homeText" | trans}} </h4>
<i class="fa fa-quote-left" aria-hidden="true"></i>
{{ generalParameters.homeText | raw }}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment