Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,18 @@ Assumes that `code.djangoproject.com` and `djangoproject.com` are stored in the
same directory (adjust paths if needed).

1. Copy the generated CSS:
``cp ../djangoproject.com/static/css/*.css trac-env/htdocs/css/``
2. Copy _utils.scss (needed by trackahacks.scss):
``cp ../djangoproject.com/static/scss/_utils.scss scss/``
``cp ../djangoproject.com/djangoproject/static/css/*.css trac-env/htdocs/css/``
2. Copy _utils.scss (needed by trachacks.scss):
``cp ../djangoproject.com/djangoproject/scss/_utils.scss scss/``
3. Copy the javascript directory:
``cp -rT ../djangoproject.com/static/js trac-env/htdocs/js``
4. Compile trackhacks.scss:
``make compile-scss``
``cp -r ../djangoproject.com/djangoproject/static/js/* trac-env/htdocs/js/``
4. Compile trachacks.scss::

docker compose exec trac make compile-scss
docker compose restart trac

For non-Docker local environments, manually compile the source layout bundle using:
``sassc scss/trachacks.scss trac-env/htdocs/css/trachacks.css -s compressed``

How to recreate `trac.sql` after upgrading Trac
-----------------------------------------------
Expand All @@ -86,4 +91,4 @@ Note:
* Be careful with changes that ``trac-admin ... upgrade`` makes to
``trac.ini``. We usually don't want them.
* Review the diff carefully to make sure no unexpected database changes
are inadvertently included.
are inadvertently included.
13 changes: 12 additions & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,20 @@ for var in "${!TRAC_INI_@}"; do
sed -i "s;^${var:9} = .*;${var:9} = ${!var};" /code/trac-env/conf/trac.ini
done

# Check if tracdjangoplugin is installed; if not, install it in editable mode so Trac can load our custom styles and scripts
if ! python <<'PY'
from importlib.metadata import entry_points

plugins = entry_points(group="trac.plugins")
raise SystemExit(not any(plugin.name == "tracdjangoplugin" for plugin in plugins))
PY
then
python -m pip install --no-deps -e ./DjangoPlugin
fi

if [ "x$TRAC_COLLECT_STATIC" = 'xon' ]; then
# Collect trac static files to be served by nginx
trac-admin /code/trac-env/ deploy ./static/
fi

exec "$@"
exec "$@"
16 changes: 16 additions & 0 deletions scss/trachacks.scss
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,22 @@ div[role="main"]{
}
}

#subnav {
@include sans-serif;

ul {
text-align: left;

li {
a {
&.active {
font-weight: bold;
}
}
}
}
}

#main {
@include sans-serif;

Expand Down
Loading
Loading