Browse Source

For table bbcode

Visman 2 years ago
parent
commit
09afbdfc87
3 changed files with 41 additions and 18 deletions
  1. 8 8
      app/config/defaultBBCode.php
  2. 16 10
      public/style/ForkBB/sccontent.css
  3. 17 0
      public/style/ForkBB/style.css

+ 8 - 8
app/config/defaultBBCode.php

@@ -467,7 +467,7 @@ foreach ($attrs as $key => $val) {
     $attr .= " {$key}=\"{$val}\"";
     $attr .= " {$key}=\"{$val}\"";
 }
 }
 
 
-return "</p><table{$attr}>{$body}</table><p>";
+return "</p><table class=\"f-bb-table\"{$attr}>{$body}</table><p>";
 HANDLER,
 HANDLER,
     ],
     ],
     [
     [
@@ -485,7 +485,7 @@ foreach ($attrs as $key => $val) {
     $attr .= " {$key}=\"{$val}\"";
     $attr .= " {$key}=\"{$val}\"";
 }
 }
 
 
-return "<caption{$attr}><p>{$body}</p></caption>";
+return "<caption class=\"f-bb-caption\"{$attr}><p>{$body}</p></caption>";
 HANDLER,
 HANDLER,
     ],
     ],
     [
     [
@@ -504,7 +504,7 @@ foreach ($attrs as $key => $val) {
     $attr .= " {$key}=\"{$val}\"";
     $attr .= " {$key}=\"{$val}\"";
 }
 }
 
 
-return "<thead{$attr}>{$body}</thead>";
+return "<thead class=\"f-bb-thead\"{$attr}>{$body}</thead>";
 HANDLER,
 HANDLER,
     ],
     ],
     [
     [
@@ -523,7 +523,7 @@ foreach ($attrs as $key => $val) {
     $attr .= " {$key}=\"{$val}\"";
     $attr .= " {$key}=\"{$val}\"";
 }
 }
 
 
-return "<tbody{$attr}>{$body}</tbody>";
+return "<tbody class=\"f-bb-tbody\"{$attr}>{$body}</tbody>";
 HANDLER,
 HANDLER,
     ],
     ],
     [
     [
@@ -542,7 +542,7 @@ foreach ($attrs as $key => $val) {
     $attr .= " {$key}=\"{$val}\"";
     $attr .= " {$key}=\"{$val}\"";
 }
 }
 
 
-return "<tfoot{$attr}>{$body}</tfoot>";
+return "<tfoot class=\"f-bb-tfoot\"{$attr}>{$body}</tfoot>";
 HANDLER,
 HANDLER,
     ],
     ],
     [
     [
@@ -561,7 +561,7 @@ foreach ($attrs as $key => $val) {
     $attr .= " {$key}=\"{$val}\"";
     $attr .= " {$key}=\"{$val}\"";
 }
 }
 
 
-return "<tr{$attr}>{$body}</tr>";
+return "<tr class=\"f-bb-tr\"{$attr}>{$body}</tr>";
 HANDLER,
 HANDLER,
     ],
     ],
     [
     [
@@ -581,7 +581,7 @@ foreach ($attrs as $key => $val) {
     $attr .= " {$key}=\"{$val}\"";
     $attr .= " {$key}=\"{$val}\"";
 }
 }
 
 
-return "<th{$attr}><p>{$body}</p></th>";
+return "<th class=\"f-bb-th\"{$attr}><p>{$body}</p></th>";
 HANDLER,
 HANDLER,
     ],
     ],
     [
     [
@@ -601,7 +601,7 @@ foreach ($attrs as $key => $val) {
     $attr .= " {$key}=\"{$val}\"";
     $attr .= " {$key}=\"{$val}\"";
 }
 }
 
 
-return "<td{$attr}><p>{$body}</p></td>";
+return "<td class=\"f-bb-td\"{$attr}><p>{$body}</p></td>";
 HANDLER,
 HANDLER,
     ],
     ],
     [
     [

+ 16 - 10
public/style/ForkBB/sccontent.css

@@ -1,4 +1,3 @@
-/*! SCEditor | (C) 2011-2013, Sam Clarke | sceditor.com/license */
 html,
 html,
 body,
 body,
 a,
 a,
@@ -135,15 +134,6 @@ ul {
   padding-inline-start: 1.5rem;
   padding-inline-start: 1.5rem;
 }
 }
 
 
-table, td {
-  border: 1px dotted #000;
-  empty-cells: show;
-}
-
-table td {
-  min-width: 5px;
-}
-
 code {
 code {
   display: block;
   display: block;
   white-space: pre;
   white-space: pre;
@@ -179,3 +169,19 @@ a {
 a:hover, a:focus {
 a:hover, a:focus {
   background-color: #D3B58D;
   background-color: #D3B58D;
 }
 }
+
+table {
+  border-collapse: collapse;
+  border: 0.0625rem solid #333333;
+}
+
+td, th {
+  border: 0.0625rem solid #333333;
+  empty-cells: show;
+  padding: 0.3125rem;
+  min-width: 1rem;
+}
+
+th {
+  background-color: #D3B58D;
+}

+ 17 - 0
public/style/ForkBB/style.css

@@ -1680,6 +1680,23 @@ body,
   text-decoration: underline;
   text-decoration: underline;
 }
 }
 
 
+#fork .f-bb-table {
+  border-collapse: collapse;
+  border: 0.0625rem solid #333333;
+}
+
+#fork .f-bb-td,
+#fork .f-bb-th {
+  border: 0.0625rem solid #333333;
+  empty-cells: show;
+  padding: 0.3125rem;
+  min-width: 1rem;
+}
+
+#fork .f-bb-th {
+  background-color: #D3B58D;
+}
+
 #fork .f-bb-size1 {
 #fork .f-bb-size1 {
   font-size: xx-small;
   font-size: xx-small;
 }
 }