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

Separate CSS and JS from jinja templates #82

Closed
tw4l opened this issue Oct 21, 2020 · 3 comments
Closed

Separate CSS and JS from jinja templates #82

tw4l opened this issue Oct 21, 2020 · 3 comments
Labels
cleanup Work that can make code/data cleaner or easier to maintain

Comments

@tw4l
Copy link
Contributor

tw4l commented Oct 21, 2020

Related to #43

@mcantelon mcantelon added the cleanup Work that can make code/data cleaner or easier to maintain label Nov 18, 2023
@mcantelon
Copy link
Member

mcantelon commented Jan 5, 2024

List of templates that seem to have JS in them:

  • AIPscan/Aggregator/templates/storage_service.html (start new fetch job, etc.)
  • Reporter/templates/chart_formats_count.html (render format pie chart)
  • Reporter/templates/plot_formats_count.html (render scatter plot)
  • Reporter/templates/aips.html (reload page when filter select elements are changed)
  • Reporter/templates/reports.html (launch various reports)

mcantelon added a commit that referenced this issue Jan 9, 2024
* Moved Javascript from templates to separate files
* Fixed issue with bundling of tasks.js
* Added Javascript/CSS bundling for plot formats count report page
* Removed hashes from bundle filenames
mcantelon added a commit that referenced this issue Jan 9, 2024
* Moved Javascript from templates to separate files
* Fixed issue with bundling of tasks.js
* Added Javascript/CSS bundling for plot formats count report page
* Removed hashes from bundle filenames
mcantelon added a commit that referenced this issue Jan 9, 2024
* Moved Javascript from templates to separate files
* Fixed issue with bundling of tasks.js
* Added Javascript/CSS bundling for plot formats count report page
* Removed hashes from bundle filenames
* Fix base URL in reports.js
mcantelon added a commit that referenced this issue Jan 9, 2024
* Moved Javascript from templates to separate files
* Fixed issue with bundling of tasks.js
* Added Javascript/CSS bundling for plot formats count report page
* Removed hashes from bundle filenames
* Fix base URL in reports.js
mcantelon added a commit that referenced this issue Jan 9, 2024
* Moved Javascript from templates to separate files
* Fixed issue with bundling of tasks.js
* Added Javascript/CSS bundling for plot formats count report page
* Removed hashes from bundle filenames
* Fix base URL in reports.js
mcantelon added a commit that referenced this issue Jan 9, 2024
* Moved Javascript from templates to separate files
* Fixed issue with bundling of tasks.js
* Added Javascript/CSS bundling for plot formats count report page
* Removed hashes from bundle filenames
* Fix base URL in reports.js
mcantelon added a commit that referenced this issue Jan 9, 2024
* Moved Javascript from templates to separate files
* Fixed issue with bundling of tasks.js
* Added Javascript/CSS bundling for plot formats count report page
* Removed hashes from bundle filenames
* Fix base URL in reports.js
mcantelon added a commit that referenced this issue Jan 9, 2024
* Moved Javascript from templates to separate files
* Fixed issue with bundling of tasks.js
* Added Javascript/CSS bundling for plot formats count report page
* Removed hashes from bundle filenames
* Fix base URL in reports.js
* Remove unneeded CSS
mcantelon added a commit that referenced this issue Jan 9, 2024
* Moved Javascript from templates to separate files
* Fixed issue with bundling of tasks.js
* Added Javascript/CSS bundling for plot formats count report page
* Removed hashes from bundle filenames
* Fix base URL in reports.js
* Remove unneeded CSS
mcantelon added a commit that referenced this issue Jan 9, 2024
* Moved Javascript from templates to separate files
* Fixed issue with bundling of tasks.js
* Added Javascript/CSS bundling for plot formats count report page
* Removed hashes from bundle filenames
* Fix base URL in reports.js
* Remove unneeded CSS
mcantelon added a commit that referenced this issue Jan 9, 2024
* Moved Javascript from templates to separate files
* Fixed issue with bundling of tasks.js
* Added Javascript/CSS bundling for plot formats count report page
* Removed hashes from bundle filenames
* Fix base URL in reports.js
* Remove unneeded CSS
mcantelon added a commit that referenced this issue Jan 9, 2024
* Moved Javascript from templates to separate files
* Fixed issue with bundling of tasks.js
* Added Javascript/CSS bundling for plot formats count report page
* Removed hashes from bundle filenames
* Fix base URL in reports.js
* Remove unneeded CSS
mcantelon added a commit that referenced this issue Jan 9, 2024
* Moved Javascript from templates to separate files
* Fixed issue with bundling of tasks.js
* Added Javascript/CSS bundling for plot formats count report page
* Removed hashes from bundle filenames
* Fix base URL in reports.js
* Remove unneeded CSS
mcantelon added a commit that referenced this issue Jan 9, 2024
* Moved Javascript from templates to separate files
* Fixed issue with bundling of tasks.js
* Added Javascript/CSS bundling for plot formats count report page
* Removed hashes from bundle filenames
* Fix base URL in reports.js
* Remove unneeded CSS
mcantelon added a commit that referenced this issue Jan 9, 2024
* Moved Javascript from templates to separate files
* Fixed issue with bundling of tasks.js
* Added Javascript/CSS bundling for plot formats count report page
* Removed hashes from bundle filenames
* Fix base URL in reports.js
* Remove unneeded CSS
mcantelon added a commit that referenced this issue Jan 9, 2024
* Moved Javascript from templates to separate files
* Fixed issue with bundling of tasks.js
* Added Javascript/CSS bundling for plot formats count report page
* Removed hashes from bundle filenames
* Fix base URL in reports.js
* Remove unneeded CSS
mcantelon added a commit that referenced this issue Jan 9, 2024
* Moved Javascript from templates to separate files
* Fixed issue with bundling of tasks.js
* Added Javascript/CSS bundling for plot formats count report page
* Removed hashes from bundle filenames
* Fix base URL in reports.js
* Remove unneeded CSS
mcantelon added a commit that referenced this issue Jan 9, 2024
* Moved Javascript from templates to separate files
* Fixed issue with bundling of tasks.js
* Added Javascript/CSS bundling for plot formats count report page
* Removed hashes from bundle filenames
* Fix base URL in reports.js
* Remove unneeded CSS
mcantelon added a commit that referenced this issue Jan 9, 2024
* Moved Javascript from templates to separate files
* Fixed issue with bundling of tasks.js
* Added Javascript/CSS bundling for plot formats count report page
* Removed hashes from bundle filenames
* Fix base URL in reports.js
* Remove unneeded CSS
mcantelon added a commit that referenced this issue Jan 9, 2024
* Moved Javascript from templates to separate files
* Fixed issue with bundling of tasks.js
* Added Javascript/CSS bundling for plot formats count report page
* Removed hashes from bundle filenames
* Fix base URL in reports.js
* Remove unneeded CSS
mcantelon added a commit that referenced this issue Jan 9, 2024
* Moved Javascript from templates to separate files
* Fixed issue with bundling of tasks.js
* Added Javascript/CSS bundling for plot formats count report page
* Removed hashes from bundle filenames
* Fix base URL in reports.js
* Remove unneeded CSS
mcantelon added a commit that referenced this issue Jan 9, 2024
* Moved Javascript from templates to separate files
* Fixed issue with bundling of tasks.js
* Added Javascript/CSS bundling for plot formats count report page
* Removed hashes from bundle filenames
* Fix base URL in reports.js
* Remove unneeded CSS
@mcantelon
Copy link
Member

mcantelon commented Jan 9, 2024

There doesn't seem to be any CSS rules declared in templates, but lots of in-line styling. This could be replaced by the use of Bootstrap 4 classes, but given these can change between Bootstrap versions it might make more sense to do during a Bootstrap version update. There are also some HTML issues (attributes not enclosed in quotes, etc.) I found using djlint, but that too might make more sense to tackle during a Bootstrap version update. I'll create a separate issue for this.

mcantelon added a commit that referenced this issue Jan 10, 2024
* Moved Javascript from templates to separate files
* Fixed issue with bundling of tasks.js
* Added Javascript/CSS bundling for plot formats count report page
* Removed hashes from bundle filenames
* Fix base URL in reports.js
* Remove unneeded CSS
@mcantelon
Copy link
Member

PR merged.

@mcantelon mcantelon changed the title Separate CSS and JS from jninja templates Separate CSS and JS from jinja templates Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Work that can make code/data cleaner or easier to maintain
Projects
None yet
Development

No branches or pull requests

2 participants