From 5c2f6b53185a5ce250944f0a73bec23504196cd5 Mon Sep 17 00:00:00 2001 From: AndreasRu <5096188+andreasRu@users.noreply.github.com> Date: Tue, 8 Aug 2023 13:39:32 +0200 Subject: [PATCH] Initial commit --- .cfformat.json | 79 ++ .github/workflows/static.yml | 43 + Application.cfc | 6 + LICENSE.txt | 21 + README.md | 157 +++ cftasks/generateStaticHTML.cfc | 42 + components/HtmlHelper.cfc | 144 ++ docs/images/dumpStruct.webp | Bin 0 -> 16956 bytes docs/index.html | 62 + docs/libs/fonts/OFL.txt | 93 ++ .../fonts/OpenSans-VariableFont_wdth,wght.ttf | Bin 0 -> 529700 bytes docs/libs/fonts/README.txt | 100 ++ docs/libs/highlightjs/LICENSE.txt | 29 + docs/libs/highlightjs/README.md.txt | 470 +++++++ docs/libs/highlightjs/highlight.min.js | 1207 +++++++++++++++++ .../highlightjs_atom-one-dark.min.css | 1 + .../highlightjs_styles_default.min.css | 9 + docs/libs/main.css | 265 ++++ docs/libs/markdowncss/LICENSE.txt | 21 + docs/libs/markdowncss/README.md | 49 + docs/libs/markdowncss/retro.css | 202 +++ docs/libs/normalizecss/normalize.min.css | 2 + docs/libs/open-sans.css | 1 + examples/cfhttpMinifyHtml.cfm | 13 + examples/encodeTrustedHtml.cfm | 16 + examples/minifyHtml.cfm | 29 + images/dumpStruct.webp | Bin 0 -> 16956 bytes index.cfm | 103 ++ libs/fonts/OFL.txt | 93 ++ .../fonts/OpenSans-VariableFont_wdth,wght.ttf | Bin 0 -> 529700 bytes libs/fonts/README.txt | 100 ++ libs/highlightjs/LICENSE.txt | 29 + libs/highlightjs/README.md.txt | 470 +++++++ libs/highlightjs/highlight.min.js | 1207 +++++++++++++++++ .../highlightjs_atom-one-dark.min.css | 1 + .../highlightjs_styles_default.min.css | 9 + libs/main.css | 265 ++++ libs/markdowncss/LICENSE.txt | 21 + libs/markdowncss/README.md | 49 + libs/markdowncss/retro.css | 202 +++ libs/normalizecss/normalize.min.css | 2 + libs/open-sans.css | 1 + node_modules/.package-lock.json | 7 + package-lock.json | 13 + package.json | 28 + serve.bat | 3 + serve.sh | 6 + server-cfml-HtmlHelper.json | 25 + 48 files changed, 5695 insertions(+) create mode 100644 .cfformat.json create mode 100644 .github/workflows/static.yml create mode 100644 Application.cfc create mode 100644 LICENSE.txt create mode 100644 README.md create mode 100644 cftasks/generateStaticHTML.cfc create mode 100644 components/HtmlHelper.cfc create mode 100644 docs/images/dumpStruct.webp create mode 100644 docs/index.html create mode 100644 docs/libs/fonts/OFL.txt create mode 100644 docs/libs/fonts/OpenSans-VariableFont_wdth,wght.ttf create mode 100644 docs/libs/fonts/README.txt create mode 100644 docs/libs/highlightjs/LICENSE.txt create mode 100644 docs/libs/highlightjs/README.md.txt create mode 100644 docs/libs/highlightjs/highlight.min.js create mode 100644 docs/libs/highlightjs/highlightjs_atom-one-dark.min.css create mode 100644 docs/libs/highlightjs/highlightjs_styles_default.min.css create mode 100644 docs/libs/main.css create mode 100644 docs/libs/markdowncss/LICENSE.txt create mode 100644 docs/libs/markdowncss/README.md create mode 100644 docs/libs/markdowncss/retro.css create mode 100644 docs/libs/normalizecss/normalize.min.css create mode 100644 docs/libs/open-sans.css create mode 100644 examples/cfhttpMinifyHtml.cfm create mode 100644 examples/encodeTrustedHtml.cfm create mode 100644 examples/minifyHtml.cfm create mode 100644 images/dumpStruct.webp create mode 100644 index.cfm create mode 100644 libs/fonts/OFL.txt create mode 100644 libs/fonts/OpenSans-VariableFont_wdth,wght.ttf create mode 100644 libs/fonts/README.txt create mode 100644 libs/highlightjs/LICENSE.txt create mode 100644 libs/highlightjs/README.md.txt create mode 100644 libs/highlightjs/highlight.min.js create mode 100644 libs/highlightjs/highlightjs_atom-one-dark.min.css create mode 100644 libs/highlightjs/highlightjs_styles_default.min.css create mode 100644 libs/main.css create mode 100644 libs/markdowncss/LICENSE.txt create mode 100644 libs/markdowncss/README.md create mode 100644 libs/markdowncss/retro.css create mode 100644 libs/normalizecss/normalize.min.css create mode 100644 libs/open-sans.css create mode 100644 node_modules/.package-lock.json create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 serve.bat create mode 100644 serve.sh create mode 100644 server-cfml-HtmlHelper.json diff --git a/.cfformat.json b/.cfformat.json new file mode 100644 index 0000000..156ae0d --- /dev/null +++ b/.cfformat.json @@ -0,0 +1,79 @@ +{ + "alignment.consecutive.assignments":false, + "alignment.consecutive.params":false, + "alignment.consecutive.properties":false, + "alignment.doc_comments":true, + "array.empty_padding":false, + "array.multiline.comma_dangle":false, + "array.multiline.element_count":4, + "array.multiline.leading_comma":false, + "array.multiline.leading_comma.padding":false, + "array.multiline.min_length":40, + "array.padding":true, + "binary_operators.newline_indent":false, + "binary_operators.padding":true, + "brackets.padding":true, + "comment.asterisks":"align", + "for_loop_semicolons.padding":true, + "function_anonymous.empty_padding":false, + "function_anonymous.group_to_block_spacing":"spaced", + "function_anonymous.multiline.comma_dangle":false, + "function_anonymous.multiline.element_count":4, + "function_anonymous.multiline.leading_comma":false, + "function_anonymous.multiline.leading_comma.padding":true, + "function_anonymous.multiline.min_length":40, + "function_anonymous.padding":false, + "function_anonymous.spacing_to_group":false, + "function_call.casing.builtin":"cfdocs", + "function_call.casing.userdefined":"ignored", + "function_call.empty_padding":false, + "function_call.multiline.comma_dangle":false, + "function_call.multiline.element_count":4, + "function_call.multiline.leading_comma":false, + "function_call.multiline.leading_comma.padding":true, + "function_call.multiline.min_length":40, + "function_call.padding":true, + "function_declaration.empty_padding":false, + "function_declaration.group_to_block_spacing":"spaced", + "function_declaration.multiline.comma_dangle":false, + "function_declaration.multiline.element_count":4, + "function_declaration.multiline.leading_comma":false, + "function_declaration.multiline.leading_comma.padding":true, + "function_declaration.multiline.min_length":40, + "function_declaration.padding":true, + "function_declaration.spacing_to_group":false, + "indent_size":4, + "keywords.block_to_keyword_spacing":"spaced", + "keywords.empty_group_spacing":false, + "keywords.group_to_block_spacing":"spaced", + "keywords.padding_inside_group":true, + "keywords.spacing_to_block":"spaced", + "keywords.spacing_to_group":false, + "max_columns":1000, + "metadata.key_value.padding":true, + "metadata.multiline.element_count":4, + "metadata.multiline.min_length":40, + "method_call.chain.multiline":10, + "newline":"os", + "param.key_value.padding":true, + "param.multiline.element_count":4, + "param.multiline.min_length":40, + "parentheses.padding":true, + "property.key_value.padding":true, + "property.multiline.element_count":4, + "property.multiline.min_length":40, + "strings.attributes.quote":"double", + "strings.convertNestedQuotes":true, + "strings.quote":"double", + "struct.empty_padding":false, + "struct.multiline.comma_dangle":false, + "struct.multiline.element_count":4, + "struct.multiline.leading_comma":false, + "struct.multiline.leading_comma.padding":true, + "struct.multiline.min_length":40, + "struct.padding":true, + "struct.quote_keys":false, + "struct.separator":": ", + "tab_indent":true, + "tags.lowercase":true +} \ No newline at end of file diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml new file mode 100644 index 0000000..b289e12 --- /dev/null +++ b/.github/workflows/static.yml @@ -0,0 +1,43 @@ +# Simple workflow for deploying static content to GitHub Pages +name: Deploy static content to Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["master"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + # Single deploy job since we're just deploying + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + # Upload entire repository + path: './docs' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/Application.cfc b/Application.cfc new file mode 100644 index 0000000..b09e475 --- /dev/null +++ b/Application.cfc @@ -0,0 +1,6 @@ +component displayname = "Application" output = "false" hint = "Handle the application" { + + this.charset.web = "UTF-8"; + this.charset.resource = "UTF-8"; + +} diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 0000000..276facc --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2023 Claudio Andreas Rüger at https://www.rhein-berg-digital.de + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..7d9371a --- /dev/null +++ b/README.md @@ -0,0 +1,157 @@ +# HtmlHelper.cfc (Vers. 1.0.0) + +--- + +***Minify your CFML generated HTML at runtime!*** + +If you want to see an enhanced version of this page, please visit [https://andreasru.github.io/cfml-htmlhelper/](https://andreasru.github.io/cfml-htmlhelper/) + +## A simple basic CFML component to + +> - **minify CFML generated html** content +> - **encode trusted HTML** content containing non-compliant/unescaped characters like e.g. €, ü, ö, ß, etc. within a tags inner HTML + +### 1. minifyHtml( string html required ) + +#### Converts a whitespace poluted HTML block like this + + +
+Hello to all CFML devs 😀 🤩 around the 🌎!!!
+