Skip to content

Commit

Permalink
Merge pull request #612 from Riverside-Healthcare/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherpickering authored Apr 25, 2023
2 parents 70021fc + b5c7bcf commit 2ef2eaa
Show file tree
Hide file tree
Showing 97 changed files with 2,309 additions and 1,212 deletions.
114 changes: 105 additions & 9 deletions docs/src/_data/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
{
"name": ".djlintrc",
"value": "\"ignore\": \"H014,H015\""
},
{
"name": "cli",
"value": "--ignore \"H014,H015\""
}
],
"tags": ["linter"]
Expand All @@ -34,6 +38,10 @@
{
"name": ".djlintrc",
"value": "\"include\": \"H014,H015\""
},
{
"name": "cli",
"value": "--include \"H014,H015\""
}
]
},
Expand All @@ -53,6 +61,10 @@
{
"name": ".djlintrc",
"value": "\"extension\": \"html.dj\""
},
{
"name": "cli",
"value": "--extension \"html.dj\"\n# or\n-e \"html.dj\""
}
]
},
Expand All @@ -72,6 +84,10 @@
{
"name": ".djlintrc",
"value": "\"custom_blocks\": \"toc,example\""
},
{
"name": "cli",
"value": "--custom-blocks \"toc,example\""
}
]
},
Expand Down Expand Up @@ -101,9 +117,9 @@
{
"name": "custom_html",
"description": {
"en": "Use to indent custom HTML tags. For example `<mjml>` or `<simple-greeting>` or `<mj-\\w+>`",
"ru": "Используется для отступа пользовательских HTML-тегов. Например, `<mjml>` или `<simple-greeting>` или `<mj-\\w+>`.",
"fr": "Permet d'indenter les balises HTML personnalisées. Par exemple, `<mjml>` ou `<simple-greeting>` ou `<mj-\\w+>`."
"en": "Use to indent custom HTML tags. For example `<mjml>` or `<simple-greeting>` or `<mj-\\\\w+>`",
"ru": "Используется для отступа пользовательских HTML-тегов. Например, `<mjml>` или `<simple-greeting>` или `<mj-\\\\w+>`.",
"fr": "Permet d'indenter les balises HTML personnalisées. Par exemple, `<mjml>` ou `<simple-greeting>` ou `<mj-\\\\w+>`."
},
"tags": ["formatter"],
"usage": [
Expand All @@ -114,6 +130,10 @@
{
"name": ".djlintrc",
"value": "\"custom_html\": \"mjml,simple-greeting,mj-\\w+\""
},
{
"name": "cli",
"value": "--custom_html \"mjml,simple-greeting,mj-\\\\w+\""
}
]
},
Expand All @@ -133,6 +153,10 @@
{
"name": ".djlintrc",
"value": "\"indent\": \"3\""
},
{
"name": "cli",
"value": "--indent 3"
}
]
},
Expand All @@ -152,6 +176,10 @@
{
"name": ".djlintrc",
"value": "\"exclude\": \".venv,venv,.tox,.eggs,...\""
},
{
"name": "cli",
"value": "--exclude \".venv,venv,.tox,.eggs,...\""
}
]
},
Expand All @@ -171,6 +199,10 @@
{
"name": ".djlintrc",
"value": "\"extend_exclude\": \".custom\""
},
{
"name": "cli",
"value": "--extend-exclude \".custom\""
}
]
},
Expand All @@ -190,6 +222,10 @@
{
"name": ".djlintrc",
"value": "\"blank_line_after_tag\": \"load,extends,include\""
},
{
"name": "cli",
"value": "--blank-line-after-tag \"load,extends,include\""
}
]
},
Expand All @@ -209,6 +245,10 @@
{
"name": ".djlintrc",
"value": "\"blank_line_before_tag\": \"load,extends,include\""
},
{
"name": "cli",
"value": "--blank-line-before-tag \"load,extends,include\""
}
]
},
Expand All @@ -228,6 +268,10 @@
{
"name": ".djlintrc",
"value": "\"profile\": \"django\""
},
{
"name": "cli",
"value": "--profile \"django\""
}
]
},
Expand All @@ -246,7 +290,11 @@
},
{
"name": ".djlintrc",
"value": "\"require_pragma\": \"true\""
"value": "\"require_pragma\": true"
},
{
"name": "cli",
"value": "--require_pragma"
}
]
},
Expand All @@ -266,6 +314,10 @@
{
"name": ".djlintrc",
"value": "\"max_line_length\": \"120\""
},
{
"name": "cli",
"value": "--max_line_length 120"
}
]
},
Expand All @@ -285,6 +337,10 @@
{
"name": ".djlintrc",
"value": "\"max_attribute_length\": \"10\""
},
{
"name": "cli",
"value": "--max-attribute-length 10"
}
]
},
Expand All @@ -299,11 +355,15 @@
"usage": [
{
"name": "pyproject.toml",
"value": "use_gitignore=True"
"value": "use_gitignore=true"
},
{
"name": ".djlintrc",
"value": "\"use_gitignore\": \"True\""
"value": "\"use_gitignore\": true"
},
{
"name": "cli",
"value": "--use_gitignore"
}
]
},
Expand All @@ -322,7 +382,11 @@
},
{
"name": ".djlintrc",
"value": "\"format_attribute_template_tags\": \"true\""
"value": "\"format_attribute_template_tags\": true"
},
{
"name": "cli",
"value": "--format-attribute-template-tags"
}
]
},
Expand All @@ -342,6 +406,10 @@
{
"name": ".djlintrc",
"value": "\"linter_output_format\": \"{filename}:{line}: {code} {message} {match}\""
},
{
"name": "cli",
"value": "--linter_output_format \"{filename}:{line}: {code} {message} {match}\""
}
]
},
Expand All @@ -361,6 +429,10 @@
{
"name": ".djlintrc",
"value": "\"preserve_leading_space\": true"
},
{
"name": "cli",
"value": "--preserve_leading_space"
}
]
},
Expand All @@ -380,6 +452,10 @@
{
"name": ".djlintrc",
"value": "\"preserve_blank_lines\": true"
},
{
"name": "cli",
"value": "--preserve_blank_lines"
}
]
},
Expand All @@ -399,6 +475,10 @@
{
"name": ".djlintrc",
"value": "\"per-file-ignores\": {\n \"file.html\": \"H026,H025\",\n \"file_two.html\":\"H001\"\n }"
},
{
"name": "cli",
"value": "--per-file-ignores \"file.html\" \"H026,H025\" --per-file-ignores \"file_two.html\" \"H001\""
}
]
},
Expand All @@ -418,6 +498,10 @@
{
"name": ".djlintrc",
"value": "\"format_js\": true\n\"js\": {\n \"indent_size\": 5\n }"
},
{
"name": "cli",
"value": "--format-js --indent-js 5"
}
]
},
Expand All @@ -437,6 +521,10 @@
{
"name": ".djlintrc",
"value": "\"format_css\": true\n\"css\": {\n \"indent_size\": 5\n }"
},
{
"name": "cli",
"value": "--format-css --indent-css 5"
}
]
},
Expand All @@ -455,7 +543,11 @@
},
{
"name": ".djlintrc",
"value": "\"files\": [\n \"index.html\"\n }"
"value": "\"files\": [\n \"index.html\"\n]"
},
{
"name": "cli",
"value": "index.html"
}
]
},
Expand All @@ -470,11 +562,15 @@
"usage": [
{
"name": "pyproject.toml",
"value": "[tool.djlint]\nignore-case=true\n"
"value": "[tool.djlint]\nignore_case=true\n"
},
{
"name": ".djlintrc",
"value": "\"ignore_case\": true"
},
{
"name": "cli",
"value": "--ignore_case"
}
]
}
Expand Down
6 changes: 1 addition & 5 deletions docs/src/_utils/scripts.11ty.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ module.exports = class {
async render() {
await esbuild.build({
entryPoints: ['src/static/js/hamburger.js'],
inject: [
'./src/static/js/animate.js',
'./src/static/js/modal.js',
'./src/static/js/tabs.js',
],
inject: ['./src/static/js/animate.js', './src/static/js/modal.js'],
bundle: true,
minify: true,
outfile: `_site/static/js/${generateContentHash(
Expand Down
34 changes: 32 additions & 2 deletions docs/src/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ document.querySelector('#filter').addEventListener('input', (event) => {

{% for flag in option.usage %}

<li class="{% if loop.index == 1 %}is-active{% endif %}"><a tab="{{- option.name | slugify -}}-{{- flag.name | slugify -}}-tab">{{ flag.name }}</a></li>
<li class="{% if loop.index == 1 %}is-active{% endif %}"><a tab="{{- flag.name | slugify -}}-tab">{{ flag.name }}</a></li>

{% endfor %}

Expand All @@ -99,7 +99,7 @@ document.querySelector('#filter').addEventListener('input', (event) => {

<div class="tab-container">
{% for flag in option.usage %}
<div class="tab {% if loop.index == 1 %}is-active{% endif %}"id="{{- option.name | slugify -}}-{{- flag.name | slugify -}}-tab">
<div class="tab {% if loop.index == 1 %}is-active{% endif %}"id="{{- flag.name | slugify -}}-tab">

```{% if flag.name == "pyproject.toml" %}toml{% else %}json{% endif %}
{{ flag.value | safe }}
Expand All @@ -113,3 +113,33 @@ document.querySelector('#filter').addEventListener('input', (event) => {
{% endfor %}

<div id="no-matches" class="is-hidden mb-5">Nothing found. Try another search.</div>

<script>
document.addEventListener('click', function (e) {
if (
e.target.closest('.tabs li a') &&
e.target.closest('.tabs li a').hasAttribute('tab')
) {
var tabLinks = document.querySelectorAll('.tabs li.is-active');
for (var l = 0; l < tabLinks.length; l++) {
tabLinks[l].classList.remove('is-active');
}

var tabs = document.querySelectorAll('.tab.is-active');

for (var i = 0; i < tabs.length; i++) {
tabs[i].classList.remove('is-active');
}

var activeBox = document.querySelectorAll('.tab#' + e.target.getAttribute('tab'))
for(var y= 0; y < activeBox.length; y++){
activeBox[y].classList.add('is-active');
}

var activeTab = document.querySelectorAll('a[tab="' + e.target.getAttribute('tab') + '"]')
for(var y= 0; y < activeTab.length; y++){
activeTab[y].parentElement.classList.add('is-active');
}
}
});
</script>
Loading

0 comments on commit 2ef2eaa

Please sign in to comment.