This is an automated email from the ASF dual-hosted git repository.

jeb pushed a commit to branch SLING-7858
in repository 
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git


The following commit(s) were added to refs/heads/SLING-7858 by this push:
     new 44bc9ee  re-added grid for login
44bc9ee is described below

commit 44bc9eef82241b245fa507968f8134a00dea3816
Author: JE Bailey <[email protected]>
AuthorDate: Tue Aug 28 12:58:13 2018 -0400

    re-added grid for login
---
 ui/src/main/frontend/src/scss/_grid.scss           | 125 +++++++++++++++++++++
 ui/src/main/frontend/src/scss/index.scss           |   1 +
 .../libs/sling-cms/components/pages/error/nav.jsp  |   2 +-
 3 files changed, 127 insertions(+), 1 deletion(-)

diff --git a/ui/src/main/frontend/src/scss/_grid.scss 
b/ui/src/main/frontend/src/scss/_grid.scss
new file mode 100644
index 0000000..8ab2e3d
--- /dev/null
+++ b/ui/src/main/frontend/src/scss/_grid.scss
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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.
+ */
+@mixin Cell ($size) {
+    // Specific sizing for cells in 5% increments.
+    .Cell {
+        @for $i from 1 through 20 {
+          &.#{$size}-#{$i*5} {
+            flex: 0 0 #{$i*5}#{'%'};
+          }
+        }
+    }
+}
+
+@mixin Fit ($size) {
+    // Proportionally space cells rather than wrapping
+    &.Fit-#{$size} {
+        >.Cell {
+            -webkit-box-flex: 1;
+            -webkit-flex: 1;
+            -ms-flex: 1;
+            flex: 1;
+        }
+    }
+}
+
+// Default grid behavior
+.Grid {
+    display: flex;
+    flex-wrap: wrap;
+    justify-content: center;
+
+    // Add gutters to a grid
+    &.Gutter {
+        margin: 0 -1rem 0 -1rem;
+        
+        >.Cell {
+            padding: 0 1rem 0 1rem;
+        }
+    }
+
+    // Grid Vertical Alignment
+    &.Align-Top {
+        align-items: flex-start;
+    }
+    &.Align-Bottom {
+        align-items: flex-end;
+    }
+    &.Align-Center {
+        align-items: center;
+    }
+
+    // Default cell behavior
+    .Cell {
+        // Cell sizing, full-width by default for responsive
+        -webkit-box-flex: 0;
+        -webkit-flex: 0 0 100%;
+        -ms-flex: 0 0 100%;
+        flex: 0 0 100%;
+
+        // Per Cell Alignment
+        &.Align-Top {
+            align-self: flex-start;
+        }
+        &.Align-Bottom {
+            align-self: flex-end;
+        }
+        &.Align-Center {
+            align-self: center;
+        }
+    }
+
+    $display-size: "Mobile";
+    @include Fit($display-size);
+    @include Cell($display-size);    
+}
+
+// Small devices (Landscape phones, 544px)
+@media (min-width: 34em) {
+    .Grid {
+        $display-size: "Small";
+        @include Fit($display-size);
+        @include Cell($display-size);
+    }
+}
+
+// Medium devices (Tablets, 768px)
+@media (min-width: 48em) { 
+    .Grid {
+        $display-size: "Medium";
+        @include Fit($display-size);
+        @include Cell($display-size);
+    }
+}
+
+// Large devices (Desktops, 992px)
+@media (min-width: 62em) { 
+    .Grid {
+        $display-size: "Large";
+        @include Cell($display-size);
+        @include Fit($display-size);
+    }
+}
+
+// Extra large devices (Large desktops, 1200px)
+@media (min-width: 75em) { 
+    .Grid {
+        $display-size: "Extra";
+        @include Cell($display-size);
+        @include Fit($display-size);
+    }
+}
\ No newline at end of file
diff --git a/ui/src/main/frontend/src/scss/index.scss 
b/ui/src/main/frontend/src/scss/index.scss
index 0edfa12..c98fdd0 100755
--- a/ui/src/main/frontend/src/scss/index.scss
+++ b/ui/src/main/frontend/src/scss/index.scss
@@ -15,3 +15,4 @@
  * limitations under the License.
  */
 @import 'fonts';
+@import 'grid';
\ No newline at end of file
diff --git 
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/error/nav.jsp 
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/error/nav.jsp
index 89c9e57..ba023a4 100644
--- 
a/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/error/nav.jsp
+++ 
b/ui/src/main/resources/jcr_root/libs/sling-cms/components/pages/error/nav.jsp
@@ -17,7 +17,7 @@
  * under the License.
  */ --%>
  <%@include file="/libs/sling-cms/global.jsp"%>
-<nav class="navbar" role="navigation" aria-label="main mavigation">
+<nav class="navbar" role="navigation" aria-label="main navigation">
 <div class="navbar-brand">
 <a class="navbar-item" href="http://sling.apache.org"; >
     <img src="/static/clientlibs/sling-cms/img/sling-logo.svg" width="100" 
alt="Apache Sling"/>

Reply via email to