il manquait le fichier package.json
This commit is contained in:
parent
ddcc4d8b7d
commit
f7d2c37043
2 changed files with 239 additions and 0 deletions
41
package.json
Normal file
41
package.json
Normal file
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
"name": "spip-html",
|
||||
"displayName": "SPIP codes for html (snippets)",
|
||||
"description": "Just snippet for create SPIP codes in html",
|
||||
"version": "0.0.1",
|
||||
"publisher": "gamuza",
|
||||
"engines": {
|
||||
"vscode": "^1.0.0"
|
||||
},
|
||||
"categories": [
|
||||
"Snippets"
|
||||
],
|
||||
"contributes": {
|
||||
"snippets": [
|
||||
{
|
||||
"language": "html",
|
||||
"path": "./snippets/snippets.json"
|
||||
},
|
||||
{
|
||||
"language": "javascriptreact",
|
||||
"path": "./snippets/snippets.json"
|
||||
},
|
||||
{
|
||||
"language": "typescriptreact",
|
||||
"path": "./snippets/snippets.json"
|
||||
},
|
||||
{
|
||||
"language": "pug",
|
||||
"path": "./snippets/snippets.json"
|
||||
},
|
||||
{
|
||||
"language": "ejs",
|
||||
"path": "./snippets/snippets.json"
|
||||
}
|
||||
]
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git.gamuza.fr/snippet/spip-html"
|
||||
}
|
||||
}
|
198
snippets/snippets.json
Normal file
198
snippets/snippets.json
Normal file
|
@ -0,0 +1,198 @@
|
|||
{
|
||||
"xm": {
|
||||
"prefix": "xm",
|
||||
"body": "endsnippet\n\nsnippet b \"SPIP <BOUCLE_>\"\n`!p t[2] = t[2].upper()`<BOUCLE_${1:nom}(${2:ARTICLES}){${3:critere}}${4}>\n\t$0\n</BOUCLE_$1>",
|
||||
"description": "Vuex Mutation Type"
|
||||
},
|
||||
"bb": {
|
||||
"prefix": "bb",
|
||||
"body": "<B_$1>\n\t${5}\n<BOUCLE_${1:nom}(${2:/upcase/ARTICLES}){${3:critere}}${4}>\n\t$0\n</BOUCLE_$1>\n\t${6}\n</B_$1>",
|
||||
"description": "SPIP <B_>"
|
||||
},
|
||||
"id_rub": {
|
||||
"prefix": "id_rub",
|
||||
"body": "#ID_RUBRIQUE${0}",
|
||||
"description": "SPIP #ID_RUBRIQUE"
|
||||
},
|
||||
"id_mot": {
|
||||
"prefix": "id_mot",
|
||||
"body": "#ID_MOT",
|
||||
"description": "SPIP #ID_MOT"
|
||||
},
|
||||
"http_header": {
|
||||
"prefix": "http_header",
|
||||
"body": "#HTTP_HEADER{Content-Type: text/plain; charset=#CHARSET}",
|
||||
"description": "SPIP #HTTP_HEADER{}"
|
||||
},
|
||||
"autoriser": {
|
||||
"prefix": "autoriser",
|
||||
"body": "[(#AUTORISER{${1:action},${2:objet}}|oui)${3}]",
|
||||
"description": "SPIP [(#AUTORISER{"
|
||||
},
|
||||
"rem": {
|
||||
"prefix": "rem",
|
||||
"body": "[(#REM)\n\t1\n]\n${0}"
|
||||
},
|
||||
"edit": {
|
||||
"prefix": "edit",
|
||||
"body": "#EDIT{1}${0}",
|
||||
"description": "SPIP #EDIT{ VISUAL }"
|
||||
},
|
||||
"env**": {
|
||||
"prefix": "env**",
|
||||
"body": "[<pre>(#ENV**|unserialize|print_r{1})</pre>]\n${0}",
|
||||
"description": "SPIP tout l'env"
|
||||
},
|
||||
"env": {
|
||||
"prefix": "env",
|
||||
"body": "#ENV{${1}}${0}",
|
||||
"description": "SPIP #ENV{}"
|
||||
},
|
||||
"set": {
|
||||
"prefix": "set",
|
||||
"body": "#SET{${1},$2}${0}",
|
||||
"description": "SPIP #SET{}"
|
||||
},
|
||||
"get": {
|
||||
"prefix": "get",
|
||||
"body": "#GET{${1}}${0}",
|
||||
"description": "SPIP #GET{}"
|
||||
},
|
||||
"chemin": {
|
||||
"prefix": "chemin",
|
||||
"body": "[(#CHEMIN{${1}})]${0}",
|
||||
"description": "SPIP #CHEMIN{}"
|
||||
},
|
||||
"cache": {
|
||||
"prefix": "cache",
|
||||
"body": "#CACHE{0}\n${0}",
|
||||
"description": "SPIP #CACHE{0}"
|
||||
},
|
||||
"url_page": {
|
||||
"prefix": "url_page",
|
||||
"body": "[(#URL_PAGE{1}${0})]",
|
||||
"description": "SPIP #URL_PAGE{}"
|
||||
},
|
||||
"action": {
|
||||
"prefix": "action",
|
||||
"body": "[(#URL_ACTION_AUTEUR{${1:name},${2:var1/var2},${3:#SELF}})]${0}",
|
||||
"description": "SPIP #URL_ACTION_AUTEUR{name,var1/var2,#SELF}"
|
||||
},
|
||||
"foreachSpip": {
|
||||
"prefix": "foreachSpip",
|
||||
"body": "[(${1}|foreach)]\n${0}",
|
||||
"description": "SPIP foreach"
|
||||
},
|
||||
"config": {
|
||||
"prefix": "config",
|
||||
"body": "#CONFIG{${1}}${0}",
|
||||
"description": "SPIP #CONFIG{}"
|
||||
},
|
||||
"setenv": {
|
||||
"prefix": "setenv",
|
||||
"body": "[(#${1:balise}|setenv{${2:nom_env}})]${0}",
|
||||
"description": "SPIP [(#BALISE|setenv{nom_env})]"
|
||||
},
|
||||
"formulaire": {
|
||||
"prefix": "formulaire",
|
||||
"body": "`!p t[1] = t[1].upper()`\n[(#FORMULAIRE_${1}{${2}})]${0}",
|
||||
"description": "SPIP #FORMULAIRE_"
|
||||
},
|
||||
"use": {
|
||||
"prefix": "use",
|
||||
"body": "<svg class=\"${2:$1}\" width=\"${3}\" height=\"${4}\" alt=\"${5}\">\n\t${6:<title></title>}\n\t<use xlink:href=\"#${1:${VISUAL:id}}\" />\n</svg>",
|
||||
"description": "SPIP SVG use"
|
||||
},
|
||||
"cptboucle": {
|
||||
"prefix": "cptboucle",
|
||||
"body": "#COMPTEUR_BOUCLE${0}",
|
||||
"description": "SPIP #COMPTEUR_BOUCLE"
|
||||
},
|
||||
"totboucle": {
|
||||
"prefix": "totboucle",
|
||||
"body": "#TOTAL_BOUCLE${0}",
|
||||
"description": "SPIP #TOTAL_BOUCLE"
|
||||
},
|
||||
"cvt": {
|
||||
"prefix": "cvt",
|
||||
"body": "<div class=\"formulaire_spip formulaire_#FORM\">\n\n[<p class=\"reponse_formulaire reponse_formulaire_erreur\">(#ENV*{message_erreur})</p>]\n[<p class=\"reponse_formulaire reponse_formulaire_ok\">(#ENV*{message_ok})</p>]\n\n[(#ENV{editable}|oui) ]\n\t<form name=\"formulaire_#FORM\" action=\"#ENV{action}\" method=\"post\"><div>\n\t\t#ACTION_FORMULAIRE{#ENV{action}}\n\t\t<div class=\"editer_groupe\">\n\n\t\t\t${1}\n\n\t\t</div>\n\t<p class=\"boutons\"><input type=\"submit\" class=\"submit\" value=\"Envoyer\" ></p>\n\t</div></form>\n\n</div>",
|
||||
"description": "SPIP formulaire CVT"
|
||||
},
|
||||
"cvttext": {
|
||||
"prefix": "cvttext",
|
||||
"body": "<div class=\"editer_groupe\">\n\t#SET{name,${1}}\n\t#SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}}\n\t#SET{obli,\"obligatoire\"}\n\t<div class=\"editer_[(#GET{name})][ (#GET{obli})][ (#GET{erreurs}|oui)erreur]\">\n\t\t<label for=\"#GET{name}\">${2}</label>\n\t\t[<span class=\"erreur_message\">(#GET{erreurs})</span>]\n\t\t<input type=\"text\" class=\"text ${3:$1}\" name=\"#GET{name}\" id=\"#GET{name}\" value=\"#ENV{#GET{name}}\" >\n\t</div>\n</div>\n${0}",
|
||||
"description": "SPIP <input type='text'"
|
||||
},
|
||||
"cvttextarea": {
|
||||
"prefix": "cvttextarea",
|
||||
"body": "<div class=\"editer_groupe\">\n\t#SET{name,${1}}\n\t#SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}}\n\t#SET{obli,\"obligatoire\"}\n\t<div class=\"editer_[(#GET{name})][ (#GET{obli})][ (#GET{erreurs}|oui)erreur]\">\n\t\t<label for=\"#GET{name}\">${2}</label>\n\t\t[<span class=\"erreur_message\">(#GET{erreurs})</span>]\n\t\t<textarea class=\"textarea ${3:$1}\" name=\"#GET{name}\" id=\"#GET{name}\">#ENV{#GET{name}}</textarea>\n\t</div>\n</div>\n${0}",
|
||||
"description": "SPIP <textarea ...> "
|
||||
},
|
||||
"cvtcheckbox": {
|
||||
"prefix": "cvtcheckbox",
|
||||
"body": "<div class=\"editer_groupe\">\n\t#SET{name,${1}}\n\t#SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}}\n\t#SET{obli,\"obligatoire\"}\n\t<div class=\"editer_[(#GET{name})][ (#GET{obli})][ (#GET{erreurs}|oui)erreur]\">\n\t\t<div class=\"choix\">\n\t\t\t<input type=\"checkbox\" class=\"checkbox\" name=\"#GET{name}[]\" id=\"#GET{name}_1\"[ (#GET{name}|in_array{#ENV{#GET{name}}}|oui) checked=\"checked\"})] >\n\t\t\t<label for=\"#GET{name}_1\">${2}</label>\n\t\t</div>\n\t</div>\n</div>\n${0}",
|
||||
"description": "SPIP <input type='checkbox'>"
|
||||
},
|
||||
"cvtradio": {
|
||||
"prefix": "cvtradio",
|
||||
"body": "<div class=\"editer_groupe\">\n\t#SET{name,${1}}\n\t#SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}}\n\t#SET{obli,\"obligatoire\"}\n\t<div class=\"editer_[(#GET{name})][ (#GET{obli})][ (#GET{erreurs}|oui)erreur]\">\n\t\t<div class=\"choix\">\n\t\t\t<input type=\"radio\" class=\"radio\" name=\"#GET{name}\" value=\"non\" id=\"#GET{name}_non\"[ (#ENV{#GET{name}}|=={non}|?{checked=\"checked\"})] >\n\t\t\t<label for=\"#GET{name}_non\">${2}</label>\n\t\t</div>\n\t\t<div class=\"choix\">\n\t\t\t<input type=\"radio\" class=\"radio\" name=\"#GET{name}\" value=\"oui\" id=\"#GET{name}_oui\"[ (#ENV{#GET{name}}|=={oui}|?{checked=\"checked\"})] >\n\t\t\t<label for=\"#GET{name}_oui\">${3}</label>\n\t\t</div>\n\t</div>\n</div>\n${0}",
|
||||
"description": "SPIP <input type='radio'>"
|
||||
},
|
||||
"cvtselect": {
|
||||
"prefix": "cvtselect",
|
||||
"body": "<div class=\"editer_groupe\">\n\t#SET{name,${1}}\n\t#SET{erreurs,#ENV**{erreurs}|table_valeur{#GET{name}}}\n\t#SET{obli,\"obligatoire\"}\n\t<div class=\"editer_[(#GET{name})][ (#GET{obli})][ (#GET{erreurs}|oui)erreur]\">\n\t\t<label for=\"#GET{name}\">${2}</label>\n\t\t<select id=\"#GET{name}\" name=\"#GET{name}\" class=\"#GET{name}\">\n\t\t\t<option value=\"${3}\">${4}</option>\n\t\t\t${0}\n\t\t</select>\n\t</div>\n</div>",
|
||||
"description": "SPIP <select>"
|
||||
},
|
||||
"saisie": {
|
||||
"prefix": "saisie",
|
||||
"body": "[(#SAISIE{${1:type},${2:nom}}\n\t{label=\"${3}\"}\n\t${0}\n)]",
|
||||
"description": "SPIP #SAISIE{}"
|
||||
},
|
||||
"saisiedata": {
|
||||
"prefix": "saisiedata",
|
||||
"body": "[(#SAISIE{${1:type},${2:nom}}\n\t{label=\"${3}\"}\n\t{defaut=${4}}\n\t{datas=${5}}\n)]\n${0}",
|
||||
"description": "SPIP #SAISIE{datas}"
|
||||
},
|
||||
"br": {
|
||||
"prefix": "br",
|
||||
"body": "<br>\n${0}",
|
||||
"description": "<br>"
|
||||
},
|
||||
"hr": {
|
||||
"prefix": "hr",
|
||||
"body": "<hr>\n${0}",
|
||||
"description": "<hr>"
|
||||
},
|
||||
"nbs": {
|
||||
"prefix": "nbs",
|
||||
"body": " ${0}",
|
||||
"description": "&nbs;"
|
||||
},
|
||||
"html": {
|
||||
"prefix": "html",
|
||||
"body": "<html>\n\n${0}\n\n</html>",
|
||||
"description": "<html>"
|
||||
},
|
||||
"script": {
|
||||
"prefix": "script",
|
||||
"body": "<script type=\"text/javascript\">\n\n\t${0}\n\n</script>"
|
||||
},
|
||||
"scriptsrc": {
|
||||
"prefix": "scriptsrc",
|
||||
"body": "<script src=\"[(#CHEMIN{${1}})]\" type=\"text/javascript\"></script>\n${0}"
|
||||
},
|
||||
"style": {
|
||||
"prefix": "style",
|
||||
"body": "<style type=\"text/css\" media=\"${1:screen}\">\n\t${2}\n</style>"
|
||||
},
|
||||
"confirm": {
|
||||
"prefix": "confirm",
|
||||
"body": "onClick=\"return confirm('${1:Confirmer cette action}');\"",
|
||||
"description": "Onclick='ruturn confirm'"
|
||||
},
|
||||
"action_url": {
|
||||
"prefix": "action_url",
|
||||
"body": "var url_${1:nom} = \"[(#VAL{$1}|generer_url_action{\"\", 1})]\";\n${0}",
|
||||
"description": "SPIP url => action spip"
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue