Browse Source

Better CP, responsive layout

Volodymyr Tkach 2 years ago
parent
commit
0f0cb12985
2 changed files with 196 additions and 0 deletions
  1. 126 0
      css/layouts/cp2/base.css
  2. 70 0
      css/layouts/cp2/example.html

+ 126 - 0
css/layouts/cp2/base.css

@@ -0,0 +1,126 @@
+body {
+	color: #1e375a;
+	position: relative;
+}
+
+header {
+	background-color: #205081;
+	color: #fff;
+	height: 56px;
+}
+
+header:before {
+	background-image: linear-gradient(45deg, #28598a 25%, transparent 0, transparent 50%, #28598a 0, #28598a 75%, transparent 0, transparent);
+	background-size: 50px 50px;
+	bottom: 0;
+	content: "";
+	height: 56px;
+	left: 0;
+	position: absolute;
+	right: 0;
+	top: 0;
+	z-index: 1;
+}
+
+header .container-fluid {
+	padding-bottom: 8px;
+	padding-top: 8px;
+	position: relative;
+	z-index: 2;
+}
+
+.sidebar .scroll,
+.content .scroll {
+	padding: 15px 0px;
+}
+
+body,
+.sidebar {
+	background-color: #eee;
+}
+
+.content {
+	background-color: #fff;
+}
+
+.sidebar-right {
+	border-top: 1px solid #d6d6d6;
+}
+
+@media (min-width: 576px) {
+	html,
+	body,
+	.container,
+	.container-fluid,
+	.row.main,
+	.content {
+		height: 100%;
+	}
+
+	body {
+		padding-top: 56px;
+	}
+
+	header {
+		left: 0;
+		position: fixed;
+		top: 0;
+		width: 100%;
+		z-index: 1;
+	}
+
+	.row.main {
+		display: block;
+	}
+
+	.sidebar {
+		clear: both;
+		float: left;
+	}
+
+	.content {
+		margin-left: 33.333333%;
+	}
+
+	.sidebar-left .scroll,
+	.content .scroll {
+		height: 100%;
+		margin: 0px -15px;
+		overflow-y: auto;
+		padding: 15px 15px;
+	}
+}
+
+@media (min-width: 768px) {
+	/* Empty */
+}
+
+@media (min-width: 992px) {
+	.row.main {
+		display: flex;
+	}
+
+	.sidebar {
+		clear: none;
+		float: none;
+	}
+
+	.content {
+		margin-left: auto;
+	}
+
+	.sidebar-right {
+		border-top: none;
+	}
+
+	.sidebar-right .scroll {
+		height: 100%;
+		margin: 0px -15px;
+		overflow-y: auto;
+		padding: 15px 15px;
+	}
+}
+
+@media (min-width: 1200px) {
+	/* Empty */
+}

+ 70 - 0
css/layouts/cp2/example.html

@@ -0,0 +1,70 @@
+<!doctype html>
+<html lang="uk">
+	<head>
+		<meta charset="utf-8" />
+		<meta name="theme-color" content="#1e375a" />
+		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
+		<title>Index</title>
+		<link rel="stylesheet" href="./../../reboot.css">
+		<link rel="stylesheet" href="./../../grid.css">
+		<link rel="stylesheet" href="./base.css">
+	</head>
+	<body class="cp">
+		<header>
+			<div class="container-fluid">
+				Header
+			</div>
+		</header>
+		<div class="container2 container-fluid">
+			<div class="row main">
+				<div class="col-12 col-sm-4 col-md-4 col-lg-3 col-xl-2 sidebar sidebar-left order-1">
+					<div class="scroll">
+						Left
+					</div>
+				</div>
+				<div class="col-12 col-sm-4 col-md-4 col-lg-3 col-xl-2 sidebar sidebar-right order-2 order-sm-12">
+					<div class="scroll">
+						Right
+					</div>
+				</div>
+				<div class="col-12 col-sm-8 col-md-8 col-lg-6 col-xl-8 content order-3">
+					<div class="scroll">
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content<br>
+						Content
+					</div>
+				</div>
+			</div>
+		</div>
+	</body>
+</html>