mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
skins: replace {js,css}.template with actual files. Simplify startup scripts.
Currently, an Etherpad skin requires the existence of 6 files: - index.{css,js} - pad.{css,js} - timeslider.{css,js} In the default empty skin (in static/custom), there were 2 small placeholders ({js,css}.template) to be copied in place by the startup script in case no skin was in use. Now that we are moving to multiple directories (see #3471) we can simply commit the example files and remove the copying code from the startup script.
This commit is contained in:
parent
6c56e7ca7a
commit
0c518cadf5
9 changed files with 29 additions and 25 deletions
|
@ -143,17 +143,4 @@ fi
|
||||||
echo "Clearing minified cache..."
|
echo "Clearing minified cache..."
|
||||||
rm -f var/minified*
|
rm -f var/minified*
|
||||||
|
|
||||||
echo "Ensure custom css/js files are created..."
|
|
||||||
|
|
||||||
for f in "index" "pad" "timeslider"
|
|
||||||
do
|
|
||||||
if [ ! -f "src/static/custom/$f.js" ]; then
|
|
||||||
cp "src/static/custom/js.template" "src/static/custom/$f.js" || exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f "src/static/custom/$f.css" ]; then
|
|
||||||
cp "src/static/custom/css.template" "src/static/custom/$f.css" || exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -18,14 +18,6 @@ cmd /C npm install --loglevel warn || exit /B 1
|
||||||
|
|
||||||
cd /D "%~dp0\.."
|
cd /D "%~dp0\.."
|
||||||
|
|
||||||
echo _
|
|
||||||
echo Copying custom templates...
|
|
||||||
set custom_dir=node_modules\ep_etherpad-lite\static\custom
|
|
||||||
FOR %%f IN (index pad timeslider) DO (
|
|
||||||
if NOT EXIST "%custom_dir%\%%f.js" copy "%custom_dir%\js.template" "%custom_dir%\%%f.js"
|
|
||||||
if NOT EXIST "%custom_dir%\%%f.css" copy "%custom_dir%\css.template" "%custom_dir%\%%f.css"
|
|
||||||
)
|
|
||||||
|
|
||||||
echo _
|
echo _
|
||||||
echo Clearing cache...
|
echo Clearing cache...
|
||||||
del /S var\minified*
|
del /S var\minified*
|
||||||
|
|
3
src/static/custom/.gitignore
vendored
3
src/static/custom/.gitignore
vendored
|
@ -1,3 +0,0 @@
|
||||||
*
|
|
||||||
!.gitignore
|
|
||||||
!*.template
|
|
8
src/static/custom/pad.css
Normal file
8
src/static/custom/pad.css
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
/*
|
||||||
|
custom css files are loaded after core css files. Simply use the same selector to override a style.
|
||||||
|
Example:
|
||||||
|
#editbar LI {border:1px solid #000;}
|
||||||
|
overrides
|
||||||
|
#editbar LI {border:1px solid #d5d5d5;}
|
||||||
|
from pad.css
|
||||||
|
*/
|
6
src/static/custom/pad.js
Normal file
6
src/static/custom/pad.js
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
function customStart()
|
||||||
|
{
|
||||||
|
//define your javascript here
|
||||||
|
//jquery is available - except index.js
|
||||||
|
//you can load extra scripts with $.getScript http://api.jquery.com/jQuery.getScript/
|
||||||
|
}
|
8
src/static/custom/timeslider.css
Normal file
8
src/static/custom/timeslider.css
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
/*
|
||||||
|
custom css files are loaded after core css files. Simply use the same selector to override a style.
|
||||||
|
Example:
|
||||||
|
#editbar LI {border:1px solid #000;}
|
||||||
|
overrides
|
||||||
|
#editbar LI {border:1px solid #d5d5d5;}
|
||||||
|
from pad.css
|
||||||
|
*/
|
6
src/static/custom/timeslider.js
Normal file
6
src/static/custom/timeslider.js
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
function customStart()
|
||||||
|
{
|
||||||
|
//define your javascript here
|
||||||
|
//jquery is available - except index.js
|
||||||
|
//you can load extra scripts with $.getScript http://api.jquery.com/jQuery.getScript/
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue