From b2c46a92048e47bfe5f29091eda2d2d7b1deed65 Mon Sep 17 00:00:00 2001 From: Wesley Bomar Date: Tue, 3 Aug 2021 13:50:15 -0500 Subject: [PATCH] Quick: Move snippets. Simpler/Add snippet READMEs. --- a2cps-cms/templates/snippets/README.md | 1 + .../snippets/a2cps-consortium-map.html | 0 .../snippets/iframe-report-consort.html | 0 .../snippets/iframe-report-weekly-dash.html | 0 .../snippets/study-timeline-table.html | 0 .../{ => templates}/snippets/twitter.html | 0 example-cms/snippets/README.md | 43 ------------------- example-cms/templates/snippets/README.md | 1 + frontera-cms/templates/snippets/README.md | 1 + .../snippets/newsletter-body--july-2020.html | 0 .../snippets/newsletter-body--july-2021.html | 0 .../snippets/newsletter-body--march-2021.html | 0 .../newsletter-body--november-2020.html | 0 .../snippets/newsletter-foot.html | 0 .../snippets/newsletter-head.html | 0 .../{ => templates}/snippets/slide-show.html | 0 .../snippets/system-monitor.html | 0 neuronex-cms/snippets/README.md | 43 ------------------- neuronex-cms/templates/snippets/README.md | 1 + protx-cms/snippets/README.md | 43 ------------------- protx-cms/templates/snippets/README.md | 1 + texascale-org/templates/snippets/README.md | 1 + .../core-gl-19-support-align-center.html | 0 ...mage-map-frontera-secret-sauce-markup.html | 0 ...mage-map-frontera-secret-sauce-styles.html | 0 .../image-map-whats-in-a-node-markup.html | 0 .../image-map-whats-in-a-node-styles.html | 0 .../snippets/meet-fellows.html | 0 tup-cms/snippets/README.md | 43 ------------------- tup-cms/templates/snippets/README.md | 1 + 30 files changed, 7 insertions(+), 172 deletions(-) create mode 100644 a2cps-cms/templates/snippets/README.md rename a2cps-cms/{ => templates}/snippets/a2cps-consortium-map.html (100%) rename a2cps-cms/{ => templates}/snippets/iframe-report-consort.html (100%) rename a2cps-cms/{ => templates}/snippets/iframe-report-weekly-dash.html (100%) rename a2cps-cms/{ => templates}/snippets/study-timeline-table.html (100%) rename a2cps-cms/{ => templates}/snippets/twitter.html (100%) delete mode 100644 example-cms/snippets/README.md create mode 100644 example-cms/templates/snippets/README.md create mode 100644 frontera-cms/templates/snippets/README.md rename frontera-cms/{ => templates}/snippets/newsletter-body--july-2020.html (100%) rename frontera-cms/{ => templates}/snippets/newsletter-body--july-2021.html (100%) rename frontera-cms/{ => templates}/snippets/newsletter-body--march-2021.html (100%) rename frontera-cms/{ => templates}/snippets/newsletter-body--november-2020.html (100%) rename frontera-cms/{ => templates}/snippets/newsletter-foot.html (100%) rename frontera-cms/{ => templates}/snippets/newsletter-head.html (100%) rename frontera-cms/{ => templates}/snippets/slide-show.html (100%) rename frontera-cms/{ => templates}/snippets/system-monitor.html (100%) delete mode 100644 neuronex-cms/snippets/README.md create mode 100644 neuronex-cms/templates/snippets/README.md delete mode 100644 protx-cms/snippets/README.md create mode 100644 protx-cms/templates/snippets/README.md create mode 100644 texascale-org/templates/snippets/README.md rename texascale-org/{ => templates}/snippets/core-gl-19-support-align-center.html (100%) rename texascale-org/{ => templates}/snippets/image-map-frontera-secret-sauce-markup.html (100%) rename texascale-org/{ => templates}/snippets/image-map-frontera-secret-sauce-styles.html (100%) rename texascale-org/{ => templates}/snippets/image-map-whats-in-a-node-markup.html (100%) rename texascale-org/{ => templates}/snippets/image-map-whats-in-a-node-styles.html (100%) rename texascale-org/{ => templates}/snippets/meet-fellows.html (100%) delete mode 100644 tup-cms/snippets/README.md create mode 100644 tup-cms/templates/snippets/README.md diff --git a/a2cps-cms/templates/snippets/README.md b/a2cps-cms/templates/snippets/README.md new file mode 100644 index 00000000..bab2d79b --- /dev/null +++ b/a2cps-cms/templates/snippets/README.md @@ -0,0 +1 @@ +See [Core `templates/snippets/README.md`](/taccsite_cms/templates/snippets/README.md). diff --git a/a2cps-cms/snippets/a2cps-consortium-map.html b/a2cps-cms/templates/snippets/a2cps-consortium-map.html similarity index 100% rename from a2cps-cms/snippets/a2cps-consortium-map.html rename to a2cps-cms/templates/snippets/a2cps-consortium-map.html diff --git a/a2cps-cms/snippets/iframe-report-consort.html b/a2cps-cms/templates/snippets/iframe-report-consort.html similarity index 100% rename from a2cps-cms/snippets/iframe-report-consort.html rename to a2cps-cms/templates/snippets/iframe-report-consort.html diff --git a/a2cps-cms/snippets/iframe-report-weekly-dash.html b/a2cps-cms/templates/snippets/iframe-report-weekly-dash.html similarity index 100% rename from a2cps-cms/snippets/iframe-report-weekly-dash.html rename to a2cps-cms/templates/snippets/iframe-report-weekly-dash.html diff --git a/a2cps-cms/snippets/study-timeline-table.html b/a2cps-cms/templates/snippets/study-timeline-table.html similarity index 100% rename from a2cps-cms/snippets/study-timeline-table.html rename to a2cps-cms/templates/snippets/study-timeline-table.html diff --git a/a2cps-cms/snippets/twitter.html b/a2cps-cms/templates/snippets/twitter.html similarity index 100% rename from a2cps-cms/snippets/twitter.html rename to a2cps-cms/templates/snippets/twitter.html diff --git a/example-cms/snippets/README.md b/example-cms/snippets/README.md deleted file mode 100644 index 013ad10a..00000000 --- a/example-cms/snippets/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# TACC CMS Per-Site Resources - Example - Snippets - -All snippet code specific to this project __must__ be placed in this directory. This allows us to version and source control snippet code. Failure to do so will result in snippet code loss upon data loss from database. - -_This directory can alleviate danger #1 of [Why a Snippet Is Dangerous](#why-a-snippet-is-dangerous)._ - -## Important - -1. The Core CMS __must not__ use any snippets. _They would be inaccessible to projects._ -2. A CMS project __should not__ use any snippets. _They __may only__ be temporarily._ - -## Usage - -In a CMS project: - -1. Any snippet __must__ also be saved into this directory in its own file. -2. Any snippet file __must__ be kept up to date.[^1] - -[^1]: For now, maintain snippet source code via internal team process. - -## What a Snippet Is - -A snippet is a __dangerous__ feature from the plugin [`djangocms-snippet`](https://github.com/divio/djangocms-snippet) which is installed in the CMS. - -It allows an authorized CMS user to create a snippet of front-end web code (e.g. CSS, HTML, JS) in the database for use anywhere on the website. - -## Why a Snippet Is Dangerous - -1. The code is dependent on the (unsynced) database, because it is not under: - - source/version control -2. The code is independent of any other code control: - - security - - dependency management - - style guide - - organization - - linting - -## Why a Snippet Is Allowed - -1. Support time-sensitive changes to the CMS.[^2] -2. Support ad-hoc changes by designer who codes.[^2] - -[^2] This is permitted with the expectation that the snippet code is soon appropriately integrated into the repository. diff --git a/example-cms/templates/snippets/README.md b/example-cms/templates/snippets/README.md new file mode 100644 index 00000000..bab2d79b --- /dev/null +++ b/example-cms/templates/snippets/README.md @@ -0,0 +1 @@ +See [Core `templates/snippets/README.md`](/taccsite_cms/templates/snippets/README.md). diff --git a/frontera-cms/templates/snippets/README.md b/frontera-cms/templates/snippets/README.md new file mode 100644 index 00000000..bab2d79b --- /dev/null +++ b/frontera-cms/templates/snippets/README.md @@ -0,0 +1 @@ +See [Core `templates/snippets/README.md`](/taccsite_cms/templates/snippets/README.md). diff --git a/frontera-cms/snippets/newsletter-body--july-2020.html b/frontera-cms/templates/snippets/newsletter-body--july-2020.html similarity index 100% rename from frontera-cms/snippets/newsletter-body--july-2020.html rename to frontera-cms/templates/snippets/newsletter-body--july-2020.html diff --git a/frontera-cms/snippets/newsletter-body--july-2021.html b/frontera-cms/templates/snippets/newsletter-body--july-2021.html similarity index 100% rename from frontera-cms/snippets/newsletter-body--july-2021.html rename to frontera-cms/templates/snippets/newsletter-body--july-2021.html diff --git a/frontera-cms/snippets/newsletter-body--march-2021.html b/frontera-cms/templates/snippets/newsletter-body--march-2021.html similarity index 100% rename from frontera-cms/snippets/newsletter-body--march-2021.html rename to frontera-cms/templates/snippets/newsletter-body--march-2021.html diff --git a/frontera-cms/snippets/newsletter-body--november-2020.html b/frontera-cms/templates/snippets/newsletter-body--november-2020.html similarity index 100% rename from frontera-cms/snippets/newsletter-body--november-2020.html rename to frontera-cms/templates/snippets/newsletter-body--november-2020.html diff --git a/frontera-cms/snippets/newsletter-foot.html b/frontera-cms/templates/snippets/newsletter-foot.html similarity index 100% rename from frontera-cms/snippets/newsletter-foot.html rename to frontera-cms/templates/snippets/newsletter-foot.html diff --git a/frontera-cms/snippets/newsletter-head.html b/frontera-cms/templates/snippets/newsletter-head.html similarity index 100% rename from frontera-cms/snippets/newsletter-head.html rename to frontera-cms/templates/snippets/newsletter-head.html diff --git a/frontera-cms/snippets/slide-show.html b/frontera-cms/templates/snippets/slide-show.html similarity index 100% rename from frontera-cms/snippets/slide-show.html rename to frontera-cms/templates/snippets/slide-show.html diff --git a/frontera-cms/snippets/system-monitor.html b/frontera-cms/templates/snippets/system-monitor.html similarity index 100% rename from frontera-cms/snippets/system-monitor.html rename to frontera-cms/templates/snippets/system-monitor.html diff --git a/neuronex-cms/snippets/README.md b/neuronex-cms/snippets/README.md deleted file mode 100644 index 013ad10a..00000000 --- a/neuronex-cms/snippets/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# TACC CMS Per-Site Resources - Example - Snippets - -All snippet code specific to this project __must__ be placed in this directory. This allows us to version and source control snippet code. Failure to do so will result in snippet code loss upon data loss from database. - -_This directory can alleviate danger #1 of [Why a Snippet Is Dangerous](#why-a-snippet-is-dangerous)._ - -## Important - -1. The Core CMS __must not__ use any snippets. _They would be inaccessible to projects._ -2. A CMS project __should not__ use any snippets. _They __may only__ be temporarily._ - -## Usage - -In a CMS project: - -1. Any snippet __must__ also be saved into this directory in its own file. -2. Any snippet file __must__ be kept up to date.[^1] - -[^1]: For now, maintain snippet source code via internal team process. - -## What a Snippet Is - -A snippet is a __dangerous__ feature from the plugin [`djangocms-snippet`](https://github.com/divio/djangocms-snippet) which is installed in the CMS. - -It allows an authorized CMS user to create a snippet of front-end web code (e.g. CSS, HTML, JS) in the database for use anywhere on the website. - -## Why a Snippet Is Dangerous - -1. The code is dependent on the (unsynced) database, because it is not under: - - source/version control -2. The code is independent of any other code control: - - security - - dependency management - - style guide - - organization - - linting - -## Why a Snippet Is Allowed - -1. Support time-sensitive changes to the CMS.[^2] -2. Support ad-hoc changes by designer who codes.[^2] - -[^2] This is permitted with the expectation that the snippet code is soon appropriately integrated into the repository. diff --git a/neuronex-cms/templates/snippets/README.md b/neuronex-cms/templates/snippets/README.md new file mode 100644 index 00000000..bab2d79b --- /dev/null +++ b/neuronex-cms/templates/snippets/README.md @@ -0,0 +1 @@ +See [Core `templates/snippets/README.md`](/taccsite_cms/templates/snippets/README.md). diff --git a/protx-cms/snippets/README.md b/protx-cms/snippets/README.md deleted file mode 100644 index 013ad10a..00000000 --- a/protx-cms/snippets/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# TACC CMS Per-Site Resources - Example - Snippets - -All snippet code specific to this project __must__ be placed in this directory. This allows us to version and source control snippet code. Failure to do so will result in snippet code loss upon data loss from database. - -_This directory can alleviate danger #1 of [Why a Snippet Is Dangerous](#why-a-snippet-is-dangerous)._ - -## Important - -1. The Core CMS __must not__ use any snippets. _They would be inaccessible to projects._ -2. A CMS project __should not__ use any snippets. _They __may only__ be temporarily._ - -## Usage - -In a CMS project: - -1. Any snippet __must__ also be saved into this directory in its own file. -2. Any snippet file __must__ be kept up to date.[^1] - -[^1]: For now, maintain snippet source code via internal team process. - -## What a Snippet Is - -A snippet is a __dangerous__ feature from the plugin [`djangocms-snippet`](https://github.com/divio/djangocms-snippet) which is installed in the CMS. - -It allows an authorized CMS user to create a snippet of front-end web code (e.g. CSS, HTML, JS) in the database for use anywhere on the website. - -## Why a Snippet Is Dangerous - -1. The code is dependent on the (unsynced) database, because it is not under: - - source/version control -2. The code is independent of any other code control: - - security - - dependency management - - style guide - - organization - - linting - -## Why a Snippet Is Allowed - -1. Support time-sensitive changes to the CMS.[^2] -2. Support ad-hoc changes by designer who codes.[^2] - -[^2] This is permitted with the expectation that the snippet code is soon appropriately integrated into the repository. diff --git a/protx-cms/templates/snippets/README.md b/protx-cms/templates/snippets/README.md new file mode 100644 index 00000000..bab2d79b --- /dev/null +++ b/protx-cms/templates/snippets/README.md @@ -0,0 +1 @@ +See [Core `templates/snippets/README.md`](/taccsite_cms/templates/snippets/README.md). diff --git a/texascale-org/templates/snippets/README.md b/texascale-org/templates/snippets/README.md new file mode 100644 index 00000000..bab2d79b --- /dev/null +++ b/texascale-org/templates/snippets/README.md @@ -0,0 +1 @@ +See [Core `templates/snippets/README.md`](/taccsite_cms/templates/snippets/README.md). diff --git a/texascale-org/snippets/core-gl-19-support-align-center.html b/texascale-org/templates/snippets/core-gl-19-support-align-center.html similarity index 100% rename from texascale-org/snippets/core-gl-19-support-align-center.html rename to texascale-org/templates/snippets/core-gl-19-support-align-center.html diff --git a/texascale-org/snippets/image-map-frontera-secret-sauce-markup.html b/texascale-org/templates/snippets/image-map-frontera-secret-sauce-markup.html similarity index 100% rename from texascale-org/snippets/image-map-frontera-secret-sauce-markup.html rename to texascale-org/templates/snippets/image-map-frontera-secret-sauce-markup.html diff --git a/texascale-org/snippets/image-map-frontera-secret-sauce-styles.html b/texascale-org/templates/snippets/image-map-frontera-secret-sauce-styles.html similarity index 100% rename from texascale-org/snippets/image-map-frontera-secret-sauce-styles.html rename to texascale-org/templates/snippets/image-map-frontera-secret-sauce-styles.html diff --git a/texascale-org/snippets/image-map-whats-in-a-node-markup.html b/texascale-org/templates/snippets/image-map-whats-in-a-node-markup.html similarity index 100% rename from texascale-org/snippets/image-map-whats-in-a-node-markup.html rename to texascale-org/templates/snippets/image-map-whats-in-a-node-markup.html diff --git a/texascale-org/snippets/image-map-whats-in-a-node-styles.html b/texascale-org/templates/snippets/image-map-whats-in-a-node-styles.html similarity index 100% rename from texascale-org/snippets/image-map-whats-in-a-node-styles.html rename to texascale-org/templates/snippets/image-map-whats-in-a-node-styles.html diff --git a/texascale-org/snippets/meet-fellows.html b/texascale-org/templates/snippets/meet-fellows.html similarity index 100% rename from texascale-org/snippets/meet-fellows.html rename to texascale-org/templates/snippets/meet-fellows.html diff --git a/tup-cms/snippets/README.md b/tup-cms/snippets/README.md deleted file mode 100644 index 013ad10a..00000000 --- a/tup-cms/snippets/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# TACC CMS Per-Site Resources - Example - Snippets - -All snippet code specific to this project __must__ be placed in this directory. This allows us to version and source control snippet code. Failure to do so will result in snippet code loss upon data loss from database. - -_This directory can alleviate danger #1 of [Why a Snippet Is Dangerous](#why-a-snippet-is-dangerous)._ - -## Important - -1. The Core CMS __must not__ use any snippets. _They would be inaccessible to projects._ -2. A CMS project __should not__ use any snippets. _They __may only__ be temporarily._ - -## Usage - -In a CMS project: - -1. Any snippet __must__ also be saved into this directory in its own file. -2. Any snippet file __must__ be kept up to date.[^1] - -[^1]: For now, maintain snippet source code via internal team process. - -## What a Snippet Is - -A snippet is a __dangerous__ feature from the plugin [`djangocms-snippet`](https://github.com/divio/djangocms-snippet) which is installed in the CMS. - -It allows an authorized CMS user to create a snippet of front-end web code (e.g. CSS, HTML, JS) in the database for use anywhere on the website. - -## Why a Snippet Is Dangerous - -1. The code is dependent on the (unsynced) database, because it is not under: - - source/version control -2. The code is independent of any other code control: - - security - - dependency management - - style guide - - organization - - linting - -## Why a Snippet Is Allowed - -1. Support time-sensitive changes to the CMS.[^2] -2. Support ad-hoc changes by designer who codes.[^2] - -[^2] This is permitted with the expectation that the snippet code is soon appropriately integrated into the repository. diff --git a/tup-cms/templates/snippets/README.md b/tup-cms/templates/snippets/README.md new file mode 100644 index 00000000..bab2d79b --- /dev/null +++ b/tup-cms/templates/snippets/README.md @@ -0,0 +1 @@ +See [Core `templates/snippets/README.md`](/taccsite_cms/templates/snippets/README.md).