nitweb: split css files
authorAlexandre Terrasa <alexandre@moz-code.org>
Fri, 9 Jun 2017 05:49:29 +0000 (01:49 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Fri, 9 Jun 2017 17:56:45 +0000 (13:56 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

share/nitweb/index.html
share/nitweb/stylesheets/cards.css [new file with mode: 0644]
share/nitweb/stylesheets/nitlight.css [new file with mode: 0644]
share/nitweb/stylesheets/nitweb.css
share/nitweb/stylesheets/nitweb_bootstrap.css
share/nitweb/stylesheets/search.css [new file with mode: 0644]

index 138955b..fe80e63 100644 (file)
                        type='text/css' rel='stylesheet'>
 
 
-               <link href='/stylesheets/nitweb_bootstrap.css' rel='stylesheet'>
-               <link href='/stylesheets/nitweb.css' rel='stylesheet'>
+               <link rel='stylesheet' href='/stylesheets/nitweb_bootstrap.css'>
+               <link rel='stylesheet' href='/stylesheets/nitweb.css'>
+               <link rel='stylesheet' href='/stylesheets/nitlight.css'>
+               <link rel='stylesheet' href='/stylesheets/search.css'>
+               <link rel='stylesheet' href='/stylesheets/cards.css'>
 
                <script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.4.4/d3.min.js"></script>
                <script src="/vendors/d3pie.min.js"></script>
diff --git a/share/nitweb/stylesheets/cards.css b/share/nitweb/stylesheets/cards.css
new file mode 100644 (file)
index 0000000..0d39859
--- /dev/null
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2017 Alexandre Terrasa <alexandre@moz-code.org>.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* cards */
+
+.card.active {
+       border: 1px solid #1E9431;
+}
+
+.card-heading {
+    margin-top: 0;
+    margin-bottom: 5px;
+}
+
+.card {
+       display: table;
+       width: 100%;
+       background: #fff;
+       border: 1px solid #ccc;
+       margin-top: 10px;
+       box-shadow: 0 -1px 0 #e5e5e5,0 0 2px rgba(0,0,0,.12),0 2px 4px rgba(0,0,0,.24);
+}
+
+.card-body, .card-left, .card-right {
+       display: table-cell;
+       padding: 15px;
+}
+
+.card-body {
+       padding: 15px 0;
+       width: 100%
+}
+
+.card-body:first-child {
+       padding-left: 15px;
+}
+
+.card-body:last-child {
+       padding-right: 15px;
+}
+
+.card-list {
+       margin-top: 10px;
+}
+
+.card-list > .card:first-child {
+       border-top: 1px solid #ccc;
+}
+
+.card-list > .card {
+       margin-top: 0;
+       border-top: none;
+}
+
+.card-title {
+    margin-top: 0;
+}
diff --git a/share/nitweb/stylesheets/nitlight.css b/share/nitweb/stylesheets/nitlight.css
new file mode 100644 (file)
index 0000000..63a1356
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2017 Alexandre Terrasa <alexandre@moz-code.org>.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * Code Highlighting
+ */
+
+.nitdoc h1, .nitdoc h2, .nitdoc h3, .nitdoc h4, .nitdoc h5, .nitdoc h6 {
+       color: #333;
+}
+
+.nitdoc .synopsys {
+       margin-top: 0;
+}
+
+.nitcode a { color: inherit; text-decoration: inherit; } /* hide links */
+.nitcode a:hover { text-decoration: underline; } /* underline links */
+.nitcode span[title]:hover { text-decoration: underline; } /* underline titles */
+/* lexical raw tokens. independent of usage or semantic: */
+.nitcode .nc_c { color: gray; font-style: italic; } /* comment */
+.nitcode .nc_d { color: #3D8127; font-style: italic; } /* documentation comments */
+.nitcode .nc_k { font-weight: bold; } /* keyword */
+.nitcode .nc_o {} /* operator */
+.nitcode .nc_i {} /* standard identifier */
+.nitcode .nc_t { color: #445588; font-weight: bold; } /* type/class identifier */
+.nitcode .nc_a { color: #445588; font-style: italic; } /* old style attribute identifier */
+.nitcode .nc_l { color: #009999; } /* char and number literal */
+.nitcode .nc_s { color: #8F1546; } /* string literal */
+/* syntactic token usage. added because of their position in the AST */
+.nitcode .nc_ast { color: blue; } /* assert label */
+.nitcode .nc_la { color: blue; } /* break/continue label */
+.nitcode .nc_m { color: #445588; } /* module name */
+/* syntactic groups */
+.nitcode .nc_def { font-weight: bold; color: blue; } /* name used in a definition */
+.nitcode .nc_def.nc_a { color: blue; } /* name used in a attribute definition */
+.nitcode .nc_def.nc_t { color: blue; } /* name used in a class or vt definition */
+.nitcode .nc_ss { color: #9E6BEB; } /* superstrings */
+.nitcode .nc_cdef {} /* A whole class definition */
+.nitcode .nc_pdef {} /* A whole property definition */
+/* semantic token usage */
+.nitcode .nc_v { font-style: italic; } /* local variable or parameter */
+.nitcode .nc_vt { font-style: italic; } /* virtual type or formal type */
+.nitcode .nc_error { border: 1px red solid;} /* not used */
index b78f244..864c296 100644 (file)
@@ -1,3 +1,38 @@
+/*
+ * Copyright 2017 Alexandre Terrasa <alexandre@moz-code.org>.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* utils */
+
+.no-margin {
+       margin: 0;
+}
+
+.no-padding {
+       padding: 0;
+}
+
+.navbar-fixed-top {
+       background-color: #1E9431;
+       box-shadow: 0 0 4px rgba(0,0,0,.14),0 4px 8px rgba(0,0,0,.28);
+}
+
+#loading-bar .bar {
+       background: #FF8100;
+}
+
 /* Body */
 
 body {
@@ -14,70 +49,11 @@ a {
        cursor: pointer;
 }
 
-.nitdoc h1, .nitdoc h2, .nitdoc h3, .nitdoc h4, .nitdoc h5, .nitdoc h6 {
-       color: #333;
-}
-
 .page-header {
     margin-top: 0;
     border: none;
 }
 
-/* cards */
-
-.card.active {
-       border: 1px solid #1E9431;
-}
-
-.card-heading {
-    margin-top: 0;
-    margin-bottom: 5px;
-}
-
-.card {
-       display: table;
-       width: 100%;
-       background: #fff;
-       border: 1px solid #ccc;
-       margin-top: 10px;
-       box-shadow: 0 -1px 0 #e5e5e5,0 0 2px rgba(0,0,0,.12),0 2px 4px rgba(0,0,0,.24);
-}
-
-.card-body, .card-left, .card-right {
-       display: table-cell;
-       padding: 15px;
-}
-
-.card-body {
-       padding: 15px 0;
-       width: 100%
-}
-
-.card-body:first-child {
-       padding-left: 15px;
-}
-
-.card-body:last-child {
-       padding-right: 15px;
-}
-
-.card-list {
-       margin-top: 10px;
-}
-
-.card-list > .card:first-child {
-       border-top: 1px solid #ccc;
-}
-
-.card-list > .card {
-       margin-top: 0;
-       border-top: none;
-}
-
-.card-title {
-    margin-top: 0;
-}
-
 /* ui */
 
 .btn-bar { margin-top: -5px; float: right }
@@ -173,57 +149,10 @@ entity-list:hover .btn-filter {
        cursor: pointer;
 }
 
-/* loading bar */
-
-#loading-bar .bar {
-       background: #FF8100;
-}
-
 /* navs */
 
 .nav-tabs li { cursor: pointer; }
 
-.navbar-fixed-top {
-       background-color: #1E9431;
-       box-shadow: 0 0 4px rgba(0,0,0,.14),0 4px 8px rgba(0,0,0,.28);
-}
-
-.navbar-fixed-top .form-control:hover, .navbar-fixed-top .form-control:focus {
-       background: rgba(255, 255, 255, 0.2);
-}
-
-.navbar-fixed-top .form-control {
-       background: rgba(255, 255, 255, 0.1);
-    border: none;
-    color: #fff;
-    box-shadow: none;
-}
-
-.navbar-fixed-top .form-control-icon {
-       color: #fff;
-}
-
-.navbar-fixed-top *::-webkit-input-placeholder {
-    color: #fff;
-}
-.navbar-fixed-top *:-moz-placeholder {
-    /* FF 4-18 */
-    color: #fff;
-}
-.navbar-fixed-top *::-moz-placeholder {
-    /* FF 19+ */
-    color: #fff;
-}
-.navbar-fixed-top *:-ms-input-placeholder {
-    /* IE 10+ */
-    color: #fff;
-}
-
-.navbar-fixed-top .form-group {
-       margin-top: 8px;
-       margin-bottom: 0px;
-}
-
 /* Summary */
 
 .summary h1, .summary h2, .summary h3, .summary h4, .summary h5, .summary h6 {
@@ -260,49 +189,3 @@ entity-list:hover .btn-filter {
 .star.active {
        color: #FFC000
 }
-
-/*
- * Users
- */
-
-.avatar {
-       border-radius: 2px;
-}
-
-.avatar-icon {
-       width: 18px;
-       height: 18px;
-}
-
-/*
- * Code Highlighting
- */
-
-.nitcode a { color: inherit; text-decoration: inherit; } /* hide links */
-.nitcode a:hover { text-decoration: underline; } /* underline links */
-.nitcode span[title]:hover { text-decoration: underline; } /* underline titles */
-/* lexical raw tokens. independent of usage or semantic: */
-.nitcode .nc_c { color: gray; font-style: italic; } /* comment */
-.nitcode .nc_d { color: #3D8127; font-style: italic; } /* documentation comments */
-.nitcode .nc_k { font-weight: bold; } /* keyword */
-.nitcode .nc_o {} /* operator */
-.nitcode .nc_i {} /* standard identifier */
-.nitcode .nc_t { color: #445588; font-weight: bold; } /* type/class identifier */
-.nitcode .nc_a { color: #445588; font-style: italic; } /* old style attribute identifier */
-.nitcode .nc_l { color: #009999; } /* char and number literal */
-.nitcode .nc_s { color: #8F1546; } /* string literal */
-/* syntactic token usage. added because of their position in the AST */
-.nitcode .nc_ast { color: blue; } /* assert label */
-.nitcode .nc_la { color: blue; } /* break/continue label */
-.nitcode .nc_m { color: #445588; } /* module name */
-/* syntactic groups */
-.nitcode .nc_def { font-weight: bold; color: blue; } /* name used in a definition */
-.nitcode .nc_def.nc_a { color: blue; } /* name used in a attribute definition */
-.nitcode .nc_def.nc_t { color: blue; } /* name used in a class or vt definition */
-.nitcode .nc_ss { color: #9E6BEB; } /* superstrings */
-.nitcode .nc_cdef {} /* A whole class definition */
-.nitcode .nc_pdef {} /* A whole property definition */
-/* semantic token usage */
-.nitcode .nc_v { font-style: italic; } /* local variable or parameter */
-.nitcode .nc_vt { font-style: italic; } /* virtual type or formal type */
-.nitcode .nc_error { border: 1px red solid;} /* not used */
index e82732b..cff83cb 100644 (file)
@@ -330,7 +330,7 @@ hr {
   margin-top: 20px;\r
   margin-bottom: 20px;\r
   border: 0;\r
-  border-top: 1px solid #eeeeee;\r
+  border-top: 1px solid #ddd;\r
 }\r
 .sr-only {\r
   position: absolute;\r
diff --git a/share/nitweb/stylesheets/search.css b/share/nitweb/stylesheets/search.css
new file mode 100644 (file)
index 0000000..2f6e2db
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * Copyright 2017 Alexandre Terrasa <alexandre@moz-code.org>.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* search */
+
+.has-icon {
+    position: relative;
+}
+
+.has-icon .form-control {
+       padding-left: 35px;
+}
+
+.form-control-icon {
+    position: absolute;
+    top: 0;
+    left: 0;
+    z-index: 2;
+    display: block;
+    width: 34px;
+    height: 34px;
+    line-height: 34px;
+    text-align: center;
+    pointer-events: none;
+}
+
+.navbar-fixed-top .form-control:hover, .navbar-fixed-top .form-control:focus {
+       background: rgba(255, 255, 255, 0.2);
+}
+
+.navbar-fixed-top .form-control {
+       background: rgba(255, 255, 255, 0.1);
+    border: none;
+    color: #fff;
+    box-shadow: none;
+}
+
+.navbar-fixed-top .form-control-icon {
+       color: #fff;
+}
+
+.navbar-fixed-top .form-group {
+       margin-top: 8px;
+       margin-bottom: 0px;
+}
+
+.navbar-fixed-top *::-webkit-input-placeholder { color: #fff; }
+.navbar-fixed-top *:-moz-placeholder { color: #fff; }
+.navbar-fixed-top *::-moz-placeholder { color: #fff; }
+.navbar-fixed-top *:-ms-input-placeholder { color: #fff; }