fixed printed material
WARNING : we are nox using gulp instead of grunt, watch for bugs
This commit is contained in:
parent
c9b16289ef
commit
df107a0443
@ -1,58 +0,0 @@
|
||||
module.exports = function (grunt) {
|
||||
grunt.initConfig({
|
||||
watch: {
|
||||
compass: {
|
||||
files: ['scss/styles.scss', 'scss/wysiwyg.scss', 'scss/layout.scss', 'scss/gui.scss', 'scss/misc.scss', 'scss/fonts.scss', 'scss/colors.scss'],
|
||||
tasks: ['compass:dev']
|
||||
},
|
||||
postcss: {
|
||||
files: ['scss/styles.scss', 'scss/wysiwyg.scss'],
|
||||
tasks: ['postcss']
|
||||
},
|
||||
// options: {
|
||||
// livereload: true,
|
||||
// },
|
||||
},
|
||||
compass: {
|
||||
dev: {
|
||||
options: {
|
||||
sassDir: 'scss',
|
||||
cssDir: 'css',
|
||||
specify: ['scss/styles.scss', 'scss/wysiwyg.scss'],
|
||||
imagesPath: 'img',
|
||||
noLineComments: false,
|
||||
// outputStyle: 'compressed'
|
||||
}
|
||||
}
|
||||
},
|
||||
postcss: {
|
||||
options: {
|
||||
processors: [
|
||||
require('autoprefixer-core')({
|
||||
browsers: ['> 1%'] //, 'ie 8', 'ie 7', 'FirefoxAndroid', 'ExplorerMobile', 'ChromeAndroid'
|
||||
}).postcss,
|
||||
]
|
||||
},
|
||||
dist: { src: 'css/*.css' }
|
||||
},
|
||||
svg2png: {
|
||||
assets: {
|
||||
// specify files in array format with multiple src-dest mapping
|
||||
files: [
|
||||
// rasterize all SVG files in "img" and its subdirectories to "img/png"
|
||||
// { src: ['assets/img/*.svg'], dest: 'assets/img/png/' },
|
||||
// rasterize SVG file to same directory
|
||||
{ src: ['img/*.svg'] }
|
||||
]
|
||||
}
|
||||
}
|
||||
});
|
||||
grunt.loadNpmTasks('grunt-contrib-compass');
|
||||
grunt.loadNpmTasks('grunt-contrib-sass');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-postcss');
|
||||
grunt.loadNpmTasks('grunt-svg2png');
|
||||
|
||||
|
||||
grunt.registerTask('default', ['svg2png']);
|
||||
};
|
File diff suppressed because it is too large
Load Diff
42
sites/all/themes/gui/materiobasetheme/gulpfile.js
Normal file
42
sites/all/themes/gui/materiobasetheme/gulpfile.js
Normal file
@ -0,0 +1,42 @@
|
||||
'use strict';
|
||||
|
||||
var gulp = require('gulp');
|
||||
var sass = require('gulp-sass');
|
||||
var watch = require('gulp-watch');
|
||||
var autoprefixer = require('gulp-autoprefixer');
|
||||
var jsmin = require('gulp-jsmin');
|
||||
var rename = require('gulp-rename');
|
||||
|
||||
function handleError(err) {
|
||||
console.log(err.toString());
|
||||
// this.emit('end');
|
||||
}
|
||||
|
||||
gulp.task('scripts', function () {
|
||||
gulp.src('./js/script.js')
|
||||
.pipe(jsmin())
|
||||
.pipe(rename({suffix: '.min'}))
|
||||
.pipe(gulp.dest('./js/'));
|
||||
});
|
||||
|
||||
gulp.task('styles', function () {
|
||||
gulp.src('./scss/styles.scss')
|
||||
.pipe(sass().on('error', sass.logError))
|
||||
// .pipe(gulp.dest('./css/'));
|
||||
|
||||
// gulp.src('./css/*.css')
|
||||
.pipe(autoprefixer({
|
||||
browsers: ['last 2 versions'],
|
||||
cascade: false
|
||||
})).on('error', handleError)
|
||||
.pipe(gulp.dest('./css/'));
|
||||
});
|
||||
|
||||
gulp.task('default', function () {
|
||||
});
|
||||
|
||||
// default gulp task
|
||||
gulp.task('default', ['scripts', 'styles'], function() {
|
||||
gulp.watch('./scss/*.scss', ['styles']);
|
||||
gulp.watch('./js/*.js', ['scripts']);
|
||||
});
|
File diff suppressed because it is too large
Load Diff
2354
sites/all/themes/gui/materiobasetheme/js/script.min.js
vendored
2354
sites/all/themes/gui/materiobasetheme/js/script.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,17 +1,18 @@
|
||||
{
|
||||
"name": "materiobasetheme",
|
||||
"version": "1.0.0",
|
||||
"description": "A theme for drupal.",
|
||||
"main": "gulpfile.js",
|
||||
"author": "Bachir Soussi Chiadmi",
|
||||
"homepage": "http://materio.com",
|
||||
"engines": {
|
||||
"node": ">= 0.8.0"
|
||||
},
|
||||
"license": "GPLv3",
|
||||
"homepage": "https://materio.com",
|
||||
"devDependencies": {
|
||||
"autoprefixer-core": "^5.1.5",
|
||||
"grunt-contrib-compass": "^0.9.0",
|
||||
"grunt-contrib-sass": "v0.7.3",
|
||||
"grunt-contrib-watch": "v0.6.1",
|
||||
"grunt-postcss": "^0.3.0",
|
||||
"grunt-svg2png": "^0.2.7"
|
||||
"gulp": "latest",
|
||||
"gulp-autoprefixer": "latest",
|
||||
"gulp-jsmin": "latest",
|
||||
"gulp-rename": "latest",
|
||||
"gulp-sass": "latest",
|
||||
"gulp-strip-debug": "latest",
|
||||
"gulp-watch": "latest"
|
||||
}
|
||||
}
|
||||
|
@ -1649,42 +1649,67 @@ article.node-materiau.vm-cardfull, article.node-breve.vm-cardfull{
|
||||
|___|__,|_| |___| | _|_| |_|_|_|_|
|
||||
|_|
|
||||
*/
|
||||
body.print-node-materiau{
|
||||
margin:2em;
|
||||
body.print-body-materiau{
|
||||
// >*{font-size:0.8em;}
|
||||
}
|
||||
.print-node-materiau{
|
||||
margin:0 auto;
|
||||
@media screen {
|
||||
@include card($cardfull_w, auto);
|
||||
width:1024px;
|
||||
padding:1em;
|
||||
}
|
||||
}
|
||||
.print-site_name{}
|
||||
.print-content{}
|
||||
.print-content .node-materiau.vm-print{
|
||||
margin:0; position:relative;
|
||||
|
||||
.print-content .node-materiau{
|
||||
@include card($cardfull_w, auto);
|
||||
padding:1em; margin:0;
|
||||
|
||||
.field-name-title-field{@include fs500;@include fs36;}
|
||||
.field-name-title-field{@include fs500; font-size: 1.4em;}
|
||||
// .field-name-field-reference-materio, .field-name-field-localisation, .field-name-field-authored-on{ @include inlineblock(); @include fs12; padding-right:15px;}
|
||||
|
||||
.field-name-field-nature-titre{
|
||||
@include fs500;@include fs24; margin-bottom: 0.5em;
|
||||
@include fs500;font-size: 1em;margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
.group-head-right{
|
||||
position:absolute;
|
||||
top:0; right:0;
|
||||
padding:1em;
|
||||
padding-top:1em;
|
||||
text-align: right;
|
||||
font-size:0.8em;
|
||||
}
|
||||
|
||||
.side{@include inlineblock(); width:50%;
|
||||
.side{
|
||||
&.group-side-left{
|
||||
// @include border-radius(5px, 0, 0, 5px);
|
||||
width:45%;
|
||||
position:absolute;
|
||||
.field-name-field-description{font-size:0.8em;}
|
||||
.field-type-taxonomy-term-reference{
|
||||
display:inline-block; vertical-align: top; max-width: 45%;
|
||||
margin:1em 1em 0 0;
|
||||
font-size:0.6em;
|
||||
}
|
||||
|
||||
}
|
||||
&.group-side-right{
|
||||
@include border-radius(5px, 5px, 5px, 5px);
|
||||
section, div, figure{max-width: 100%;}
|
||||
.field-name-field-materiau-image{
|
||||
// padding-left:1em;
|
||||
float:right;
|
||||
text-align: right;
|
||||
.field-item{
|
||||
display:none;
|
||||
&:nth-child(-n+7){
|
||||
display:inline-block;
|
||||
}
|
||||
max-width:18.5%;
|
||||
margin:0.5em 0 0 0.5em;
|
||||
&:nth-child(-n+2){
|
||||
max-width:100%;
|
||||
margin-left: 50%;
|
||||
}
|
||||
img{max-width:100%;}
|
||||
}
|
||||
}
|
||||
// , .field-items, .field-item{
|
||||
// @include inlineblock();
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
}
|
||||
@ -1707,15 +1732,17 @@ body.print-node-materiau{
|
||||
/_/ /_/ |_/___/_/ |_/ /_/
|
||||
|
||||
*/
|
||||
|
||||
@media print {
|
||||
@page { margin: 1.5cm 7mm 8mm; }
|
||||
}
|
||||
|
||||
.print-site_name{
|
||||
width:100%;
|
||||
vertical-align: bottom;
|
||||
margin-bottom:1em;
|
||||
h1{
|
||||
margin:0;
|
||||
@include fs36;
|
||||
margin:0 1em 0 0;
|
||||
font-size: 1.2em;
|
||||
@include inlineblock(); vertical-align: baseline; position:relative; line-height:1.25;
|
||||
a{
|
||||
color:inherit;
|
||||
@ -1723,7 +1750,7 @@ body.print-node-materiau{
|
||||
}
|
||||
}
|
||||
span.slogan{
|
||||
@include fs14;
|
||||
font-size: 0.8em;
|
||||
margin-top:-3px;
|
||||
margin-left:-0.5em;
|
||||
@include fs900;
|
||||
@ -1736,7 +1763,7 @@ body.print-node-materiau{
|
||||
}
|
||||
|
||||
.print-footer{
|
||||
margin-bottom: 2em;
|
||||
position:fixed; bottom:0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -83,11 +83,13 @@
|
||||
<?php endif; ?>
|
||||
<?php print $css; ?>
|
||||
</head>
|
||||
<body class="print-node-materiau">
|
||||
<div class="print-site_name"><?php print $site_title; ?></div>
|
||||
<?php if (!isset($node->type)): ?>
|
||||
<h2 class="print-title"><?php print $print_title; ?></h2>
|
||||
<?php endif; ?>
|
||||
<div class="print-content"><?php print $content; ?></div>
|
||||
<div class="print-footer"><?php print $site_footer; ?></div>
|
||||
<body class="print-body-materiau">
|
||||
<div class="print-node-materiau">
|
||||
<div class="print-site_name"><?php print $site_title; ?></div>
|
||||
<?php if (!isset($node->type)): ?>
|
||||
<h2 class="print-title"><?php print $print_title; ?></h2>
|
||||
<?php endif; ?>
|
||||
<div class="print-content"><?php print $content; ?></div>
|
||||
<div class="print-footer"><?php print $site_footer; ?></div>
|
||||
</div>
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user