+
{props.children}
diff --git a/src/components/Panels/Panel.less b/src/components/Panels/Panel.less
deleted file mode 100644
index d76c023..0000000
--- a/src/components/Panels/Panel.less
+++ /dev/null
@@ -1,10 +0,0 @@
-@import "../../styles/constants.less";
-
-.title {
- font-family: @title;
-
-}
-
-.contents {
- font-family: @text;
-}
diff --git a/src/components/Panels/Section.js b/src/components/Panels/Section.js
index 9d497a9..071cc77 100644
--- a/src/components/Panels/Section.js
+++ b/src/components/Panels/Section.js
@@ -1,15 +1,14 @@
import Split from "../Layout/Split";
-import {Fragment} from "preact";
export default function (props) {
return (
-
+
{props.title}
{props.children}
-
+
);
}
diff --git a/src/components/Rendering/Markdown.less b/src/components/Rendering/Markdown.less
index ee7249a..15aad7f 100644
--- a/src/components/Rendering/Markdown.less
+++ b/src/components/Rendering/Markdown.less
@@ -7,6 +7,6 @@
h1 {
padding-bottom: 2px;
- border-bottom: 1px solid @plusplusplus;
+ border-bottom: 1px solid fade(@fg, 15%);
}
}
diff --git a/src/index.js b/src/index.js
index 908c0d7..1b408b7 100644
--- a/src/index.js
+++ b/src/index.js
@@ -9,7 +9,6 @@ import FormButton from "./components/Forms/FormButton";
import FormInput from "./components/Forms/FormInput";
import FormRow from "./components/Forms/FormRow";
import getEventValue from "./utils/getEventValue";
-import HZero from "./components/Elements/HZero";
import ILatex from "./components/Rendering/ILatex";
import Image from "./components/Elements/Image";
import isString from "./utils/isString";
@@ -58,7 +57,6 @@ export {
FormInput,
FormRow,
getEventValue,
- HZero,
ILatex,
Image,
isString,
diff --git a/src/routes/Sample.js b/src/routes/Sample.js
index 9eef3ef..e15683e 100644
--- a/src/routes/Sample.js
+++ b/src/routes/Sample.js
@@ -30,28 +30,44 @@ export default function (props) {
- This is a default panel.
+
+ This is a default panel.
+
- This is a red panel.
+
+ This is a red panel.
+
- This is a orange panel.
+
+ This is a orange panel.
+
- This is a yellow panel.
+
+ This is a yellow panel.
+
- This is a lime panel.
+
+ This is a lime panel.
+
- This is a cyan panel.
+
+ This is a cyan panel.
+
- This is a blue panel.
+
+ This is a blue panel.
+
- This is a magenta panel.
+
+ This is a magenta panel.
+
diff --git a/src/styles/constants.less b/src/styles/constants.less
index bb46fb7..6d50573 100644
--- a/src/styles/constants.less
+++ b/src/styles/constants.less
@@ -1,7 +1,4 @@
@bg: #0d193b;
-@bg-light: #142245;
-@bg-lighter: #1c2b4f;
-@bg-lightest: #233358;
@fg: #a0ccff;
@accent: #ffffff;
@@ -9,11 +6,6 @@
@linkhover: #00ffff;
@linkactive: #a0ffff;
-@plus: fade(@fg, 5%);
-@plusplus: fade(@fg, 10%);
-@plusplusplus: fade(@fg, 15%);
-@plusplusplusplus: fade(@fg, 20%);
-
@red: #ff7d7d;
@orange: #ffbb7d;
@yellow: #ffff7d;
@@ -30,10 +22,3 @@
@warningbg: #231c00;
@errorfg: @red;
@errorbg: #330e00;
-
-@sans: "Arial", sans-serif;
-@text: "Calibri", sans-serif;
-@title: "Verdana", sans-serif;
-@mono: "Consolas", "SFMono-Regular", "Liberation Mono", "Menlo", monospace;
-
-@example: #d3a1ff;
diff --git a/src/styles/mixins.less b/src/styles/mixins.less
index fab6989..3d888ab 100644
--- a/src/styles/mixins.less
+++ b/src/styles/mixins.less
@@ -1,43 +1,24 @@
-@import "constants.less";
-
-.h(@hfg; @hbg) {
+/// A bordered item
+.bordered(@hfg; @hbg) {
color: @hfg;
background-color: @hbg;
-}
-
-.hb(@hfg; @hbg) {
- .h(@hfg; @hbg);
border: 1px solid fade(@hfg, 10%);
}
-.hh(@hfg; @hbg) {
- .hb(@hfg; @hbg);
-
+/// A hoverable element
+.hoverable(@hfg, @hbg) {
&:hover, &.hover {
background-color: overlay(fade(@hfg, 10%), @hbg);
border: 1px solid @hfg;
- color: @hfg;
- }
-
- &:active, &.active {
- background-color: overlay(fade(@accent, 20%), @hbg);
- border: 1px solid @accent;
- color: @accent;
+ color: screen(@hfg, #808080);
}
}
-.hnh(@hfg; @hbg) {
- .hb(@hfg; @hbg);
-
- &:hover, &.hover {
- background-color: @hbg;
- border: 1px solid fade(@hfg, 10%);
- color: @hfg;
- }
-
+/// A clickable element
+.clickable(@hfg, @hbg) {
&:active, &.active {
- background-color: @hbg;
- border: 1px solid fade(@hfg, 10%);
- color: @hfg;
+ background-color: overlay(rgba(255, 255, 255, 0.2), @hbg);
+ border: 1px solid white;
+ color: white;
}
}
diff --git a/src/styles/theme.less b/src/styles/theme.less
index 26e0ce5..63893ab 100644
--- a/src/styles/theme.less
+++ b/src/styles/theme.less
@@ -4,17 +4,14 @@
.bluelib {
background-color: @bg;
color: @fg;
- font-family: @sans;
+ font-family: sans-serif;
* {
box-sizing: border-box;
}
h1, h2, h3, h4, h5, h6 {
- margin-top: 4px;
- margin-bottom: 4px;
color: @accent;
- font-family: @title;
font-weight: normal;
text-align: center;
}
@@ -37,119 +34,61 @@
}
}
- img, iframe {
- max-width: 100%;
- max-height: 300px;
- border-radius: 4px;
- }
-
pre, code {
- font-family: @mono;
+ font-family: monospace;
font-size: 14px;
}
blockquote {
color: @fg;
- border-left: 3px solid @plusplusplusplus;
- background-color: @plus;
+ border-left: 3px solid fade(@fg, 20%);
+ background-color: fade(@fg, 5%);
padding: 4px 4px 4px 8px;
margin: 8px 0;
}
- input[type="text"], input[type="password"] {
- .hb(@fg; @bg);
+ input:not([type="checkbox"]):not([type="radio"]) {
+ .bordered(@fg; @bg);
border-radius: 4px;
padding: 4px;
font-size: medium;
}
- button {
- .hh(@fg, @bg);
+ button, input[type="button"], input[type="submit"] {
+ .bordered(@fg; @bg);
+
+ :not([disabled]) {
+ .hoverable(@fg; @bg);
+ .clickable(@fg; @bg);
+ }
border-radius: 4px;
padding: 4px;
font-size: medium;
}
- .ok {
- color: @okfg;
-
- input[type="text"], input[type="password"] {
- .hb(@okfg; @okbg);
- }
-
- button {
- .hh(@okfg, @okbg);
- }
- }
-
- .warning {
- color: @warningfg;
-
- input[type="text"], input[type="password"] {
- .hb(@warningfg; @warningbg);
- }
-
- button {
- .hh(@warningfg, @warningbg);
- }
- }
-
- .error {
- color: @errorfg;
-
- input[type="text"], input[type="password"] {
- .hb(@errorfg; @errorbg);
- }
-
- button {
- .hh(@errorfg; @errorbg);
- }
- }
-
- .disabled {
- color: @disabledfg;
- cursor: not-allowed;
-
- input[type="text"], input[type="password"] {
- .hb(@disabledfg; @disabledbg);
- }
-
- button {
- .hnh(@disabledfg, @disabledbg);
- }
- }
-
- input[type="text"][disabled], input[type="password"][disabled] {
- .hb(@disabledfg; @disabledbg);
- }
-
- button[disabled] {
- .hnh(@disabledfg, @disabledbg);
- }
-
hr {
- border: 1px solid @plusplusplusplus;
+ border: 1px solid fade(@fg, 20%);
margin-top: 24px;
margin-bottom: 24px;
}
table {
border-spacing: 0;
- border: 2px solid @plusplus;
- background-color: @plus;
+ border: 2px solid fade(@fg, 10%);
+ background-color: fade(@fg, 5%);
border-collapse: collapse;
thead, tbody {
th, td {
padding: 4px;
- border: 1px solid @plusplus;
+ border: 1px solid fade(@fg, 10%);
}
}
thead {
- background-color: @plusplus;
+ background-color: fade(@fg, 10%);
color: @accent;
}
}
@@ -170,7 +109,7 @@
margin: 4px 0;
padding: 4px;
font-size: smaller;
- background-color: @plus;
+ background-color: fade(@fg, 5%);
border-radius: 4px;
}
}