Commit 1952ee2e authored by Sebastian Castro's avatar Sebastian Castro
Browse files

Refactor color styling #1 Change colors names

parent f7ebdb91
......@@ -32,22 +32,32 @@ class ConfigurationStyleAdmin extends AbstractAdmin
->add('fontImport', null, array('label' => 'Lien pour le CDN des polices', 'required' => false))
->add('iconImport', null, array('label' => 'Lien pour le CDN des icones', 'required' => false))
->end()
->with('Style principal', array('class' => 'col-md-6'))
->with('Thème et polices', array('class' => 'col-md-6'))
->add('theme', 'choice', array('label' => 'Thème', "choices" => ["default" => "Défaut", "presdecheznous" => "Près de chez Nous", "transiscope" => "Transiscope"]))
->add('mainFont', null, array('label' => 'Police principale'))
->add('titleFont', null, array('label' => 'Police de titre'))
->add('textColor', 'text', array('label' => 'Couleur de texte', 'attr' => ['class' => 'gogo-color-picker']))
->add('primaryColor', 'text', array('label' => 'Couleur Primaire', 'attr' => ['class' => 'gogo-color-picker']))
->end()
->with('Style avancé', array('class' => 'col-md-6'))
->add('headerColor', 'text', array('label' => 'Couleur header', 'attr' => ['class' => 'gogo-color-picker'], 'required' => false))
->add('secondaryColor', 'text', array('label' => 'Couleur Secondaire', 'attr' => ['class' => 'gogo-color-picker'], 'required' => false))
->add('backgroundColor', 'text', array('label' => 'Couleur de fond de page', 'attr' => ['class' => 'gogo-color-picker'], 'required' => false))
->add('contentBackgroundColor', 'text', array('label' => 'Couleur arrière plan du contenu', 'attr' => ['class' => 'gogo-color-picker'], 'required' => false))
->add('searchBarColor', 'text', array('label' => 'Couleur search bar', 'attr' => ['class' => 'gogo-color-picker'], 'required' => false))
->with('Couleurs principales', array('class' => 'col-md-6'))
->add('textColor', 'text', array('label' => 'Couleur de texte', 'attr' => ['class' => 'gogo-color-picker']))
->add('primaryColor', 'text', array('label' => 'Couleur Primaire', 'attr' => ['class' => 'gogo-color-picker']))
->add('backgroundColor', 'text', array('label' => 'Couleur de fond de page', 'attr' => ['class' => 'gogo-color-picker'], 'required' => false))
->end()
->with('Autres couleurs', array('class' => 'col-md-12'))
->add('headerColor', 'text', array('label' => 'Couleur header (=text par défault)', 'attr' => ['class' => 'gogo-color-picker'], 'required' => false))
->add('secondaryColor', 'text', array('label' => 'Couleur Secondaire (=primaire par défault)', 'attr' => ['class' => 'gogo-color-picker'], 'required' => false))
->add('contentBackgroundColor', 'text', array('label' => 'Couleur arrière plan du contenu (=blanc par défault)', 'attr' => ['class' => 'gogo-color-picker'], 'required' => false))
->add('searchBarColor', 'text', array('label' => 'Couleur bar de recherche (=primaire par défault)', 'attr' => ['class' => 'gogo-color-picker'], 'required' => false))
->add('interactiveSectionColor', 'text', array('label' => 'Couleur section pour voter dans la fiche détail (=primaire par défault)', 'attr' => ['class' => 'gogo-color-picker'], 'required' => false))
->end()
->with('Couleurs avancées', array('class' => 'col-md-12'))
->add('textDarkColor', 'text', array('label' => 'Couleur text foncé (=texte par défault)', 'attr' => ['class' => 'gogo-color-picker'], 'required' => false))
->add('textDarkSoftColor', 'text', array('label' => 'Couleur text foncé adoucie (=adoucie automatiquement par défault)', 'attr' => ['class' => 'gogo-color-picker'], 'required' => false))
->add('textLightColor', 'text', array('label' => 'Couleur texte clair (=blanc par défault)', 'attr' => ['class' => 'gogo-color-picker'], 'required' => false))
->add('textLightSoftColor', 'text', array('label' => 'Couleur désactivé (=adoucie automatiquement par défault)', 'attr' => ['class' => 'gogo-color-picker'], 'required' => false))
->add('disableColor', 'text', array('label' => 'Couleur désactivé', 'attr' => ['class' => 'gogo-color-picker'], 'required' => false))
->add('pendingColor', 'text', array('label' => 'Couleur pending', 'attr' => ['class' => 'gogo-color-picker'], 'required' => false))
->add('interactiveSectionColor', 'text', array('label' => 'Couleur Interactive section', 'attr' => ['class' => 'gogo-color-picker'], 'required' => false))
->end()
->end()
->tab('Custom Style')
......
......@@ -81,57 +81,23 @@ class LoadConfiguration implements FixtureInterface
$configuration->setElementFormFieldsJson("[{\"type\":\"taxonomy\",\"label\":\"Choisissez la ou les catégories par ordre d importance\",\"name\":\"taxonomy\"},{\"type\":\"separator\",\"label\":\"Séparateur de section\",\"name\":\"separator-1539422234804\"},{\"type\":\"header\",\"subtype\":\"h1\",\"label\":\"Informations\"},{\"type\":\"title\",\"required\":true,\"label\":\"Titre de la fiche\",\"name\":\"name\",\"maxlength\":\"80\",\"icon\":\"gogo-icon-account-circle\"},{\"type\":\"text\",\"required\":true,\"label\":\"Description courte\",\"name\":\"description\",\"maxlength\":\"250\",\"subtype\":\"text\"},{\"type\":\"textarea\",\"label\":\"Description longue\",\"name\":\"descriptionMore\",\"subtype\":\"textarea\",\"maxlength\":\"600\"},{\"type\":\"address\",\"label\":\"Adresse complète\",\"name\":\"address\",\"icon\":\"gogo-icon-marker-symbol\"},{\"type\":\"separator\",\"label\":\"Séparateur de section\",\"name\":\"separator-1539423917238\"},{\"type\":\"header\",\"subtype\":\"h1\",\"label\":\"Contact (optionnel)\"},{\"type\":\"text\",\"subtype\":\"tel\",\"label\":\"Téléphone\",\"name\":\"telephone\"},{\"type\":\"email\",\"subtype\":\"email\",\"label\":\"Mail\",\"name\":\"email\"},{\"type\":\"text\",\"subtype\":\"url\",\"label\":\"Site web\",\"name\":\"website\"},{\"type\":\"separator\",\"label\":\"Séparateur de section\",\"name\":\"separator-1539424058076\"},{\"type\":\"header\",\"subtype\":\"h1\",\"label\":\"Horaires (optionnel)\"},{\"type\":\"openhours\",\"label\":\"Horaires d ouvertures\",\"name\":\"openhours\"}]");
$configuration->setElementFormGeocodingHelp("Ne mettez pas de ponctuation, les noms tout en majuscules ne sont pas reconnus non plus. Si la localisation ne fonctionne pas (il arrive que certaines adresses ne soient pas reconnues), entrez le nom de la ville/le village le plus proche, cliquez sur « Localiser », puis placer le point de localisation manuellement. Re-rentrez l’adresse complète dans la barre et passez à la suite du formulaire sans re-cliquer sur « localiser ».");
$neutralDark = '#345451' ;
$neutralDarkTransparent = '#345451' ;
$neutralSoftDark = '#345451' ;
$neutral = '#467471' ;
$neutralSoft = '#467471' ;
$neutralLight = '#95C5C2' ;
$primary = '#F57B56' ;
$primarySoft = '#F57B56';
$pendingColor = '#5B5B5B';
$secondary = '#97C5C2' ;
$background = '#F4F4F4' ;
$textColor = '#477572' ;
$disableColor = '#C2C9D4' ;
$listTitle = '#345451' ;
$listTitleBackBtn = '#FFFFFF';
$listTitleBackground = '#F4F4F4' ;
$mainFont = 'Cabin' ;
$titleFont = 'Carter One' ;
$taxonomyMainTitleFont = $titleFont ;
$textColor = '#495057';
$primary = '#64d29b';
$background = '#f4f4f4';
$mainFont = 'Cabin';
$titleFont = 'Carter One';
// IMPORT
$configuration->setFontImport('<link href="https://fonts.googleapis.com/css?family=Cabin:400,700|Carter+One" rel="stylesheet">');
$configuration->setIconImport('<script src="https://use.fontawesome.com/3b93bc3463.js"></script>');
$configuration->setIconImport('<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css" integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">');
// STYLE
$configuration->setMainFont($mainFont);
$configuration->setTitleFont($titleFont);
$configuration->setNeutralDarkColor($neutralDark);
$configuration->setNeutralSoftDarkColor($neutralSoftDark);
$configuration->setNeutralColor($neutral);
$configuration->setNeutralSoftColor($neutralSoft);
$configuration->setNeutralLightColor($neutralLight);
$configuration->setSecondaryColor($secondary);
$configuration->setTextColor($textColor);
$configuration->setPrimaryColor($primary);
$configuration->setBackgroundColor($background);
$configuration->setContentBackgroundColor('white'); // #fafafa
$configuration->setTextColor($textColor);
// CUSTOM COLORS & FONTS
$configuration->setHeaderColor($neutralDark);
$configuration->setSearchBarColor($neutral);
$configuration->setDisableColor($disableColor);
$configuration->setNeutralDarkTransparentColor($neutralDarkTransparent);
$configuration->setListTitleColor($listTitle);
$configuration->setListTitleBackBtnColor($listTitleBackBtn);
$configuration->setListTitleBackgroundColor($listTitleBackground);
$configuration->setTaxonomyMainTitleFont($taxonomyMainTitleFont);
$configuration->setPendingColor($pendingColor);
$configuration->setInteractiveSectionColor($primarySoft);
$configuration->setCustomCSS('');
$manager->persist($configuration);
......
......@@ -314,70 +314,58 @@ class Configuration
// --------- STYLE ---------
// -------------------------
// MAIN COLORS & FONTS
/** @MongoDB\Field(type="string") */
protected $mainFont;
protected $theme;
/** @MongoDB\Field(type="string") */
protected $titleFont;
// FONTS
/** @MongoDB\Field(type="string") */
protected $neutralDarkColor;
protected $mainFont;
/** @MongoDB\Field(type="string") */
protected $neutralSoftDarkColor;
protected $titleFont;
/** @MongoDB\Field(type="string") */
protected $neutralColor;
// COLORS BASIC
/** @MongoDB\Field(type="string") */
protected $neutralSoftColor;
protected $textColor;
/** @MongoDB\Field(type="string") */
protected $neutralLightColor;
protected $primaryColor;
/** @MongoDB\Field(type="string") */
protected $secondaryColor;
/** @MongoDB\Field(type="string") */
protected $primaryColor;
/** @MongoDB\Field(type="string") */
protected $backgroundColor;
/** @MongoDB\Field(type="string") */
protected $contentBackgroundColor;
// COLORS INTERMEDIAITE
/** @MongoDB\Field(type="string") */
protected $textColor;
// CUSTOM COLORS & FONTS
protected $textDarkColor;
/** @MongoDB\Field(type="string") */
protected $headerColor;
protected $textDarkSoftColor;
/** @MongoDB\Field(type="string") */
protected $searchBarColor;
protected $textLightColor;
/** @MongoDB\Field(type="string") */
protected $disableColor;
protected $textLightSoftColor;
/** @MongoDB\Field(type="string") */
protected $neutralDarkTransparentColor;
protected $contentBackgroundColor;
/** @MongoDB\Field(type="string") */
protected $listTitleColor;
protected $headerColor;
/** @MongoDB\Field(type="string") */
protected $listTitleBackBtnColor;
// COLORS ADVANCED
/** @MongoDB\Field(type="string") */
protected $listTitleBackgroundColor;
protected $searchBarColor;
/** @MongoDB\Field(type="string") */
protected $taxonomyMainTitleFont;
protected $disableColor;
/** @MongoDB\Field(type="string") */
protected $pendingColor;
......@@ -937,52 +925,6 @@ class Configuration
return $this->secondaryColor;
}
/**
* Set darkColor
*
* @param string $darkColor
* @return $this
*/
public function setDarkColor($darkColor)
{
if (strlen($darkColor) == 6) $darkColor = '#' . $darkColor;
$this->darkColor = $darkColor;
return $this;
}
/**
* Get darkColor
*
* @return string $darkColor
*/
public function getDarkColor()
{
return $this->darkColor;
}
/**
* Set lightColor
*
* @param string $lightColor
* @return $this
*/
public function setLightColor($lightColor)
{
if (strlen($lightColor) == 6) $lightColor = '#' . $lightColor;
$this->lightColor = $lightColor;
return $this;
}
/**
* Get lightColor
*
* @return string $lightColor
*/
public function getLightColor()
{
return $this->lightColor;
}
/**
* Set collaborativeModerationFeature
*
......@@ -1071,52 +1013,6 @@ class Configuration
return $this->titleFont;
}
/**
* Set neutralDarkColor
*
* @param string $neutralDarkColor
* @return $this
*/
public function setNeutralDarkColor($neutralDarkColor)
{
if (strlen($neutralDarkColor) == 6) $neutralDarkColor = '#' . $neutralDarkColor;
$this->neutralDarkColor = $neutralDarkColor;
return $this;
}
/**
* Get neutralDarkColor
*
* @return string $neutralDarkColor
*/
public function getNeutralDarkColor()
{
return $this->neutralDarkColor;
}
/**
* Set neutralSoftDarkColor
*
* @param string $neutralSoftDarkColor
* @return $this
*/
public function setNeutralSoftDarkColor($neutralSoftDarkColor)
{
if (strlen($neutralSoftDarkColor) == 6) $neutralSoftDarkColor = '#' . $neutralSoftDarkColor;
$this->neutralSoftDarkColor = $neutralSoftDarkColor;
return $this;
}
/**
* Get neutralSoftDarkColor
*
* @return string $neutralSoftDarkColor
*/
public function getNeutralSoftDarkColor()
{
return $this->neutralSoftDarkColor;
}
/**
* Set neutralColor
*
......@@ -1140,29 +1036,6 @@ class Configuration
return $this->neutralColor;
}
/**
* Set neutralLightColor
*
* @param string $neutralLightColor
* @return $this
*/
public function setNeutralLightColor($neutralLightColor)
{
if (strlen($neutralLightColor) == 6) $neutralLightColor = '#' . $neutralLightColor;
$this->neutralLightColor = $neutralLightColor;
return $this;
}
/**
* Get neutralLightColor
*
* @return string $neutralLightColor
*/
public function getNeutralLightColor()
{
return $this->neutralLightColor;
}
/**
* Set backgroundColor
*
......@@ -1185,122 +1058,6 @@ class Configuration
{
return $this->backgroundColor;
}
/**
* Set neutralDarkTransparentColor
*
* @param string $neutralDarkTransparentColor
* @return $this
*/
public function setNeutralDarkTransparentColor($neutralDarkTransparentColor)
{
if (strlen($neutralDarkTransparentColor) == 6) $neutralDarkTransparentColor = '#' . $neutralDarkTransparentColor;
$this->neutralDarkTransparentColor = $neutralDarkTransparentColor;
return $this;
}
/**
* Get neutralDarkTransparentColor
*
* @return string $neutralDarkTransparentColor
*/
public function getNeutralDarkTransparentColor()
{
return $this->neutralDarkTransparentColor;
}
/**
* Set listTitleColor
*
* @param string $listTitleColor
* @return $this
*/
public function setListTitleColor($listTitleColor)
{
if (strlen($listTitleColor) == 6) $listTitleColor = '#' . $listTitleColor;
$this->listTitleColor = $listTitleColor;
return $this;
}
/**
* Get listTitleColor
*
* @return string $listTitleColor
*/
public function getListTitleColor()
{
return $this->listTitleColor;
}
/**
* Set listTitleBackBtnColor
*
* @param string $listTitleBackBtnColor
* @return $this
*/
public function setListTitleBackBtnColor($listTitleBackBtnColor)
{
if (strlen($listTitleBackBtnColor) == 6) $listTitleBackBtnColor = '#' . $listTitleBackBtnColor;
$this->listTitleBackBtnColor = $listTitleBackBtnColor;
return $this;
}
/**
* Get listTitleBackBtnColor
*
* @return string $listTitleBackBtnColor
*/
public function getListTitleBackBtnColor()
{
return $this->listTitleBackBtnColor;
}
/**
* Set listTitleBackgroundColor
*
* @param string $listTitleBackgroundColor
* @return $this
*/
public function setListTitleBackgroundColor($listTitleBackgroundColor)
{
if (strlen($listTitleBackgroundColor) == 6) $listTitleBackgroundColor = '#' . $listTitleBackgroundColor;
$this->listTitleBackgroundColor = $listTitleBackgroundColor;
return $this;
}
/**
* Get listTitleBackgroundColor
*
* @return string $listTitleBackgroundColor
*/
public function getListTitleBackgroundColor()
{
return $this->listTitleBackgroundColor;
}
/**
* Set taxonomyMainTitleFont
*
* @param string $taxonomyMainTitleFont
* @return $this
*/
public function setTaxonomyMainTitleFont($taxonomyMainTitleFont)
{
if (strlen($taxonomyMainTitleFont) == 6) $taxonomyMainTitleFont = '#' . $taxonomyMainTitleFont;
$this->taxonomyMainTitleFont = $taxonomyMainTitleFont;
return $this;
}
/**
* Get taxonomyMainTitleFont
*
* @return string $taxonomyMainTitleFont
*/
public function getTaxonomyMainTitleFont()
{
return $this->taxonomyMainTitleFont;
}
/**
* Set customCSS
......@@ -1462,29 +1219,6 @@ class Configuration
return $this->interactiveSectionColor;
}
/**
* Set neutralSoftColor
*
* @param string $neutralSoftColor
* @return $this
*/
public function setNeutralSoftColor($neutralSoftColor)
{
if (strlen($neutralSoftColor) == 6) $neutralSoftColor = '#' . $neutralSoftColor;
$this->neutralSoftColor = $neutralSoftColor;
return $this;
}
/**
* Get neutralSoftColor
*
* @return string $neutralSoftColor
*/
public function getNeutralSoftColor()
{
return $this->neutralSoftColor;
}
/**
* Set contentBackgroundColor
*
......@@ -2852,4 +2586,114 @@ class Configuration
if(!$this->api) $this->api = new ConfigurationApi();
return $this->api;
}
/**
* Set theme
*
* @param string $theme
* @return $this
*/
public function setTheme($theme)
{
$this->theme = $theme;
return $this;
}
/**
* Get theme
*
* @return string $theme
*/
public function getTheme()
{
return $this->theme;
}
/**
* Set textDarkColor
*
* @param string $textDarkColor
* @return $this
*/
public function setTextDarkColor($textDarkColor)
{
$this->textDarkColor = $textDarkColor;
return $this;
}
/**
* Get textDarkColor
*
* @return string $textDarkColor
*/
public function getTextDarkColor()
{
return $this->textDarkColor;
}
/**
* Set textDarkSoftColor
*
* @param string $textDarkSoftColor
* @return $this
*/
public function setTextDarkSoftColor($textDarkSoftColor)
{
$this->textDarkSoftColor = $textDarkSoftColor;
return $this;
}
/**
* Get textDarkSoftColor
*
* @return string $textDarkSoftColor
*/
public function getTextDarkSoftColor()
{
return $this->textDarkSoftColor;
}
/**
* Set textLightColor
*
* @param string $textLightColor
* @return $this
*/
public function setTextLightColor($textLightColor)
{
$this->textLightColor = $textLightColor;
return $this;
}
/**
* Get textLightColor
*
* @return string $textLightColor
*/
public function getTextLightColor()
{
return $this->textLightColor;
}
/**
* Set textLightSoftColor
*
* @param string $textLightSoftColor
* @return $this
*/
public function setTextLightSoftColor($textLightSoftColor)
{
$this->textLightSoftColor = $textLightSoftColor;
return $this;
}
/**
* Get textLightSoftColor
*
* @return string $textLightSoftColor
*/
public function getTextLightSoftColor()
{
return $this->textLightSoftColor;
}
}