Skip to content

Commit

Permalink
#175 [CSS] add: Style to quickcreation project frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
eoxia-amandine authored and nicolas-eoxia committed Dec 8, 2023
1 parent b36fdfb commit 9e7a5db
Show file tree
Hide file tree
Showing 17 changed files with 139 additions and 15 deletions.
14 changes: 8 additions & 6 deletions core/tpl/frontend/easycrm_media_editor_frontend.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,25 @@
</div>
<!-- Modal-ADD Image Content-->
<div class="modal-content" id="#modalContent" style="height: 75%;">
<canvas id="canvas" style="height: 98%; width: 100%; border: #0b419b solid 2px"></canvas>
<div class="canvas-container">
<canvas id="canvas" style="border: #0b419b solid 2px"></canvas>
</div>
</div>
<!-- Modal-Footer-->
<div class="modal-footer">
<div class="image-rotate-left wpeo-button button-grey" style="font-size: 30px;">
<div class="image-rotate-left wpeo-button button-grey button-square-50">
<span><i class="fas fa-undo-alt"></i></span>
</div>
<div class="image-rotate-right wpeo-button button-grey" style="font-size: 30px;">
<div class="image-rotate-right wpeo-button button-grey button-square-50">
<span><i class="fas fa-redo-alt"></i></span>
</div>
<div class="image-undo wpeo-button button-grey" style="font-size: 30px;">
<div class="image-undo wpeo-button button-grey button-square-50">
<span><i class="fas fa-undo-alt"></i></span>
</div>
<div class="image-erase wpeo-button button-grey" style="font-size: 30px;">
<div class="image-erase wpeo-button button-grey button-square-50">
<span><i class="fas fa-eraser"></i></span>
</div>
<div class="image-validate wpeo-button button-primary" style="font-size: 30px;" value="0">
<div class="image-validate wpeo-button button-primary button-square-50" value="0">
<span><i class="fas fa-check"></i></span>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<div class="wpeo-button button-square-50">
<i class="fas fa-camera"></i><i class="fas fa-plus-circle button-add"></i>
</div>
<?php print saturne_show_medias_linked('easycrm', $conf->easycrm->multidir_output[$conf->entity] . '/project/tmp/0/project_photos', 'small', '', 0, 0, 0, 50, 50, 0, 0, 0, 'project/tmp/0/project_photos', $project, '', 0, 0, 0, 0, '', 0); ?>
<?php print saturne_show_medias_linked('easycrm', $conf->easycrm->multidir_output[$conf->entity] . '/project/tmp/0/project_photos', 'small', '', 0, 0, 0, 50, 50, 0, 0, 0, 'project/tmp/0/project_photos', $project, '', 0, 1, 0, 0, ''); ?>
</div>
</label>
</div>
Expand Down
1 change: 1 addition & 0 deletions css/easycrm.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions css/scss/element/_element.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "form";
22 changes: 22 additions & 0 deletions css/scss/element/_form.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
form {
input, select, textarea {
background: #fff;
}

select.widthcentpercentminusx, span.widthcentpercentminusx:not(.select2-selection):not(.select2-dropdown), input.widthcentpercentminusx {
width: 100% !important;
margin-bottom: 2em;

.select2-container--default, .select2-selection--multiple {
--border-color: var(--form-element-border-color);
width: 100%;
border:var(--border-width) solid var(--border-color);
border-radius:var(--border-radius);
outline:0;

input {
margin: 0;
}
}
}
}
20 changes: 20 additions & 0 deletions css/scss/layout/_body.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
.fiche {
margin-left: 0 !important;
margin-right: 0 !important;
}
form {
margin: 0;
}

.project-container {
display: flex;
flex-direction: column;
height: 100vh;
}

.page-content {
background: #F7F7F7;
padding: 1rem;
height: calc( 100% - 160px);
overflow: auto;
}
8 changes: 8 additions & 0 deletions css/scss/layout/_footer.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.page-footer {
height: 80px;
padding: 1rem;

button {
margin: 0;
}
}
10 changes: 10 additions & 0 deletions css/scss/layout/_header.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.page-header {
background: #fff;
padding: 2rem 1rem 0rem 1rem;
border-bottom: 2px solid #D8D8D8;
height: 80px;

.page-title {
font-weight: 700;
}
}
3 changes: 3 additions & 0 deletions css/scss/layout/_layout.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@import "header";
@import "body";
@import "footer";
18 changes: 18 additions & 0 deletions css/scss/pages/_linked-medias.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.linked-medias-list {
display: flex;
flex-wrap: wrap;
gap: 1.5em;

.wpeo-button {
}
.media-container {
margin-right: 0 !important;
width: 50px;
height: 50px;

img {
object-fit: cover;
height: 50px;
}
}
}
26 changes: 26 additions & 0 deletions css/scss/pages/_modal-edit-image.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.wpeo-modal {
.modal-container {
max-height: none;
padding-left: 0;
padding-right: 0;

.canvas-container {
display: flex;
margin: auto;
width: 100%;
height: 100%;
justify-content: center;

}
canvas {
object-fit: contain;
width: 600px;
height: 800px;

@media ( max-width: $media__small ) {
width: 300px;
height: 400px;
}
}
}
}
2 changes: 2 additions & 0 deletions css/scss/pages/_pages.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import "linked-medias";
@import "modal-edit-image";
4 changes: 4 additions & 0 deletions css/scss/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@import "variables/variables";
@import "layout/layout";
@import "element/element";
@import "pages/pages";
1 change: 1 addition & 0 deletions css/scss/variables/_colors.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
$color__primary: var(--primary);
4 changes: 4 additions & 0 deletions css/scss/variables/_structure.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$media__large: 1200px;
$media__medium: 992px;
$media__small: 768px;
$media__extra-small: 576px;
2 changes: 2 additions & 0 deletions css/scss/variables/_variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import "colors";
@import "structure";
16 changes: 8 additions & 8 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ const uglify = require('gulp-uglify');
const concat = require('gulp-concat');

const paths = {
//scss_core: ['css/scss/**/*.scss', 'css/'],
scss_core: ['css/scss/**/*.scss', 'css/'],
js_backend: ['js/easycrm.js', 'js/modules/*.js']
};

/** Core */
// gulp.task('scss_core', function() {
// return gulp.src(paths.scss_core[0])
// .pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
// .pipe(rename('./easycrm.min.css'))
// .pipe(gulp.dest(paths.scss_core[1]));
// });
gulp.task('scss_core', function() {
return gulp.src(paths.scss_core[0])
.pipe(sass({outputStyle: 'compressed'}).on('error', sass.logError))
.pipe(rename('./easycrm.min.css'))
.pipe(gulp.dest(paths.scss_core[1]));
});

gulp.task('js_backend', function() {
return gulp.src(paths.js_backend)
Expand All @@ -28,6 +28,6 @@ gulp.task('js_backend', function() {

/** Watch */
gulp.task('default', function() {
//gulp.watch(paths.scss_core[0], gulp.series('scss_core'));
gulp.watch(paths.scss_core[0], gulp.series('scss_core'));
gulp.watch(paths.js_backend[1], gulp.series('js_backend'));
});

0 comments on commit 9e7a5db

Please sign in to comment.