diff --git a/designsafe/apps/workspace/migrations/0009_alter_applistingentry_icon.py b/designsafe/apps/workspace/migrations/0009_alter_applistingentry_icon.py new file mode 100644 index 0000000000..b8d119068b --- /dev/null +++ b/designsafe/apps/workspace/migrations/0009_alter_applistingentry_icon.py @@ -0,0 +1,52 @@ +# Generated by Django 4.2.11 on 2024-04-19 21:49 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("workspace", "0008_appvariantsplugin"), + ] + + operations = [ + migrations.AlterField( + model_name="applistingentry", + name="icon", + field=models.CharField( + blank=True, + choices=[ + ("Generic-App", "Generic: Application"), + ("Generic-Vis", "Generic: Visualization"), + ("Earth", "Element: Earth"), + ("Water", "Element: Water"), + ("Wind", "Element: Wind"), + ("All-Hazards", "All Hazards"), + ("adcirc", "ADCIRC"), + ("Ansys", "Ansys"), + ("Blender", "Blender"), + ("Clawpack", "Clawpack"), + ("Compress", "Compress"), + ("Dakota", "Dakota"), + ("Extract", "Extract"), + ("GiD", "GiD"), + ("Hazmapper", "Hazmapper"), + ("HVSR", "HVSR"), + ("Jupyter", "Jupyter"), + ("LS-DYNA", "LS-DYNA"), + ("MATLAB", "MATLAB"), + ("MPM", "MPM"), + ("NGL-without-text", "NGL"), + ("OpenFOAM", "OpenFOAM"), + ("OpenSees", "OpenSees"), + ("Paraview", "Paraview"), + ("Potree", "Potree"), + ("QGIS", "QGIS"), + ("rWHALE", "rWHALE"), + ("STKO", "STKO"), + ("SWBatch", "SWBatch"), + ], + help_text="The icon associated with this app.", + max_length=64, + ), + ), + ] diff --git a/designsafe/apps/workspace/models/app_entries.py b/designsafe/apps/workspace/models/app_entries.py index 21f4f06ee4..a756d3fded 100644 --- a/designsafe/apps/workspace/models/app_entries.py +++ b/designsafe/apps/workspace/models/app_entries.py @@ -4,26 +4,35 @@ from django.db import models APP_ICONS = [ + ("Generic-App", "Generic: Application"), + ("Generic-Vis", "Generic: Visualization"), + ("Earth", "Element: Earth"), + ("Water", "Element: Water"), + ("Wind", "Element: Wind"), + ("All-Hazards", "All Hazards"), ("adcirc", "ADCIRC"), - ("ansys", "Ansys"), - ("blender", "Blender"), - ("clawpack", "Clawpack"), - ("compress", "Compress"), - ("dakota", "Dakota"), - ("extract", "Extract"), - ("hazmapper", "Hazmapper"), - ("jupyter", "Jupyter"), - ("ls-dyna", "LS-DYNA"), - ("matlab", "MATLAB"), - ("ngl", "NGL"), - ("openfoam", "OpenFOAM"), - ("opensees", "OpenSees"), - ("paraview", "Paraview"), - ("qgis", "QGIS"), - ("rwhale", "rWHALE"), - ("stko", "STKO"), - ("swbatch", "swbatch"), - ("visit", "VisIt"), + ("Ansys", "Ansys"), + ("Blender", "Blender"), + ("Clawpack", "Clawpack"), + ("Compress", "Compress"), + ("Dakota", "Dakota"), + ("Extract", "Extract"), + ("GiD", "GiD"), + ("Hazmapper", "Hazmapper"), + ("HVSR", "HVSR"), + ("Jupyter", "Jupyter"), + ("LS-DYNA", "LS-DYNA"), + ("MATLAB", "MATLAB"), + ("MPM", "MPM"), + ("NGL-without-text", "NGL"), + ("OpenFOAM", "OpenFOAM"), + ("OpenSees", "OpenSees"), + ("Paraview", "Paraview"), + ("Potree", "Potree"), + ("QGIS", "QGIS"), + ("rWHALE", "rWHALE"), + ("STKO", "STKO"), + ("SWBatch", "SWBatch"), ] LICENSE_TYPES = [("OS", "Open Source"), ("LS", "Licensed")] diff --git a/designsafe/static/fonts/DesignSafe-Icons.eot b/designsafe/static/fonts/DesignSafe-Icons.eot new file mode 100644 index 0000000000..85b19b0b9d Binary files /dev/null and b/designsafe/static/fonts/DesignSafe-Icons.eot differ diff --git a/designsafe/static/fonts/DesignSafe-Icons.svg b/designsafe/static/fonts/DesignSafe-Icons.svg new file mode 100644 index 0000000000..82ce07b98c --- /dev/null +++ b/designsafe/static/fonts/DesignSafe-Icons.svg @@ -0,0 +1,42 @@ + + + +Generated by IcoMoon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/designsafe/static/fonts/DesignSafe-Icons.ttf b/designsafe/static/fonts/DesignSafe-Icons.ttf new file mode 100644 index 0000000000..c790ee7334 Binary files /dev/null and b/designsafe/static/fonts/DesignSafe-Icons.ttf differ diff --git a/designsafe/static/fonts/DesignSafe-Icons.woff b/designsafe/static/fonts/DesignSafe-Icons.woff new file mode 100644 index 0000000000..8b04ddca90 Binary files /dev/null and b/designsafe/static/fonts/DesignSafe-Icons.woff differ diff --git a/designsafe/static/fonts/DesignSafe-Icons.woff2 b/designsafe/static/fonts/DesignSafe-Icons.woff2 new file mode 100644 index 0000000000..3b6b7dae5c Binary files /dev/null and b/designsafe/static/fonts/DesignSafe-Icons.woff2 differ diff --git a/designsafe/static/styles/DesignSafe-Icons.css b/designsafe/static/styles/DesignSafe-Icons.css new file mode 100644 index 0000000000..29fc145a9d --- /dev/null +++ b/designsafe/static/styles/DesignSafe-Icons.css @@ -0,0 +1,125 @@ +@font-face { + font-family: 'DesignSafe-Icons'; + src: url('/static/fonts/DesignSafe-Icons.eot?nvbv6c'); + src: url('/static/fonts/DesignSafe-Icons.eot?nvbv6c#iefix') format('embedded-opentype'), + url('/static/fonts/DesignSafe-Icons.ttf?nvbv6c') format('truetype'), + url('/static/fonts/DesignSafe-Icons.woff2') format('woff2'), + url('/static/fonts/DesignSafe-Icons.woff?nvbv6c') format('woff'), + url('/static/fonts/DesignSafe-Icons.svg?nvbv6c#DesignSafe-Icons') format('svg'); + font-weight: normal; + font-style: normal; + font-display: block; +} + +[class^='ds-icon-'], +[class*=' ds-icon-'] { + /* use !important to prevent issues with browser extensions that change fonts */ + font-family: 'DesignSafe-Icons' !important; + speak: never; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.ds-icon-Contract:before { + content: '\e91d'; +} +.ds-icon-Expand:before { + content: '\e923'; +} +.ds-icon-Job-Status:before { + content: '\e929'; +} +.ds-icon-All-Hazards:before { + content: '\e908'; +} +.ds-icon-New-Tab:before { + content: '\ea7e'; +} +.ds-icon-NGL-without-text:before { + content: '\e903'; +} +.ds-icon-Potree:before { + content: '\e906'; +} +.ds-icon-Generic-Vis:before { + content: '\e907'; +} +.ds-icon-HVSR:before { + content: '\e90d'; +} +.ds-icon-MPM:before { + content: '\e90e'; +} +.ds-icon-Generic-App:before { + content: '\e960'; +} +.ds-icon-GiD:before { + content: '\e90f'; +} +.ds-icon-Earth:before { + content: '\e910'; +} +.ds-icon-Water:before { + content: '\e912'; +} +.ds-icon-Wind:before { + content: '\e915'; +} +.ds-icon-rWHALE:before { + content: '\e905'; +} +.ds-icon-Extract:before { + content: '\e959'; +} +.ds-icon-Hazmapper:before { + content: '\e904'; +} +.ds-icon-Compress:before { + content: '\e958'; +} +.ds-icon-STKO:before { + content: '\e91c'; +} +.ds-icon-OpenFOAM:before { + content: '\e900'; +} +.ds-icon-Blender:before { + content: '\e901'; +} +.ds-icon-MATLAB:before { + content: '\e902'; +} +.ds-icon-Paraview:before { + content: '\e911'; +} +.ds-icon-Jupyter:before { + content: '\e913'; +} +.ds-icon-QGIS:before { + content: '\e914'; +} +.ds-icon-OpenSees:before { + content: '\e916'; +} +.ds-icon-LS-DYNA:before { + content: '\e917'; +} +.ds-icon-Dakota:before { + content: '\e918'; +} +.ds-icon-Clawpack:before { + content: '\e919'; +} +.ds-icon-Ansys:before { + content: '\e91a'; +} +.ds-icon-SWBatch:before { + content: '\e91b'; +} diff --git a/designsafe/templates/base.j2 b/designsafe/templates/base.j2 index ce6a3ae92b..3ff0c50994 100644 --- a/designsafe/templates/base.j2 +++ b/designsafe/templates/base.j2 @@ -36,6 +36,7 @@ + {% block styles %}{% endblock %} {% render_block "css" %} {% render_block "react_assets" %} diff --git a/designsafe/templates/cms_homepage.html b/designsafe/templates/cms_homepage.html index 212cc5b772..75b4c64beb 100644 --- a/designsafe/templates/cms_homepage.html +++ b/designsafe/templates/cms_homepage.html @@ -22,6 +22,7 @@ + {% render_block "css" %}