Przeglądaj źródła

Merge branch 'master' of https://github.com/unaio/una

AntonLV 4 lat temu
rodzic
commit
492bc68e59

+ 7 - 10
modules/boonex/artificer/data/template/bx_forum/unit_gallery.html

@@ -1,4 +1,4 @@
-<div class="__class__ bx-base-text-unit bx-forum-unit bx-base-text-unit-gallery bx-def-gal-unit-size flex flex-col w-full p-2 box-border relative">
+<div onclick="location.href='__content_url__'" class="__class__ bx-base-text-unit bx-forum-unit bx-base-text-unit-gallery bx-def-gal-unit-size flex flex-col w-full p-2 box-border relative inline-block cursor-pointer">
     <div class="grid grid-cols-1">
         <div class="bx-base-text-unit-cnt rounded-lg ring-1 ring-gray-200 dark:ring-gray-700 overflow-hidden bg-white dark:bg-gray-800 row-start-1 col-start-1" >
             <bx_if:thumb>
@@ -15,17 +15,14 @@
             </bx_if:no_thumb>
         </div>
         <div class="flex flex-col m-4 justify-between row-start-1 col-start-1 items-start">
-            <div class="bx-forum-category rounded-lg bg-gray-100 py-1 px-2 ">
-                <div class="bx-forum-icon bx-def-margin-sec-right ">__category_icon__</div>
-                <div>__category__</div>
-            </div>
-            <div class="bx-base-text-unit-text box-border bottom-0 max-w-full">
+            
+            <div class="bx-base-text-unit-text box-border bottom-0 max-w-full h-full justify-between flex flex-col">
                 <div class="bx-base-text-unit-title flex items-center text-left mb-2">
-                    <a href="__content_url__" class="text-ellipsis whitespace-nowrap overflow-hidden text-xl font-bold text-white group-hover:text-gray-900 dark:group-hover:text-white">__title__</a>
-                </div>
-                <div class="bx-base-text-unit-info">
-                    __author__
+                    <a href="__content_url__" class="text-ellipsis text-xl font-bold text-white group-hover:text-gray-900 dark:group-hover:text-white">__title__</a>
                 </div>
+               <div class="bx-base-text-unit-info text-xs">
+                    <bx_if:meta><div class="bx-base-general-unit-meta pb-2">__meta__</div></bx_if:meta>
+               </div>
             </div>
         </div>
     </div>

+ 3 - 4
modules/boonex/artificer/data/template/system/css/forms.css

@@ -262,18 +262,17 @@ import url(../../../../../../../template/css/forms.css);
 /*--- Form field: Auto-siggestion ---*/
 .bx-form-value .bx-form-input-autotoken:not(.bx-form-input-labels) {
     float:left;
-    padding: 0.25rem 0;
+    padding: 2px 0;
     height:auto;
     box-shadow: none;
-    min-height: 2.8rem;
+    min-height: 2.375rem;
 }
 .bx-form-value .bx-form-input-autotoken:not(.bx-form-input-labels) b {
     display: block;
-    margin: 0.25rem;
     padding-right: 1.5rem;
     border-radius: 1.25rem;
 
-    line-height: 2.5rem;
+    line-height: 2rem;
     white-space: nowrap;
     font-weight: normal;    
     cursor: pointer;

+ 1 - 1
modules/boonex/forum/template/category_list.html

@@ -1,6 +1,6 @@
 <div class="bx-category-list">
     <bx_repeat:cats>
-        <div class="bx-category-list-item bx-forum-category-list-item __class__ rounded-lg bx-def-padding-sec">
+        <div class="bx-category-list-item bx-forum-category-list-item __class__ rounded-lg bx-def-padding-sec hover:bg-gray-100 hover:text-gray-700 dark:hover:bg-gray-700 dark:hover:text-gray-100">
             <a href="__url__"><div class="bx-forum-icon bx-def-margin-sec-right">__icon__</div> __name__ (__num__)</a> 
         </div>
     </bx_repeat:cats>

+ 25 - 4
modules/boonex/forum/template/css/main.css

@@ -363,7 +363,11 @@
     border-bottom: 1px solid #F4F4F5
 }
 .dark #bx-grid-table-bx_forum tr{
-    border-bottom: 1px solid rgb(55 65 81);
+    border-bottom: 1px solid rgb(31 41 55);
+}
+.bx-grid-table-cell-participants .sys-action-counter-iconset .ml-2
+{
+    display: none;
 }
 .bx-grid-table-cell-participants .cmt-counter{
     float: right;
@@ -465,7 +469,7 @@
     color:rgb(107,114,128) !important;
 }
 .bx-forum-unit .bx-base-text-unit-no-thumb{
-    background: url("data:image/svg+xml,%3Csvg width='32' height='26' viewBox='0 0 32 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M14 0v3.994C14 7.864 10.858 11 7 11c-3.866 0-7-3.138-7-7.006V0h2v4.005C2 6.765 4.24 9 7 9c2.756 0 5-2.236 5-4.995V0h2zm0 26v-5.994C14 16.138 10.866 13 7 13c-3.858 0-7 3.137-7 7.006V26h2v-6.005C2 17.235 4.244 15 7 15c2.76 0 5 2.236 5 4.995V26h2zm2-18.994C16 3.136 19.142 0 23 0c3.866 0 7 3.138 7 7.006v9.988C30 20.864 26.858 24 23 24c-3.866 0-7-3.138-7-7.006V7.006zm2-.01C18 4.235 20.244 2 23 2c2.76 0 5 2.236 5 4.995v10.01C28 19.765 25.756 22 23 22c-2.76 0-5-2.236-5-4.995V6.995z' fill='%230694A2' fill-opacity='0.4' fill-rule='evenodd'/%3E%3C/svg%3E"), linear-gradient(90deg, #3F83F8 0%, #0694A2 100%);
+    background: url("data:image/svg+xml,%3Csvg width='16' height='20' viewBox='0 0 16 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%239C92AC' fill-opacity='0.4' fill-rule='evenodd'%3E%3Cpath d='M8 0v20L0 10M16 0v10L8 0M16 10v10H8'/%3E%3C/g%3E%3C/svg%3E"), linear-gradient(90deg, #3F83F8 0%, #0694A2 100%);
     text-align: left;
     color:#fff;
     border-radius: 7px 7px 0 0;
@@ -486,7 +490,7 @@
 #bx-forum-snippet-meta-main{
     overflow: hidden;
     display: flex;
-    flex-wrap: nowrap;
+    grid-row-gap: 0.5rem;
 }
 .bx-forum-unit.bx-base-text-unit-gallery .bx-base-text-unit-info .bx-base-pofile-unit A,
 .bx-forum-unit.bx-base-text-unit-gallery .bx-base-text-unit-title A{
@@ -499,6 +503,24 @@
     margin-bottom: 0px;
     margin-right: 0px;
 }
+.bx-base-unit-showcase.bx-forum-unit{
+    display: inline-block;
+}
+/* one item */
+.bx-base-unit-showcase-wrapper .bx-forum-unit:first-child:nth-last-child(1) {
+    width: 100% !important;
+}
+/* two items */
+.bx-base-unit-showcase-wrapper .bx-forum-unit:first-child:nth-last-child(2),
+.bx-base-unit-showcase-wrapper .bx-forum-unit:first-child:nth-last-child(2) ~ .bx-forum-unit {
+    width: 50%  !important;
+}
+/* 3 items or more */
+.bx-base-unit-showcase-wrapper .bx-forum-unit:first-child:nth-last-child(3),
+.bx-base-unit-showcase-wrapper .bx-forum-unit:first-child:nth-last-child(3) ~ .bx-forum-unit {
+    width: 33.3333%;
+}
+
 /* ---------------new meta menu need to move incore*/
 
 .bx-menu-meta-icon img,
@@ -520,4 +542,3 @@
     margin-right: 0.5rem !important;
 }
 
-

+ 7 - 10
modules/boonex/forum/template/unit_gallery.html

@@ -1,4 +1,4 @@
-<div class="__class__ bx-base-text-unit bx-forum-unit bx-base-text-unit-gallery bx-def-gal-unit-size flex flex-col w-full p-2 box-border relative">
+<div onclick="location.href='__content_url__'" class="__class__ bx-base-text-unit bx-forum-unit bx-base-text-unit-gallery bx-def-gal-unit-size flex flex-col w-full p-2 box-border relative inline-block cursor-pointer">
     <div class="grid grid-cols-1">
         <div class="bx-base-text-unit-cnt rounded-lg ring-1 ring-gray-200 dark:ring-gray-700 overflow-hidden bg-white dark:bg-gray-800 row-start-1 col-start-1" >
             <bx_if:thumb>
@@ -15,17 +15,14 @@
             </bx_if:no_thumb>
         </div>
         <div class="flex flex-col m-4 justify-between row-start-1 col-start-1 items-start">
-            <div class="bx-forum-category rounded-lg bg-gray-100 py-1 px-2 ">
-                <div class="bx-forum-icon bx-def-margin-sec-right ">__category_icon__</div>
-                <div>__category__</div>
-            </div>
-            <div class="bx-base-text-unit-text box-border bottom-0 max-w-full">
+            
+            <div class="bx-base-text-unit-text box-border bottom-0 max-w-full h-full justify-between flex flex-col">
                 <div class="bx-base-text-unit-title flex items-center text-left mb-2">
-                    <a href="__content_url__" class="text-ellipsis whitespace-nowrap overflow-hidden text-xl font-bold text-white group-hover:text-gray-900 dark:group-hover:text-white">__title__</a>
-                </div>
-                <div class="bx-base-text-unit-info">
-                    __author__
+                    <a href="__content_url__" class="text-ellipsis text-xl font-bold text-white group-hover:text-gray-900 dark:group-hover:text-white">__title__</a>
                 </div>
+               <div class="bx-base-text-unit-info text-xs">
+                    <bx_if:meta><div class="bx-base-general-unit-meta pb-2">__meta__</div></bx_if:meta>
+               </div>
             </div>
         </div>
     </div>

+ 12 - 0
template/css/colors.css

@@ -58,3 +58,15 @@
 .col-gray-dark { color: #333333; } /* 26.13.13: prev val #575757; */
 .bg-col-gray-dark { background-color: #575757; }
 
+/* icons */
+.sys-icon-emoji{
+    font-weight: normal !important;
+}
+
+.sys-icon-image,
+.sys-icon-svg{
+    width: 1.5rem;
+    height: 1.5rem;
+    background-size: contain;
+    display: inline-block;
+}

+ 0 - 12
template/css/icons.css

@@ -4266,15 +4266,3 @@
 
 .sys-icon.zhihu:before, .fa-zhihu:before {
   content: "\f63f"; }
-
-/* icons */
-.sys-icon-emoji{
-    font-weight: normal !important;
-}
-.sys-icon-image,
-.sys-icon-svg{
-    width: 1.5rem;
-    height: 1.5rem;
-    background-size: contain;
-    display: inline-block;
-}

+ 5 - 0
template/css/score.css

@@ -46,6 +46,11 @@ div.bx-score-counter-holder {
     line-height: 1.25rem;
 }
 
+.bx-score-counter-holder{
+    min-width: 40px !important;
+    text-align: center;
+}
+
 .bx-score-button .bx-score-element-holder,
 .bx-score-button .bx-score-counter-holder {
     line-height: 36px;

+ 1 - 1
template/score_element_inline.html

@@ -4,7 +4,7 @@
             <span class="sys-action-element-holder __style_prefix__-element-holder __style_prefix__-eh-up relative inline-flex items-center px-2 py-1 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:z-10 focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 dark:bg-gray-800 dark:hover:bg-gray-700 dark:text-gray-300 dark:border-gray-700">__do_vote__</span>
         </bx_if:show_do_vote_up>
         <bx_if:show_counter>
-            <span class="sys-action-counter-holder __style_prefix__-counter-holder -ml-px relative inline-flex items-center px-2 py-1 border border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:z-10 focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 dark:bg-gray-800 dark:hover:bg-gray-700 dark:text-gray-300 dark:border-gray-700"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</span>
+            <span class="sys-action-counter-holder __style_prefix__-counter-holder -ml-px relative inline-flex items-center px-2 py-1 border border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:z-10 focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 dark:bg-gray-800 dark:hover:bg-gray-700 dark:text-gray-300 dark:border-gray-700 text-center justify-center"<bx_if:show_hidden> style="display:none"</bx_if:show_hidden>>__counter__</span>
         </bx_if:show_counter>
         <bx_if:show_do_vote_down>
             <span class="sys-action-element-holder __style_prefix__-element-holder __style_prefix__-eh-down  -ml-px relative inline-flex items-center px-2 py-1 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:z-10 focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500 dark:bg-gray-800 dark:hover:bg-gray-700 dark:text-gray-300 dark:border-gray-700">__do_vote__</span>

+ 1 - 1
template/scripts/BxBaseFormView.php

@@ -1514,7 +1514,7 @@ BLAH;
                         continue;
 
                    $aTmplVarsVals[] = [
-                       'item_unit' => $oProfile->getUnit(0, array('template' => 'unit_wo_info')),
+                       'item_unit' => $oProfile->getUnit(0, ['template' => ['name' => 'unit_wo_info', 'size' => 'icon']]),
                        'item_name' => $oProfile->getDisplayName(),
                        'name' => $aInput['name'] . (isset($aInput['custom']['only_once']) && $aInput['custom']['only_once'] == 1 ? '' : '[]'),
                        'value' => $sVal

+ 1 - 1
template/unit_meta_item_ex.html

@@ -1,4 +1,4 @@
-<span class="bx-menu-meta-item-ex __class__ flex mr-2 items-center font-medium text-slate-700  bg-slate-100 py-1 px-1.5 rounded-md hover:bg-slate-200 dark:bg-gray-800 dark:hover:bg-gray-700 dark:text-gray-300">
+<span class="bx-menu-meta-item-ex __class__ flex mr-2 items-baseline font-medium text-slate-700  bg-slate-100 py-1 px-1.5 rounded-md hover:bg-slate-200 dark:bg-gray-800 dark:hover:bg-gray-700 dark:text-gray-300">
     <bx_if:extended>
         <bx_if:a>
             <a href ='__link__' class="flex items-center">