Skip to content

feat(djangocms_icon): support cortal font & svg logos#611

Merged
wesleyboar merged 6 commits intomainfrom
task/icon-support-cortal-svg
Mar 21, 2023
Merged

feat(djangocms_icon): support cortal font & svg logos#611
wesleyboar merged 6 commits intomainfrom
task/icon-support-cortal-svg

Conversation

@wesleyboar
Copy link
Member

@wesleyboar wesleyboar commented Mar 17, 2023

Overview

Let users add Cortal Font icons* and SVG logos†.

* Because adding these manually (<i class="icon icon-whatever'></i>) is not easy for basic CMS editors and has no source of truth.
† Because Django Filer (Django CMS uses this for file management) does not support SVG.

Related

Changes

Testing

  1. https://github.com/TACC/Core-CMS/wiki/Test-CMS-Changes
  2. Create an "Icon" plugin to a page.
  3. Choose any icon from TACC "Cortal" Icons.
  4. Save.
  5. Verify icon loads.
  6. Create an "Icon" plugin to a page.
  7. Choose any icon from Logo SVGs.
  8. Save.
  9. Verify logo loads.

UI

choose render
cortal icon cortal icon - choose cortal icon - render
svg logo svg logo - choose svg logo - render

Video of client usage of a supplementary site-specific set of SVGs is available at TACC/tup-ui#168.

Notes

Known Issues

  1. Icon previews are blank if editor switches from SVG set to icon set.
    I suspect a bug with the plugin e.g. Multiple iconsets cause problems with the icon selector widget django-cms/djangocms-icon#9.

@wesleyboar wesleyboar changed the title feat: djangocms icon plugin support cortal & svg feat(djangocms_icon): support cortal font & svg logos Mar 17, 2023
Let svg.html template (fka logos.html) to be re-used via path parameter.
If user wants external path, they can make internal file with external path.

Failed Alternatives:
- no way to capture static via with: https://www.google.com/search?q=pass+static+file+asset+to+include+tag+django
- not worth the overhead: https://django-capture-tag.readthedocs.io/en/latest/
- name of parameter can be unclear: path_to_static, is_path_static, static_path
- name of parameter can be verbose or clunky: should_make_path_static, make_path_static
wesleyboar added a commit to TACC/tup-ui that referenced this pull request Mar 18, 2023
wesleyboar added a commit to TACC/tup-ui that referenced this pull request Mar 18, 2023
wesleyboar added a commit to TACC/tup-ui that referenced this pull request Mar 18, 2023
wesleyboar added a commit to TACC/tup-ui that referenced this pull request Mar 18, 2023
@wesleyboar
Copy link
Member Author

Merging based on approval of TACC/tup-ui#168.

@wesleyboar wesleyboar merged commit dc76cb0 into main Mar 21, 2023
@wesleyboar wesleyboar deleted the task/icon-support-cortal-svg branch March 21, 2023 15:59
jarosenb added a commit to TACC/tup-ui that referenced this pull request Mar 23, 2023
* add support for React components in CMS content

* remove index.html artifact

* skip rendering if DOM element doesn't exist

* software table CMS component

* docs(tup-cms): assets_custom_delayed.html warning (#165)

* feat(tup-cms): snippets, sprial-big

* fix(tup-cms): snippets, sprial-big {{html}}

* rename variables

* feat(tup-cms): allow folder-level permissions

* feat(tup-cms): save global css snippets

* fix(tup-cms): snippet name typo

* remove unused import

* fix(tup-cms): simplify footer border

And make it more likely to show up all the time for any browser.

* fix: use/set page title on app pages

Some apps fail to read from CMS page (they show URL), so I manually set:
- portal
- portal debug

Some app templates can read title from CMS page at same URL:
- list

Some pages cannot read form CMS because we won't create a page for each:
- read

* fix(tup-cms): change page title on portal

* fix(tup-cms): change page title on portal

* feat(core-styles): new message styles

TACC/Core-Styles#131

* fix(core-styles): bug fixes (and new dev features)

* fix(tup-cms): cms image from wrong branch

The Core-CMS image should be built from `dev/tup-cms` branch.

But the image was built from `task/get-core-styles-beyond-0.11.0`.

* feat(tup-cms): save footer styles (as of cd3f128)

* feat(core-cms): picture children in figcaption

TODO: Move this to Core-CMS.

* feat(tup-cms): .banner--large, .highlight, .tag

* feat(tup-cms): .banner--small, tweak .tag

* feat(tup-cms): banner-row|cell--minor|major

* feat(tup-cms): core-cms djangocms_picture template

Load the new djangocms_picture template from Core-CMS.

* feat(tup-cms): for-core-styles css (for banner)

* feat(tup-cms): refactor banner css, no figcaption

* chore(tup-cms): revert to previous cms image

Because the change in the c9f0dce one is no longer necessary.

* fix(tup-cms): banner-cell--minor, missing space

* fix(tup-cms): banner-row mobile layout

* fix(tup-ui): remove old system monitor styles

* fix(tup-ui): update pill styles

* fix(tup-cms): core-cms templates: picture, 404

- add manual 404 page
- fix djangocms_picture template bugs

* fix(tup-cms): css banner supports two layouts

The homepage banner can be created with two layouts. One layout did not allow cropping image (like a background image). Now it does.

* fix(tup-cms): core-cms image, missing a "not"

* feat(tup-cms): manual 404 page w/ tup-style markup

* fix(tup-components): user updates pill style/type

* feat(tup-components): (unused) pill danger color

* fix(tup-cms): css c-feed-list half-visible text

* feat(tup-cms): css: banner update, new tag snippet

* feat(tup-cms): retire banner "Image & Link" layout

- Convert inline style `column-count` solution to `display: table`.
- Retire "Image & Link" layout (it can not adapt to `display: table`).

* feat(tup-cms): change footer logo layout

* fix(tup-cms): change footer tacc logo height

* chore(tup-cms): save latest color settings snippet

* fix(tup-cms): tacc color drop #558EFF add #f3f7fe

The normal color on dark context was not light enough. I "pulled the light colors down".

* feat(tup-cms): test svg & font icons, for core-cms

* chore(tup-cms): remove cruft from previous commit

* feat(tup-cms): use svg support from core-cms

* chore(tup-cms): nx format:write

* fix(tup-cms): incomplete svg support from core-cms

* chore(tup-cms): update based on core-cms updates

TACC/Core-CMS#611

* docs(tup-cms): note icon editor dual-svg sets bug

* fix(tup-cms): simplify decals svg

* chore(tup-cms): .section--has-decal → .has-decal

* fix(css): django-cms-icon svg stretch to fill

TACC/Core-CMS#611

* fix(tup-cms): news list revert inline css

* docs(tup-cms): cms font size xxx large commit ref

* feat(tup-cms): migrate news and tag css to core

Also small updates from dev.tup.tacc.utexas.edu snippet content.

* fix(tup-cms): news and tag css migration bugs

* fix(tup-cms): news and tag css migration bugs

* chore(tup-ui): match Core-Styles version with CMS

* chore(tup-cms): delete variable now in core-styles

* docs(tup-cms): user updates readme

* feat(tup-cms): user updates reskin ⚠️ incomplete

* test(tup-cms): core-cms layout-choice-form ⚠️ TEMP

* feat(tup-cms): more decal svgs

* fix(tup-cms): remove test attr preventing svg css

* feat(tup-cms): add more svgs (to allow layering)

* fix(tup-cms): user news read page header layout

* feat(tup-cms): user news "Update" pill in header

* fic(tup-cms): remove layout choice form testing

* fix(core-cms): news title to be regular link color

* chore(core-styles): v2.6.1

* chore(core-cms): latest dev/tup-cms build

* fix(tup-cms): user updates read page, new styles

Also, adds new `c-update.css`.

---------

Co-authored-by: jarosenb <jrosenberg@tacc.utexas.edu>
wesleyboar added a commit to TACC/tup-ui that referenced this pull request Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant