diff --git a/.gitignore b/.gitignore index 592e87f0c..9fcdf9d28 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,6 @@ composer.lock vendor/* parameters.yml *~ +*.DS_Store +*.sass-cache +Resources/node_modules/ \ No newline at end of file diff --git a/Resources/Gruntfile.js b/Resources/Gruntfile.js new file mode 100644 index 000000000..60a81ed38 --- /dev/null +++ b/Resources/Gruntfile.js @@ -0,0 +1,46 @@ +module.exports = function(grunt) { + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + + chillperson: { + folders: { + pub: './public', + css: '<%= chillperson.folders.pub %>/css/', + sass: '<%= chillperson.folders.pub %>/sass/', + } + }, + sass: { + dist: { + options: { + debugInfo: true, + }, + files: [{ + expand: true, + cwd: '<%= chillperson.folders.sass.src %>', + src: ['*.scss'], + dest: '<%= chillperson.folders.css %>', + ext: '.css' + }] + } + }, + watch: { + css: { + files: [ '<%= chillperson.folders.sass %>/*.scss', '<%= chillperson.folders.sass %>/**/*.scss' ], + tasks: ['generatecss'], + /* + options: { + spawn: false, + interrupt: true, + } + */ + } + }, + }); + + grunt.loadNpmTasks('grunt-contrib-sass'); + grunt.loadNpmTasks('grunt-contrib-watch'); + + grunt.registerTask('generatecss', 'sass'); + + grunt.registerTask('default', ['generatecss']); +}; \ No newline at end of file diff --git a/Resources/assets/css/.sass-cache/5423e640e54bbdf4d80063fe9dc2028bb970d84c/person.scssc b/Resources/assets/css/.sass-cache/5423e640e54bbdf4d80063fe9dc2028bb970d84c/person.scssc deleted file mode 100644 index 9287bacc2..000000000 Binary files a/Resources/assets/css/.sass-cache/5423e640e54bbdf4d80063fe9dc2028bb970d84c/person.scssc and /dev/null differ diff --git a/Resources/assets/css/config.rb b/Resources/assets/css/config.rb deleted file mode 100644 index 39e93a077..000000000 --- a/Resources/assets/css/config.rb +++ /dev/null @@ -1,33 +0,0 @@ -# Require any additional compass plugins here. - -# Tell compass where to find local extensions -# If you followed directions and ran 'gem install modular-scale' comment the next two lines out: -#extensions_dir = "bower_components/gumby/sass/extensions" - -#Compass::Frameworks.register('modular-scale', :path => File.expand_path("#{extensions_dir}/modular-scale")) - -# Uncomment these to use regular Ruby gems. -require 'modular-scale' -require 'sassy-math' - -# Set this to the root of your project when deployed: -http_path = "/" -css_dir = "./../../public/css" -sass_dir = "sass" -images_dir = "img" - -# You can select your preferred output style here (can be overridden via the command line) :nested or :expanded or :compact or :compressed: -output_style = :compact - -# To enable relative paths to assets via compass helper functions. Uncomment: -# relative_assets = true - -# To disable debugging comments that display the original location of your selectors. Uncomment: -line_comments = false - - -# If you prefer the indented syntax, you might want to regenerate this -# project again passing --syntax sass, or you can uncomment this: -# preferred_syntax = :sass -# and then run: -# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass diff --git a/Resources/assets/css/sass/person.scss b/Resources/assets/css/sass/person.scss deleted file mode 100644 index c753b4a5c..000000000 --- a/Resources/assets/css/sass/person.scss +++ /dev/null @@ -1,74 +0,0 @@ -div#person_wrapper { - - div#general { - - } - - div#person_details { - margin-top: 50px; - - - .tab-content { - border-top: 1px solid #e5e5e5; - - width: 640px; - } - - dl { - padding: 0.5em; - } - - dt { - float: left; - clear: left; - width: 190px; - text-align: right; - font-weight: bold; - color: green; - } - - dt:after { - content: " :"; - } - - dd { - margin: 0 0 0 199px; - padding: 0 0 0.5em 0; - } - - label { - color: green; - } - - label:not(.radio) { - min-width: 190px; - font-weight: bold; - } - - label.radio{ - margin-left: 0.2em; - } - - .has_error { - label { - color: red; - } - - ul.errors li { - color: red; - } - - input { - - } - } - - div.form_control { - .controls { - float: right; - } - } - } - -} - diff --git a/Resources/package.json b/Resources/package.json new file mode 100644 index 000000000..3db5780e7 --- /dev/null +++ b/Resources/package.json @@ -0,0 +1,16 @@ +{ + "name": "chill-person-js-css", + "version": "0.0.0", + "description": "JS-CSS files for ChillPerson Bundle, a software for social workers", + "directories": { + }, + "author": "Champs-Libres ", + "devDependencies": { + "grunt": "^0.4.5", + "grunt-contrib-copy": "^0.7.0", + "grunt-contrib-sass": "^0.8.1", + "grunt-contrib-watch": "^0.6.1", + "grunt-contrib-clean": "^0.6.0" + }, + "dependencies": {} +} diff --git a/Resources/public/css/person.css b/Resources/public/css/person.css new file mode 100644 index 000000000..e6557aad5 --- /dev/null +++ b/Resources/public/css/person.css @@ -0,0 +1,15 @@ +@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/marcu\/Projects\/Chill\/vendor\/chill-project\/person\/Resources\/public\/sass\/person\.scss}line{font-family:\000034}} +div#header-person-name { + background: none repeat scroll 0 0 #328474; + color: #FFF; + padding-top: 1em; + padding-bottom: 1em; } + +@media -sass-debug-info{filename{font-family:file\:\/\/\/Users\/marcu\/Projects\/Chill\/vendor\/chill-project\/person\/Resources\/public\/sass\/person\.scss}line{font-family:\0000311}} +div#header-person-details { + background: none repeat scroll 0 0 #43b29d; + color: #FFF; + padding-top: 1em; + padding-bottom: 1em; } + +/*# sourceMappingURL=person.css.map */ diff --git a/Resources/public/css/person.css.map b/Resources/public/css/person.css.map new file mode 100644 index 000000000..01f7c3c9f --- /dev/null +++ b/Resources/public/css/person.css.map @@ -0,0 +1,7 @@ +{ +"version": 3, +"mappings": ";AAGA,sBAAuB;EACnB,UAAU,EAAE,8BAAwC;EACpD,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,GAAG;EAChB,cAAc,EAAE,GAAG;;;AAGvB,yBAA0B;EACtB,UAAU,EAAE,8BAAmC;EAC/C,KAAK,EAAE,IAAI;EACX,WAAW,EAAE,GAAG;EAChB,cAAc,EAAE,GAAG", +"sources": ["../sass/person.scss"], +"names": [], +"file": "person.css" +} diff --git a/Resources/public/sass/person.scss b/Resources/public/sass/person.scss new file mode 100644 index 000000000..8b4f15e8e --- /dev/null +++ b/Resources/public/sass/person.scss @@ -0,0 +1,16 @@ + +@import '../../../../main/Resources/public/sass/config/colors'; + +div#header-person-name { + background: none repeat scroll 0 0 $chill-green-dark; + color: #FFF; + padding-top: 1em; + padding-bottom: 1em; +} + +div#header-person-details { + background: none repeat scroll 0 0 $chill-green; + color: #FFF; + padding-top: 1em; + padding-bottom: 1em; +} \ No newline at end of file diff --git a/Resources/views/layout.html.twig b/Resources/views/layout.html.twig index e27f1ab71..279092bf6 100644 --- a/Resources/views/layout.html.twig +++ b/Resources/views/layout.html.twig @@ -16,15 +16,24 @@ #} {% extends "ChillMainBundle::layout.html.twig" %} + +{% block css %} + {% stylesheets output="css/person.css" filter="cssrewrite" + "bundles/chillperson/css/person.css" + %} + + {% endstylesheets %} +{% endblock %} + {% block layout_content %}
- {{ 'Lastname'|trans|upper }} : {{ person.lastName|upper }} + {{ 'Lastname'|trans|upper }} : {{ person.lastName|upper }}
- {{ 'Fistname'|trans|upper}} : {{ person.firstName|upper }} + {{ 'Fistname'|trans|upper}} : {{ person.firstName|upper }}
- {{ 'Birthdate'|trans|upper }} : + {{ 'Birthdate'|trans|upper }} : {% if person.birthdate == null %} {{ 'Unknown date of birth'|trans }}, {{ ('person.gender.' ~ person.gender)|trans }} @@ -56,7 +65,7 @@ {% endif %}
- {{ 'Nationality'|trans|upper}} : + {{ 'Nationality'|trans|upper}} : {% if person.nationality is not null %} {{ person.nationality.name|localize_translatable_string }} {% else %} @@ -64,7 +73,7 @@ {% endif %}
- {{ 'Spoken languages'|trans|upper}} : + {{ 'Spoken languages'|trans|upper}} : {% if person.spokenLanguages|length == 0 %} {{ 'Unknown spoken languages'|trans }} {% else %} @@ -78,13 +87,6 @@
- {# Note: activeRouteKey should be defined in Controller or child layout #} - {{ chill_menu('person', { - 'layout': 'ChillPersonBundle::menu.html.twig', - 'args' : {'person_id': person.id }, - 'activeRouteKey': activeRouteKey - }) }} -
{# Flash messages ! #}
@@ -115,6 +117,13 @@ {% block personcontent %}{%endblock%}
+ + {# Note: activeRouteKey should be defined in Controller or child layout #} + {{ chill_menu('person', { + 'layout': 'ChillPersonBundle::menu.html.twig', + 'args' : {'person_id': person.id }, + 'activeRouteKey': activeRouteKey + }) }}
diff --git a/Resources/views/menu.html.twig b/Resources/views/menu.html.twig index f363f80f3..82be5518c 100644 --- a/Resources/views/menu.html.twig +++ b/Resources/views/menu.html.twig @@ -15,8 +15,7 @@ * along with this program. If not, see . #}
-