Просмотр исходного кода

Page index

- style points de vente / produits
- prix produits
dev
Guillaume Bourgeois 5 лет назад
Родитель
Сommit
6e89086e7b
3 измененных файлов: 96 добавлений и 10 удалений
  1. +38
    -6
      producer/views/site/index.php
  2. +26
    -2
      producer/web/css/screen.css
  3. +32
    -2
      producer/web/sass/site/_index.scss

+ 38
- 6
producer/views/site/index.php Просмотреть файл

@@ -69,8 +69,18 @@ else
'dataProvider' => $dataProviderPointsSale,
'summary' => '',
'columns' => [
'name',
'locality',
[
'attribute' => 'name',
'format' => 'raw',
'contentOptions' => ['class' => 'name'],
'value' => function($model) {
$html = '<span class="the-name">'.Html::encode($model->name).'</span>' ;
if(strlen($model->locality)) {
$html .= '<br />à '.Html::encode($model->locality) ;
}
return $html ;
}
],
[
'label' => 'Jours de livraison',
'value' => function($model) {
@@ -91,7 +101,7 @@ else
[
'attribute' => 'photo',
'format' => 'raw',
'headerOptions' => ['class' => 'td-photo'],
'contentOptions' => ['class' => 'photo'],
'value' => function($model) {
if(strlen($model->photo)) {
return '<img class="photo-product" src="'.Yii::$app->urlManagerProducer->baseUrl.'/uploads/'.$model->photo.'" />' ;
@@ -99,13 +109,35 @@ else
return '' ;
}
],
'name',
'description',
[
'attribute' => 'name',
'format' => 'raw',
'contentOptions' => ['class' => 'name'],
'value' => function($model) {
$html = '<span class="the-name">'.Html::encode($model->name).'</span>' ;
if(strlen($model->description)) {
$html .= ' / '.Html::encode($model->description) ;
}
if(strlen($model->recipe)) {
$html .= '<br />'.Html::encode($model->recipe) ;
}
return $html ;
}
],
[
'attribute' => 'weight',
'value' => function($model) {
if(strlen($model->weight)) {
return $model->weight.'g' ;
return $model->weight.' g' ;
}
return '' ;
}
],
[
'attribute' => 'price',
'value' => function($model) {
if($model->price) {
return Price::format($model->price) ;
}
return '' ;
}

+ 26
- 2
producer/web/css/screen.css Просмотреть файл

@@ -563,11 +563,35 @@ termes.
width: 100%;
max-width: 500px;
}
/* line 54, ../sass/site/_index.scss */
.site-index #products img.photo-product {
/* line 55, ../sass/site/_index.scss */
.site-index #points-sale .name {
color: #333;
}
/* line 57, ../sass/site/_index.scss */
.site-index #points-sale .name .the-name {
font-family: "capsuularegular";
font-size: 20px;
color: black;
}
/* line 67, ../sass/site/_index.scss */
.site-index #products td.photo {
width: 100px;
}
/* line 69, ../sass/site/_index.scss */
.site-index #products td.photo img.photo-product {
width: 120px;
height: auto;
}
/* line 75, ../sass/site/_index.scss */
.site-index #products .name {
color: #333;
}
/* line 77, ../sass/site/_index.scss */
.site-index #products .name .the-name {
font-family: "capsuularegular";
font-size: 20px;
color: black;
}

/* line 4, ../sass/site/_credit_history.scss */
.site-credit-history #credit-user {

+ 32
- 2
producer/web/sass/site/_index.scss Просмотреть файл

@@ -50,10 +50,40 @@ termes.
}
}
}
#points-sale {
.name {
color: #333 ;
.the-name {
font-family: 'capsuularegular' ;
font-size: 20px ;
color: black ;
}
}
}
#products {
img.photo-product {
td.photo {
width: 100px ;
height: auto ;
img.photo-product {
width: 120px ;
height: auto ;
}
}
.name {
color: #333 ;
.the-name {
font-family: 'capsuularegular' ;
font-size: 20px ;
color: black ;
}
.recipe {
}
}
}
}

Загрузка…
Отмена
Сохранить