Skip to content

Commit

Permalink
Contrast-Finder v0.3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
mfaure committed Dec 18, 2016
2 parents ae4f7e0 + 6e3ae84 commit 59df151
Show file tree
Hide file tree
Showing 18 changed files with 78 additions and 123 deletions.
5 changes: 2 additions & 3 deletions contrast-finder-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
<parent>
<groupId>org.opens</groupId>
<artifactId>contrast-finder</artifactId>
<version>0.3.4</version>
<version>0.3.5</version>
</parent>

<groupId>org.opens</groupId>
<artifactId>contrast-finder-api</artifactId>
<version>0.3.4</version>
<version>0.3.5</version>
<packaging>jar</packaging>
<name>contrast-finder-api</name>

Expand Down
8 changes: 4 additions & 4 deletions contrast-finder-hsv/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
<parent>
<groupId>org.opens</groupId>
<artifactId>contrast-finder</artifactId>
<version>0.3.4</version>
<version>0.3.5</version>
</parent>
<groupId>org.opens</groupId>
<artifactId>contrast-finder-hsv</artifactId>
<version>0.3.4</version>
<version>0.3.5</version>
<packaging>jar</packaging>
<name>contrast-finder-hsv</name>
<build>
Expand All @@ -33,7 +32,8 @@
<formats>
<format>xml</format>
</formats>
</configuration>
<check/>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
5 changes: 2 additions & 3 deletions contrast-finder-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
<parent>
<groupId>org.opens</groupId>
<artifactId>contrast-finder</artifactId>
<version>0.3.4</version>
<version>0.3.5</version>
</parent>
<groupId>org.opens</groupId>
<artifactId>contrast-finder-impl</artifactId>
<version>0.3.4</version>
<version>0.3.5</version>
<packaging>jar</packaging>
<name>contrast-finder-impl</name>
<dependencies>
Expand Down
5 changes: 2 additions & 3 deletions contrast-finder-resources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@
<parent>
<groupId>org.opens</groupId>
<artifactId>contrast-finder</artifactId>
<version>0.3.4</version>
<version>0.3.5</version>
</parent>
<groupId>org.opens</groupId>
<artifactId>contrast-finder-resources</artifactId>
<version>0.3.4</version>
<version>0.3.5</version>
<name>contrast-finder-resources</name>
<url>http://maven.apache.org</url>
<properties>
Expand Down
5 changes: 2 additions & 3 deletions contrast-finder-utils/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
<parent>
<groupId>org.opens</groupId>
<artifactId>contrast-finder</artifactId>
<version>0.3.4</version>
<version>0.3.5</version>
</parent>
<groupId>org.opens</groupId>
<artifactId>contrast-finder-utils</artifactId>
<version>0.3.4</version>
<version>0.3.5</version>
<packaging>jar</packaging>
<name>contrast-finder-utils</name>
<dependencies>
Expand Down
5 changes: 2 additions & 3 deletions contrast-finder-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
<parent>
<groupId>org.opens</groupId>
<artifactId>contrast-finder</artifactId>
<version>0.3.4</version>
<version>0.3.5</version>
</parent>
<groupId>org.opens</groupId>
<artifactId>contrast-finder-webapp</artifactId>
<version>0.3.4</version>
<version>0.3.5</version>
<packaging>war</packaging>

<name>contrast-finder-webapp</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
package org.opens.color.finder.webapp.controller;


import java.awt.Color;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import org.apache.log4j.Logger;
import org.opens.color.finder.webapp.model.ColorModel;
import org.opens.color.finder.webapp.validator.ColorModelValidator;
import org.opens.colorfinder.ColorFinder;
Expand All @@ -33,7 +29,6 @@
import org.opens.utils.contrastchecker.ContrastChecker;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
Expand All @@ -42,8 +37,11 @@
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import java.awt.*;

/**
*
* @author alingua
*/
@Controller
Expand All @@ -62,11 +60,7 @@ public class IndexController {
*/
@Value("${piwik_analytics_key}")
private String piwikAnalyticsKey;
/**
* google analyticskey
*/
@Value("${google_analytics_key}")
private String googleAnalyticsKey;

@Autowired
private ColorFinderFactory colorFinderFactory;

Expand All @@ -88,13 +82,11 @@ protected void initBinder(WebDataBinder binder) {
public String initAccueil(final Model model) {
ColorModel colorModel = new ColorModel();
model.addAttribute("piwikKey", piwikAnalyticsKey);
model.addAttribute("googleKey", googleAnalyticsKey);
model.addAttribute(commandName, colorModel);
return mainPageView;
}

/**
*
* @param model
* @param colorModel
* @param result
Expand Down Expand Up @@ -138,14 +130,12 @@ public String getPageResultFromGet(final Model model, @Valid ColorModel colorMod
model.addAttribute("otherAlgo", getOppositeAlgo(colorModel.getAlgo()));
/* Analytics Keys*/
model.addAttribute("piwikKey", piwikAnalyticsKey);
model.addAttribute("googleKey", googleAnalyticsKey);
return mainPageView;
}

}

/**
*
* @param algo
* @return the other algorithm
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
NOT_A_VALID_RATIO.colorModel.ratio=Wrong ratio
NOT_A_VALID_COLOR=The color should be between #000000 and #FFFFFF
home.titleTag=Contrast-Finder - find correct color contrasts for web accessibility (WCAG / RGAA)
form.fillInFields=Please fill in the following fields :
form.description=Asqatasun Contrast-Finder finds correct color contrasts for web accessibility
form.description=Contrast-Finder finds correct color contrasts for web accessibility
form.help=The color should be between #000000 and #FFFFFF
form.foregroundColor=Foreground Color :
form.backgroundColor=Background Color :
form.component=Component to edit :
form.componentForeground=Edit the foreground color
form.componentBackground=Edit the background color
form.ratio=Minimum ratio :
form.results=Results
form.contrastOld=Old contrast
form.contrastNew=New contrast
form.validate=Check and find contrast
Expand All @@ -22,22 +21,16 @@ form.contrastSolutionBackground=Background
form.contrastSolutionRatio=Ratio
form.contrastSolutionSample=Sample
form.initialContrastCaption=Invalid contrast
form.sampleTitle=Title big size
form.sampleTitle=Title big size
form.sampleTitleBold=with words in bold
form.sampleText=Here is some text sample
form.sampleText=Here is some text sample
form.sampleTextBold=with some words in bold
form.sampleText2=\ to illustrate the contrast.
form.wcagLink=http://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast
form.sc=Success criteria
form.sc-info=requires text to have a minimum contrast ratio of 4.5:1 (and 3:1 for large text).
footer.paragraphe=Liked this tool ? Try our other opensource tools for accessibility !
footer.tanaguru=<a href="https://github.com/Asqatasun/Asqatasun">automated accessibility assessment tool</a>, with heavy automation and high reliability (really !)
footer.kbaccess=<a href="http://www.kbaccess.org/">examples of accessibility on real webpages</a> (archived)
footer.LikedCf=Liked Contrast-Finder ? Try <em>Asqatasun</em>, the <a href="http://asqatasun.org/">opensource website analyser for accessibility and <abbr title="Search Engine optimisation">SEO</abbr></a>
form.contrastSolutionDistance=Distance
form.usage=Usage :
form.ratioMedium=Small text (size &lt; 18px, Level AA)
form.ratioShort=Big text (size &ge; 18px, Level AA)
form.ratioHigh=Strenghten contrast (Level AAA)
form.contrastSolutionDistanceEx=Distance from initial color
form.objectifs=Gimme :
form.algoHSV=a <em>range</em> of valid colors
Expand All @@ -49,7 +42,7 @@ form.tryHsv=Gimme a <em>range</em> of colors
form.tryRgb=Gimme valid colors and <em>very close</em> to initial color
form.testedColors=colors tested
form.notSatisfied=Not satisfied ?
form.anyResult=Let's
form.anyResult=Let's
form.oppositeComponentForeground=background color
form.oppositeComponentBackground=foreground color
message.addon=Hey! Have you tried the new <a class="alert-link" href="{0}"><em>Asqatasun Contrast-Finder</em> Firefox addon</a> ?
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
NOT_A_VALID_RATIO.colorModel.ratio=Wrong ratio
NOT_A_VALID_COLOR=The color should be between #000000 and #FFFFFF
home.titleTag=Contrast-Finder - find correct color contrasts for web accessibility (WCAG / RGAA)
form.fillInFields=Please fill in the following fields :
form.description=Asqatasun Contrast-Finder finds correct color contrasts for web accessibility
form.description=Contrast-Finder finds correct color contrasts for web accessibility
form.help=The color should be between #000000 and #FFFFFF
form.foregroundColor=Foreground Color :
form.backgroundColor=Background Color :
form.component=Component to edit :
form.componentForeground=Edit the foreground color
form.componentBackground=Edit the background color
form.ratio=Minimum ratio :
form.results=Results
form.contrastOld=Old contrast
form.contrastNew=New contrast
form.validate=Check and find contrast
Expand All @@ -30,14 +29,8 @@ form.sampleText2=\ to illustrate the contrast.
form.wcagLink=http://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast
form.sc=Success criteria
form.sc-info=requires text to have a minimum contrast ratio of 4.5:1 (and 3:1 for large text).
footer.paragraphe=Liked this tool ? Try our other opensource tools for accessibility !
footer.tanaguru=<a href="https://github.com/Asqatasun/Asqatasun">automated accessibility assessment tool</a>, with heavy automation and high reliability (really !)
footer.kbaccess=<a href="http://www.kbaccess.org/">examples of accessibility on real webpages</a> (archived)
footer.LikedCf=Liked Contrast-Finder ? Try <em>Asqatasun</em>, the <a href="http://asqatasun.org/">opensource website analyser for accessibility and <abbr title="Search Engine optimisation">SEO</abbr></a>
form.contrastSolutionDistance=Distance
form.usage=Usage :
form.ratioMedium=Small text (size &lt; 18px, Level AA)
form.ratioShort=Big text (size &ge; 18px, Level AA)
form.ratioHigh=Strenghten contrast (Level AAA)
form.contrastSolutionDistanceEx=Distance from initial color
form.objectifs=Gimme :
form.algoHSV=a <em>range</em> of valid colors
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
NOT_A_VALID_RATIO.colorModel.ratio=Le ratio n'est pas valide
NOT_A_VALID_COLOR=La couleur doit \u00eatre entre #000000 \u00e0 #FFFFFF
home.titleTag=Contrast-Finder - trouver les bons contrastes de couleurs pour l'accessibilit\u00e9 web (WCAG / RGAA)
form.fillInFields=Renseignez les champs suivants :
form.description=Asqatasun <span lang="en">Contrast-Finder</span> trouve les bons contrastes de couleurs pour l'accessibilit\u00e9 web
form.description=<span lang="en">Contrast-Finder</span> trouve les bons contrastes de couleurs pour l'accessibilit\u00e9 web
form.help=La couleur doit \u00eatre comprise entre #000000 \u00e0 #FFFFFF
form.foregroundColor=Couleur du texte :
form.backgroundColor=Couleur du fond :
form.component=Composante \u00e0 modifier :
form.componentForeground=Modifier la couleur du texte
form.componentBackground=Modifier la couleur du fond
form.ratio=Ratio minimum :
form.results=Resultats
form.contrastOld=Ancien contraste
form.contrastNew=Nouveau contraste
form.validate=Verifier et trouver le contraste
Expand All @@ -22,22 +21,16 @@ form.contrastSolutionBackground=Arri\u00e8re plan
form.contrastSolutionRatio=Ratio
form.contrastSolutionSample=Exemple
form.initialContrastCaption=Contraste invalide
form.sampleTitle=Titre de grande taille
form.sampleTitle=Titre de grande taille
form.sampleTitleBold=avec des mots en gras
form.sampleText=Ceci est un echantillon de texte
form.sampleText=Ceci est un \u00e9chantillon de texte
form.sampleTextBold=avec quelques mots en gras
form.sampleText2=\ pour illustrer le bon contraste.
form.wcagLink=http://www.w3.org/Translations/WCAG20-fr/#visual-audio-contrast-contrast
form.sc=Crit\u00e8re de succ\u00e8s
form.sc-info=demande pour le texte un rapport de contraste minimum de 4.5:1 (et 3:1 pour le texte agrandi).
footer.paragraphe=Vous aimez cet outil ? Essayez nos autres logiciels libres pour l'acc\u00e9ssibilit\u00e9 !
footer.tanaguru=Logiciel pour <a href="https://github.com/Asqatasun/Asqatasun">\u00e9valuer l'accessibilit\u00e9 web</a>, avec une forte automatisation et grande fiabilit\u00e9 (vraiment !)
footer.kbaccess=<a href="http://www.kbaccess.org/">exemples d'accessibilit\u00e9 sur des pages web r\u00e9elles</a> (et archiv\u00e9es).
footer.LikedCf=Tu kiffes Contrast-Finder ? Essaye <em>Asqatasun</em>, le <a href="http://asqatasun.org/">logiciel libre de mesure de l'accessibilit\u00e9 et du <span lang="en"><abbr title="Search Engine optimisation">SEO</abbr></span></a>
form.contrastSolutionDistance=Distance
form.usage=Utilisation :
form.ratioMedium=Texte petit (Taille &lt; 18px, Niveau AA)
form.ratioShort=Grand texte (Taille &ge; 18px, Niveau AA)
form.ratioHigh=Renforcer le contraste (Niveau AAA)
form.contrastSolutionDistanceEx=Distance de la couleur d'origine
form.objectifs=Propose-moi :
form.algoHSV=une <em>palette</em> de couleurs valides
Expand Down
5 changes: 5 additions & 0 deletions contrast-finder-webapp/src/main/webapp/Js/jquery-ui.min.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions contrast-finder-webapp/src/main/webapp/Js/jquery.min.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions contrast-finder-webapp/src/main/webapp/WEB-INF/pages/form.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
</c:otherwise>
</c:choose>
<html lang="${lang}">
<c:set var="title" value="Asqatasun Contrast-Finder"/>
<c:set var="title" value="Contrast-Finder"/>
<%@include file='/WEB-INF/template/head.jspf' %>
<body id="contrast-finder-page">
<div class="container">
<%@include file='/WEB-INF/template/header.jspf' %>
<%@include file='/WEB-INF/template/cf-message.jspf' %>
<%--<%@include file='/WEB-INF/template/cf-message.jspf' %>--%>
<div id="set-up-form" class="row">
<div class="col-lg-12">
<h2><fmt:message key="form.fillInFields"/></h2>
Expand Down Expand Up @@ -363,8 +363,8 @@
</div> <!-- class="container' -->
<%@include file='/WEB-INF/template/footer.jspf' %>
<!-- From -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.0/jquery-ui.min.js"></script>
<script src="Js/jquery.min.js"></script>
<script src="Js/jquery-ui.min.js"></script>
<c:if test="${colorResult.numberOfSuggestedColors > 0}">
<script src="Js/jquery.tablesorter.min.js"></script>
<script src="Js/accessible-min.js"></script>
Expand Down
50 changes: 13 additions & 37 deletions contrast-finder-webapp/src/main/webapp/WEB-INF/template/footer.jspf
Original file line number Diff line number Diff line change
Expand Up @@ -4,52 +4,28 @@
<jsp:useBean id="now" class="java.util.Date" scope="page" />
<footer class="container">
<div id="footer-msg">
<p><fmt:message key="footer.paragraphe"/></p>
<ul>
<li><strong>Asqatasun: </strong><fmt:message key="footer.tanaguru"/></li>
</ul>
<p><fmt:message key="footer.LikedCf"/></p>
</div>
<p id="footer-copyright"><fmt:formatDate value="${now}" pattern="yyyy" /> <a href="http://asqatasun.org/">Asqatasun</a> - Version 0.3.4 - Contact <a href="http://twitter.com/mfaure">@mfaure</a> - <a href="https://twitter.com/Asqatasun">@Asqatasun</a></p>
<p id="footer-copyright">&copy; 2013-<fmt:formatDate value="${now}" pattern="yyyy" /> <a href="http://asqatasun.org/">Asqatasun</a> - Version 0.3.5 - Contact <a href="https://twitter.com/Asqatasun">@Asqatasun</a></p>
</footer>
<c:set var="analytics" value="${googleKey}"/>
<c:if test="${not empty analytics}">
<script>
(function(i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function() {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');

ga('create', '${analytics}', 'tanaguru.com');
ga('send', 'pageview');

</script>
</c:if>

<c:set var="piwikSiteId" value="${piwikKey}"/>
<c:if test="${not empty piwikSiteId}">
<!-- Piwik -->
<script type="text/javascript">
var _paq = _paq || [];
_paq.push(["trackPageView"]);
_paq.push(["enableLinkTracking"]);
_paq.push(["setDomains", ["*.contrast-finder.org","*.www.contrast-finder.org"]]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u = (("https:" == document.location.protocol) ? "https" : "http") + "://stats.open-s.com/";
_paq.push(["setTrackerUrl", u + "piwik.php"]);
_paq.push(["setSiteId", "${piwikSiteId}"]);
var d = document, g = d.createElement("script"), s = d.getElementsByTagName("script")[0];
g.type = "text/javascript";
g.defer = true;
g.async = true;
g.src = u + "piwik.js";
s.parentNode.insertBefore(g, s);
var u="//stats.taqamaqa.com/piwik/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '${piwikSiteId}']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<!-- End Piwik Code -->
<noscript><p><img src="//stats.taqamaqa.com/piwik/piwik.php?idsite=${piwikSiteId}" style="border:0;" alt="" /></p></noscript>
<!-- End Piwik Code -->

</c:if>
Loading

0 comments on commit 59df151

Please sign in to comment.