Compare commits
12 Commits
177d35e1de
...
6d62e8aaf7
Author | SHA1 | Date |
---|---|---|
François Poulain | 6d62e8aaf7 | |
François Poulain | 750a030dd0 | |
François Poulain | 0f9a243823 | |
François Poulain | b4e861af93 | |
François Poulain | ce53bc3a04 | |
François Poulain | 97ede23641 | |
François Poulain | df27c8b2b3 | |
François Poulain | a01b4bd646 | |
François Poulain | da2b017097 | |
François Poulain | 3a0c955694 | |
François Poulain | ab64c75ef9 | |
François Poulain | 8dd2f6faf1 |
|
@ -3,6 +3,7 @@ guide_libre_asso.*
|
|||
teaser.pdf
|
||||
version_html/
|
||||
version_epub/
|
||||
includes/*/vignettes/*
|
||||
|
||||
*.aux
|
||||
*.ilg
|
||||
|
|
39
Makefile
|
@ -1,14 +1,23 @@
|
|||
#all: guide.pdf teaser.pdf guide.html
|
||||
#all: index.xhtml
|
||||
all: guide.pdf
|
||||
|
||||
EXT = aux ilg log lof lot nlo nls out toc tns nav snm old blg bbl haux htoc
|
||||
|
||||
TEMP=$(foreach ext,$(EXT), guide.$(ext) teaser.$(ext))
|
||||
TEMP=$(foreach ext,$(EXT), guide.$(ext))
|
||||
|
||||
PDFTEX = pdflatex -interaction nonstopmode
|
||||
NEED_RERUN = '(There were undefined references|Rerun (me )?to get (cross-references|the bars) right)|((Reference|Citation).*undefined)|(Label.*multiply defined)'
|
||||
|
||||
IMG_PNG = $(wildcard includes/screenshots/*.png) $(wildcard includes/images/*.png)
|
||||
IMG_PNG_SMALL = $(subst screenshots,screenshots/vignettes, ${IMG_PNG})
|
||||
|
||||
includes/screenshots/vignettes/%.png: includes/screenshots/%.png
|
||||
convert $< -resize 200 $@
|
||||
|
||||
IMG_JPG = $(wildcard includes/screenshots/*.jpg) $(wildcard includes/images/*.jpg)
|
||||
IMG_JPG_SMALL = $(subst screenshots,screenshots/vignettes, ${IMG_JPG})
|
||||
|
||||
includes/screenshots/vignettes/%.jpg: includes/screenshots/%.jpg
|
||||
convert $< -resize 200 $@
|
||||
|
||||
all : ${PDF}
|
||||
guide_libre_asso.wiki:
|
||||
wget "http://wiki.april.org/index.php?title=Guide_Libre_Association_complet&action=raw" -O $@
|
||||
|
@ -16,16 +25,14 @@ guide_libre_asso.wiki:
|
|||
guide_libre_asso.tex: guide_libre_asso.wiki
|
||||
sed -f tools/wiki2tex.sed $< > $@
|
||||
sed -i $@ -e 's/.png//g'
|
||||
sed -i $@ -e 's/\\description/\\descriptif/g'
|
||||
vim -c '%s/^\(\s*\*.*\)\n\(\s*[^*]\|\n\)/\1\r\\end{itemize}\r\2/g' -c '%s/^\(\s*[^*].*\|\)\n\s*\*/\1\r\\begin{itemize}\r*/g' -c '%s/^\s*\*/\\item/' -c ':x' $@
|
||||
|
||||
guide.pdf: guide.tex guide_libre_asso.tex lolipop.cls
|
||||
guide.pdf: guide.tex guide_libre_asso.tex lolipop.cls ${IMG_PNG}
|
||||
${PDFTEX} $<
|
||||
if egrep -q $(NEED_RERUN) $(subst tex,log,$<) ; then ${PDFTEX} $< ; fi
|
||||
|
||||
teaser.pdf: teaser.tex guide.pdf
|
||||
${PDFTEX} $<
|
||||
|
||||
version_html/tmp/guide.html: guide.tex guide_libre_asso.tex lolipop.hva
|
||||
version_html/tmp/guide.html: guide.tex guide_libre_asso.tex lolipop.hva ${IMG_PNG_SMALL}
|
||||
cd version_html/tmp &&\
|
||||
hevea -I ../../ $< 2> guide.log &&\
|
||||
if egrep -q $(NEED_RERUN) guide.log ; then hevea -I ../../ $< 2> guide.log; fi
|
||||
|
@ -35,9 +42,9 @@ version_html/tmp/index.html: version_html/tmp/guide.html
|
|||
|
||||
version_html/tmp/index.xhtml: version_html/tmp/index.html
|
||||
cd $(dir $<) &&\
|
||||
(tidy -c -e -utf8 --output-xhtml 1 --fix-uri 1 $(notdir $<) > $(notdir $@) || test -f $(notdir $@)) &&\
|
||||
(for file in guide*.html; do tidy -utf8 --output-xhtml 1 $$file > `basename $$file html`xhtml; done || /bin/true) &&\
|
||||
(tidy -utf8 --output-xhtml 1 index.html > index.xhtml || test -f index.xhtml) &&\
|
||||
(tidy -c -e -utf8 -asxhtml --doctype strict --fix-uri 1 $(notdir $<) > $(notdir $@) || test -f $(notdir $@)) &&\
|
||||
(for file in guide*.html; do tidy -utf8 -asxhtml --doctype strict $$file > `basename $$file html`xhtml; done || /bin/true) &&\
|
||||
(tidy -utf8 -asxhtml --doctype strict index.html > index.xhtml || test -f index.xhtml) &&\
|
||||
sed -i -e 's/guide\([0-9]*\)\.html/guide\1.xhtml/g' *.xhtml
|
||||
|
||||
version_html/guide.html: version_html/tmp/index.xhtml $(wildcard version_html/tmp/*.xhtml)
|
||||
|
@ -47,6 +54,12 @@ clean:
|
|||
rm -fv $(TEMP) version_html/tmp/*
|
||||
|
||||
mrproper: clean
|
||||
rm -fv guide.pdf guide_libre_asso.* teaser.pdf version_html/guide.html
|
||||
rm -fv guide.pdf guide_libre_asso.* version_html/guide.html
|
||||
|
||||
distclean: mrproper
|
||||
|
||||
rebuild:
|
||||
rm -fv guide_libre_asso.wiki guide_libre_asso.tex
|
||||
make all
|
||||
|
||||
.PHONY: all clean mrproper distclean rebuild
|
||||
|
|
12
README
|
@ -1,15 +1,19 @@
|
|||
== Guide libre association ==
|
||||
|
||||
=== Pour contribuer ===
|
||||
|
||||
La source est le wiki de l'April : https://wiki.april.org/w/Guide_Libre_Association_complet
|
||||
|
||||
=== Pour construire le guide, version pdf ===
|
||||
|
||||
La procédure est faite sur une Debian Wheezy, avec une distribution LaTeX
|
||||
La procédure est faite sur une Debian Buster, avec une distribution LaTeX
|
||||
installée, ainsi que les build-essential.
|
||||
|
||||
- Dans un terminal, tapez "make".
|
||||
|
||||
=== Pour construire le guide, version html ===
|
||||
|
||||
La procédure est faite sur une Debian Wheezy, avec une distribution LaTeX
|
||||
installée, ainsi que les build-essential, hevea et xsltproc.
|
||||
La procédure est faite sur une Debian Buster, avec une distribution LaTeX
|
||||
installée, ainsi que les build-essential, hevea, tidy et xsltproc.
|
||||
|
||||
- Dans un terminal, tapez "make version_html/index.html".
|
||||
- Dans un terminal, tapez "make version_html/guide.html".
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
\title{Guide Libre Association}
|
||||
\subject{Guide d'usage des logiciels libres en milieu associatif}
|
||||
\keywords{Logiciels libres, association, Internet, travail collaboratif}
|
||||
\version{1.1}
|
||||
\version{1.9}
|
||||
\date{\today}
|
||||
\organisation{April}
|
||||
\orgwebsite{www.april.org}
|
||||
|
|
After Width: | Height: | Size: 224 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 66 KiB |
Before Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 83 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 124 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 109 KiB |
|
@ -0,0 +1 @@
|
|||
../../includes/images/stevejob.pdf
|
After Width: | Height: | Size: 103 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 68 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 17 KiB |
76
lolipop.cls
|
@ -143,6 +143,17 @@
|
|||
% Mise en forme
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
% Commençons par écrire un constructeur pour les parametres à déclarer.
|
||||
\def\lolipop@declare#1{%
|
||||
\global\long\expandafter%
|
||||
\def \csname lolipop@#1\endcsname {}%
|
||||
\global\long\expandafter%
|
||||
\def \csname #1\endcsname ##1{%
|
||||
\global\long\expandafter%
|
||||
\def \csname lolipop@#1\endcsname{##1}%
|
||||
}%
|
||||
}
|
||||
|
||||
%%% Couleur %%%
|
||||
|
||||
% Le magenta est la couleur dominante du guide.
|
||||
|
@ -153,18 +164,10 @@
|
|||
\renewcommand{\emph}[1]{{\it#1}}
|
||||
\newcommand{\strong}[1]{{\bf\magenta#1}}
|
||||
% Ainsi que pour les exergues, que nous définirons comme un paragraphe centré
|
||||
% dans la marge.
|
||||
\NewEnviron{exergue}{
|
||||
\let\href\fnhref
|
||||
\marginpar{
|
||||
\checkoddpage\ifoddpage\raggedright\else\raggedleft\fi
|
||||
\begin{minipage}{4.0cm}
|
||||
\centering
|
||||
\bf\large\magenta
|
||||
\BODY
|
||||
\end{minipage}
|
||||
}
|
||||
\let\href\mphref
|
||||
\newcommand{\exergue}[1]{
|
||||
\vskip 20\p@
|
||||
{\centering\bf\large\magenta #1}
|
||||
\vskip 20\p@
|
||||
}
|
||||
|
||||
%%% Hyperliens %%%
|
||||
|
@ -177,8 +180,8 @@
|
|||
% redéfinissons les notres.
|
||||
\let\hhref\href
|
||||
\let\hurl\url
|
||||
\let\href\mphref
|
||||
\newcommand{\mphref}[2]{\hhref{#1}{#2\footnote{\url{#1}}}}
|
||||
\let\href\mphref
|
||||
\renewcommand{\url}[1]{\hurl{#1}}
|
||||
\newcommand{\email}[1]{\hhref{mailto:#1}{\tech{#1}}}
|
||||
% Cependant, cela ne permet plus d'afficher un lien dans une footnote. Pour
|
||||
|
@ -226,6 +229,8 @@
|
|||
\newlength{\headwidth}
|
||||
\pgfdeclareimage{tache}{\@images tache}
|
||||
|
||||
\lolipop@declare{manchette}
|
||||
|
||||
\newcommand{\fancychapter}[1]{
|
||||
\reflectodd{
|
||||
\setlength\headwidth{0.6\columnwidth}
|
||||
|
@ -265,6 +270,32 @@
|
|||
|
||||
\def\@chapapp{}
|
||||
|
||||
\def\@chapter[#1]#2{%
|
||||
\let\oldmanchette\manchette%
|
||||
\def\manchette##1{}%
|
||||
\ifnum \c@secnumdepth >\m@ne
|
||||
\if@mainmatter
|
||||
\refstepcounter{chapter}%
|
||||
\typeout{\@chapapp\space\thechapter.}%
|
||||
\addcontentsline{toc}{chapter}%
|
||||
{\protect\numberline{\thechapter}#1}%
|
||||
\else
|
||||
\addcontentsline{toc}{chapter}{#1}%
|
||||
\fi
|
||||
\else
|
||||
\addcontentsline{toc}{chapter}{#1}%
|
||||
\fi
|
||||
\chaptermark{#1}%
|
||||
\addtocontents{lof}{\protect\addvspace{10\p@}}%
|
||||
\addtocontents{lot}{\protect\addvspace{10\p@}}%
|
||||
\let\manchette\oldmanchette%
|
||||
\if@twocolumn
|
||||
\@topnewpage[\@makechapterhead{#2}]%
|
||||
\else
|
||||
\@makechapterhead{#2}%
|
||||
\@afterheading
|
||||
\fi}
|
||||
|
||||
\def\@makechapterhead#1{%
|
||||
\vspace*{20\p@}%
|
||||
{\parindent \z@
|
||||
|
@ -283,6 +314,7 @@
|
|||
\Huge \bfseries #1
|
||||
}
|
||||
\par\nobreak
|
||||
\if@not@empty{\lolipop@manchette}{\vskip 10\p@\large\lolipop@manchette}\manchette{}
|
||||
\vskip 20\p@
|
||||
}
|
||||
}
|
||||
|
@ -297,6 +329,7 @@
|
|||
\Huge \bfseries #1
|
||||
}
|
||||
\par\nobreak
|
||||
\if@not@empty{\lolipop@manchette}{\vskip 10\p@\large\lolipop@manchette}\manchette{}
|
||||
\vskip 20\p@
|
||||
}
|
||||
}
|
||||
|
@ -360,21 +393,10 @@
|
|||
% Flottants : logiciels
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
% Commençons par écrire un constructeur pour les parametres à déclarer.
|
||||
\def\lolipop@declare#1{%
|
||||
\global\long\expandafter%
|
||||
\def \csname lolipop@#1\endcsname {}%
|
||||
\global\long\expandafter%
|
||||
\def \csname #1\endcsname ##1{%
|
||||
\global\long\expandafter%
|
||||
\def \csname lolipop@#1\endcsname{##1}%
|
||||
}%
|
||||
}
|
||||
|
||||
% Déclarons les paramètres qui nous intéressent.
|
||||
\lolipop@declare{nom}
|
||||
\lolipop@declare{logo}
|
||||
\lolipop@declare{description}
|
||||
\lolipop@declare{genre}
|
||||
\lolipop@declare{apprentissage}
|
||||
\lolipop@declare{installation}
|
||||
\lolipop@declare{lien}
|
||||
|
@ -383,7 +405,7 @@
|
|||
% L'interface utilisateur est l'environnement "logiciel". Là où le logiciel est
|
||||
% déclaré, son résumé est inséré en marge et une référence est crée.
|
||||
\NewEnviron{logiciel}{
|
||||
\nom{} \logo{} \description{} \apprentissage{}
|
||||
\nom{} \logo{} \genre{} \apprentissage{}
|
||||
\installation{} \lien{} \equivalent{}
|
||||
\BODY
|
||||
\let\href\fnhref
|
||||
|
@ -392,7 +414,7 @@
|
|||
\begin{rosebox}{\lolipop@nom}
|
||||
\sffamily\footnotesize
|
||||
% Logo : \lolipop@logo
|
||||
\if@not@empty{\lolipop@description }{\lolipop@description \\ }
|
||||
\if@not@empty{\lolipop@genre }{\lolipop@genre \\ }
|
||||
\if@not@empty{\lolipop@apprentissage}{Apprentissage : \iconify{hirondelle}{\lolipop@apprentissage} \\ }
|
||||
\if@not@empty{\lolipop@installation }{Installation : \iconify{marguerite}{\lolipop@installation} \\ }
|
||||
\if@not@empty{\lolipop@lien }{Lien : \lolipop@lien \\ }
|
||||
|
|
13
lolipop.hva
|
@ -64,6 +64,11 @@
|
|||
\end{rawhtml}#1\begin{rawhtml}</span></span>\end{rawhtml}
|
||||
}
|
||||
|
||||
%%% Manchettes
|
||||
\renewcommand{\manchette}[1]
|
||||
{\begin{rawhtml}<span class="guide_manchette">\end{rawhtml}#1\begin{rawhtml}</span>\end{rawhtml}}
|
||||
|
||||
|
||||
%%% Autres interfaces %%%
|
||||
|
||||
% Pour l'écrit étranger.
|
||||
|
@ -87,7 +92,7 @@
|
|||
\newenvironment{capture}[2][]{\begin{rawhtml}<div class="guide_capture">
|
||||
<a href="\end{rawhtml}\@screenshots #2\begin{rawhtml}.png"
|
||||
class="guide_screenshot_fullscreen">
|
||||
<img class="guide_screenshot_vignette" src="\end{rawhtml}\@screenshots\@lowres #2\begin{rawhtml}.png"/>
|
||||
<img class="guide_screenshot_vignette" src="\end{rawhtml}\@screenshots\@lowres #2\begin{rawhtml}.png">
|
||||
</a>\end{rawhtml}}
|
||||
{\begin{rawhtml}
|
||||
</div>\end{rawhtml}}
|
||||
|
@ -102,8 +107,8 @@ class="guide_screenshot_fullscreen">
|
|||
|
||||
\newcommand{\logo}[1]{}
|
||||
|
||||
\renewcommand{\description}[1]
|
||||
{\begin{rawhtml}<div class="guide_description">\end{rawhtml}#1\begin{rawhtml}</div>\end{rawhtml}}
|
||||
\renewcommand{\genre}[1]
|
||||
{\begin{rawhtml}<div class="guide_genre">\end{rawhtml}#1\begin{rawhtml}</div>\end{rawhtml}}
|
||||
|
||||
\newcommand{\apprentissage}[1]
|
||||
{\begin{rawhtml}<div class="guide_apprentissage">\end{rawhtml}#1\begin{rawhtml}</div>\end{rawhtml}}
|
||||
|
@ -133,7 +138,7 @@ class="guide_screenshot_fullscreen">
|
|||
|
||||
\newenvironment{ressource}[1]
|
||||
{\begin{rawhtml}<div class="guide_ressource"><a href="\end{rawhtml}\@images #1\begin{rawhtml}.png"><p>
|
||||
<img src="\end{rawhtml}\@images\@lowres #1\begin{rawhtml}.png"/></a>\end{rawhtml}}
|
||||
<img src="\end{rawhtml}\@images\@lowres #1\begin{rawhtml}.png"></a>\end{rawhtml}}
|
||||
{\begin{rawhtml}</p></div>\end{rawhtml}\par}
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
|
42
teaser.tex
|
@ -1,42 +0,0 @@
|
|||
\documentclass{lolipop}
|
||||
\usepackage{pdfpages}
|
||||
\newgeometry{hmargin={4cm}}
|
||||
|
||||
\begin{document}\large
|
||||
\AddToShipoutPicture{\parbox{0pt}{\vspace{-520mm}\rotatebox{45}{\parbox{5cm}{\Huge\bf\color{black!50}\centering Brouillon\\ \normalfont\normalsize Ne pas diffuser, merci}}}}
|
||||
|
||||
\includepdf[pages={1}]{guide.pdf}
|
||||
|
||||
\chapter*{Tout sur le Guide Libre Association de l'April}
|
||||
|
||||
\section*{Dirigeants, salariés, bénévoles, investis dans un projet associatif...}
|
||||
|
||||
Le guide d’usage des logiciels libres en milieu associatif est fait pour vous !
|
||||
|
||||
Afin de «~jeter des ponts entre les logiciels libres et le monde associatif~», l'April a réalisé, en partenariat avec la Fondation Crédit Coopératif, un guide répertoriant des méthodes et des outils de travail adaptés aux besoins des associations.
|
||||
|
||||
Distribué gratuitement, ce guide est prévu pour donner à chaque association les clés de ses libertés informatiques.
|
||||
|
||||
\section*{Quand le guide sera-t-il disponible ?}
|
||||
|
||||
Le guide sera dévoilé le 20 juin 2012 à l'occasion du salon Solutions GNU/Linux à Paris, la Défense :
|
||||
\begin{center}
|
||||
\large\url{http://www.solutionslinux.fr}
|
||||
\end{center}
|
||||
|
||||
\section*{Comment se procurer le guide ?}
|
||||
|
||||
Pour organiser la distribution, l'April met à disposition un formulaire à la page :
|
||||
\begin{center}
|
||||
\large\url{http://guide.libreassociation.info}
|
||||
\end{center}
|
||||
|
||||
Il suffit que vous remplissiez ce formulaire, et les guides vous seront expédiés dès que possible. Pensez à bien préciser le nombre d'exemplaires
|
||||
que vous pensez qu'il soit pertinent de recevoir.
|
||||
|
||||
\section*{Découvrez le dès maintenant !}
|
||||
|
||||
Pour que vous appréciez son contenu, les pages suivantes sont extraites du guide. Rendez-vous le 20 juin 2012 pour sa publication officielle !
|
||||
|
||||
\includepdf[pages={3-7,27-28,77,80}]{guide.pdf}
|
||||
\end{document}
|
|
@ -7,8 +7,11 @@ s/ / /g
|
|||
# acceptons de mettre du code LaTeX dans la page wiki
|
||||
s/\ /\\nbspace /g
|
||||
s/\(\$\|~\|%\|\&\|_\|#\)/\\\1/g
|
||||
# en début de ligne on suppose que c'est du commentaire
|
||||
s/^\\%/%/
|
||||
s/« /«\~/g
|
||||
s/ »/\~»/g
|
||||
s/\([0-9]\) \([0-9]\{3,3\}\)/\1~\2/g
|
||||
s/’/'/g
|
||||
s/n°/\\no /g
|
||||
s/\\nbspace /~/g
|
||||
|
@ -20,9 +23,11 @@ s/{{[ ]*[Tt]ravail [Ee]n [Cc]ours.*}}//g
|
|||
s/<references *\/>//g
|
||||
|
||||
# Mise en forme
|
||||
s/'''\([^\('''\)]*\)'''/\\strong{\1}/g
|
||||
s/'''\([^\('''\)]\+\)'''/\\strong{\1}/g
|
||||
s/<strong>\([^<]*\)<\/strong>/\\strong{\1}/g
|
||||
s/''\([^\(''\)]*\)''/\\emph{\1}/g
|
||||
s/<em>\([^<]*\)<\/em>/\\emph{\1}/g
|
||||
s/{{Exergue|\(.*\)}}/\\exergue{\1}/g
|
||||
|
||||
# buggy ...
|
||||
s/<ref>\([^\(<\/ref>\)]*\)<\/ref>/\\emph{\1}/g
|
||||
|
|
|
@ -250,4 +250,3 @@ L<sup>A</sup>T<sub>E</sub>X par</em> <a href=
|
|||
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
export XML_CATALOG_FILES="dtd/catalog"
|
||||
xsltproc -o ../../version_html/guide.html guide-html.xsl conf.xml
|
||||
xsltproc -o ../../version_html/guide.html guide-html.xsl conf.xml
|
||||
|
|
|
@ -0,0 +1,319 @@
|
|||
@import url("jquery.lightbox-adapte.css");
|
||||
|
||||
body {
|
||||
font-family: Geneva, Arial, Helvetica, sans-serif;
|
||||
/*font-size: 100%;
|
||||
/*font-size: 80%;*/
|
||||
}
|
||||
|
||||
p.entete_titre {
|
||||
margin: 0;
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
p.entete_soustitre {
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
p.contenu_titre {
|
||||
margin: 0;
|
||||
font-size: 36px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
p.contenu_soustitre {
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
div.ui-layout-west {
|
||||
padding: 0!important;
|
||||
}
|
||||
|
||||
div.ui-layout-west h1 {
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
padding: 3px;
|
||||
background-color: #007E91;
|
||||
color: white;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
a.JQ_LienExterne {
|
||||
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAFZJREFUeF59z4EJADEIQ1F36k7u5E7ZKXeUQPACJ3wK7UNokVxVk9kHnQH7bY9hbDyDhNXgjpRLqFlo4M2GgfyJHhjq8V4agfrgPQX3JtJQGbofmCHgA/nAKks+JAjFAAAAAElFTkSuQmCC") no-repeat scroll right center transparent;
|
||||
padding-right: 13px;
|
||||
color: #007E91;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
body {
|
||||
color: #404040;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
color: #F26A16;
|
||||
margin-right: 280px;
|
||||
}
|
||||
|
||||
div.ui-layout-center p, div.ui-layout-center ul, div.guide_large_font, h4, h5, dl, div.guide_signature {
|
||||
margin-right: 280px;
|
||||
margin-left: 30px;
|
||||
}
|
||||
|
||||
div.ui-layout-center p {
|
||||
line-height: 1.3em;
|
||||
text-align: justify;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
div.ui-layout-center li {
|
||||
line-height: 1.3em;
|
||||
margin-bottom: 12px;
|
||||
margin-right: 30px;
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.3em;
|
||||
background-color: #007E91;
|
||||
color: white;
|
||||
margin-top: 50px;
|
||||
margin-bottom: 25px;
|
||||
padding: 5px;
|
||||
padding-left: 20px;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.2em;
|
||||
padding-bottom: 3px;
|
||||
border-bottom-width: 1px;
|
||||
border-bottom-style: solid;
|
||||
border-bottom-color: #F26A16;
|
||||
margin-top: 35px;
|
||||
margin-bottom: 15px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.0em;
|
||||
margin-left: 50px;
|
||||
margin-top: 35px;
|
||||
margin-bottom: 25px;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 0.9em;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-style: italic;
|
||||
font-weight: normal;
|
||||
color: #404040;
|
||||
font-size: 1.0em;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.guide_manchette {
|
||||
display: block;
|
||||
font-size: smaller;
|
||||
margin-top: 1em;
|
||||
font-weight: initial;
|
||||
}
|
||||
|
||||
.toc .guide_manchette {
|
||||
display: none;
|
||||
}
|
||||
|
||||
dt {
|
||||
color: #F26A16;
|
||||
font-weight: bold;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
|
||||
div.guide_ressource, div.guide_encart, div.guide_logiciel, div.guide_capture {
|
||||
clear: right;
|
||||
float: right;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
width: 240px;
|
||||
margin-top: 20px;
|
||||
margin-bottom: 10px;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
div.guide_capture {
|
||||
text-align: center;
|
||||
border-color: #999999;
|
||||
padding-top: 5px;
|
||||
}
|
||||
|
||||
|
||||
div.guide_ressource, div.guide_encart {
|
||||
border-color: #0099ff;
|
||||
}
|
||||
|
||||
div.guide_encart p, div.guide_encartdefin p, div.guide_capture p {
|
||||
margin-top: 0;
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
margin-bottom: 5px;
|
||||
text-align: left;
|
||||
line-height: 1.2em;
|
||||
}
|
||||
|
||||
div.guide_capture p {
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
margin-bottom: 5px;
|
||||
text-align: center;
|
||||
font-style: italic;
|
||||
line-height: 1.2em;
|
||||
}
|
||||
|
||||
div.guide_logiciel {
|
||||
border-color: #ff00ff;
|
||||
}
|
||||
|
||||
div.guide_ressource_titre, div.guide_encart_titre {
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: #ffffff;
|
||||
padding: 3px;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
color: #ffffff;
|
||||
background-color: #0099ff;
|
||||
position: relative;
|
||||
top: -15px;
|
||||
margin-right: 15px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
div.guide_nom {
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
border-color: #ffffff;
|
||||
padding: 3px;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
color: #ffffff;
|
||||
background-color: #ff00ff;
|
||||
position: relative;
|
||||
top: -15px;
|
||||
margin-right: 15px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
div.guide_description, div.guide_ressource_contenu, div.guide_encart_contenu {
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
div.guide_apprentissage, div.guide_installation {
|
||||
margin-left: 5px;
|
||||
margin-right: 5px;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
div.guide_installation {
|
||||
|
||||
}
|
||||
|
||||
span.guide_footnote {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
div.guide_large_font {
|
||||
text-align: center;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
div.guide_encartdefin {
|
||||
float: left;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
width: 360px;
|
||||
margin-top: 40px;
|
||||
margin-bottom: 10px;
|
||||
font-size: 0.9em;
|
||||
margin-left: 20px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
span.guide_foreign {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/** Table des matières ***/
|
||||
ul.toc a, ul.toc a:visited{
|
||||
color: #007E91;
|
||||
}
|
||||
|
||||
ul.toc li{
|
||||
font-size: 0.9em;
|
||||
list-style: none;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
ul.toc {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
li.li-toc > ul.toc {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
div.guide_signature table {
|
||||
margin-top: 30px;
|
||||
border: none;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
div.guide_signature tr:first-child {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
div.guide_signature td {
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
div.guide_logos {
|
||||
float: left;
|
||||
}
|
||||
|
||||
div.guide_logos img {
|
||||
display: block;
|
||||
margin-right: 20px;
|
||||
float: left;
|
||||
}
|
|
@ -0,0 +1,101 @@
|
|||
/**
|
||||
* jQuery lightBox plugin
|
||||
* This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
|
||||
* and adapted to me for use like a plugin from jQuery.
|
||||
* @name jquery-lightbox-0.5.css
|
||||
* @author Leandro Vieira Pinho - http://leandrovieira.com
|
||||
* @version 0.5
|
||||
* @date April 11, 2008
|
||||
* @category jQuery plugin
|
||||
* @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com)
|
||||
* @license CCAttribution-ShareAlike 2.5 Brazil - http://creativecommons.org/licenses/by-sa/2.5/br/deed.en_US
|
||||
* @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
|
||||
*/
|
||||
#jquery-overlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 90;
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
#jquery-lightbox {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 100;
|
||||
text-align: center;
|
||||
line-height: 0;
|
||||
}
|
||||
#jquery-lightbox a img { border: none; }
|
||||
#lightbox-container-image-box {
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
width: 250px;
|
||||
height: 250px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
#lightbox-container-image { padding: 10px; }
|
||||
#lightbox-loading {
|
||||
position: absolute;
|
||||
top: 40%;
|
||||
left: 0%;
|
||||
height: 25%;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
line-height: 0;
|
||||
}
|
||||
#lightbox-nav {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
z-index: 10;
|
||||
}
|
||||
#lightbox-container-image-box > #lightbox-nav { left: 0; }
|
||||
#lightbox-nav a { outline: none;}
|
||||
#lightbox-nav-btnPrev, #lightbox-nav-btnNext {
|
||||
width: 49%;
|
||||
height: 100%;
|
||||
zoom: 1;
|
||||
display: block;
|
||||
}
|
||||
#lightbox-nav-btnPrev {
|
||||
left: 0;
|
||||
float: left;
|
||||
}
|
||||
#lightbox-nav-btnNext {
|
||||
right: 0;
|
||||
float: right;
|
||||
}
|
||||
#lightbox-container-image-data-box {
|
||||
font: 10px Verdana, Helvetica, sans-serif;
|
||||
background-color: #fff;
|
||||
margin: 0 auto;
|
||||
line-height: 1.4em;
|
||||
overflow: auto;
|
||||
width: 100%;
|
||||
padding: 0 10px 0;
|
||||
}
|
||||
#lightbox-container-image-data {
|
||||
padding: 0 10px;
|
||||
color: #666;
|
||||
}
|
||||
#lightbox-container-image-data #lightbox-image-details {
|
||||
width: 70%;
|
||||
float: left;
|
||||
text-align: left;
|
||||
}
|
||||
#lightbox-image-details-caption { font-weight: bold; }
|
||||
#lightbox-image-details-currentNumber {
|
||||
display: block;
|
||||
clear: left;
|
||||
padding-bottom: 1.0em;
|
||||
}
|
||||
#lightbox-secNav-btnClose {
|
||||
width: 66px;
|
||||
float: right;
|
||||
padding-bottom: 0.7em;
|
||||
}
|
|
@ -0,0 +1,164 @@
|
|||
/*
|
||||
* Default Layout Theme
|
||||
*
|
||||
* Created for jquery.layout
|
||||
*
|
||||
* Copyright (c) 2010
|
||||
* Fabrizio Balliano (http://www.fabrizioballiano.net)
|
||||
* Kevin Dalman (http://allpro.net)
|
||||
*
|
||||
* Dual licensed under the GPL (http://www.gnu.org/licenses/gpl.html)
|
||||
* and MIT (http://www.opensource.org/licenses/mit-license.php) licenses.
|
||||
*
|
||||
* Last Updated: 2010-02-10
|
||||
* NOTE: For best code readability, view this with a fixed-space font and tabs equal to 4-chars
|
||||
*/
|
||||
|
||||
/*
|
||||
* PANES & CONTENT-DIVs
|
||||
*/
|
||||
.ui-layout-pane { /* all 'panes' */
|
||||
background: #FFF;
|
||||
border: 1px solid #BBB;
|
||||
padding: 10px;
|
||||
overflow: auto;
|
||||
/* DO NOT add scrolling (or padding) to 'panes' that have a content-div,
|
||||
otherwise you may get double-scrollbars - on the pane AND on the content-div
|
||||
- use ui-layout-wrapper class if pane has a content-div
|
||||
- use ui-layout-container if pane has an inner-layout
|
||||
*/
|
||||
}
|
||||
/* (scrolling) content-div inside pane allows for fixed header(s) and/or footer(s) */
|
||||
.ui-layout-content {
|
||||
padding: 10px;
|
||||
position: relative; /* contain floated or positioned elements */
|
||||
overflow: auto; /* add scrolling to content-div */
|
||||
}
|
||||
|
||||
/*
|
||||
* UTILITY CLASSES
|
||||
* Must come AFTER pane-class above so will override
|
||||
* These classes are NOT auto-generated and are NOT used by Layout
|
||||
*/
|
||||
.layout-child-container,
|
||||
.layout-content-container {
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.layout-child-container {
|
||||
border: 0; /* remove border because inner-layout-panes probably have borders */
|
||||
}
|
||||
.layout-scroll {
|
||||
overflow: auto;
|
||||
}
|
||||
.layout-hide {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/*
|
||||
* RESIZER-BARS
|
||||
*/
|
||||
.ui-layout-resizer { /* all 'resizer-bars' */
|
||||
background: #DDD;
|
||||
border: 1px solid #BBB;
|
||||
border-width: 0;
|
||||
}
|
||||
.ui-layout-resizer-drag { /* REAL resizer while resize in progress */
|
||||
}
|
||||
.ui-layout-resizer-hover { /* affects both open and closed states */
|
||||
}
|
||||
/* NOTE: It looks best when 'hover' and 'dragging' are set to the same color,
|
||||
otherwise color shifts while dragging when bar can't keep up with mouse */
|
||||
.ui-layout-resizer-open-hover , /* hover-color to 'resize' */
|
||||
.ui-layout-resizer-dragging { /* resizer beging 'dragging' */
|
||||
background: #C4E1A4;
|
||||
}
|
||||
.ui-layout-resizer-dragging { /* CLONED resizer being dragged */
|
||||
border: 1px solid #BBB;
|
||||
}
|
||||
/* NOTE: Add a 'dragging-limit' color to provide visual feedback when resizer hits min/max size limits */
|
||||
.ui-layout-resizer-dragging-limit { /* CLONED resizer at min or max size-limit */
|
||||
background: #E1A4A4; /* red */
|
||||
}
|
||||
|
||||
.ui-layout-resizer-closed-hover { /* hover-color to 'slide open' */
|
||||
background: #EBD5AA;
|
||||
}
|
||||
.ui-layout-resizer-sliding { /* resizer when pane is 'slid open' */
|
||||
opacity: .10; /* show only a slight shadow */
|
||||
filter: alpha(opacity=10);
|
||||
}
|
||||
.ui-layout-resizer-sliding-hover { /* sliding resizer - hover */
|
||||
opacity: 1.00; /* on-hover, show the resizer-bar normally */
|
||||
filter: alpha(opacity=100);
|
||||
}
|
||||
/* sliding resizer - add 'outside-border' to resizer on-hover
|
||||
* this sample illustrates how to target specific panes and states */
|
||||
.ui-layout-resizer-north-sliding-hover { border-bottom-width: 1px; }
|
||||
.ui-layout-resizer-south-sliding-hover { border-top-width: 1px; }
|
||||
.ui-layout-resizer-west-sliding-hover { border-right-width: 1px; }
|
||||
.ui-layout-resizer-east-sliding-hover { border-left-width: 1px; }
|
||||
|
||||
/*
|
||||
* TOGGLER-BUTTONS
|
||||
*/
|
||||
.ui-layout-toggler {
|
||||
border: 1px solid #BBB; /* match pane-border */
|
||||
background-color: #BBB;
|
||||
}
|
||||
.ui-layout-resizer-hover .ui-layout-toggler {
|
||||
opacity: .60;
|
||||
filter: alpha(opacity=60);
|
||||
}
|
||||
.ui-layout-toggler-hover , /* need when NOT resizable */
|
||||
.ui-layout-resizer-hover .ui-layout-toggler-hover { /* need specificity when IS resizable */
|
||||
background-color: #FC6;
|
||||
opacity: 1.00;
|
||||
filter: alpha(opacity=100);
|
||||
}
|
||||
.ui-layout-toggler-north ,
|
||||
.ui-layout-toggler-south {
|
||||
border-width: 0 1px; /* left/right borders */
|
||||
}
|
||||
.ui-layout-toggler-west ,
|
||||
.ui-layout-toggler-east {
|
||||
border-width: 1px 0; /* top/bottom borders */
|
||||
}
|
||||
/* hide the toggler-button when the pane is 'slid open' */
|
||||
.ui-layout-resizer-sliding .ui-layout-toggler {
|
||||
display: none;
|
||||
}
|
||||
/*
|
||||
* style the text we put INSIDE the togglers
|
||||
*/
|
||||
.ui-layout-toggler .content {
|
||||
color: #666;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
padding-bottom: 0.35ex; /* to 'vertically center' text inside text-span */
|
||||
}
|
||||
|
||||
/*
|
||||
* PANE-MASKS
|
||||
* these styles are hard-coded on mask elems, but are also
|
||||
* included here as !important to ensure will overrides any generic styles
|
||||
*/
|
||||
.ui-layout-mask {
|
||||
border: none !important;
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
overflow: hidden !important;
|
||||
position: absolute !important;
|
||||
opacity: 0 !important;
|
||||
filter: Alpha(Opacity="0") !important;
|
||||
}
|
||||
.ui-layout-mask-inside-pane { /* masks always inside pane EXCEPT when pane is an iframe */
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
}
|
||||
div.ui-layout-mask {} /* standard mask for iframes */
|
||||
iframe.ui-layout-mask {} /* extra mask for objects/applets */
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
$(function () {
|
||||
|
||||
myLayout = $('body').layout({
|
||||
|
||||
// reference only - these options are NOT required because 'true' is the default
|
||||
closable: true // pane can open & close
|
||||
, resizable: true // when open, pane can be resized
|
||||
, slidable: true // when closed, pane can 'slide' open over other panes - closes on mouse-out
|
||||
, livePaneResizing: true
|
||||
|
||||
// some pane-size settings
|
||||
, west__minSize: 100
|
||||
, north__size: "auto"
|
||||
|
||||
// enable state management
|
||||
, stateManagement__enabled: true // automatic cookie load & save enabled by default
|
||||
|
||||
, showDebugMessages: true // log and/or display messages from debugging & testing code
|
||||
});
|
||||
|
||||
|
||||
var listeLiens = $("a");
|
||||
var length = listeLiens.length;
|
||||
for(var i = 0; i < length; i++) {
|
||||
var el = $(listeLiens[i]);
|
||||
var href = el.attr("href");
|
||||
if ((href) && (href.length) && (href.length > 10) && (href.substring(0,4) == "http")) {
|
||||
el.attr("target", "_blank").addClass("JQ_LienExterne");
|
||||
}
|
||||
}
|
||||
|
||||
$("h4").prepend("‣ ");
|
||||
$("h5").prepend("↬ ");
|
||||
|
||||
$("a.guide_screenshot_fullscreen").lightBox();
|
||||
|
||||
});
|
|
@ -0,0 +1,472 @@
|
|||
/**
|
||||
* jQuery lightBox plugin
|
||||
* This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
|
||||
* and adapted to me for use like a plugin from jQuery.
|
||||
* @name jquery-lightbox-0.5.js
|
||||
* @author Leandro Vieira Pinho - http://leandrovieira.com
|
||||
* @version 0.5
|
||||
* @date April 11, 2008
|
||||
* @category jQuery plugin
|
||||
* @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com)
|
||||
* @license CCAttribution-ShareAlike 2.5 Brazil - http://creativecommons.org/licenses/by-sa/2.5/br/deed.en_US
|
||||
* @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
|
||||
*/
|
||||
|
||||
// Offering a Custom Alias suport - More info: http://docs.jquery.com/Plugins/Authoring#Custom_Alias
|
||||
(function($) {
|
||||
/**
|
||||
* $ is an alias to jQuery object
|
||||
*
|
||||
*/
|
||||
$.fn.lightBox = function(settings) {
|
||||
// Settings to configure the jQuery lightBox plugin how you like
|
||||
settings = jQuery.extend({
|
||||
// Configuration related to overlay
|
||||
overlayBgColor: '#000', // (string) Background color to overlay; inform a hexadecimal value like: #RRGGBB. Where RR, GG, and BB are the hexadecimal values for the red, green, and blue values of the color.
|
||||
overlayOpacity: 0.8, // (integer) Opacity value to overlay; inform: 0.X. Where X are number from 0 to 9
|
||||
// Configuration related to navigation
|
||||
fixedNavigation: false, // (boolean) Boolean that informs if the navigation (next and prev button) will be fixed or not in the interface.
|
||||
// Configuration related to images
|
||||
imageLoading: 'images/lightbox-ico-loading.gif', // (string) Path and the name of the loading icon
|
||||
imageBtnPrev: 'images/lightbox-btn-prev.gif', // (string) Path and the name of the prev button image
|
||||
imageBtnNext: 'images/lightbox-btn-next.gif', // (string) Path and the name of the next button image
|
||||
imageBtnClose: 'images/lightbox-btn-close.gif', // (string) Path and the name of the close btn
|
||||
imageBlank: 'images/lightbox-blank.gif', // (string) Path and the name of a blank image (one pixel)
|
||||
// Configuration related to container image box
|
||||
containerBorderSize: 10, // (integer) If you adjust the padding in the CSS for the container, #lightbox-container-image-box, you will need to update this value
|
||||
containerResizeSpeed: 400, // (integer) Specify the resize duration of container image. These number are miliseconds. 400 is default.
|
||||
// Configuration related to texts in caption. For example: Image 2 of 8. You can alter either "Image" and "of" texts.
|
||||
txtImage: 'Image', // (string) Specify text "Image"
|
||||
txtOf: 'of', // (string) Specify text "of"
|
||||
// Configuration related to keyboard navigation
|
||||
keyToClose: 'c', // (string) (c = close) Letter to close the jQuery lightBox interface. Beyond this letter, the letter X and the SCAPE key is used to.
|
||||
keyToPrev: 'p', // (string) (p = previous) Letter to show the previous image
|
||||
keyToNext: 'n', // (string) (n = next) Letter to show the next image.
|
||||
// Don´t alter these variables in any way
|
||||
imageArray: [],
|
||||
activeImage: 0
|
||||
},settings);
|
||||
// Caching the jQuery object with all elements matched
|
||||
var jQueryMatchedObj = this; // This, in this context, refer to jQuery object
|
||||
/**
|
||||
* Initializing the plugin calling the start function
|
||||
*
|
||||
* @return boolean false
|
||||
*/
|
||||
function _initialize() {
|
||||
_start(this,jQueryMatchedObj); // This, in this context, refer to object (link) which the user have clicked
|
||||
return false; // Avoid the browser following the link
|
||||
}
|
||||
/**
|
||||
* Start the jQuery lightBox plugin
|
||||
*
|
||||
* @param object objClicked The object (link) whick the user have clicked
|
||||
* @param object jQueryMatchedObj The jQuery object with all elements matched
|
||||
*/
|
||||
function _start(objClicked,jQueryMatchedObj) {
|
||||
// Hime some elements to avoid conflict with overlay in IE. These elements appear above the overlay.
|
||||
$('embed, object, select').css({ 'visibility' : 'hidden' });
|
||||
// Call the function to create the markup structure; style some elements; assign events in some elements.
|
||||
_set_interface();
|
||||
// Unset total images in imageArray
|
||||
settings.imageArray.length = 0;
|
||||
// Unset image active information
|
||||
settings.activeImage = 0;
|
||||
// We have an image set? Or just an image? Let´s see it.
|
||||
if ( jQueryMatchedObj.length == 1 ) {
|
||||
settings.imageArray.push(new Array(objClicked.getAttribute('href'),objClicked.getAttribute('title')));
|
||||
} else {
|
||||
// Add an Array (as many as we have), with href and title atributes, inside the Array that storage the images references
|
||||
for ( var i = 0; i < jQueryMatchedObj.length; i++ ) {
|
||||
settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),jQueryMatchedObj[i].getAttribute('title')));
|
||||
}
|
||||
}
|
||||
while ( settings.imageArray[settings.activeImage][0] != objClicked.getAttribute('href') ) {
|
||||
settings.activeImage++;
|
||||
}
|
||||
// Call the function that prepares image exibition
|
||||
_set_image_to_view();
|
||||
}
|
||||
/**
|
||||
* Create the jQuery lightBox plugin interface
|
||||
*
|
||||
* The HTML markup will be like that:
|
||||
<div id="jquery-overlay"></div>
|
||||
<div id="jquery-lightbox">
|
||||
<div id="lightbox-container-image-box">
|
||||
<div id="lightbox-container-image">
|
||||
<img src="../fotos/XX.jpg" id="lightbox-image">
|
||||
<div id="lightbox-nav">
|
||||
<a href="#" id="lightbox-nav-btnPrev"></a>
|
||||
<a href="#" id="lightbox-nav-btnNext"></a>
|
||||
</div>
|
||||
<div id="lightbox-loading">
|
||||
<a href="#" id="lightbox-loading-link">
|
||||
<img src="../images/lightbox-ico-loading.gif">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="lightbox-container-image-data-box">
|
||||
<div id="lightbox-container-image-data">
|
||||
<div id="lightbox-image-details">
|
||||
<span id="lightbox-image-details-caption"></span>
|
||||
<span id="lightbox-image-details-currentNumber"></span>
|
||||
</div>
|
||||
<div id="lightbox-secNav">
|
||||
<a href="#" id="lightbox-secNav-btnClose">
|
||||
<img src="../images/lightbox-btn-close.gif">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
*
|
||||
*/
|
||||
function _set_interface() {
|
||||
// Apply the HTML markup into body tag
|
||||
$('body').append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="' + settings.imageLoading + '"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="' + settings.imageBtnClose + '"></a></div></div></div></div>');
|
||||
// Get page sizes
|
||||
var arrPageSizes = ___getPageSize();
|
||||
// Style overlay and show it
|
||||
$('#jquery-overlay').css({
|
||||
backgroundColor: settings.overlayBgColor,
|
||||
opacity: settings.overlayOpacity,
|
||||
width: arrPageSizes[0],
|
||||
height: arrPageSizes[1]
|
||||
}).fadeIn();
|
||||
// Get page scroll
|
||||
var arrPageScroll = ___getPageScroll();
|
||||
// Calculate top and left offset for the jquery-lightbox div object and show it
|
||||
$('#jquery-lightbox').css({
|
||||
top: arrPageScroll[1] + (arrPageSizes[3] / 10),
|
||||
left: arrPageScroll[0]
|
||||
}).show();
|
||||
// Assigning click events in elements to close overlay
|
||||
$('#jquery-overlay,#jquery-lightbox').click(function() {
|
||||
_finish();
|
||||
});
|
||||
// Assign the _finish function to lightbox-loading-link and lightbox-secNav-btnClose objects
|
||||
$('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function() {
|
||||
_finish();
|
||||
return false;
|
||||
});
|
||||
// If window was resized, calculate the new overlay dimensions
|
||||
$(window).resize(function() {
|
||||
// Get page sizes
|
||||
var arrPageSizes = ___getPageSize();
|
||||
// Style overlay and show it
|
||||
$('#jquery-overlay').css({
|
||||
width: arrPageSizes[0],
|
||||
height: arrPageSizes[1]
|
||||
});
|
||||
// Get page scroll
|
||||
var arrPageScroll = ___getPageScroll();
|
||||
// Calculate top and left offset for the jquery-lightbox div object and show it
|
||||
$('#jquery-lightbox').css({
|
||||
top: arrPageScroll[1] + (arrPageSizes[3] / 10),
|
||||
left: arrPageScroll[0]
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Prepares image exibition; doing a image´s preloader to calculate it´s size
|
||||
*
|
||||
*/
|
||||
function _set_image_to_view() { // show the loading
|
||||
// Show the loading
|
||||
$('#lightbox-loading').show();
|
||||
if ( settings.fixedNavigation ) {
|
||||
$('#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();
|
||||
} else {
|
||||
// Hide some elements
|
||||
$('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();
|
||||
}
|
||||
// Image preload process
|
||||
var objImagePreloader = new Image();
|
||||
objImagePreloader.onload = function() {
|
||||
$('#lightbox-image').attr('src',settings.imageArray[settings.activeImage][0]);
|
||||
// Perfomance an effect in the image container resizing it
|
||||
_resize_container_image_box(objImagePreloader.width,objImagePreloader.height);
|
||||
// clear onLoad, IE behaves irratically with animated gifs otherwise
|
||||
objImagePreloader.onload=function(){};
|
||||
};
|
||||
objImagePreloader.src = settings.imageArray[settings.activeImage][0];
|
||||
};
|
||||
/**
|
||||
* Perfomance an effect in the image container resizing it
|
||||
*
|
||||
* @param integer intImageWidth The image´s width that will be showed
|
||||
* @param integer intImageHeight The image´s height that will be showed
|
||||
*/
|
||||
function _resize_container_image_box(intImageWidth,intImageHeight) {
|
||||
// Get current width and height
|
||||
var intCurrentWidth = $('#lightbox-container-image-box').width();
|
||||
var intCurrentHeight = $('#lightbox-container-image-box').height();
|
||||
// Get the width and height of the selected image plus the padding
|
||||
var intWidth = (intImageWidth + (settings.containerBorderSize * 2)); // Plus the image´s width and the left and right padding value
|
||||
var intHeight = (intImageHeight + (settings.containerBorderSize * 2)); // Plus the image´s height and the left and right padding value
|
||||
// Diferences
|
||||
var intDiffW = intCurrentWidth - intWidth;
|
||||
var intDiffH = intCurrentHeight - intHeight;
|
||||
// Perfomance the effect
|
||||
$('#lightbox-container-image-box').animate({ width: intWidth, height: intHeight },settings.containerResizeSpeed,function() { _show_image(); });
|
||||
if ( ( intDiffW == 0 ) && ( intDiffH == 0 ) ) {
|
||||
if ( $.browser.msie ) {
|
||||
___pause(250);
|
||||
} else {
|
||||
___pause(100);
|
||||
}
|
||||
}
|
||||
$('#lightbox-container-image-data-box').css({ width: intImageWidth });
|
||||
$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ height: intImageHeight + (settings.containerBorderSize * 2) });
|
||||
};
|
||||
/**
|
||||
* Show the prepared image
|
||||
*
|
||||
*/
|
||||
function _show_image() {
|
||||
$('#lightbox-loading').hide();
|
||||
$('#lightbox-image').fadeIn(function() {
|
||||
_show_image_data();
|
||||
_set_navigation();
|
||||
});
|
||||
_preload_neighbor_images();
|
||||
};
|
||||
/**
|
||||
* Show the image information
|
||||
*
|
||||
*/
|
||||
function _show_image_data() {
|
||||
$('#lightbox-container-image-data-box').slideDown('fast');
|
||||
$('#lightbox-image-details-caption').hide();
|
||||
if ( settings.imageArray[settings.activeImage][1] ) {
|
||||
$('#lightbox-image-details-caption').html(settings.imageArray[settings.activeImage][1]).show();
|
||||
}
|
||||
// If we have a image set, display 'Image X of X'
|
||||
/*if ( settings.imageArray.length > 1 ) {
|
||||
$('#lightbox-image-details-currentNumber').html(settings.txtImage + ' ' + ( settings.activeImage + 1 ) + ' ' + settings.txtOf + ' ' + settings.imageArray.length).show();
|
||||
}*/
|
||||
}
|
||||
/**
|
||||
* Display the button navigations
|
||||
*
|
||||
*/
|
||||
function _set_navigation() {
|
||||
$('#lightbox-nav').show();
|
||||
|
||||
// Instead to define this configuration in CSS file, we define here. And it´s need to IE. Just.
|
||||
$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
|
||||
|
||||
// Show the prev button, if not the first image in set
|
||||
if ( settings.activeImage != 0 ) {
|
||||
if ( settings.fixedNavigation ) {
|
||||
$('#lightbox-nav-btnPrev').css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' })
|
||||
.unbind()
|
||||
.bind('click',function() {
|
||||
settings.activeImage = settings.activeImage - 1;
|
||||
_set_image_to_view();
|
||||
return false;
|
||||
});
|
||||
} else {
|
||||
// Show the images button for Next buttons
|
||||
$('#lightbox-nav-btnPrev').unbind().hover(function() {
|
||||
$(this).css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' });
|
||||
},function() {
|
||||
$(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
|
||||
}).show().bind('click',function() {
|
||||
settings.activeImage = settings.activeImage - 1;
|
||||
_set_image_to_view();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Show the next button, if not the last image in set
|
||||
if ( settings.activeImage != ( settings.imageArray.length -1 ) ) {
|
||||
if ( settings.fixedNavigation ) {
|
||||
$('#lightbox-nav-btnNext').css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' })
|
||||
.unbind()
|
||||
.bind('click',function() {
|
||||
settings.activeImage = settings.activeImage + 1;
|
||||
_set_image_to_view();
|
||||
return false;
|
||||
});
|
||||
} else {
|
||||
// Show the images button for Next buttons
|
||||
$('#lightbox-nav-btnNext').unbind().hover(function() {
|
||||
$(this).css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' });
|
||||
},function() {
|
||||
$(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
|
||||
}).show().bind('click',function() {
|
||||
settings.activeImage = settings.activeImage + 1;
|
||||
_set_image_to_view();
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
// Enable keyboard navigation
|
||||
_enable_keyboard_navigation();
|
||||
}
|
||||
/**
|
||||
* Enable a support to keyboard navigation
|
||||
*
|
||||
*/
|
||||
function _enable_keyboard_navigation() {
|
||||
$(document).keydown(function(objEvent) {
|
||||
_keyboard_action(objEvent);
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Disable the support to keyboard navigation
|
||||
*
|
||||
*/
|
||||
function _disable_keyboard_navigation() {
|
||||
$(document).unbind();
|
||||
}
|
||||
/**
|
||||
* Perform the keyboard actions
|
||||
*
|
||||
*/
|
||||
function _keyboard_action(objEvent) {
|
||||
// To ie
|
||||
if ( objEvent == null ) {
|
||||
keycode = event.keyCode;
|
||||
escapeKey = 27;
|
||||
// To Mozilla
|
||||
} else {
|
||||
keycode = objEvent.keyCode;
|
||||
escapeKey = objEvent.DOM_VK_ESCAPE;
|
||||
}
|
||||
// Get the key in lower case form
|
||||
key = String.fromCharCode(keycode).toLowerCase();
|
||||
// Verify the keys to close the ligthBox
|
||||
if ( ( key == settings.keyToClose ) || ( key == 'x' ) || ( keycode == escapeKey ) ) {
|
||||
_finish();
|
||||
}
|
||||
// Verify the key to show the previous image
|
||||
if ( ( key == settings.keyToPrev ) || ( keycode == 37 ) ) {
|
||||
// If we´re not showing the first image, call the previous
|
||||
if ( settings.activeImage != 0 ) {
|
||||
settings.activeImage = settings.activeImage - 1;
|
||||
_set_image_to_view();
|
||||
_disable_keyboard_navigation();
|
||||
}
|
||||
}
|
||||
// Verify the key to show the next image
|
||||
if ( ( key == settings.keyToNext ) || ( keycode == 39 ) ) {
|
||||
// If we´re not showing the last image, call the next
|
||||
if ( settings.activeImage != ( settings.imageArray.length - 1 ) ) {
|
||||
settings.activeImage = settings.activeImage + 1;
|
||||
_set_image_to_view();
|
||||
_disable_keyboard_navigation();
|
||||
}
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Preload prev and next images being showed
|
||||
*
|
||||
*/
|
||||
function _preload_neighbor_images() {
|
||||
if ( (settings.imageArray.length -1) > settings.activeImage ) {
|
||||
objNext = new Image();
|
||||
objNext.src = settings.imageArray[settings.activeImage + 1][0];
|
||||
}
|
||||
if ( settings.activeImage > 0 ) {
|
||||
objPrev = new Image();
|
||||
objPrev.src = settings.imageArray[settings.activeImage -1][0];
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Remove jQuery lightBox plugin HTML markup
|
||||
*
|
||||
*/
|
||||
function _finish() {
|
||||
$('#jquery-lightbox').remove();
|
||||
$('#jquery-overlay').fadeOut(function() { $('#jquery-overlay').remove(); });
|
||||
// Show some elements to avoid conflict with overlay in IE. These elements appear above the overlay.
|
||||
$('embed, object, select').css({ 'visibility' : 'visible' });
|
||||
}
|
||||
/**
|
||||
/ THIRD FUNCTION
|
||||
* getPageSize() by quirksmode.com
|
||||
*
|
||||
* @return Array Return an array with page width, height and window width, height
|
||||
*/
|
||||
function ___getPageSize() {
|
||||
var xScroll, yScroll;
|
||||
if (window.innerHeight && window.scrollMaxY) {
|
||||
xScroll = window.innerWidth + window.scrollMaxX;
|
||||
yScroll = window.innerHeight + window.scrollMaxY;
|
||||
} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
|
||||
xScroll = document.body.scrollWidth;
|
||||
yScroll = document.body.scrollHeight;
|
||||
} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
|
||||
xScroll = document.body.offsetWidth;
|
||||
yScroll = document.body.offsetHeight;
|
||||
}
|
||||
var windowWidth, windowHeight;
|
||||
if (self.innerHeight) { // all except Explorer
|
||||
if(document.documentElement.clientWidth){
|
||||
windowWidth = document.documentElement.clientWidth;
|
||||
} else {
|
||||
windowWidth = self.innerWidth;
|
||||
}
|
||||
windowHeight = self.innerHeight;
|
||||
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
|
||||
windowWidth = document.documentElement.clientWidth;
|
||||
windowHeight = document.documentElement.clientHeight;
|
||||
} else if (document.body) { // other Explorers
|
||||
windowWidth = document.body.clientWidth;
|
||||
windowHeight = document.body.clientHeight;
|
||||
}
|
||||
// for small pages with total height less then height of the viewport
|
||||
if(yScroll < windowHeight){
|
||||
pageHeight = windowHeight;
|
||||
} else {
|
||||
pageHeight = yScroll;
|
||||
}
|
||||
// for small pages with total width less then width of the viewport
|
||||
if(xScroll < windowWidth){
|
||||
pageWidth = xScroll;
|
||||
} else {
|
||||
pageWidth = windowWidth;
|
||||
}
|
||||
arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);
|
||||
return arrayPageSize;
|
||||
};
|
||||
/**
|
||||
/ THIRD FUNCTION
|
||||
* getPageScroll() by quirksmode.com
|
||||
*
|
||||
* @return Array Return an array with x,y page scroll values.
|
||||
*/
|
||||
function ___getPageScroll() {
|
||||
var xScroll, yScroll;
|
||||
if (self.pageYOffset) {
|
||||
yScroll = self.pageYOffset;
|
||||
xScroll = self.pageXOffset;
|
||||
} else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
|
||||
yScroll = document.documentElement.scrollTop;
|
||||
xScroll = document.documentElement.scrollLeft;
|
||||
} else if (document.body) {// all other Explorers
|
||||
yScroll = document.body.scrollTop;
|
||||
xScroll = document.body.scrollLeft;
|
||||
}
|
||||
arrayPageScroll = new Array(xScroll,yScroll);
|
||||
return arrayPageScroll;
|
||||
};
|
||||
/**
|
||||
* Stop the code execution from a escified time in milisecond
|
||||
*
|
||||
*/
|
||||
function ___pause(ms) {
|
||||
var date = new Date();
|
||||
curDate = null;
|
||||
do { var curDate = new Date(); }
|
||||
while ( curDate - date < ms);
|
||||
};
|
||||
// Return the jQuery object for chaining. The unbind method is used to avoid click conflict when the plugin is called more than once
|
||||
return this.unbind('click').click(_initialize);
|
||||
};
|
||||
})(jQuery); // Call and execute the function immediately passing the jQuery object
|