From 71113c2481c70cb94eced9587929c19df169afbd Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Mon, 11 Nov 2019 13:12:52 +0100 Subject: [PATCH] :art: Update --- custom.css | 8 ++++++++ docs/Overview/README.mdr | 2 ++ docs/README.mdr | 2 +- docs/Reference/Types/Unions.mdr | 12 ++++++++++++ scripts/deploy.sh | 2 +- scripts/mdr2mdbook.sh | 7 +++---- 6 files changed, 27 insertions(+), 6 deletions(-) diff --git a/custom.css b/custom.css index d5170b1c..a4532723 100644 --- a/custom.css +++ b/custom.css @@ -15,3 +15,11 @@ footer { font-size: small; font-style: italic; } + +.zoom { + transition: transform .2s; /* Animation */ +} + +.zoom:hover { + transform: scale(1.5); /* (150% zoom - Note: if the zoom is too large, it will go outside of the viewport) */ +} diff --git a/docs/Overview/README.mdr b/docs/Overview/README.mdr index 07dd0c5c..3b158d40 100644 --- a/docs/Overview/README.mdr +++ b/docs/Overview/README.mdr @@ -1 +1,3 @@ # Overview + + diff --git a/docs/README.mdr b/docs/README.mdr index 670a1ff4..89e44d0c 100644 --- a/docs/README.mdr +++ b/docs/README.mdr @@ -15,7 +15,7 @@ Here is the piece of code you're waiting for :tada:: ## (Bag of) Features * [single inheritance](https://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming)#Design_constraints) * typedef (function pointers and type aliases) - * enums and unions + * [enums](Reference/Types/Enums.html) and [unions](Reference/Types/Unions.html) * templates (both class and functions) * easy concurrency/async * [lambdas](Reference/Functions/Lambdas.html) diff --git a/docs/Reference/Types/Unions.mdr b/docs/Reference/Types/Unions.mdr index 3ca0d197..e171f881 100644 --- a/docs/Reference/Types/Unions.mdr +++ b/docs/Reference/Types/Unions.mdr @@ -1 +1,13 @@ # Union types + +Union store their component in the same memory space. +For more infomations, see [here](https://en.wikipedia.org/wiki/Union_type). + +@``` base_union +union { + int a; + float f; + Object o; +}; +@``` + diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 2acb9464..f31adb02 100644 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -1,4 +1,4 @@ -git checkout doc_tmp +git checkout -b doc_tmp git branch -r | grep gh-pages && git push origin :gh-pages || true git add -f book git commit -m "add book" diff --git a/scripts/mdr2mdbook.sh b/scripts/mdr2mdbook.sh index d5618015..da47e7bd 100644 --- a/scripts/mdr2mdbook.sh +++ b/scripts/mdr2mdbook.sh @@ -22,7 +22,6 @@ ensure_dir() { } doc2src() { -echo $1 mdr $1 || return mdfile=${1::-1} target=$(sed 's/docs/src/' <<< $mdfile) @@ -38,10 +37,10 @@ runall() { done } -if [[ "$1" == *".mdr" ]] + if [[ "$1" == *".mdr" ]] then doc2src $1 if [ "$(git status -s | grep docs)" ] then sh scripts/summary.sh > src/SUMMARY.md fi -else runall -fi + else runall + fi -- 2.43.0