Skip to content

Commit

Permalink
schemam/US/vscode-snippets-hapi
Browse files Browse the repository at this point in the history
  • Loading branch information
fititnt committed Jun 16, 2021
1 parent b42d995 commit e85f9f1
Show file tree
Hide file tree
Showing 4 changed files with 104 additions and 28 deletions.
6 changes: 5 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
*.gql linguist-detectable
*.graphqls linguist-detectable
*.liquid linguist-detectable
*.code-snippets linguist-detectable

## Exemplum: schemam/US/vscode-snippets-hapi/hapi.code-snippets
*.code-snippets linguist-language=JSON5

## Markdown are documentation (this could be changed later)
*.md linguist-documentation
Expand All @@ -26,4 +30,4 @@ Gemfile linguist-vendored
documentum/robots.txt linguist-vendored

## This (test) file on schema needs to be ignored
schema/graphql.schema.mjs linguist-generated
schema/graphql.schema.mjs linguist-generated
54 changes: 28 additions & 26 deletions _includes/schemam/index.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
<!-- _includes/schemam/index.html -->


<section>
<h3 id="todo-schema">schemam</h3>
{% for xschemam_global in site.data.hapi.xschemam %}
{% if xschemam_global.collectionem_xschemam %}
gid - {{ xschemam_global.gid }}
{% for xschemam in xschemam_global.collectionem_xschemam %}
{% if xschemam.alternativum_linguam contains page.linguam %}
{% assign rem = xschemam.alternativum | where: 'linguam', page.linguam | first %}
{% include schemam/item.html schemam=rem initiale_html_hN=3 %}
{% else %}
TODO: do it
{% endif %}

{% for xschemam_global in site.data.hapi.xschemam %}
{% if xschemam_global.collectionem_xschemam %}
gid - {{ xschemam_global.gid }}
{% for xschemam in xschemam_global.collectionem_xschemam %}
{% if xschemam.alternativum_linguam contains page.linguam %}
{% assign rem = xschemam.alternativum | where: 'linguam', page.linguam | first %}
{% include schemam/item.html schemam=rem initiale_html_hN=3 %}
{% else %}
TODO: do it
<article>
{% comment %} {{ xschemam_global | inspect }} {% endcomment %}
<br>
<br>
{% comment %} {{ xschemam_global.collectionem_xschemam | inspect }} {% endcomment %}
<br>
<br>
{{ xschemam }}
<br>
{{ xschemam.alternativum_linguam }}
<br>
<br>
<br>
</article>
{% endfor %}
{% endif %}

<article>
{% comment %} {{ xschemam_global | inspect }} {% endcomment %}
<br>
<br>
{% comment %} {{ xschemam_global.collectionem_xschemam | inspect }} {% endcomment %}
<br>
<br>
{{ xschemam }}
<br>
{{ xschemam.alternativum_linguam }}
<br>
<br>
<br>
</article>
{% endfor %}
{% endif %}
{% endfor %}
<section>
2 changes: 1 addition & 1 deletion _plugins/jekyll_hapi_schemam.rb
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ def descriptionem
# - 'gid'
# - https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
def gid_est?(gid)
# puts "gid_est?(gid) #{@gid} #{gid}"
# puts "gid_est?(gid) #{@gid} #{gid}"
@gid == gid
end

Expand Down
70 changes: 70 additions & 0 deletions schemam/US/vscode-snippets-hapi/hapi.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
// Place your Auxilium-Humanitarium-API workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
// See also - https://code.visualstudio.com/docs/editor/userdefinedsnippets
// - https://code.visualstudio.com/api/language-extensions/snippet-guide
// - https://snippet-generator.app/
"l10n": {
"scope": "html,markdown,yaml,sql,xml,json",
"prefix": "l10n",
"body": [
"{% _🗣️ $1 🗣️_ %}"
],
"description": "Hapi L10n Tag, minimum"
},
"l10n0": {
"scope": "html,markdown,yaml,sql,xml,json",
"prefix": "l10n0",
"body": [
"{% _🗣️ 👁️$2-$3👁️ _👂$1👂_ 👁️$2-$3👁️ 🗣️_ %}"
],
"description": "Hapi L10n Tag, minimum, non codicem"
},
"l10n2": {
"scope": "html,markdown,yaml,sql,xml,json",
"prefix": "l10n2",
"body": [
"{% _🗣️ 📝${2-${3|Arab,Latn|}📝 $1 📝${2-${3|Arab,Latn|}📝 🗣️_ %}"
// "{% _🗣️ 📝${2:/downcase}/}-${3|Arab,Latn|}📝 $1 📝${2:/downcase}/}-${3|Arab,Latn|}📝 🗣️_ %} ${1/(.*)/${1:/capitalize}/}"
],
"description": "Hapi L10n Tag, minimum"
},
"l10n0eng": {
"scope": "html,markdown,yaml,sql,xml,json",
"prefix": "l10n0eng",
"body": [
"{% _🗣️ 👁️eng-Latn👁️ _👂$1👂_ 👁️eng-Latn👁️ 🗣️_ %}"
],
"description": "Hapi L10n Tag, textum, eng-Latn"
},
"l10n0spa": {
"scope": "html,markdown,yaml,sql,xml,json",
"prefix": "l10n0spa",
"body": [
"{% _🗣️ 👁️spa-Latn👁️ _👂$1👂_ 👁️spa-Latn👁️ 🗣️_ %}"
],
"description": "Hapi L10n Tag, textum, spa-Latn"
},
"l10n0por": {
"scope": "html,markdown,yaml,sql,xml,json",
"prefix": "l10n0por",
"body": [
"{% _🗣️ 👁️por-Latn👁️ _👂$1👂_ 👁️por-Latn👁️ 🗣️_ %}"
],
"description": "Hapi L10n Tag, textum, por-Latn"
}
}

0 comments on commit e85f9f1

Please sign in to comment.