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

Ticket #268 - Extending list of customizable parts in UNI template.

AntonLV 10 лет назад
Родитель
Сommit
8298c5431f

+ 4 - 0
modules/boonex/russian/data/langs/bx_uni/ru.xml

@@ -70,6 +70,7 @@
 	<string name="_bx_uni_stg_cpt_option_block_title_font_family"><![CDATA[Шрифт заголовка]]></string>
 	<string name="_bx_uni_stg_cpt_option_block_title_font_size"><![CDATA[Размер шрифта заголовка]]></string>
 	<string name="_bx_uni_stg_cpt_option_block_title_font_color"><![CDATA[Цвет шрифта заголовка]]></string>
+	<string name="_bx_uni_stg_cpt_option_block_title_font_weight"><![CDATA[Плотность шрифта заголовка]]></string>
 	<string name="_bx_uni_stg_cpt_option_block_title_div_height"><![CDATA[Высота разделителя заголовка]]></string>
 	<string name="_bx_uni_stg_cpt_option_block_title_div_bg_color"><![CDATA[Цвет разделителя заголовка]]></string>
 
@@ -198,18 +199,21 @@
 	<string name="_bx_uni_stg_cpt_option_font_size_middle"><![CDATA[Размер среднего шрифта]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_size_large"><![CDATA[Размер большого шрифта]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_size_h1"><![CDATA[Размер шрифта тэга H1]]></string>
+	<string name="_bx_uni_stg_cpt_option_font_weight_h1"><![CDATA[Плотность шрифта тэга H1]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_default_h1"><![CDATA[Стандартный цвет шрифта тэга H1]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_grayed_h1"><![CDATA[Серый цвет шрифта тэга H1]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_contrasted_h1"><![CDATA[Контрастный цвет шрифта тэга H1]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_link_h1"><![CDATA[Цвет линок в тэге H1]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_link_h1_hover"><![CDATA[Цвет линок в тэге H1 при наведении курсора]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_size_h2"><![CDATA[Размер шрифта тэга H2]]></string>
+	<string name="_bx_uni_stg_cpt_option_font_weight_h2"><![CDATA[Плотность шрифта тэга H2]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_default_h2"><![CDATA[Стандартный цвет шрифта тэга H2]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_grayed_h2"><![CDATA[Серый цвет шрифта тэга H2]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_contrasted_h2"><![CDATA[Контрастный цвет шрифта тэга H2]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_link_h2"><![CDATA[Цвет линок в тэге H2]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_link_h2_hover"><![CDATA[Цвет линок в тэге H2 при наведении курсора]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_size_h3"><![CDATA[Размер шрифта тэга H3]]></string>
+	<string name="_bx_uni_stg_cpt_option_font_weight_h3"><![CDATA[Плотность шрифта тэга H3]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_default_h3"><![CDATA[Стандартный цвет шрифта тэга H3]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_grayed_h3"><![CDATA[Серый цвет шрифта тэга H3]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_contrasted_h3"><![CDATA[Контрастный цвет шрифта тэга H3]]></string>

+ 5 - 1
modules/boonex/uni/data/template/system/css/default.less

@@ -211,6 +211,7 @@ a:hover > .sys-icon-a i {
 
 h1,
 .bx-def-font-h1 {
+	font-weight: @bx-font-weight-h1;
 	color: @bx-font-color-default-h1;
 }
 h1.bx-def-font-grayed,
@@ -246,6 +247,7 @@ a.bx-def-font-h1:hover {
 
 h2,
 .bx-def-font-h2 {
+	font-weight: @bx-font-weight-h2;
 	color: @bx-font-color-default-h2;
 }
 h2.bx-def-font-grayed,
@@ -281,6 +283,7 @@ a.bx-def-font-h2:hover {
 
 h3,
 .bx-def-font-h3 {
+	font-weight: @bx-font-weight-h3;
 	color: @bx-font-color-default-h3;
 }
 h3.bx-def-font-grayed,
@@ -326,7 +329,8 @@ a.bx-def-font-h3:hover {
 	background-color: @bx-color-block-title;
 }
 .bx-db-header .bx-db-title {
-	font-family: @bx-font-family-block-title;	
+	font-family: @bx-font-family-block-title;
+	font-weight: @bx-font-weight-block-title;
 	color: @bx-color-font-block-title;
 }
 .bx-db-header .bx-db-title.bx-def-font-h2 {

+ 5 - 0
modules/boonex/uni/data/template/system/scripts/BxTemplConfig.php

@@ -237,10 +237,15 @@ class BxTemplConfig extends BxBaseConfig
         $this->_aConfig['aLessConfig']['bx-font-color-link-h3-hover'] = $this->_setColorRgba($sName . '_font_color_link_h3_hover', $sColFontLnkHov);
 
 		//--- Font Weight
+		
+		$this->_aConfig['aLessConfig']['bx-font-weight-block-title'] = $this->_setValue($sName . '_block_title_font_weight', '500');
 		$this->_aConfig['aLessConfig']['bx-font-weight-menu-main'] = $this->_setValue($sName . '_menu_main_font_weight', '400');
 		$this->_aConfig['aLessConfig']['bx-font-weight-menu-page'] = $this->_setValue($sName . '_menu_page_font_weight', '400');
 		$this->_aConfig['aLessConfig']['bx-font-weight-button'] = $this->_setValue($sName . '_button_lg_font_weight', '400');
 		$this->_aConfig['aLessConfig']['bx-font-weight-button-small'] = $this->_setValue($sName . '_button_sm_font_weight', '400');
+		$this->_aConfig['aLessConfig']['bx-font-weight-h1'] = $this->_setValue($sName . '_font_weight_h1', '700');
+		$this->_aConfig['aLessConfig']['bx-font-weight-h2'] = $this->_setValue($sName . '_font_weight_h2', '700');
+		$this->_aConfig['aLessConfig']['bx-font-weight-h3'] = $this->_setValue($sName . '_font_weight_h3', '500');
 
 		//--- Viewport 
 		$this->_aConfig['aLessConfig']['bx-viewport-font-tablet'] = $this->_setValue($sName . '_vpt_font_size_scale', '100%');

+ 4 - 0
modules/boonex/uni/install/langs/en.xml

@@ -70,6 +70,7 @@
 	<string name="_bx_uni_stg_cpt_option_block_title_font_family"><![CDATA[Title font stack]]></string>
 	<string name="_bx_uni_stg_cpt_option_block_title_font_size"><![CDATA[Title font size]]></string>
 	<string name="_bx_uni_stg_cpt_option_block_title_font_color"><![CDATA[Title font color]]></string>
+	<string name="_bx_uni_stg_cpt_option_block_title_font_weight"><![CDATA[Title font weight]]></string>
 	<string name="_bx_uni_stg_cpt_option_block_title_div_height"><![CDATA[Title separator height]]></string>
 	<string name="_bx_uni_stg_cpt_option_block_title_div_bg_color"><![CDATA[Title separator color]]></string>
 
@@ -198,18 +199,21 @@
 	<string name="_bx_uni_stg_cpt_option_font_size_middle"><![CDATA[Middle font size]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_size_large"><![CDATA[Large font size]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_size_h1"><![CDATA[H1 font size]]></string>
+	<string name="_bx_uni_stg_cpt_option_font_weight_h1"><![CDATA[H1 font weight]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_default_h1"><![CDATA[H1 default font color]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_grayed_h1"><![CDATA[H1 grayed font color]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_contrasted_h1"><![CDATA[H1 contrasted font color]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_link_h1"><![CDATA[H1 link font color]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_link_h1_hover"><![CDATA[H1 on-hover link font color]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_size_h2"><![CDATA[H2 font size]]></string>
+	<string name="_bx_uni_stg_cpt_option_font_weight_h2"><![CDATA[H2 font weight]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_default_h2"><![CDATA[H2 default font color]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_grayed_h2"><![CDATA[H2 grayed font color]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_contrasted_h2"><![CDATA[H2 contrasted font color]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_link_h2"><![CDATA[H2 link font color]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_link_h2_hover"><![CDATA[H2 on-hover link font color]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_size_h3"><![CDATA[H3 font size]]></string>
+	<string name="_bx_uni_stg_cpt_option_font_weight_h3"><![CDATA[H3 font weight]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_default_h3"><![CDATA[H3 default font color]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_grayed_h3"><![CDATA[H3 grayed font color]]></string>
 	<string name="_bx_uni_stg_cpt_option_font_color_contrasted_h3"><![CDATA[H3 contrasted font color]]></string>

+ 23 - 19
modules/boonex/uni/install/sql/install.sql

@@ -105,8 +105,9 @@ INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `ex
 (@iCategoryId, CONCAT(@sName, '_block_title_font_family'), '_bx_uni_stg_cpt_option_block_title_font_family', 'Helvetica, Arial, sans-serif', 'digit', '', '', '', 12),
 (@iCategoryId, CONCAT(@sName, '_block_title_font_size'), '_bx_uni_stg_cpt_option_block_title_font_size', '1.5rem', 'digit', '', '', '', 13),
 (@iCategoryId, CONCAT(@sName, '_block_title_font_color'), '_bx_uni_stg_cpt_option_block_title_font_color', 'rgba(0, 0, 20, 1)', 'rgba', '', '', '', 14),
-(@iCategoryId, CONCAT(@sName, '_block_title_div_height'), '_bx_uni_stg_cpt_option_block_title_div_height', '1px', 'digit', '', '', '', 15),
-(@iCategoryId, CONCAT(@sName, '_block_title_div_bg_color'), '_bx_uni_stg_cpt_option_block_title_div_bg_color', 'rgba(208, 208, 208, 1)', 'rgba', '', '', '', 16);
+(@iCategoryId, CONCAT(@sName, '_block_title_font_weight'), '_bx_uni_stg_cpt_option_block_title_font_weight', '500', 'digit', '', '', '', 15),
+(@iCategoryId, CONCAT(@sName, '_block_title_div_height'), '_bx_uni_stg_cpt_option_block_title_div_height', '1px', 'digit', '', '', '', 16),
+(@iCategoryId, CONCAT(@sName, '_block_title_div_bg_color'), '_bx_uni_stg_cpt_option_block_title_div_bg_color', 'rgba(208, 208, 208, 1)', 'rgba', '', '', '', 17);
 
 
 -- SETTINGS: UNI Styles Card
@@ -285,23 +286,26 @@ INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `ex
 (@iCategoryId, CONCAT(@sName, '_font_size_middle'), '_bx_uni_stg_cpt_option_font_size_middle', '16px', 'digit', '', '', '', 7),
 (@iCategoryId, CONCAT(@sName, '_font_size_large'), '_bx_uni_stg_cpt_option_font_size_large', '22px', 'digit', '', '', '', 8),
 (@iCategoryId, CONCAT(@sName, '_font_size_h1'), '_bx_uni_stg_cpt_option_font_size_h1', '38px', 'digit', '', '', '', 9),
-(@iCategoryId, CONCAT(@sName, '_font_color_default_h1'), '_bx_uni_stg_cpt_option_font_color_default_h1', 'rgba(51, 51, 51, 1)', 'rgba', '', '', '', 10),
-(@iCategoryId, CONCAT(@sName, '_font_color_grayed_h1'), '_bx_uni_stg_cpt_option_font_color_grayed_h1', 'rgba(153, 153, 153, 1)', 'rgba', '', '', '', 11),
-(@iCategoryId, CONCAT(@sName, '_font_color_contrasted_h1'), '_bx_uni_stg_cpt_option_font_color_contrasted_h1', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 12),
-(@iCategoryId, CONCAT(@sName, '_font_color_link_h1'), '_bx_uni_stg_cpt_option_font_color_link_h1', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 13),
-(@iCategoryId, CONCAT(@sName, '_font_color_link_h1_hover'), '_bx_uni_stg_cpt_option_font_color_link_h1_hover', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 14),
-(@iCategoryId, CONCAT(@sName, '_font_size_h2'), '_bx_uni_stg_cpt_option_font_size_h2', '24px', 'digit', '', '', '', 15),
-(@iCategoryId, CONCAT(@sName, '_font_color_default_h2'), '_bx_uni_stg_cpt_option_font_color_default_h2', 'rgba(51, 51, 51, 1)', 'rgba', '', '', '', 16),
-(@iCategoryId, CONCAT(@sName, '_font_color_grayed_h2'), '_bx_uni_stg_cpt_option_font_color_grayed_h2', 'rgba(153, 153, 153, 1)', 'rgba', '', '', '', 17),
-(@iCategoryId, CONCAT(@sName, '_font_color_contrasted_h2'), '_bx_uni_stg_cpt_option_font_color_contrasted_h2', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 18),
-(@iCategoryId, CONCAT(@sName, '_font_color_link_h2'), '_bx_uni_stg_cpt_option_font_color_link_h2', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 19),
-(@iCategoryId, CONCAT(@sName, '_font_color_link_h2_hover'), '_bx_uni_stg_cpt_option_font_color_link_h2_hover', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 20),
-(@iCategoryId, CONCAT(@sName, '_font_size_h3'), '_bx_uni_stg_cpt_option_font_size_h3', '18px', 'digit', '', '', '', 21),
-(@iCategoryId, CONCAT(@sName, '_font_color_default_h3'), '_bx_uni_stg_cpt_option_font_color_default_h3', 'rgba(51, 51, 51, 1)', 'rgba', '', '', '', 22),
-(@iCategoryId, CONCAT(@sName, '_font_color_grayed_h3'), '_bx_uni_stg_cpt_option_font_color_grayed_h3', 'rgba(153, 153, 153, 1)', 'rgba', '', '', '', 23),
-(@iCategoryId, CONCAT(@sName, '_font_color_contrasted_h3'), '_bx_uni_stg_cpt_option_font_color_contrasted_h3', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 24),
-(@iCategoryId, CONCAT(@sName, '_font_color_link_h3'), '_bx_uni_stg_cpt_option_font_color_link_h3', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 25),
-(@iCategoryId, CONCAT(@sName, '_font_color_link_h3_hover'), '_bx_uni_stg_cpt_option_font_color_link_h3_hover', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 26);
+(@iCategoryId, CONCAT(@sName, '_font_weight_h1'), '_bx_uni_stg_cpt_option_font_weight_h1', '700', 'digit', '', '', '', 10),
+(@iCategoryId, CONCAT(@sName, '_font_color_default_h1'), '_bx_uni_stg_cpt_option_font_color_default_h1', 'rgba(51, 51, 51, 1)', 'rgba', '', '', '', 11),
+(@iCategoryId, CONCAT(@sName, '_font_color_grayed_h1'), '_bx_uni_stg_cpt_option_font_color_grayed_h1', 'rgba(153, 153, 153, 1)', 'rgba', '', '', '', 12),
+(@iCategoryId, CONCAT(@sName, '_font_color_contrasted_h1'), '_bx_uni_stg_cpt_option_font_color_contrasted_h1', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 13),
+(@iCategoryId, CONCAT(@sName, '_font_color_link_h1'), '_bx_uni_stg_cpt_option_font_color_link_h1', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 14),
+(@iCategoryId, CONCAT(@sName, '_font_color_link_h1_hover'), '_bx_uni_stg_cpt_option_font_color_link_h1_hover', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 15),
+(@iCategoryId, CONCAT(@sName, '_font_size_h2'), '_bx_uni_stg_cpt_option_font_size_h2', '24px', 'digit', '', '', '', 16),
+(@iCategoryId, CONCAT(@sName, '_font_weight_h2'), '_bx_uni_stg_cpt_option_font_weight_h2', '700', 'digit', '', '', '', 17),
+(@iCategoryId, CONCAT(@sName, '_font_color_default_h2'), '_bx_uni_stg_cpt_option_font_color_default_h2', 'rgba(51, 51, 51, 1)', 'rgba', '', '', '', 18),
+(@iCategoryId, CONCAT(@sName, '_font_color_grayed_h2'), '_bx_uni_stg_cpt_option_font_color_grayed_h2', 'rgba(153, 153, 153, 1)', 'rgba', '', '', '', 19),
+(@iCategoryId, CONCAT(@sName, '_font_color_contrasted_h2'), '_bx_uni_stg_cpt_option_font_color_contrasted_h2', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 20),
+(@iCategoryId, CONCAT(@sName, '_font_color_link_h2'), '_bx_uni_stg_cpt_option_font_color_link_h2', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 21),
+(@iCategoryId, CONCAT(@sName, '_font_color_link_h2_hover'), '_bx_uni_stg_cpt_option_font_color_link_h2_hover', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 22),
+(@iCategoryId, CONCAT(@sName, '_font_size_h3'), '_bx_uni_stg_cpt_option_font_size_h3', '18px', 'digit', '', '', '', 23),
+(@iCategoryId, CONCAT(@sName, '_font_weight_h3'), '_bx_uni_stg_cpt_option_font_weight_h3', '500', 'digit', '', '', '', 24),
+(@iCategoryId, CONCAT(@sName, '_font_color_default_h3'), '_bx_uni_stg_cpt_option_font_color_default_h3', 'rgba(51, 51, 51, 1)', 'rgba', '', '', '', 25),
+(@iCategoryId, CONCAT(@sName, '_font_color_grayed_h3'), '_bx_uni_stg_cpt_option_font_color_grayed_h3', 'rgba(153, 153, 153, 1)', 'rgba', '', '', '', 26),
+(@iCategoryId, CONCAT(@sName, '_font_color_contrasted_h3'), '_bx_uni_stg_cpt_option_font_color_contrasted_h3', 'rgba(255, 255, 255, 1)', 'rgba', '', '', '', 27),
+(@iCategoryId, CONCAT(@sName, '_font_color_link_h3'), '_bx_uni_stg_cpt_option_font_color_link_h3', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 28),
+(@iCategoryId, CONCAT(@sName, '_font_color_link_h3_hover'), '_bx_uni_stg_cpt_option_font_color_link_h3_hover', 'rgba(62, 134, 133, 1)', 'rgba', '', '', '', 29);
 
 -- SETTINGS: UNI Viewport Tablet
 INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `order`) VALUES 

+ 1 - 1
template/css/default.less

@@ -429,7 +429,7 @@ h1,
 h2,
 .bx-def-font-h2 {
     .font-size(@bx-font-size-h2);
-    font-weight:500;
+    font-weight:700;
 }
 
 h3,

+ 1 - 1
template/designbox_1.html

@@ -1,6 +1,6 @@
 <!-- Design Box 1 [start]: Content + title + background -->
 <div class="bx-db-container bx-def-color-bg-block">
-    <div class="bx-db-header"><div class="bx-db-title bx-def-font-h2">__title__</div>__caption_item__<div class="bx-clear"></div></div>
+    <div class="bx-db-header"><div class="bx-db-title bx-def-font-h3">__title__</div>__caption_item__<div class="bx-clear"></div></div>
     <div class="bx-def-hr"></div>
     <div class="bx-db-content bx-clearfix">__designbox_content__</div>
 </div>

+ 1 - 1
template/designbox_11.html

@@ -1,6 +1,6 @@
 <!-- Design Box 11 [start]: Content + title + background + padding -->
 <div class="bx-db-container bx-def-color-bg-block">
-    <div class="bx-db-header"><div class="bx-db-title bx-def-font-h2">__title__</div>__caption_item__<div class="bx-clear"></div></div>
+    <div class="bx-db-header"><div class="bx-db-title bx-def-font-h3">__title__</div>__caption_item__<div class="bx-clear"></div></div>
     <div class="bx-def-hr"></div>
     <div class="bx-db-content bx-def-padding-top bx-clearfix">__designbox_content__</div>
 </div>

+ 1 - 1
template/designbox_14.html

@@ -1,6 +1,6 @@
 <!-- Design Box 14 [start]: Content + title + padding -->
 <div class="bx-db-container bx-dbc-nobg">
-    <div class="bx-db-header"><div class="bx-db-title bx-def-font-h2">__title__</div>__caption_item__<div class="bx-clear"></div></div>
+    <div class="bx-db-header"><div class="bx-db-title bx-def-font-h3">__title__</div>__caption_item__<div class="bx-clear"></div></div>
     <div class="bx-def-hr"></div>
     <div class="bx-db-content bx-def-padding-top bx-clearfix">__designbox_content__</div>
 </div>

+ 1 - 1
template/designbox_4.html

@@ -1,6 +1,6 @@
 <!-- Design Box 4 [start]: Content + title -->
 <div class="bx-db-container bx-dbc-nobg">
-    <div class="bx-db-header"><div class="bx-db-title bx-def-font-h2">__title__</div>__caption_item__<div class="bx-clear"></div></div>
+    <div class="bx-db-header"><div class="bx-db-title bx-def-font-h3">__title__</div>__caption_item__<div class="bx-clear"></div></div>
     <div class="bx-def-hr"></div>
     <div class="bx-db-content bx-clearfix">__designbox_content__</div>
 </div>