Fix message dialog (js) + add header menu

master
Julien Rosset 5 years ago
parent ba09c131c0
commit 21b93880c8

@ -4,6 +4,7 @@
<configs> <configs>
<sshConfig authType="PASSWORD" host="giftopic.fr" id="818b2043-4522-45d1-a6aa-6e33d67df9a2" port="4352" customName="giftopic-dev" nameFormat="CUSTOM" username="giftopic-dev" /> <sshConfig authType="PASSWORD" host="giftopic.fr" id="818b2043-4522-45d1-a6aa-6e33d67df9a2" port="4352" customName="giftopic-dev" nameFormat="CUSTOM" username="giftopic-dev" />
<sshConfig authType="PASSWORD" host="giftopic.fr" id="8723ba75-f241-4c47-b5e4-bb4d58cd78d4" port="4351" nameFormat="DESCRIPTIVE" username="database" /> <sshConfig authType="PASSWORD" host="giftopic.fr" id="8723ba75-f241-4c47-b5e4-bb4d58cd78d4" port="4351" nameFormat="DESCRIPTIVE" username="database" />
<sshConfig authType="PASSWORD" host="giftopic.fr" id="5170af19-1f09-4309-be27-9e349cd19dbf" port="4352" customName="giftopic-dev" nameFormat="CUSTOM" username="giftopic-dev" />
</configs> </configs>
</component> </component>
</project> </project>

@ -1,30 +0,0 @@
@import "~bootstrap/scss/bootstrap";
@font-face {
font-family: Gabriola;
font-style: normal;
font-weight: normal;
src: local('Gabriola'), url('/build/static/fonts/gabriola.woff') format('woff');
}
@font-face {
font-family: BlackChancery;
font-style: normal;
font-weight: normal;
src: local('BlackChancery'), url('/build/static/fonts/black_chancery.ttf') format('truetype');
}
#messages {
display: none;
}
body {
font-family: Gabriola, sans-serif;
font-size: 1.5rem;
margin : 120px 5px 0 5px;
}
.ui-widget {
font-family: Gabriola, sans-serif;
font-size: 1.5rem;
}
@import "header";

@ -0,0 +1,12 @@
@font-face {
font-family: Gabriola;
font-style: normal;
font-weight: normal;
src: local('Gabriola'), url('/build/static/fonts/gabriola.woff') format('woff');
}
@font-face {
font-family: BlackChancery;
font-style: normal;
font-weight: normal;
src: local('BlackChancery'), url('/build/static/fonts/black_chancery.ttf') format('truetype');
}

@ -0,0 +1,3 @@
#messages {
display: none;
}

@ -1,13 +0,0 @@
header {
position : fixed;
top : 0;
left : 0;
width : 100%;
background : rgba(255, 255, 255, 1);
}
#logo {
font-family : BlackChancery, sans-serif;
font-size : 3em;
margin-left: 10px;
}

@ -0,0 +1,20 @@
header {
position: fixed;
top: 0;
left: 0;
width: 100%;
background: rgba(255, 255, 255, 1);
padding: 5px 10px 0 10px;
display: flex;
justify-content: space-between;
nav a {
margin: 0 5px;
}
}
#logo {
font-family: BlackChancery, sans-serif;
font-size: 2em;
}

@ -0,0 +1,12 @@
%font {
font-family: Gabriola, sans-serif;
font-size: 1.5rem;
}
body {
@extend %font;
margin: 80px 5px 0 5px; // Vertical translation for the fixed header
}
.ui-widget {
@extend %font;
}

@ -0,0 +1,8 @@
@import "~bootstrap/scss/bootstrap";
@import "base/fonts";
@import "components/messages";
@import "layouts/page";
@import "layouts/header";

@ -0,0 +1,6 @@
require('bootstrap/dist/js/bootstrap.bundle.min');
require('@fortawesome/fontawesome-free/css/all.min.css');
require('../css/main.scss');
require('../js/messages.js');

@ -1,7 +1,6 @@
require('../css/app.scss');
const $ = require('jquery'); const $ = require('jquery');
require('jquery-ui'); require('jquery-ui-css/all.css');
require('jquery-ui/dialog');
$(function () { $(function () {
/* Messages */ /* Messages */

@ -18,6 +18,7 @@
"build": "encore production --progress" "build": "encore production --progress"
}, },
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-free": "^5.13.0",
"jquery": "^3.5.1", "jquery": "^3.5.1",
"jquery-ui": "^1.12.1" "jquery-ui": "^1.12.1"
} }

@ -525,7 +525,7 @@
}, },
"files": [ "files": [
"assets/css/app.css", "assets/css/app.css",
"assets/js/app.js", "assets/js/main.js",
"config/packages/assets.yaml", "config/packages/assets.yaml",
"config/packages/prod/webpack_encore.yaml", "config/packages/prod/webpack_encore.yaml",
"config/packages/test/webpack_encore.yaml", "config/packages/test/webpack_encore.yaml",

@ -8,7 +8,7 @@
<!-- STYLESHEET --> <!-- STYLESHEET -->
{% block stylesheets %} {% block stylesheets %}
{{ encore_entry_link_tags('app') }} {{ encore_entry_link_tags('main') }}
{% endblock %} {% endblock %}
</head> </head>
<body> <body>
@ -16,11 +16,20 @@
<div id="logo"> <div id="logo">
Giftopic Giftopic
</div> </div>
<div> <nav>
<a href="{{ path('app_site_index') }}" class="fas fa-home"></a>
{% if app.user %} {% if app.user %}
{{ app.user.username }}, <a href="{{ path('app_security_sign_out') }}">{% trans from 'security' %}sign.out{% endtrans %}</a> <div class="dropdown">
<button type="button" id="menu_username" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{ app.user.username }}</button>
<div class="dropdown-menu" aria-labelledby="menu_username">
<a href="{{ path('app_security_sign_out') }}" class="dropdown-item">{% trans from 'security' %}sign.out{% endtrans %}</a>
</div>
</div>
{% else %}
{# <li><a href="{{ path('app_security_sign_up') }}">{% trans from 'security' %}sign.up{% endtrans %}</a></li>#}
<a href="{{ path('app_security_sign_in') }}">{% trans from 'security' %}sign.in{% endtrans %}</a>
{% endif %} {% endif %}
</div> </nav>
</header> </header>
{% block body %}{% endblock %} {% block body %}{% endblock %}
@ -41,7 +50,7 @@
<!-- JAVASCRIPT --> <!-- JAVASCRIPT -->
{% block javascripts %} {% block javascripts %}
{{ encore_entry_script_tags('app') }} {{ encore_entry_script_tags('main') }}
{% endblock %} {% endblock %}
</body> </body>
</html> </html>

@ -27,6 +27,13 @@ Encore
}, },
)) ))
.addAliases(
{
'jquery-ui': 'jquery-ui/ui/widgets',
'jquery-ui-css': 'jquery-ui/../../themes/base',
},
)
/* /*
* ENTRY CONFIG * ENTRY CONFIG
* *
@ -36,7 +43,7 @@ Encore
* Each entry will result in one JavaScript file (e.g. app.js) * Each entry will result in one JavaScript file (e.g. app.js)
* and one CSS file (e.g. app.css) if your JavaScript imports CSS. * and one CSS file (e.g. app.css) if your JavaScript imports CSS.
*/ */
.addEntry('app', './assets/js/app.js') .addEntry('main', './assets/js/main.js')
//.addEntry('page1', './assets/js/page1.js') //.addEntry('page1', './assets/js/page1.js')
//.addEntry('page2', './assets/js/page2.js') //.addEntry('page2', './assets/js/page2.js')

@ -743,6 +743,11 @@
lodash "^4.17.13" lodash "^4.17.13"
to-fast-properties "^2.0.0" to-fast-properties "^2.0.0"
"@fortawesome/fontawesome-free@^5.13.0":
version "5.13.0"
resolved "https://registry.yarnpkg.com/@fortawesome/fontawesome-free/-/fontawesome-free-5.13.0.tgz#fcb113d1aca4b471b709e8c9c168674fbd6e06d9"
integrity sha512-xKOeQEl5O47GPZYIMToj6uuA2syyFlq9EMSl2ui0uytjY9xbe8XS0pexNWmxrdcCyNGyDmLyYw5FtKsalBUeOg==
"@nodelib/fs.scandir@2.1.3": "@nodelib/fs.scandir@2.1.3":
version "2.1.3" version "2.1.3"
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b"

Loading…
Cancel
Save