Commit 56d24509f13847252ac05943ab4eb2833a1d25e8

Authored by Андрей Ларионов
Exists in master

Merge branch 'master' of http://gitlab.nologostudio.ru/alarionov/rekamore-su

Showing 4 changed files Side-by-side Diff

public/css/style_may2024.css
... ... @@ -3473,6 +3473,12 @@ h1 {
3473 3473 flex-direction: column;
3474 3474 gap: 20px;
3475 3475 }
  3476 +.main__employer-page-info.row2{
  3477 + justify-content: flex-start;
  3478 +}
  3479 +.main__employer-page-info.row2 .main__employer-page-item{
  3480 + width: 25%;
  3481 +}
3476 3482 @media (min-width: 768px) {
3477 3483 .main__employer-page-info {
3478 3484 display: grid;
... ... @@ -8427,6 +8433,18 @@ main + .news {
8427 8433 .cabinet__export-error{
8428 8434 color: red;
8429 8435 }
  8436 +.flot-image-wrap img{
  8437 + max-width: 100%;
  8438 + max-height: 100%;
  8439 + flex: 0 0 auto;
  8440 +}
  8441 +.flot-image-wrap{
  8442 + width: 220px;
  8443 + height: 220px;
  8444 + display: flex;
  8445 + justify-content: center;
  8446 + align-items: center;
  8447 +}
8430 8448 @media (min-width: 768px) {
8431 8449 .cabinet__filters {
8432 8450 gap: 20px;
resources/views/employers/edit-flot.blade.php
... ... @@ -3,6 +3,27 @@
3 3 @section('scripts')
4 4 <script src="https://cdn.ckeditor.com/ckeditor5/23.0.0/classic/ckeditor.js"></script>
5 5 <script>
  6 + $(function() {
  7 + $('form.cabinet__add [type="file"][name="image"]').change(function (event) {
  8 + const file = event.target.files[0];
  9 +
  10 + if (file) {
  11 + var img_wrap = $('.flot-image-wrap');
  12 + var img = $('<img id="flot-img" src="#"/>');
  13 + const reader = new FileReader();
  14 +
  15 + reader.onload = function(e) {
  16 + img.attr('src', e.target.result);
  17 + img_wrap.find('img').remove();
  18 + img_wrap.append(img);
  19 + $('.no-img-svg').remove();
  20 + };
  21 +
  22 + reader.readAsDataURL(file);
  23 + }
  24 + });
  25 + });
  26 +
6 27 ClassicEditor
7 28 .create( document.querySelector( '#txtarea' ) )
8 29 .catch( error => {
... ... @@ -44,9 +65,16 @@
44 65 </span>
45 66 @enderror
46 67 <input type="hidden" name="employer_id" id="employer_id" value="{{ $Employer->id }}"/>
47   - <svg>
48   - <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
49   - </svg>
  68 + <div class="flot-image-wrap">
  69 + @if (!empty($Flot->image))
  70 + <img id="flot-img" src="{{ asset(Storage::url($Flot->image)) }}" alt="{{ $Flot->name }}">
  71 + @endif
  72 + </div>
  73 + @if (empty($Flot->image))
  74 + <svg class="no-img-svg">
  75 + <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
  76 + </svg>
  77 + @endif
50 78 <span>
51 79 <svg>
52 80 <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use>
resources/views/employers/fly-flot.blade.php
... ... @@ -3,6 +3,27 @@
3 3 @section('scripts')
4 4 <script src="https://cdn.ckeditor.com/ckeditor5/23.0.0/classic/ckeditor.js"></script>
5 5 <script>
  6 + $(function() {
  7 + $('form.cabinet__add [type="file"][name="image"]').change(function (event) {
  8 + const file = event.target.files[0];
  9 +
  10 + if (file) {
  11 + var img_wrap = $('.flot-image-wrap');
  12 + var img = $('<img id="flot-img" src="#"/>');
  13 + const reader = new FileReader();
  14 +
  15 + reader.onload = function(e) {
  16 + img.attr('src', e.target.result);
  17 + img_wrap.find('img').remove();
  18 + img_wrap.append(img);
  19 + $('.no-img-svg').remove();
  20 + };
  21 +
  22 + reader.readAsDataURL(file);
  23 + }
  24 + });
  25 + });
  26 +
6 27 ClassicEditor
7 28 .create( document.querySelector( '#txtarea' ) )
8 29 .catch( error => {
... ... @@ -44,7 +65,8 @@
44 65 </span>
45 66 @enderror
46 67 <input type="hidden" name="employer_id" id="employer_id" value="{{ $Employer[0]->id }}"/>
47   - <svg>
  68 + <div class="flot-image-wrap"></div>
  69 + <svg class="no-img-svg">
48 70 <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use>
49 71 </svg>
50 72 <span>
resources/views/info_company_new.blade.php
... ... @@ -158,6 +158,20 @@
158 158 </span>
159 159 </div>
160 160 </div>
  161 + <div class="main__employer-page-info row2">
  162 + <div class="main__employer-page-item">
  163 + <b>Почта (alt)</b>
  164 + <span>
  165 + {{ $company[0]->email_2 }}
  166 + </span>
  167 + </div>
  168 + <div class="main__employer-page-item">
  169 + <b>Телефон (alt)</b>
  170 + <span>
  171 + <a href="{{ $company[0]->site }}">{{ $company[0]->telephone_2 }}</a>
  172 + </span>
  173 + </div>
  174 + </div>
161 175  
162 176 <div class="main__employer-page-item">
163 177 <b>Описание</b>