mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-01-16 02:51:57 +00:00
Add horizontal view, change header layout and fix webide position problems
This commit is contained in:
parent
822b65462d
commit
5e0e55eb16
@ -1,5 +1,5 @@
|
|||||||
<app-header></app-header>
|
|
||||||
<div class="tfw-grid-main-components">
|
<div class="tfw-grid-main-components">
|
||||||
|
<div class="tfw-header"><app-header></app-header></div>
|
||||||
<div class="tfw-messages"><app-messages></app-messages></div>
|
<div class="tfw-messages"><app-messages></app-messages></div>
|
||||||
<div class="tfw-web tao-grid-top-left"><app-login></app-login></div>
|
<div class="tfw-web tao-grid-top-left"><app-login></app-login></div>
|
||||||
<div class="tfw-webide"><app-webide></app-webide></div>
|
<div class="tfw-webide"><app-webide></app-webide></div>
|
||||||
|
@ -1,29 +1,46 @@
|
|||||||
$space: 24px;
|
$space: 24px;
|
||||||
|
$small: 0.75 * $space;
|
||||||
|
|
||||||
$tao-plum-900: #272F4C;
|
|
||||||
$tao-gray-50: #FAFAFA;
|
|
||||||
|
|
||||||
$tao-navbar-height: 67px;
|
$tao-navbar-height: 67px;
|
||||||
|
|
||||||
$layout-template: "default"; // Change this to switch template
|
$tao-plum-900: #272F4C;
|
||||||
|
$tao-gray-50: #FAFAFA;
|
||||||
|
$tao-gray-100: #F2F2F2;
|
||||||
|
$tao-gray-500: #555555;
|
||||||
|
|
||||||
|
|
||||||
|
// Change this to switch template. Options: 'default', 'vraw', 'hraw'
|
||||||
|
$layout-template: 'hraw';
|
||||||
|
|
||||||
$default-layout: (
|
$default-layout: (
|
||||||
'messages': (1, 2, 1, 4),
|
'header': (1, 2, 1, 2),
|
||||||
|
'messages': (1, 2, 2, 10),
|
||||||
'webide': (4, -1, 1, -1),
|
'webide': (4, -1, 1, -1),
|
||||||
'terminal': (1, 4, 4, -1),
|
'terminal': (1, 4, 10, -1),
|
||||||
'web': (2, 4, 1, 4)
|
'web': (2, 4, 1, 10)
|
||||||
);
|
);
|
||||||
|
|
||||||
$raw-layout: (
|
$vraw-layout: (
|
||||||
'messages': (1, 2, 1, -1),
|
'header': (1, 2, 1, 2),
|
||||||
|
'messages': (1, 2, 2, -1),
|
||||||
'webide': (4, -1, 1, -1),
|
'webide': (4, -1, 1, -1),
|
||||||
'terminal': (2, 4, 1, -1),
|
'terminal': (2, 4, 1, -1),
|
||||||
'web': (),
|
'web': (),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$hraw-layout: (
|
||||||
|
'header': (1, 2, 1, -1),
|
||||||
|
'messages': (1, 2, 2, -1),
|
||||||
|
'webide': (2, -1, 1, 10),
|
||||||
|
'terminal': (2, -1, 10, -1),
|
||||||
|
'web': (),
|
||||||
|
);
|
||||||
|
|
||||||
$layout: (
|
$layout: (
|
||||||
"default": $default-layout,
|
'default': $default-layout,
|
||||||
"raw": $raw-layout
|
'vraw': $vraw-layout,
|
||||||
|
'hraw': $hraw-layout
|
||||||
);
|
);
|
||||||
|
|
||||||
@mixin position-grid-items($map, $sel) {
|
@mixin position-grid-items($map, $sel) {
|
||||||
@ -48,25 +65,38 @@ $layout: (
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tfw-grid-main-components {
|
.tfw-grid-main-components {
|
||||||
overflow-y: hidden;
|
// overflow-y: visible;
|
||||||
display: grid;
|
display: grid;
|
||||||
padding-top: $tao-navbar-height;
|
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-content: center;
|
align-content: center;
|
||||||
grid-template-columns: repeat(5, 1fr);
|
grid-template-columns: repeat(5, 1fr);
|
||||||
grid-template-rows: repeat(5, 1fr);
|
grid-template-rows: repeat(15, 1fr);
|
||||||
|
|
||||||
@include position-grid-items(map_get($layout,$layout-template),'.tfw-');
|
@include position-grid-items(map_get($layout,$layout-template),'.tfw-');
|
||||||
|
|
||||||
.tfw-web {
|
.tfw-header {
|
||||||
padding: $space;
|
padding: $small;
|
||||||
|
background-color: $tao-gray-50;
|
||||||
|
height: $tao-navbar-height;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tfw-messages {
|
.tfw-messages {
|
||||||
padding: $space;
|
padding: $space;
|
||||||
background-color: $tao-gray-50;
|
background-color: $tao-gray-50;
|
||||||
|
overflow-y: scroll;
|
||||||
|
|
||||||
|
@if ($layout-template != 'default') {
|
||||||
|
max-height: 95vmin;
|
||||||
|
}
|
||||||
|
@else {
|
||||||
|
max-height: 55vmin;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tfw-web {
|
||||||
|
padding: $space;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tfw-webide {
|
.tfw-webide {
|
||||||
@ -74,6 +104,16 @@ $layout: (
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tfw-terminal {
|
.tfw-terminal {
|
||||||
}
|
border: 1px solid $tao-plum-900;
|
||||||
|
border-left: 0;
|
||||||
|
border-right: 0;
|
||||||
|
border-bottom: 0;
|
||||||
|
|
||||||
|
.xterm .xterm-viewport {
|
||||||
|
height: 100vmin;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,4 @@
|
|||||||
<nav class="navbar navbar-default navbar-expand-md navbar-light tfw-navbar fixed-top">
|
<div class="tfw-grid-navbar tao-grid-center-center">
|
||||||
<div class="tfw-grid-navbar">
|
<img src="images/avatao_logo.svg" routerLink="/" class="tao-grid-center-left tfw-company-logo" alt="">
|
||||||
<!-- <ul class="navbar-nav tao-grid-center-right">
|
<span class="tfw-header-title">Tutorials</span>
|
||||||
<li class="nav-item tao-header-title">an</li>
|
</div>
|
||||||
</ul>-->
|
|
||||||
<img src="images/avatao_logo.svg" routerLink="/" class="tao-grid-center-left tfw-company-logo" alt="">
|
|
||||||
<ul class="navbar-nav">
|
|
||||||
<li class="nav-item tfw-header-title">Tutorials</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
|
@ -11,14 +11,6 @@ $company-logo-width: 130px;
|
|||||||
font-size: $font-size-h3;
|
font-size: $font-size-h3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tfw-navbar {
|
|
||||||
background-color: rgba(255, 255, 255, 0.96);
|
|
||||||
min-height: $tao-navbar-height;
|
|
||||||
box-shadow: 0px 1px 6px 0px #888;
|
|
||||||
margin-bottom: 12px;
|
|
||||||
border: 1px solid #e7e7e7;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tfw-grid-navbar {
|
.tfw-grid-navbar {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: $company-logo-width 1fr;
|
grid-template-columns: $company-logo-width 1fr;
|
||||||
@ -31,29 +23,3 @@ $company-logo-width: 130px;
|
|||||||
width: $company-logo-width;
|
width: $company-logo-width;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tfw-company-logo-mobile {
|
|
||||||
display: none;
|
|
||||||
width: 130px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 767px) {
|
|
||||||
.tfw-grid-navbar {
|
|
||||||
grid-template-columns: 1fr;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tfw-company-logo {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tfw-company-logo-mobile {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tfw-navbar-links {
|
|
||||||
justify-self: left !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.jumbotron {
|
|
||||||
padding: 2vh;
|
|
||||||
}
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div>
|
<div [class.deploy-blur]="deployButtonState === 'DEPLOYING'">
|
||||||
<h1>Login page</h1>
|
<h1>Login page</h1>
|
||||||
<form #loginForm="ngForm" (submit)="onSubmit()" [hidden]="submitted">
|
<form #loginForm="ngForm" (submit)="onSubmit()" [hidden]="submitted">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
@ -23,7 +23,7 @@
|
|||||||
[(ngModel)]="model.password"
|
[(ngModel)]="model.password"
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-primary">Submit</button>
|
<button type="submit" class="btn tao-btn-primary">Submit</button>
|
||||||
</form>
|
</form>
|
||||||
<div [hidden]="!submitted">
|
<div [hidden]="!submitted">
|
||||||
<p>
|
<p>
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
.deploy-blur {
|
||||||
|
filter: blur(3px);
|
||||||
|
}
|
@ -9,3 +9,4 @@
|
|||||||
<div [innerHtml]="message.message"></div>
|
<div [innerHtml]="message.message"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -9,14 +9,21 @@ $tao-blue-500: #277EEC;
|
|||||||
$tao-gray-100: #F2F2F2;
|
$tao-gray-100: #F2F2F2;
|
||||||
|
|
||||||
$tao-panel-border-radius-sm: 8px;
|
$tao-panel-border-radius-sm: 8px;
|
||||||
|
$tao-navbar-height: 67px;
|
||||||
|
|
||||||
|
|
||||||
$font-size-tiny: 12px;
|
$font-size-tiny: 12px;
|
||||||
$font-size-base: 14px;
|
$font-size-base: 14px;
|
||||||
|
|
||||||
|
|
||||||
|
.tfw-grid-header-messages {
|
||||||
|
|
||||||
|
display: grid;
|
||||||
|
grid-template-rows: $tao-navbar-height auto;
|
||||||
|
}
|
||||||
|
|
||||||
.tfw-messages-main {
|
.tfw-messages-main {
|
||||||
max-height: 50vmin;
|
|
||||||
overflow-y: scroll;
|
|
||||||
|
|
||||||
h5 {
|
h5 {
|
||||||
margin-bottom: $small;
|
margin-bottom: $small;
|
||||||
|
@ -1 +1 @@
|
|||||||
<div #xterm class="tfw-xterm mt-3 mb-3" (window:resize)="fit()"></div>
|
<div #xterm class="tfw-xterm" (window:resize)="fit()"></div>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div class="tfw-grid-container">
|
<div class="tfw-grid-webide-statusbar">
|
||||||
<div class="btn-group btn-group-sm flex-wrap tao-grid-center-left">
|
<div class="btn-group btn-group-sm flex-wrap tao-grid-center-left">
|
||||||
<button *ngFor="let file of files"
|
<button *ngFor="let file of files"
|
||||||
class="btn tfw-tab-btn"
|
class="btn tfw-tab-btn"
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
$space: 24px;
|
$space: 24px;
|
||||||
$small: 0.75 * $space;
|
$small: 0.75 * $space;
|
||||||
|
$tiny: 0.5 * $space;
|
||||||
|
|
||||||
|
$tao-navbar-height: 67px;
|
||||||
|
|
||||||
$tao-bright-green-100: #c5f2e4;
|
$tao-bright-green-100: #c5f2e4;
|
||||||
$tao-bright-green-200: #a0ead3;
|
$tao-bright-green-200: #a0ead3;
|
||||||
@ -11,14 +14,14 @@ $tao-plum-200: #BEC7F3;
|
|||||||
$tao-plum-900: #272F4C;
|
$tao-plum-900: #272F4C;
|
||||||
$tao-red-500: #FF5252;
|
$tao-red-500: #FF5252;
|
||||||
|
|
||||||
|
.tfw-grid-webide-statusbar {
|
||||||
.tfw-grid-container {
|
|
||||||
display: grid;
|
display: grid;
|
||||||
|
height: $tao-navbar-height;
|
||||||
grid-template-columns: 8fr 1fr;
|
grid-template-columns: 8fr 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tfw-ace-editor {
|
.tfw-ace-editor {
|
||||||
height: 100%;
|
height: calc(100% - 67px);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -45,7 +48,7 @@ $tao-red-500: #FF5252;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tfw-deploy-btn-group {
|
.tfw-deploy-btn-group {
|
||||||
margin: $small;
|
margin: auto $tiny;
|
||||||
|
|
||||||
.tfw-deploy-btn {
|
.tfw-deploy-btn {
|
||||||
background: $tao-bright-green-200;
|
background: $tao-bright-green-200;
|
||||||
@ -97,4 +100,3 @@ $tao-red-500: #FF5252;
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,5 +156,4 @@ $font-size-h4: floor(($font-size-base * 1.2));
|
|||||||
$font-size-h5: floor(($font-size-base * 1.1));
|
$font-size-h5: floor(($font-size-base * 1.1));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$tao-navbar-height: 67px;
|
$tao-navbar-height: 67px;
|
||||||
|
Loading…
Reference in New Issue
Block a user