Skip to content

Commit

Permalink
Improve style (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
afreismuth-ippon authored Oct 16, 2024
1 parent 40defe7 commit 1ae9403
Show file tree
Hide file tree
Showing 22 changed files with 116 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/atom/_atom.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@use 'paragraph/paragraph';
@use 'title/title';
4 changes: 3 additions & 1 deletion src/atom/atom.pug
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ block content
.tikui-vertical-spacing--line
include /documentation/atomic-design/quote/atom
.tikui-vertical-spacing--line
// Atoms componentDoc
include:componentDoc(height=100) paragraph/paragraph.md
.tikui-vertical-spacing--line
include:componentDoc(height=100) title/title.md
6 changes: 6 additions & 0 deletions src/atom/paragraph/_paragraph.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.paragraph {
margin: 1rem 0;
font-family: sans-serif;
font-size: 2rem;
color: #223344;
}
3 changes: 3 additions & 0 deletions src/atom/paragraph/paragraph.code.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include paragraph.mixin.pug

+paragraph My paragraph
1 change: 1 addition & 0 deletions src/atom/paragraph/paragraph.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Paragraph
3 changes: 3 additions & 0 deletions src/atom/paragraph/paragraph.mixin.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mixin paragraph
p.paragraph
block
4 changes: 4 additions & 0 deletions src/atom/paragraph/paragraph.render.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
extends /layout

block body
include paragraph.code.pug
8 changes: 8 additions & 0 deletions src/atom/title/_title.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.title {
margin: 0;
color: #234;
margin-bottom: 3rem;
text-align: center;
font-size: 4rem;
font-family: sans-serif;
}
3 changes: 3 additions & 0 deletions src/atom/title/title.code.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include title.mixin.pug

+title My title
1 change: 1 addition & 0 deletions src/atom/title/title.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Title
3 changes: 3 additions & 0 deletions src/atom/title/title.mixin.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mixin title
h1.title
block
4 changes: 4 additions & 0 deletions src/atom/title/title.render.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
extends /layout

block body
include title.code.pug
8 changes: 8 additions & 0 deletions src/head.mixin.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
mixin head
head
meta(charset='utf-8')
block title
title Mon site web
link(rel='icon' type='image/png' href='[[TIKUI_BASEPATH]]favicon.png')
link(href='[[TIKUI_BASEPATH]]tikui.css' rel='stylesheet')

16 changes: 14 additions & 2 deletions src/index.pug
Original file line number Diff line number Diff line change
@@ -1,2 +1,14 @@
block body
p Bonjour
include /head.mixin.pug
include /atom/title/title.mixin.pug
include /atom/paragraph/paragraph.mixin.pug
include /template/layout/layout.mixin.pug

doctype html
html(lang='fr')
+head
body
+layout
+title Mon site web à déployer
+paragraph Mon site web fonctionne bien en local et j'en suis fier 💪
+paragraph Pendant ce live, voyons comment le déployer !
:reload
1 change: 1 addition & 0 deletions src/template/_template.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@use 'layout/layout';
35 changes: 35 additions & 0 deletions src/template/layout/_layout.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
$layout-padding: 1vw;
$layout-large-horizontal-padding: 3vw;
$layout-large-content: 75vw;

@media screen {
.layout {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
padding: $layout-padding;
overflow: auto;
}
}

@media screen and (min-width: 1200px) {
.layout {
background-color: #fff;
padding: 0;

&--content {
box-sizing: border-box;
margin: 0 auto;
border-width: 2px;
border-top-width: 0;
border-bottom-width: 0;
border-style: solid;
border-color: #234;
padding: $layout-padding $layout-large-horizontal-padding;
width: $layout-large-content + 2 * $layout-large-horizontal-padding;
min-height: 100vh;
}
}
}
3 changes: 3 additions & 0 deletions src/template/layout/layout.code.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
include layout.mixin.pug

+layout Layout
1 change: 1 addition & 0 deletions src/template/layout/layout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
## Layout
5 changes: 5 additions & 0 deletions src/template/layout/layout.mixin.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mixin layout
.layout
.layout--content
block

4 changes: 4 additions & 0 deletions src/template/layout/layout.render.pug
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
extends /layout

block body
include layout.code.pug
3 changes: 2 additions & 1 deletion src/template/template.pug
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ block content
.tikui-vertical-spacing--line
include /documentation/atomic-design/quote/template
.tikui-vertical-spacing--line
// Templates componentDoc
include:templateDoc layout/layout.md

3 changes: 2 additions & 1 deletion src/tikui.scss
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
// stylelint-disable-line no-empty-source
@use 'atom/atom';
@use 'template/template';

0 comments on commit 1ae9403

Please sign in to comment.