Browse Source

Colored svg icons for admin and active fields, new icon

Vova Tkach 6 years ago
parent
commit
d111e5cf25
4 changed files with 14 additions and 2 deletions
  1. 11 0
      assets/cp.styles.css
  2. 0 0
      assets/cp.styles.css.go
  3. 1 0
      assets/sys.svg.icon.go
  4. 2 2
      engine/builder/builder.go

+ 11 - 0
assets/cp.styles.css

@@ -221,6 +221,17 @@ body.cp .wrap .sidebar.sidebar-left ul.nav li.nav-item svg.sicon {
 	margin-right: 5px;
 }
 
+/* SVG colors */
+.svg-green svg {
+	fill: currentColor;
+	color: #28a745;
+}
+
+.svg-red svg {
+	fill: currentColor;
+	color: #cb2431;
+}
+
 /* Admin table */
 .data-table.table-hover tbody tr:hover {
 	background-color: #fffbdf;

File diff suppressed because it is too large
+ 0 - 0
assets/cp.styles.css.go


+ 1 - 0
assets/sys.svg.icon.go

@@ -10,3 +10,4 @@ var SysSvgIconRemove = `<svg viewBox="0 0 16 16" width="16" height="16" class="s
 var SysSvgIconChecked = `<svg viewBox="0 0 16 16" width="16" height="16" class="sicon" version="1.1"><path fill-rule="evenodd" d="M12 5l-8 8-4-4 1.5-1.5L4 10l6.5-6.5L12 5z"></path></svg>`
 var SysSvgIconDot = `<svg viewBox="0 0 16 16" width="16" height="16" class="sicon" version="1.1"><path fill-rule="evenodd" d="M0 8c0-2.2 1.8-4 4-4s4 1.8 4 4-1.8 4-4 4-4-1.8-4-4z"></path></svg>`
 var SysSvgIconAlert = `<svg viewBox="0 0 16 16" width="16" height="16" class="sicon" version="1.1"><path fill-rule="evenodd" d="M8.893 1.5c-.183-.31-.52-.5-.887-.5s-.703.19-.886.5L.138 13.499a.98.98 0 0 0 0 1.001c.193.31.53.501.886.501h13.964c.367 0 .704-.19.877-.5a1.03 1.03 0 0 0 .01-1.002L8.893 1.5zm.133 11.497H6.987v-2.003h2.039v2.003zm0-3.004H6.987V5.987h2.039v4.006z"></path></svg>`
+var SysSvgIconError = `<svg viewBox="0 0 16 16" width="16" height="16" class="sicon" version="1.1"><path fill-rule="evenodd" d="M7.48 8l3.75 3.75-1.48 1.48L6 9.48l-3.75 3.75-1.48-1.48L4.52 8 .77 4.25l1.48-1.48L6 6.52l3.75-3.75 1.48 1.48L7.48 8z"></path></svg>`

+ 2 - 2
engine/builder/builder.go

@@ -6,7 +6,7 @@ import (
 
 func CheckBox(value int) string {
 	if value > 0 {
-		return assets.SysSvgIconChecked
+		return `<span class="svg-green">` + assets.SysSvgIconChecked + `</span>`
 	}
-	return assets.SysSvgIconAlert
+	return `<span class="svg-red">` + assets.SysSvgIconError + `</span>`
 }

Some files were not shown because too many files changed in this diff