Skip to content

Commit

Permalink
docs: CMD-165 BRANDING → PORTAL_BRANDING
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleyboar committed Jul 5, 2024
1 parent 0a8b3ed commit 08bfcc4
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions docs/upgrade-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,76 @@

## Table of Contents

- [from v4.N to v4.13](#from-v4n-to-v413)
- [from v4.N to v4.12](#from-v4n-to-v412)
- [from v4.N to v4.7](#from-v4n-to-v47)
- [from v3 to v4](#from-v3-to-v4)
- [from v3.N to v3.12](#from-v3n-to-v312)
- [from v2 to v3](#from-v2-to-v3)

## from v4.N to v4.13

- [Upgrade Custom Branding Setting](#upgrade-custom-logo-setting)

### Upgrade Custom Branding Setting

Refactor the `BRANDING` array to a `PORTAL_BRANDING` dict:

```diff
- NSF_BRANDING = [
- ...
- ]
-
- TACC_BRANDING = [
- ...
- ]
-
- UTEXAS_BRANDING = [
- ...
- ]
-
- CUSTOM_BRANDING = [
- "portal",
- "custom-project_cms/img/org_logos/custom-project-logo.png",
- "",
- "/",
- "_self",
- "Custom Project Logo",
- "anonymous",
- "True"
- ]
-
- BRANDING = [ NSF_BRANDING, TACC_BRANDING, UTEXAS_BRANDING, CUSTOM_BRANDING ]
+ from taccsite_cms._settings.branding import *
+
+ CUSTOM_BRANDING = {
+ "is_remote": True,
+ "img_file_src": "https://cdn.jsdelivr.net/gh/TACC/Core-CMS-Custom@______/custom-project_assets/custom-project-logo.png",
+ "img_class": "", # additional class names
+ "link_href": "/",
+ "link_target": "_self",
+ "img_alt_text": "Portal Logo",
+ "img_crossorigin": "anonymous",
+ } # To hide logo, set `PORTAL_LOGO = False`
+
+ PORTAL_BRANDING = [ PORTAL_BRANDING_TACC, PORTAL_BRANDING_UTEXAS ]
```

<details><summary>Map of Array Values to Dict Properties</summary>

| | from Array Value | to Dict Property |
| - | - | - |
| 0 | "portal" | (unused value) |
| 1 | "site_cms/.../portal.png" | `"img_file_src"` |
| 2 | "" | `"img_class"` |
| 3 | "/" | `"link_href"` |
| 4 | "_self" | `"link_target"` |
| 5 | "Portal Logo" | `"img_alt_text"` |
| 6 | "anonymous" | `"img_crossorigin"` |
| 7 | "True" | (whether to show logo) |

</details>

## from v4.N to v4.12

- [Rename Certain Settings](#rename-certain-settings)
Expand Down

0 comments on commit 08bfcc4

Please sign in to comment.