From 1ea34121d18608feedfae51a1e7f2d9370f30801 Mon Sep 17 00:00:00 2001 From: "luk.lu" Date: Wed, 14 Jul 2021 10:36:43 +0800 Subject: [PATCH] first commit --- .gitignore | 17 ++++++++++++++ device.scss | 26 +++++++++++++++++++++ triangle.scss | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 .gitignore create mode 100644 device.scss create mode 100644 triangle.scss diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3d3c395 --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +.DS_Store +node_modules/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* +/test/unit/coverage/ +/test/e2e/reports/ +selenium-debug.log + +# Editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln +/package-lock.json diff --git a/device.scss b/device.scss new file mode 100644 index 0000000..2c691ab --- /dev/null +++ b/device.scss @@ -0,0 +1,26 @@ +/** + * Unified Theme + * 通用个性化主题 + */ + + @mixin _PHONE { + /* #ifdef H5 */ + @media screen and (min-width: 0px) and (max-width: 750px) { + @content; + } + /* #endif */ +} +@mixin _PAD { + /* #ifdef H5 */ + @media screen and (min-width: 751px) and (max-width: 1024px) { + @content; + } + /* #endif */ +} +@mixin _DESK { + /* #ifdef H5 */ + @media screen and (min-width: 751px) { + @content; + } + /* #endif */ +} diff --git a/triangle.scss b/triangle.scss new file mode 100644 index 0000000..dfd7836 --- /dev/null +++ b/triangle.scss @@ -0,0 +1,63 @@ +//*************************************** +// * 三角函数 +//*************************************** +@function fact($number) { + $value: 1; + @if $number>0 { + @for $i from 1 through $number { + $value: $value * $i; + } + } + @return $value; +} + +@function pow($number, $exp) { + $value: 1; + @if $exp>0 { + @for $i from 1 through $exp { + $value: $value * $number; + } + } @else if $exp < 0 { + @for $i from 1 through -$exp { + $value: $value / $number; + } + } + @return $value; +} + +@function rad($angle) { + $unit: unit($angle); + $unitless: $angle / ($angle * 0 + 1); + @if $unit==deg { + $unitless: $unitless / 180 * pi(); + } + @return $unitless; +} + +@function pi() { + @return 3.14159265359; +} + +@function sin($angle) { + $sin: 0; + $angle: rad($angle); + // Iterate a bunch of times. + @for $i from 0 through 10 { + $sin: $sin + pow(-1, $i) * pow($angle, (2 * $i + 1)) / fact(2 * $i + 1); + } + @return $sin; +} + +@function cos($angle) { + $cos: 0; + $angle: rad($angle); + // Iterate a bunch of times. + @for $i from 0 through 10 { + $cos: $cos + pow(-1, $i) * pow($angle, 2 * $i) / fact(2 * $i); + } + @return $cos; +} + +@function tan($angle) { + @return sin($angle) / cos($angle); +}