Browse Source

color legend

merge-requests/1/head
JamesRezo 4 years ago
parent
commit
c1469276a8
  1. 6
      .editorconfig
  2. 6
      css/supported-versions.css
  3. 18
      lang/supportedversions_en.php
  4. 18
      lang/supportedversions_fr.php
  5. 7
      modeles/legend.html
  6. 1
      paquet.xml
  7. 49
      phpcs.xml.dist
  8. 4
      supported-versions.svg.html
  9. 9
      supportedversions_fonctions.php

6
.editorconfig

@ -0,0 +1,6 @@
root = true
[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = tab

6
css/supported-versions.css

@ -1,16 +1,16 @@
/* Branches page */
table.standard tr.eol td:first-child {
background: #f33;
background: #e29ea2;
color: white;
}
table.standard tr.security td:first-child {
background: #f93;
background: #fceaae;
}
table.standard tr.stable td:first-child {
background: #9c9;
background: #c3e2c5;
}
@media (max-width: 767px) {

18
lang/supportedversions_en.php

@ -1,12 +1,14 @@
<?php
$GLOBALS[$GLOBALS['idx_lang']] = [
'active_support' => 'Active support',
'security_fix' => 'Security fixes only',
'security_fix_defintion' => 'A release that is supported for critical security issues only.
Releases are only made on an as-needed basis.'
'end_of_life' => 'End of life',
'end_of_life_definition' => 'A release that is no longer supported.
Users of this release should upgrade as soon as possible,
as they may be exposed to unpatched security vulnerabilities.',
'active_support' => 'Active support',
'active_support_definition' => 'A release that is being actively supported.
Reported bugs and security issues are fixed and regular point releases are made.',
'security_fix' => 'Security fixes only',
'security_fix_defintion' => 'A release that is supported for critical security issues only.
Releases are only made on an as-needed basis.',
'end_of_life' => 'End of life',
'end_of_life_definition' => 'A release that is no longer supported.
Users of this release should upgrade as soon as possible,
as they may be exposed to unpatched security vulnerabilities.',
];

18
lang/supportedversions_fr.php

@ -1,12 +1,14 @@
<?php
$GLOBALS[$GLOBALS['idx_lang']] = [
'active_support' => 'Active support',
'security_fix' => 'Security fixes only',
'security_fix_defintion' => 'Une version qui est maintenue pour des corrections de failles de sécurité seulement.
Releases are only made on an as-needed basis.'
'end_of_life' => 'Fin de vie',
'end_of_life_definition' => 'Une version qui n\'est plus maintenue.
Les utilisateurs de cette version devraient faire une mise à jour le plus rapidement possible,
as they may be exposed to unpatched security vulnerabilities.',
'active_support' => 'Active support',
'active_support_definition' => 'A release that is being actively supported.
Reported bugs and security issues are fixed and regular point releases are made.',
'security_fix' => 'Security fixes only',
'security_fix_definition' => 'Une version qui est maintenue pour des corrections de failles de sécurité seulement.
Releases are only made on an as-needed basis.',
'end_of_life' => 'Fin de vie',
'end_of_life_definition' => 'Une version qui n\'est plus maintenue.
Les utilisateurs de cette version devraient faire une mise à jour le plus rapidement possible,
as they may be exposed to unpatched security vulnerabilities.',
];

7
modeles/legend.html

@ -1,10 +1,7 @@
<table class="standard">
<tr class="stable">
<td><:supportedversions:active_support:></td>
<td>
A release that is being actively supported. Reported bugs and security
issues are fixed and regular point releases are made.
</td>
<td><:supportedversions:active_support_definition:></td>
</tr>
<tr class="security">
<td><:supportedversions:security_fix:></td>
@ -14,4 +11,4 @@
<td><:supportedversions:end_of_life:></td>
<td><:supportedversions:end_of_life_definition:></td>
</tr>
</table>
</table>

1
paquet.xml

@ -6,4 +6,5 @@
compatibilite="[3.2;["
>
<nom>SPIP: Supported Versions</nom>
<pipeline nom="insert_head_css" />
</paquet>

49
phpcs.xml.dist

@ -0,0 +1,49 @@
<?xml version="1.0"?>
<ruleset name="SPIP">
<description>Coding rules for SPIP</description>
<file>./</file>
<exclude-pattern>lang/*</exclude-pattern>
<exclude-pattern>css/*</exclude-pattern>
<!-- Appliquer PSR-2 moins nos exceptions -->
<rule ref="PSR2" >
<!-- Désactiver la vérification sur les noms de classes/fonctions -->
<exclude name="Squiz.Classes.ValidClassName" />
<!-- Désactiver la vérification sur l'indentation -->
<exclude name="Generic.WhiteSpace.ScopeIndent" />
<exclude name="Generic.WhiteSpace.DisallowTabIndent" />
<!-- Désactiver la vérification sur les accolades -->
<exclude name="Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine" />
<exclude name="PSR2.Classes.ClassDeclaration.OpenBraceNewLine" />
<exclude name="PSR2.Classes.PropertyDeclaration" />
</rule>
<!-- Tabulations pour l'indentation -->
<arg name="tab-width" value="4"/>
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="indent" value="4"/>
<property name="tabIndent" value="true"/>
</properties>
</rule>
<!-- Accolades -->
<rule ref="Generic.Functions.OpeningFunctionBraceKernighanRitchie"/>
<rule ref="Generic.ControlStructures.InlineControlStructure" />
<rule ref="Squiz.ControlStructures.ControlSignature" />
<rule ref="Squiz.ControlStructures.ControlSignature.NewlineAfterOpenBrace">
<severity>0</severity>
</rule>
<!-- Guillemets doubles -->
<rule ref="Squiz.Strings.DoubleQuoteUsage"/>
<rule ref="Squiz.Strings.DoubleQuoteUsage.ContainsVar">
<severity>0</severity>
</rule>
<!-- Constantes en majuscules -->
<rule ref="Generic.NamingConventions.UpperCaseConstantName"/>
</ruleset>

4
supported-versions.svg.html

@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
#MODELE{supported-versions}
#HTTP_HEADER{Content-Type: image/svg+xml}<?xml version="1.0" encoding="utf-8" ?>
#MODELE{supported-versions}

9
supportedversions_fonctions.php

@ -0,0 +1,9 @@
<?php
function supportedversions_insert_head_css($flux) {
$flux .= '<link rel="stylesheet" type="text/css" media="all" href="'.
find_in_path('css/supported-versions.css').
'" />'."\n";
return $flux;
}
Loading…
Cancel
Save