Gitlab CSE Unil

Commit b51b3887 authored by M. Chardon's avatar M. Chardon
Browse files

compilation scss

parent df1a66f7
......@@ -191,8 +191,30 @@ module.exports = function(grunt) {
},
// ===== Lessc Files =====
less: {
sass: { // Task
adim: { // Target
// @TODO
options: { // Target options
style: 'compressed'
},
files: { // Dictionary of files
'../css/adim.css': 'scss/adim.scss', // 'destination': 'source'
}
}
},
/* compass: {
adim: {
options: {
sassDir: 'less/scss',
cssDir: '../css/',
environment: 'development',
outputStyle: 'compressed'
}
}
},*/
less: {
/*adim: {
// @TODO
options: {
relativeUrls: false,
......@@ -201,7 +223,7 @@ module.exports = function(grunt) {
files: {
"../css/adim.css": "less/adim.less"
}
},
},*/
libs: {
// Compress and rewrite 'src' attributes of third party css (found in lib)
// The concat:libs task should be called after this to include the bootstrap's css
......@@ -245,14 +267,17 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-compass');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-less-to-sass');
// ===== Register Tasks =====
// Optimize third party libraries.
// This has to be called when there is a modification at the libraries level
grunt.registerTask('libs', ['copy:libs', 'less:libs', 'concat:libs', 'less:adim']);
grunt.registerTask('libs', ['copy:libs', 'less:libs', 'concat:libs', 'sass:adim']);
// Build main app
grunt.registerTask('build app', ['uglify:adim', 'requirejs']);
......
@import (reference) "../lib/bootstrap/less/mixins";
@import (reference) "../lib/bootstrap/less/variables";
@import (reference) "../lib/bootstrap/less/theme";
@import (reference) "../lib/bootstrap/less/buttons";
@import (reference) "../lib/bootstrap/less/mixins/vendor-prefixes";
@import (reference) "../lib/bootstrap/scss/_mixins.scss";
@import (reference) "../lib/bootstrap/scss/_variables.scss";
//@import (reference) "../lib/bootstrap/scss/_theme";
@import (reference) "../lib/bootstrap/scss/_buttons.scss";
//@import (reference) "../lib/bootstrap/scss/mixins/vendor-prefixes";
@import "adim-variables";
//// ===== Color Variables ==================================
......@@ -1233,7 +1233,7 @@ canvas {
&.processus-prop {
.processus-list {
label.btn-secondary {
color: @btn-default-color;
color: @colorbtn-default-color;
}
}
}
......@@ -1806,7 +1806,7 @@ canvas {
@import "anobj-mgr";
@import (inline) "typeaheadjs.css";
@import (inline) "../scss/typeaheadjs.css";
.twitter-typeahead .tt-dataset-users2 {
.tt-suggestion p {
font-style: italic;
......
......@@ -16,6 +16,9 @@
"grunt-contrib-copy": "^0.5.0",
"grunt-contrib-less": "^0.11.4",
"grunt-contrib-requirejs": "^0.4.4",
"grunt-contrib-uglify": "~0.4.0"
"grunt-contrib-sass": "^1.0.0",
"grunt-contrib-uglify": "~0.4.0",
"grunt-less-to-sass": "0.0.10",
"less-scss-convertor": "0.0.17"
}
}
@import "adim-variables";
@import "adim-mixins";
// ====================================
// CIMAF
// ====================================
$cimaf-sidecol-width: 250px;
#graph-col {
padding-bottom: 20px;
margin-bottom: 20px;
canvas {
background-color: #ffffff;
border: none;
border-radius: 0;
}
}
#analyse-graph-ctrl {
position: absolute;
&.pinned {
position: fixed;
top: 20px;
}
}
#side-col {
// Env specific Cimaf
.adim-env-cimaf & {
@include sidecol-width($cimaf-sidecol-width);
}
.adim-env-cimaf .adim-view-review & {
@include sidecol-width($cimaf-sidecol-width + $toolscol-width);
}
}
// -----
$anodate-c0: #000;
$anodate-c1: lighten($anodate-c0, 15%);
$anodate-c2: lighten($anodate-c0, 30%);
$anodate-c3: lighten($anodate-c0, 45%);
$anodate-c4: lighten($anodate-c0, 60%);
$anodate-c5: lighten($anodate-c0, 75%);
$anodate-c6: lighten($anodate-c0, 90%);
$anodate-sidecol-width: 350px;
.adim-env-anodate {
#tool-colorselect .color-menu > li > a {
&.c1 {
@include color-menu-item($anodate-c1);
}
&.c2 {
@include color-menu-item($anodate-c2);
}
&.c3 {
@include color-menu-item($anodate-c3);
}
&.c4 {
@include color-menu-item($anodate-c4);
}
&.c5 {
@include color-menu-item($anodate-c5);
}
&.c6 {
@include color-menu-item($anodate-c6);
}
}
}
.adim-env-anodate {
#side-col {
@include sidecol-width($anodate-sidecol-width);
}
.adim-view-review {
#side-col {
&.col-sm-1 {
@include sidecol-width(250px);
}
&.col-sm-2 {
@include sidecol-width(450px);
}
}
#alt-side-col-panel-group {
//width: 50% !important;
//display: block !important;
margin-right: 0;
padding-right: 0;
}
#side-col-panel-group {
//width: 50% !important;
#annotation-markers-panel {
display: none !important;
}
}
}
}
#annotation-markers-panel .panel-body,
#shared-annotation-markers-panel .panel-body {
padding: 0;
.list-group {
background-color: transparent;
margin-bottom: 0;
padding: 10px;
overflow-x: hidden;
overflow-y: auto;
border-radius: 0;
}
.list-group-item {
background-color: #e6e6e6;
padding: 5px;
border-color: #c9c9c9;
border-bottom: 0;
}
.list-group-item:last-child {
margin-bottom: 10px;
}
}
#shared-annotation-markers-panel .panel-body {
.list-group-item-heading h4 {
margin: 0 5px 0 0;
line-height: 2em;
padding: 0 3px 0 0;
border-right: solid 1px #c9c9c9;
width: 25px;
}
}
.adim-env-geomo {
#side-col {
@include sidecol-width($anodate-sidecol-width);
}
.adim-view-review {
#side-col {
&.col-sm-1 {
@include sidecol-width(250px);
}
&.col-sm-2 {
@include sidecol-width(450px);
}
}
#alt-side-col-panel-group {
//width: 50% !important;
//display: block !important;
margin-right: 0;
padding-right: 0;
}
#side-col-panel-group {
//width: 50% !important;
#annotation-markers-panel {
display: none !important;
}
}
}
}
\ No newline at end of file
$main-footer-height: 80px;
$main-footer-bg: hsv(0, 0, 20%);
$main-footer-color: #e9e9e9;
// Footer
#main-footer {
bottom: 0;
width: 100%;
height: $main-footer-height;
overflow: auto;
padding-top: 5px;
margin-top: 0px;
background-color: $main-footer-bg;
box-shadow: 0 3px 3px -1px rgba(0, 0, 0, 0.25) inset;
.logo {
margin-top: -3px;
font-size: 63px;
}
&,a,a:visited {
color: $main-footer-color;
text-decoration: none;
}
a:hover,
a:active {
color: lighten($main-footer-color, 20%);
text-decoration: none;
border-bottom: dotted 1px #fff;
text-shadow: 0 0 2px rgba(255, 255, 255, 0.25);
}
.logo,
a.logo {
line-height: 75px;
text-shadow: none; //0 0 1px rgba(0, 0, 0, 0.33);
&:hover, &:active {
border-bottom: none !important;
text-shadow: none; //0 0 1px rgba(0, 0, 0, 0@mixin 33), 0 0 4px rgba(255, 255, 255, 0.25);
}
}
ul a {
line-height: 1.8em;
}
}
$no_cache: '32abcde';
@mixin font-face {
font-family: 'adim';
src:url('../fonts/adim.eot?${no_cache}');
src:url('../fonts/adim@mixin eot?#iefix${no_cache}') format('embedded-opentype'),
url('../fonts/adim@mixin woff?${no_cache}') format('woff'),
url('../fonts/adim@mixin ttf?${no_cache}') format('truetype'),
url('../fonts/adim@mixin svg?${no_cache}#adim') format('svg');
font-weight: normal;
font-style: normal;
}
[class^="adim-icon-"], [class*=" adim-icon-"] {
font-family: 'adim';
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.adim-icon-blank:before {
content: " ";
}
.adim-icon-clippy:before {
content: "\f035";
}
.adim-icon-line-width:before {
content: "\e600";
}
.adim-icon-opacity:before {
content: "\e601";
}
.adim-icon-color:before {
content: "\e602";
}
.adim-icon-ttp-moodle:before {
content: "\e603";
}
.adim-icon-zone-concordance:before {
content: "\e604";
}
.adim-icon-bord-de-champ:before {
content: "\e605";
}
.adim-icon-concordant:before {
content: "\e606";
}
.adim-icon-discordant:before {
content: "\e607";
}
\ No newline at end of file
@mixin vertical-four-colors($start-color: #00b3ee, $sec-color: #7a43b6, $color-stop-sec: 33%, $thrd-color: #679235, $color-stop-thrd: 66%, $end-color: #c3325f, $color-stop-end: 100%) {
background-image: -webkit-linear-gradient($start-color, $sec-color $color-stop-sec, $thrd-color $color-stop-thrd, $end-color $color-stop-end);
background-image: -o-linear-gradient($start-color, $sec-color $color-stop-sec, $thrd-color $color-stop-thrd, $end-color $color-stop-end);
background-image: linear-gradient($start-color, $sec-color $color-stop-sec, $thrd-color $color-stop-thrd, $end-color $color-stop-end);
background-repeat: no-repeat;
//filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",argb($start-color),argb($end-color))); // IE9 and down, gets no color-stop at all for proper fallback
}
@mixin color-menu-item ($color) {
&, &:hover {
background-color: $color;
}
&:hover {
box-shadow: 0 1px 4px -1px fade(darken($color, 66%), 66%) inset, 0 0 1px 3px fade($color, 90%);
}
}
// Mixin for setting the sidecol's width
@mixin sidecol-width($_width) {
width: $_width;
&.collapsed {
margin: 0 -($_width + 25px) 0 25px;
}
}
\ No newline at end of file
//
// Load core variables and mixins
// --------------------------------------------------
@import "../lib/bootstrap/scss/mixins";
@import "../lib/bootstrap/scss/functions";
@import "../lib/bootstrap/scss/variables";
@import "adim-variables";
//
// Adim Variables
// --------------------------------------------------
$modal-header: #d0d0d0;
//
// Navbar
// --------------------------------------------------
.nav {
$marginY: (($line-height-base / 2) - 1);
$marginX: 10px;
.nav-divider {
height: 1px;
margin: $marginY 0;
overflow: hidden;
background-color: #e5e5e5;
&.divider-vertical {
height: $navbar-brand-height - (2 * $marginY);
width: 1px;
margin: $marginY $marginX;
}
}
}
.navbar-inverse {
.nav {
.nav-divider {
background-color: lighten($navbar-dark-color, 20%);
}
}
}
.tooltip-inner {
box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.20);
}
//
// Modals
// --------------------------------------------------
.modal {
.modal-content {
#gradient > {
@include gradient-y($start-color: lighten($modal-header, 15%), $end-color: $modal-header, $end-percent: 50px);
}
.modal-header {
.modal-title {
line-height: 1;
font-weight: 700;
color: lighten(black, 20%);
text-shadow: 0 1px 0px rgba(255, 255, 255, 0.66);
}
border-color: $modal-content-border-color;
}
.modal-footer {
border-color: $modal-content-border-color;
}
.modal-body {
background-color: #fff;
.nav-tabs {
li { font-weight: 600; }
}
}
}
}
//
// Buttons
// --------------------------------------------------
// ---->>>> Var def in adim-variables.less
// Tools toolbar buttons
#draw-tool-tb .btn.disabled {
opacity: 0.33;
}
.btn-adim-layertb {
@include button-variant($btn-adim-layertb-color, $btn-adim-layertb-bg, $btn-adim-layertb-border);
&.active,
&:hover.active {
color: $btn-adim-layertb-active-color;
}
}
.theme-light .btn-adim-layertb {
@include button-variant($btn-adim-layertb-light-color, $btn-adim-layertb-light-bg, $btn-adim-layertb-light-border);
}
.btn-adim-dark {
@include button-variant($btn-adim-dark-color, $btn-adim-dark-bg, $btn-adim-dark-border);
}
.btn-adim-layer {
$__color: darken($btn-adim-dark-color, 10%);
$__bg: darken($panel-dark-bg, 5%);
$__border: darken($btn-adim-dark-border, 5%);
//$__active-color: $btn-info-color;
//$__active-bg: darken(desaturate($info-bg, 25%), 15%);
//$__active-border: darken(desaturate($btn-info-border, 25%), 5%); //$btn-info-border;
@include button-variant($__color, $__bg, $__border);
&.active:hover,
&.active,
&:active,
&:focus,
&:focus:active,
//&:hover:active {
// color: $__active-color;
// background-color: $__active-bg;
// border-color: $__active-border;
//}
//&.active:hover {
// background-color: darken(desaturate($btn-info-bg, 15%), 15%);
//}
&:hover { color: $__color; background-color: $__bg; border-color: $__border; }
overflow: hidden;
text-overflow: ellipsis;
}
.theme-light .btn-adim-layer {
font-weight: bold;
letter-spacing: 0.3px;
}
//
// Forms
// --------------------------------------------------------
//.form-control {
// color: lighten($input-color-placeholder, 20%);
//}
@import "../lib/bootstrap/scss/functions";
@import "../lib/bootstrap/scss/variables";
// ===== Color Variables ==================================
// ----- Global -----
$x-bodyBg: #424242;
$unil-logo-blue: #0096C7;
// ----- Home page -----
$home-mainBg: #EEE;
$home-color: #f2f2f2;
// ----- Exercise -----
//$navbar-inverse-link-color: lighten($navbar-inverse-link-color, 25%);
// Canvas
$canvas-ctnr-dark-color: #CCC;
$canvas-dark-border: #444444;
$canvas-bbar-dark-bg: $canvas-ctnr-dark-color;
// Panels
$panel-dark-bg: #6f6f6f