Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complete redesign and overhaul #54

Merged
merged 1 commit into from
Dec 13, 2023
Merged
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
3 changes: 2 additions & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
variables:
TUTOR_PLUGIN: indigo
TUTOR_EXTRA_ENABLED_PLUGINS: mfe
TUTOR_PYPI_PACKAGE: tutor-indigo
TUTOR_IMAGES: openedx
TUTOR_IMAGES: openedx mfe
OPENEDX_RELEASE: quince
GITHUB_REPO: overhangio/tutor-indigo

Expand Down
1 change: 1 addition & 0 deletions changelog.d/20231213_100433_regis_indigo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- 💥[Improvement] Complete overhaul and redesign: the Indigo theme now covers more pages, including the MFE footer and header, and they are more beautiful than ever! (by @hinakhadim and @TanveerAhmed)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def load_about():
packages=find_packages(exclude=["tests*"]),
include_package_data=True,
python_requires=">=3.8",
install_requires=["tutor>=17.0.0,<18.0.0"],
install_requires=["tutor>=17.0.0,<18.0.0", "tutor-mfe>=17.0.0,<18.0.0"],
extras_require={"dev": "tutor[dev]>=17.0.0,<18.0.0"},
entry_points={"tutor.plugin.v1": ["indigo = tutorindigo.plugin"]},
classifiers=[
Expand Down
46 changes: 38 additions & 8 deletions tutorindigo/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@
# To remove all links, run:
# tutor config save --set INDIGO_FOOTER_NAV_LINKS=[] --set INDIGO_FOOTER_LEGAL_LINKS=[]
"FOOTER_NAV_LINKS": [
{"title": "About", "url": "/about"},
{"title": "Contact", "url": "/contact"},
{"title": "About Us", "url": "/about"},
{"title": "Blog", "url": "/blog"},
{"title": "Donate", "url": "/donate"},
{"title": "Terms of Sevice", "url": "/tos"},
{"title": "Privacy Policy", "url": "/privacy"},
{"title": "Help", "url": "/help"},
{"title": "Contact Us", "url": "/contact"},
],
"FOOTER_LEGAL_LINKS": [
{"title": "Terms of service", "url": "/tos"},
Expand Down Expand Up @@ -69,17 +74,22 @@
hooks.Filters.CLI_DO_INIT_TASKS.add_item(("lms", task_file.read()))


# Override openedx docker image name
@hooks.Filters.CONFIG_DEFAULTS.add()
# Override openedx & mfe docker image names
@hooks.Filters.CONFIG_DEFAULTS.add(priority=hooks.priorities.LOW)
def _override_openedx_docker_image(
items: list[tuple[str, t.Any]]
) -> list[tuple[str, t.Any]]:
image = ""
openedx_image = ""
mfe_image = ""
for k, v in items:
if k == "DOCKER_IMAGE_OPENEDX":
image = v
if image:
items.append(("DOCKER_IMAGE_OPENEDX", f"{image}-indigo"))
openedx_image = v
elif k == "MFE_DOCKER_IMAGE":
mfe_image = v
if openedx_image:
items.append(("DOCKER_IMAGE_OPENEDX", f"{openedx_image}-indigo"))
if mfe_image:
items.append(("MFE_DOCKER_IMAGE", f"{mfe_image}-indigo"))
return items


Expand All @@ -91,3 +101,23 @@ def _override_openedx_docker_image(
[(f"INDIGO_{key}", value) for key, value in config["unique"].items()]
)
hooks.Filters.CONFIG_OVERRIDES.add_items(list(config["overrides"].items()))


hooks.Filters.ENV_PATCHES.add_items(
[
(
"mfe-dockerfile-post-npm-install-learning",
"""
RUN npm install '@edx/brand@npm:@edly-io/indigo-brand-openedx@^1.0.0'
RUN npm install '@edx/frontend-component-header@npm:@edly-io/indigo-frontend-component-header@^1.0.0'
RUN npm install '@edx/frontend-component-footer@npm:@edly-io/indigo-frontend-component-footer@^1.0.0'
""",
),
(
"mfe-dockerfile-post-npm-install-authn",
"""
RUN npm install '@edx/brand@npm:@edly-io/indigo-brand-openedx@^1.0.0'
""",
),
]
)
Binary file modified tutorindigo/templates/indigo/cms/static/images/favicon.ico
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tutorindigo/templates/indigo/lms/static/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions tutorindigo/templates/indigo/lms/static/images/profile.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tutorindigo/templates/indigo/lms/static/images/tutor-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions tutorindigo/templates/indigo/lms/static/images/unenroll.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading