1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-08-30 00:59:47 +02:00

feat: Split screen

This commit is contained in:
Phuoc Nguyen
2022-09-21 13:52:09 +07:00
parent f016b79765
commit e6f6a31ca0
7 changed files with 68 additions and 141 deletions

View File

@@ -0,0 +1,8 @@
<div class="split-screen">
<div class="split-screen__half">
{% circle "md" %}
</div>
<div class="split-screen__half">
{% lines "hor", 10 %}
</div>
</div>

View File

@@ -115,6 +115,7 @@ eleventyExcludeFromCollections: true
{% pattern "Same height columns" %}{% include "patterns/same-height-columns.njk" %}{% endpattern %}
{% pattern "Sidebar" %}{% include "patterns/sidebar.njk" %}{% endpattern %}
{% pattern "Simple grid" %}{% include "patterns/simple-grid.njk" %}{% endpattern %}
{% pattern "Split screen" %}{% include "patterns/split-screen.njk" %}{% endpattern %}
</div>
</div>

36
contents/split-screen.md Normal file
View File

@@ -0,0 +1,36 @@
---
layout: layouts/post.njk
title: Split screen
description: Create a split screen with CSS flexbox
keywords: css flexbox, css layout, css split screen
---
## HTML
```html
<div class="split-screen">
<!-- Left content -->
<div class="split-screen__half">
...
</div>
<!-- Right content -->
<div class="split-screen__half">
...
</div>
</div>
```
## CSS
```css
.split-screen {
display: flex;
}
.split-screen__half {
flex: 1;
}
```
{% demo %}{% include "patterns/split-screen.njk" %}{% enddemo %}