Commit aab65ac6 authored by Julien Fastré's avatar Julien Fastré

Merge branch 'master' of github.com:Chill-project/chill.social

Conflicts:
	.gitignore
	Gruntfile.js
	README.md
	bower.json
	package.json
	website/index.html
parents 46b3b4d5 835d5f43
bower_components
node_modules
#should be generated by grunt tasks
website/js/*
website/css/*
website/img/*
website/fonts/*
src/js/all.js
src/js/bootstrap.js
temp/*
#used by deploy task
.ftppass
sftpCache.json
......@@ -7,9 +7,12 @@ module.exports = function(grunt) {
'web': 'website',
'js': '<%= website.folders.web %>/js',
'bower': './bower_components',
'src': './src'
'src': './src',
'temp': './temp',
'less': '<%= website.folders.src %>/less'
}
},
bower: {
install: {
options: {
......@@ -21,6 +24,21 @@ module.exports = function(grunt) {
}
}
},
less: {
options: {
strictMath: true,
sourceMap: true,
outputSourceFiles: true,
sourceMapURL: '<%= pkg.name %>.css.map',
sourceMapFilename: '<%= website.folders.web %>/css/<%= pkg.name %>.css.map',
paths: ['<%= website.folders.bower %>/bootstrap/less' ]
},
'<%= website.folders.web %>/css/chill.social.css': '<%= website.folders.less %>/index.less'
},
bootlint: {
options: {
stoponerror: false,
......@@ -28,42 +46,100 @@ module.exports = function(grunt) {
},
files: ['<%= website.folders.web %>/*.html']
},
copy: {
css: {
files: [
{cwd: '<%= website.folders.bower %>/bootstrap/dist/css/', src: '*', dest: '<%= website.folders.web %>/css', expand: true},
{cwd: '<%= website.folders.bower %>/bootstrap/dist/fonts/', src: '*', dest: '<%= website.folders.web %>/fonts', expand: true}
{cwd: '<%= website.folders.bower %>/font-awesome/css/', src: '*', dest: '<%= website.folders.web %>/css', expand: true},
{cwd: '<%= website.folders.bower %>/font-awesome/fonts/', src: '*', dest: '<%= website.folders.web %>/fonts', expand: true}
]
},
img: {
files: [
{expand: true, src: ['**'], cwd: '<%= website.folders.src %>/img', dest: '<%= website.folders.web %>/img'}
]
}
},
concat: {
bootstrap: {
dest: '<%= website.folders.temp %>/js/bootstrap.js',
src: [
//'<%= website.folders.bower %>/bootstrap/js/transition.js',
//'<%= website.folders.bower %>/bootstrap/js/alert.js',
//'<%= website.folders.bower %>/bootstrap/js/button.js',
//'<%= website.folders.bower %>/bootstrap/js/carousel.js',
//'<%= website.folders.bower %>/bootstrap/js/collapse.js',
//'<%= website.folders.bower %>/bootstrap/js/dropdown.js',
//'<%= website.folders.bower %>/bootstrap/js/modal.js',
'<%= website.folders.bower %>/bootstrap/js/tooltip.js',
'<%= website.folders.bower %>/bootstrap/js/popover.js',
//'<%= website.folders.bower %>/bootstrap/js/scrollspy.js',
'<%= website.folders.bower %>/bootstrap/js/tab.js',
//'<%= website.folders.bower %>/bootstrap/js/affix.js'
]
},
jquery_bootstrap: {
dest: '<%= website.folders.temp %>/js/all.js',
src: [
'<%= website.folders.bower %>/jquery/dist/jquery.js',
'<%= website.folders.temp %>/js/bootstrap.js'
]
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
dist: {
files: {
'<%= website.folders.js %>/all.js':
'<%= website.folders.js %>/all.min.js':
[
'<%= website.folders.bower %>/jquery/dist/js/jquery.js',
'<%= website.folders.bower %>/bootstrap/dist/js/bootstrap.js'
'<%= website.folders.temp %>/js/all.js'
]
}
}
},
'sftp-deploy': {
build: {
auth: {
host: 'srv0.champs-libres.coop',
port: 22,
authKey: 'chill.social'
},
cache: 'sftpCache.json',
src: '<%= website.folders.web %>',
dest: '/srv/www/chill.social',
exclusions: ['/path/to/source/folder/**/.DS_Store', '/path/to/source/folder/**/Thumbs.db', 'dist/tmp'],
serverSep: '/',
concurrency: 4,
progress: true
}
},
watch: {
files: ['<%= website.folders.less %>/*.less'],
tasks: ['less']
}
});
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-bootlint');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-bower-task');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-sftp-deploy');
grunt.registerTask('default', ['uglify', 'bootlint']);
grunt.registerTask('install', ['bower', 'uglify', 'copy:img', 'copy:css']);
grunt.registerTask('default', ['concat', 'uglify', 'bootlint', 'less']);
grunt.registerTask('install', ['bower', 'concat', 'less', 'uglify', 'copy:img', 'copy:css']);
grunt.registerTask('deploy', ['install', 'sftp-deploy']);
};
......
......@@ -14,16 +14,40 @@ You must have `npm` and `bower` installed.
```bash
git clone git@github.com:Chill-project/chill.social
cd chill.social
npm install
grunt install
```
#open in your browser:
```
firefox /path/to/repo/chill.social/website/index.html
```
The main page is website/index.html
## deploy
A task `grunt deploy` will deploy on server running the website `http://chill.social`. This task will run the install task and, then, upload files to remote server.
Before running this command, you must :
- have access on the server :-)
- configure a .ftppass at the root of the project. A basic .ftppass will be :
```json
{
"chill.social": {
"username": "root",
"agent": true
}
}
```
For complete configuration, see https://www.npmjs.com/package/grunt-sftp-deploy
## Contribute
Things to know :
......@@ -31,3 +55,10 @@ Things to know :
- the task `grunt install` will install bower dependencies and minify js ;
- the task `grunt` will minify js and bootlint-check htm files.
### less files
The bootstrap framework is used, but unused parts are removed, and some are overriden.
In directory `src/less` you will find personalized components using bootstrap mixins.
......@@ -22,6 +22,7 @@
"tests"
],
"dependencies": {
"bootstrap": "~3.3.4"
"bootstrap": "~3.3.4",
"font-awesome": "~4.3.0"
}
}
......@@ -9,8 +9,12 @@
"devDependencies": {
"grunt-bootlint": "^0.9.0",
"grunt-bower-task": "^0.4.0",
"grunt-contrib-concat": "^0.5.1",
"grunt-contrib-copy": "^0.8.0",
"grunt-contrib-uglify": "^0.9.1"
"grunt-contrib-less": "^1.0.1",
"grunt-contrib-uglify": "^0.9.1",
"grunt-contrib-watch": "^0.6.1",
"grunt-sftp-deploy": "^0.2.4"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
......
//TODO: personalize buttons with chill colors
.popover-chill.btn {
margin-top: 1em;
}
\ No newline at end of file
.fa.bigger {
font-size: 5em;
margin-bottom: 0.3em;
&::after {
content:"\A";
white-space:pre;
}
}
.jumbotron {
background-color: inherit;
}
.label-chill-to-come {
.label-variant(@magenta);
}
img.head-image {
max-width: 80vw;
}
p.slogan {
margin-top: 3em;
}
p.next_meeting {
margin-top: 3em;
}
.panel h3 {
font-size: @font-size-base;
margin-bottom: 2px;
margin-top: 3px;
}
.module-plus {
i { color: @brown;}
color: darken(@brown, 30%);
text-align: center;
font-size: @font-size-h4;
}
.wrapper_modules {
h2 {
margin-bottom: 22px;
}
}
.know_more {
h2 {
margin-bottom: 22px;
}
& > div.container > div.row {
margin-bottom: 18px;
& > div {
text-align: center;
}
}
}
//logo of enterprise in tabs
@media(max-width: 767px) {
img.logo-entreprise {
width: 90vw;
}
}
@media(min-width: 768px) {
img.logo-entreprise {
max-width: 40vw;
}
}
//define a panel with chill colors
.panel-chill {
.panel-variant(@brown; @dark; @brown; @brown);
}
//create a stick if viewport >= 1100px.
// fallback to simple on smaller screens
@media all and (min-width: 1100px) {
.stickercontainer {
position: absolute;
top: 40px;
left: 20px;
width: 310px;
height: 310px;
margin: auto;
font-size: 400px;
-moz-transform: rotate(-25deg);
-webkit-transform: rotate(-25deg);
-o-transform: rotate(-25deg);
transform: rotate(-25deg);
}
.sticker {
position: absolute;
width: 95%;
height: 95%;
top: -10%;
left: 2.5%;
background: -moz-radial-gradient(center, ellipse cover, #3f82e7 0%, #000 400%);
background: -webkit-radial-gradient(center, ellipse cover, #3f82e7 0%, #000 400%);
background: -o-radial-gradient(center, ellipse cover, #3f82e7 0%, #000 400%);
background: radial-gradient(center, ellipse cover, #3f82e7 0%, #000 400%);
box-shadow: 0px 1px 5px -1px #000;
border-radius: 50%;
}
.stickercrop {
position: absolute;
width: 100%;
height: 100%;
overflow: hidden;
}
.foldshadow {
position: absolute;
width: 80%;
height: 95%;
top: -85.5%;
left: 10%;
background-color: #000;
box-shadow: 0px 0px 10px 5px rgba(0, 0, 0, 0.5);
border-radius: 50%;
}
.foldshadowcrop {
position: absolute;
width: 100%;
height: 100%;
overflow: hidden;
}
.fold {
position: absolute;
width: 95%;
height: 95%;
top: -85%;
left: 2.5%;
background: -moz-linear-gradient(top, #000 30%, #6899e3 100%);
background: -webkit-linear-gradient(top, #000 30%, #6899e3 100%);
background: -o-linear-gradient(top, #000 30%, #6899e3 100%);
background: linear-gradient(top, #000 30%, #6899e3 100%);
box-shadow: 0px 1px 5px -1px rgba(0, 0, 0, 0.1);
border-radius: 50%;
}
.foldcrop {
position: absolute;
width: 100%;
height: 100%;
overflow: hidden;
}
.text {
position: absolute;
width: 100%;
height: 100%;
top: 22%;
overflow: hidden;
text-align: center;
font-size: 25px;
color: white;
text-shadow: 0px 2px 3px #6899e3;
}
}
@media all and (max-width: 1099px) {
.stickercontainer {
display: hidden;
}
}
//import open sans
//TODO : remove import from google fonts !
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,700,700italic,800,800italic,400italic);
h2, .h2 {
font-weight: 700;
}
h3, .h3 {
font-weight: 700;
}
h1, h2, h3, h4, h5, h6 {
&.centered {
text-align: center;
}
}
//
// chill variables
//
// == chill colors
//
@yellow: #edc74b;
@yellow_outer: #edc74b;
@orange: #e27a3e;
@orange_outer: #e89463;
@red: #de4849;
@red_outer: #e57469;
@grey: #ebebeb;
@grey_outer: #efefef;
@brown: #c9b99e;
@brown_outer: #d3c7b1;
@magenta: #d50b51;
@magenta_outer: #dc516d;
@dark: #333333;
@dark_outer: #333333;
@cyan: #43b09b;
@cyan_outer: #79c0af;
// == override bootstrap values
@font-family-sans-serif: 'Open Sans', sans-serif;
@font-size-base: 16px;
@font-size-h1: floor((@font-size-base * 3.2)); // ~36px
@font-size-h2: floor((@font-size-base * 2.8)); // ~30px
.wrapper {
padding: 1em 0 2em 0;
&.wrapper_jumbotron {
background-color: lighten(@cyan_outer, 10%);
}
&.wrapper_to_do_what {
background-color: @grey_outer;
color: @dark;
}
&.wrapper_how {
background-color: @red_outer;
color: @grey_outer;
}
&.wrapper_modules {
background-color: @grey_outer;
color: @dark;
//set background color inside panel
.panel-body {
background-color: lighten(@grey_outer, 10%);
}
}
&.wrapper_meetings {
background-color: @cyan;
color: @grey_outer;
a { color: darken(@brand-primary, 15%) };
a:hover { color: darken(@brand-primary, 30%) };
}
&.wrapper_know_more {
background-color: @grey_outer;
color: @dark;
}
}
// Core variables and mixins
@import "variables.less";
@import "chill_variables.less";
@import "mixins.less";
// Reset and dependencies
@import "normalize.less";
@import "print.less";
//@import "glyphicons.less";
// Core CSS
@import "scaffolding.less";
@import "type.less";
@import "code.less";
@import "grid.less";
//@import "tables.less";
//@import "forms.less";
@import "buttons.less";
// Components
//@import "component-animations.less";
//@import "dropdowns.less";
//@import "button-groups.less";
//@import "input-groups.less";
@import "navs.less";
//@import "navbar.less";
//@import "breadcrumbs.less";
//@import "pagination.less";
//@import "pager.less";
@import "labels.less";
//@import "badges.less";
@import "jumbotron.less";
//@import "thumbnails.less";
//@import "alerts.less";
//@import "progress-bars.less";
//@import "media.less";
//@import "list-group.less";
@import "panels.less";
//@import "responsive-embed.less";
//@import "wells.less";
//@import "close.less";
// Components w/ JavaScript
//@import "modals.less";
//@import "tooltip.less";
@import "popovers.less";
//@import "carousel.less";
// Utility classes
@import "utilities.less";
@import "responsive-utilities.less";
//customization
@import "chill_typography.less";
@import "chill_icons.less";
@import "chill_jumbotron.less";
@import "chill_wrapper.less";
@import "chill_sticker.less";
@import "chill_panel.less";
@import "chill_label.less";
@import "chill_buttons.less";
@import "chill_misc.less";
This diff is collapsed.
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