Skip to content

Commit

Permalink
Commit #51
Browse files Browse the repository at this point in the history
  • Loading branch information
madmurphy committed Apr 19, 2021
1 parent 0f525c2 commit e2444ed
Show file tree
Hide file tree
Showing 153 changed files with 212,344 additions and 1,680 deletions.
17 changes: 16 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
# Change Log


## 3.0.0 (2021-03-12)
## 3.1.0 (2021-04-19)

Changes:

* The default font has been set to `Victoria Typewriter` (this is due to the
previous `1942 report` font lacking support for accented characters)
* Support for internationalization has been added (`takefive-i18n-*.css`)
* A further new plugin has been created (`takefive-slides.css`)
* A bug affecting the usage of `data-label` has been fixed
* The layout of the slides on small screens in landscape mode has been improved
* Minor adjustments
* Documentation
* Examples


## 3.0.0 (2021-04-12)

Changes:

Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Take Five!

A semantically-consistent pure-CSS slide renderer
The most advanced pure CSS lightbox – not one single line of JavaScript
has been wasted

See:

* [Live demo][1]
* [Manual][2]

Please refer to the `dist` subdirectory for the current release of the CSS.


Free software
-------------
Expand Down
3 changes: 3 additions & 0 deletions dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ A shell script is available for stripping the variables and minifying the CSS
files (the original files will not be overwritten -- `qalc` and `uglifycss` are
required).

If you are only interested in using the CSS for a website, please refer to the
`dist` subdirectory.

31 changes: 24 additions & 7 deletions dev/nondev-gen.sh → dev/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
#
# nondev-gen.sh
# build.sh
#
# Expand all the CSS variables declared in `$MAINCSS` **recursively** and save
# the files generated in the temporary `$EXPDIR` directory. Then simplify the
Expand All @@ -10,28 +10,28 @@
#


PACKAGE_JSON='../package.json'
MAINCSS='takefive-dev.css'
EXPDIR='var-expansion'
SRCDIR='src'
MINDIR='min'
DISTDIR='dist'

_RE_VAR_='^\s*--\([^:]\+\): var(--[^,]\+, \([^\)]\+\));'
_RE_JSON_VERSION_='\(^\|[,{]\)\s*"version"\s*:\s*"\([^"]\+\)"\s*\([,}]\|$\)'
# Maximum four levels of nesting are supported
_RE_CALC_='calc\(([^()]+|[^()]*\([^()]+\)[^()]*|[^()]*\([^()]*\([^()]+\)[^()]*\)[^()]*|[^()]*\([^()]*\([^()]*\([^()]+\)[^()]*\)[^()]*\)[^()]*|[^()]*\([^()]*\([^()]*\([^()]*\([^()]+\)[^()]*\)[^()]*\)[^()]*\)[^()]*)\)'

_ALLVARS_="$(cat "${MAINCSS}" | grep -o "${_RE_VAR_}" "${MAINCSS}" | sed 's/'"${_RE_VAR_}"'/s\/var(--\1)\/\2\/g;/g')"

rm -rf "${EXPDIR}" "${SRCDIR}" "${MINDIR}"
rm -rf "${EXPDIR}" "${SRCDIR}" "${MINDIR}" "${DISTDIR}"
mkdir -p $(find '.' -type f -name '*-dev.css' -printf "${EXPDIR}/%h\\n")
find '.' -type f -name '*-dev.css' ! -wholename "./${EXPDIR}/*" \
-exec cp '{}' "${EXPDIR}/{}" ';' \
-exec 'sed' '-i' "${_ALLVARS_}//g" "${EXPDIR}/{}" ';' \
-exec 'sed' '-i' "${_ALLVARS_}//g;/!\s*DEV_ONLY\s*!/,/!\s*END_DEV_ONLY\s*!/{d}" "${EXPDIR}/{}" ';' \
-exec 'diff' '-u' '{}' "${EXPDIR}/{}" ';' \
> "${EXPDIR}/${EXPDIR}.diff"

sed -i '/!\s*DEV_ONLY\s*!/,/!\s*END_DEV_ONLY\s*!/{d}' "${EXPDIR}/${MAINCSS}"

if ! which qalc &> /dev/null ; then
echo 'You need to have qalc installed on your machine.' 1>&2
exit 1
Expand All @@ -47,7 +47,7 @@ rm -f "${SRCDIR}/${EXPDIR}.diff"

echo 'Simplifying the content of `calc()` ...'

# Calculations yelding zero as final result are not supported
# Calculations yelding zero as final result are not yet supported
find "${SRCDIR}" -type f -name '*.css' | while read -r _CSSFILE_ ; do
echo "${_CSSFILE_}"

Expand Down Expand Up @@ -90,13 +90,15 @@ done
mkdir -p $(cd "${SRCDIR}" && find '.' -type f -name '*.css' -printf "${MINDIR}/%h\\n")
_PKGVERSION_="$(grep -o "${_RE_JSON_VERSION_}" "${PACKAGE_JSON}" | head -1 | sed 's/'"${_RE_JSON_VERSION_}"'/\2/g')"
{
(cd "${SRCDIR}" && find '.' -type f -name '*.css') | while read -r _CSSFILE_ ; do
_CLEANNAME_="$(echo "${_CSSFILE_}" | sed 's/-dev\.css$/.css/g')"
test "x${_CLEANNAME_}" = "x${_CSSFILE_}" || mv "${SRCDIR}/${_CSSFILE_}" "${SRCDIR}/${_CLEANNAME_}" > /dev/null
diff -u "${EXPDIR}/${_CSSFILE_}" "${SRCDIR}/${_CLEANNAME_}"
{
echo '/* https://github.com/madmurphy/takefive.css */'
echo "/* https://github.com/madmurphy/takefive.css (v${_PKGVERSION_}) */"
uglifycss "${SRCDIR}/${_CLEANNAME_}" | sed 's/ not(/ not (/g'
} > "${MINDIR}/$(echo "${_CLEANNAME_}" | sed 's/\.css$/.min.css/g')"
echo
Expand All @@ -110,5 +112,20 @@ rsync -azq --remove-source-files \
rm -rf "${EXPDIR}" "${SRCDIR}" "${MINDIR}"
echo
cat << 'END_HEREDOC'
All done. You can now launch
(cd 'dist' && find '.' -type f -name '*.min.css' -exec cp '{}' \
'../../docs/css' ';' && mkdir -p $(find '.' -type f -name '*.css' \
-printf '../../dist/%h\n') && find '.' -type f -name '*.css' -exec mv \
'{}' '../../dist/{}' ';') && rm -r 'dist' 'src.diff' && (cd \
'../docs/css' && find '.' -type f -wholename \
'./takefive-i18n-*.min.css' ! -wholename \
'./takefive-i18n-la.min.css' -exec 'rm' '{}' ';')
to merge the files created and clean this directory
END_HEREDOC
# EOF
11 changes: 11 additions & 0 deletions dev/plugins/counters/takefive-counters-dev.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*\
|*|
|*| :: Take Five! -- Counters ::
|*|
|*| Version 1.0.0
|*|
|*| https://github.com/madmurphy/takefive.css/
|*|
\*/


@media all {

section.slides > :first-child {
Expand Down
11 changes: 11 additions & 0 deletions dev/plugins/glyphs/takefive-glyphs-dev.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
/*\
|*|
|*| :: Take Five! -- Glyphs ::
|*|
|*| Version 1.0.0
|*|
|*| https://github.com/madmurphy/takefive.css/
|*|
\*/


@media only screen {

article.slide > nav:first-of-type a[href][data-glyph]:not(.no-glyph)::after {
Expand Down
100 changes: 100 additions & 0 deletions dev/plugins/i18n/takefive-i18n-de-dev.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
/*\
|*|
|*| :: German translation of **Take Five!** ::
|*|
|*| Version 1.0.0
|*|
|*| https://github.com/madmurphy/takefive.css/
|*|
\*/


@media only screen {

/*
No need to use `!important`, these selectors already have sufficient
specificity.
Do not change the order whereby the selectors are listed.
*/

article.slide:lang(de) > nav:first-of-type a[href]:not([rel])::before {
/* English: "See also"; */
content: "Siehe auch";
}

article.slide:lang(de) > nav:first-of-type a[href][rel~="tag"]::before {
/* English: "Tagged content"; */
content: "Verwandte Inhalte";
}

article.slide:lang(de) > nav:first-of-type a[href][rel~="discussion"]::before {
/* English: "Comments"; */
content: "Kommentare";
}

article.slide:lang(de) > nav:first-of-type a[href][rel~="author"]::before {
/* English: "Author"; */
content: "Autor";
}

article.slide:lang(de) > nav:first-of-type a[href][rel~="attachment"]::before {
/* English: "Download"; */
content: "Herunterladen";
}

article.slide:lang(de) > nav:first-of-type a[href][rel~="bookmark"]::before {
/* English: "Share it!"; */
content: "Verbreite";
}

article.slide:lang(de) > nav:first-of-type a[href][rel~="index"]::before {
/* English: "Index"; */
content: "Index";
}

article.slide:lang(de) > nav:first-of-type a[href][rel~="first"]::before {
/* English: "First slide"; */
content: "Erste Folie";
}

article.slide:lang(de) > nav:first-of-type a[href][rel~="last"]::before {
/* English: "Last slide"; */
content: "Letzte Folie ";
}

article.slide:lang(de) > nav:first-of-type a[href][rel~="prev"]::before {
/* English: "Previous slide"; */
content: "Vorherige Folie";
}

article.slide:lang(de) > nav:first-of-type a[href][rel~="next"]::before {
/* English: "Next slide"; */
content: "N\0000E4chste Folie";
}

article.slide:lang(de) > nav:first-of-type a[href][rel~="child"]::before {
/* English: "More"; */
content: "Mehr";
}

article.slide:lang(de) > nav:first-of-type a[href][rel~="parent"]::before {
/* English: "Back to"; */
content: "Zur\0000FCck zu";
}

article.slide:lang(de) > nav:first-of-type a[href][rel~="parent"]:empty::before {
/* English: "Exit"; */
content: "Ausgang";
}

article.slide:lang(de) > nav:first-of-type a[href][rel~="parent"]:not(.tab):not(.plate):not(.no-rel):empty::before {
/* English: "Click to exit"; */
content: "Klick zum Verlassen";
}

}


/* EOF */

100 changes: 100 additions & 0 deletions dev/plugins/i18n/takefive-i18n-es-dev.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
/*\
|*|
|*| :: Spanish translation of **Take Five!** ::
|*|
|*| Version 1.0.0
|*|
|*| https://github.com/madmurphy/takefive.css/
|*|
\*/


@media only screen {

/*
No need to use `!important`, these selectors already have sufficient
specificity.
Do not change the order whereby the selectors are listed.
*/

article.slide:lang(es) > nav:first-of-type a[href]:not([rel])::before {
/* English: "See also"; */
content: "Ver también";
}

article.slide:lang(es) > nav:first-of-type a[href][rel~="tag"]::before {
/* English: "Tagged content"; */
content: "Contenido relacionado";
}

article.slide:lang(es) > nav:first-of-type a[href][rel~="discussion"]::before {
/* English: "Comments"; */
content: "Comentarios";
}

article.slide:lang(es) > nav:first-of-type a[href][rel~="author"]::before {
/* English: "Author"; */
content: "Autor";
}

article.slide:lang(es) > nav:first-of-type a[href][rel~="attachment"]::before {
/* English: "Download"; */
content: "Descargar";
}

article.slide:lang(es) > nav:first-of-type a[href][rel~="bookmark"]::before {
/* English: "Share it!"; */
content: "Difundir";
}

article.slide:lang(es) > nav:first-of-type a[href][rel~="index"]::before {
/* English: "Index"; */
content: "\0000CDndice";
}

article.slide:lang(es) > nav:first-of-type a[href][rel~="first"]::before {
/* English: "First slide"; */
content: "Primera diapositiva";
}

article.slide:lang(es) > nav:first-of-type a[href][rel~="last"]::before {
/* English: "Last slide"; */
content: "\0000DAltima diapositiva";
}

article.slide:lang(es) > nav:first-of-type a[href][rel~="prev"]::before {
/* English: "Previous slide"; */
content: "Diapositiva anterior";
}

article.slide:lang(es) > nav:first-of-type a[href][rel~="next"]::before {
/* English: "Next slide"; */
content: "Diapositiva siguiente";
}

article.slide:lang(es) > nav:first-of-type a[href][rel~="child"]::before {
/* English: "More"; */
content: "M\0000E1s";
}

article.slide:lang(es) > nav:first-of-type a[href][rel~="parent"]::before {
/* English: "Back to"; */
content: "Regresar a";
}

article.slide:lang(es) > nav:first-of-type a[href][rel~="parent"]:empty::before {
/* English: "Exit"; */
content: "Salida";
}

article.slide:lang(es) > nav:first-of-type a[href][rel~="parent"]:not(.tab):not(.plate):not(.no-rel):empty::before {
/* English: "Click to exit"; */
content: "Haga clic para salir";
}

}


/* EOF */

Loading

0 comments on commit e2444ed

Please sign in to comment.