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

#77 - different gallery layout for notes

Alex Trofimov 12 лет назад
Родитель
Сommit
b82e856f67

+ 1 - 1
inc/classes/BxDolTemplate.php

@@ -831,7 +831,7 @@ class BxDolTemplate extends BxDol implements iBxDolSingleton
     function getHtml($sName, $sCheckIn = BX_DOL_TEMPLATE_CHECK_IN_BOTH)
     {
         $sAbsolutePath = $this->_getAbsoluteLocation('path', $this->_sFolderHtml, $sName, $sCheckIn);
-        return !empty($sAbsolutePath) ? file_get_contents($sAbsolutePath) : false;
+        return !empty($sAbsolutePath) ? trim(file_get_contents($sAbsolutePath)) : false;
     }
 
     /**

+ 0 - 8
modules/base/text/template/css/main.css

@@ -22,10 +22,6 @@
     overflow:hidden;
 }
 
-.bx-base-text-unit-no-thumb {
-    overflow:hidden;
-}
-
 .bx-base-text-unit-summary p {
     margin:0;
 }
@@ -36,10 +32,6 @@
     text-overflow:ellipsis;
 }
 
-.bx-base-text-unit-gallery {
-    float:left;
-}
-
 .bx-base-text-unit-gallery .bx-base-text-unit-no-thumb,
 .bx-base-text-unit-gallery .bx-base-text-unit-thumb {
     float:none;

+ 2 - 4
modules/base/text/template/unit_gallery.html

@@ -1,5 +1,4 @@
-
-<div class="bx-base-text-unit bx-base-text-unit-gallery bx-def-gal-unit-size bx-def-margin">
+<div class="bx-base-text-unit bx-base-text-unit-gallery bx-def-gal-unit-size bx-def-padding">
 
     <bx_if:thumb>
         <a href="__content_url__"><img class="bx-base-text-unit-thumb bx-def-gal-img-size bx-def-round-corners bx-def-color-bg-sec bx-def-font-middle" alt="__summary_attr__" src="__thumb_url__" /></a>
@@ -7,7 +6,7 @@
 
     <bx_if:no_thumb>
         <div class="bx-def-gal-img-column">
-            <div class="bx-base-text-unit-no-thumb bx-def-gal-img-size bx-def-round-corners bx-def-color-bg-sec bx-def-font-middle bx-def-font-grayed bx-def-padding bx-def-box-sizing">__summary_plain__</div>
+            <div class="bx-base-text-unit-no-thumb bx-def-gal-div-size bx-def-round-corners bx-def-color-bg-sec bx-def-font-middle bx-def-font-grayed bx-def-padding bx-def-box-sizing">__summary_plain__</div>
         </div>
     </bx_if:no_thumb>
 
@@ -22,4 +21,3 @@
     </div>
 
 </div>
-

+ 1 - 1
modules/boonex/english/data/langs/system.xml

@@ -1989,7 +1989,7 @@ If it is not enabled then please consider implement this optimization, since it
 	<string name="_sys_txt_unsubscribe_info"><![CDATA[Update email preferences for <b>{0}</b>]]></string>
 	<string name="_sys_txt_unsubscribe_wrong_link"><![CDATA[Unsubscribe link is wrong.]]></string>
 	<string name="_sys_upgrade_conclusion"><![CDATA[<h3>Important info:</h3><p>{0}</p>]]></string>
-	<string name="_sys_upgrade_db_and_files_versions_different"><![CDATA[Database and files versions are different, probably porevious patch wasn't applied correctly.]]></string>
+	<string name="_sys_upgrade_db_and_files_versions_different"><![CDATA[Database and files versions are different, probably previous patch wasn't applied correctly.]]></string>
 	<string name="_sys_upgrade_files_checksum_failed"><![CDATA[Can't apply apgrade becase the following files were modified: {0}]]></string>
 	<string name="_sys_upgrade_files_checksum_failed_too_many"><![CDATA[Can't apply upgrade becase too many files({0}%) were modified]]></string>
 	<string name="_sys_upgrade_get_version_info_failed"><![CDATA[Get version info failed, please check internet connection on the web-server or web-server firewall]]></string>

+ 1 - 1
modules/boonex/notes/install/sql/enable.sql

@@ -12,7 +12,7 @@ SET @iCategId = LAST_INSERT_ID();
 
 INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `extra`, `order`) VALUES
 ('bx_notes_summary_chars', '700', @iCategId, '_bx_notes_option_summary_chars', 'digit', '', '', '', 1),
-('bx_notes_plain_summary_chars', '280', @iCategId, '_bx_notes_option_plain_summary_chars', 'digit', '', '', '', 2),
+('bx_notes_plain_summary_chars', '200', @iCategId, '_bx_notes_option_plain_summary_chars', 'digit', '', '', '', 2),
 ('bx_notes_per_page_browse', '12', @iCategId, '_bx_notes_option_per_page_browse', 'digit', '', '', '', 10),
 ('bx_notes_rss_num', '10', @iCategId, '_bx_notes_option_rss_num', 'digit', '', '', '', 20);
 

+ 0 - 2
modules/boonex/notes/template/unit_gallery.html

@@ -1,3 +1 @@
-
 <bx_include_base:../modules/base/text/template/unit_gallery.html />
-

+ 6 - 0
template/css/_mixins.less

@@ -66,3 +66,9 @@
     -ms-column-width: ~"@{rem-w}rem";
     column-width: ~"@{rem-w}rem";
 }
+.column-width-raw (@width) {
+    -webkit-column-width: @width;
+    -moz-column-width: @width;
+    -ms-column-width: @width;
+    column-width: @width;
+}

+ 14 - 6
template/css/default.less

@@ -470,16 +470,24 @@ h3,
 }
 
 .bx-def-gal-img-column {
-    .column-width(@bx-size-gallery-img-width);
+    .column-width-raw(100%);
 }
 .bx-def-gal-img-size {
-    .width(@bx-size-gallery-img-width);
-    .height(@bx-size-gallery-img-height);    
+    max-width:100%;
+    height:auto;
+}
+.bx-def-gal-div-size {
+    max-width:100%;
+    .min-height(@bx-size-gallery-img-height);
 }
 .bx-def-gal-unit-column {
-    .column-width(@bx-size-gallery-unit-width);
+    .column-width-raw(100%);
 }
 .bx-def-gal-unit-size {
-    .width(@bx-size-gallery-unit-width);
-    .height(@bx-size-gallery-unit-height);
+    display:inline-block;
+    width:33.3%;
+    height:auto;
+    vertical-align:top;
+    overflow:hidden;
+    .box-sizing();
 }