diff --git a/.gitignore b/.gitignore index f824f2cf8..63bdc41d9 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,4 @@ links/who.ini ckanext/canada/templates/public/snippets/site_message_* ckanext/canada/download/*.jsonl **.mo +*.xcf diff --git a/changes/1521.feature b/changes/1521.feature new file mode 100644 index 000000000..489114e6f --- /dev/null +++ b/changes/1521.feature @@ -0,0 +1,5 @@ +Added additional Resource formats sprite sheet and added supported Resource formats: + +* FLV +* MKV +* MP4 diff --git a/ckanext/canada/assets/public/canada_public.css b/ckanext/canada/assets/public/canada_public.css index e74b891ab..17a60f9bb 100644 --- a/ckanext/canada/assets/public/canada_public.css +++ b/ckanext/canada/assets/public/canada_public.css @@ -478,16 +478,6 @@ ul.resource-list > li.resource-item > div.canada-resource-list-badges a.validati ul.resource-list > li.resource-item > div.canada-resource-list-badges{ align-self: last baseline; } -ul.resource-list > li.resource-item span.format-label[data-format="pbix"]{ - background-image: url("/data/static/img/power_bi.svg"), url("/static/img/power_bi.svg"); - background-repeat: no-repeat; - background-size: 100% 100%; - background-position: 0 0; - width: 33px; - height: 36px; - transform: none !important; - margin: 0 !important; -} .resource-item .resource-action-links{ display: block !important; position: relative !important; @@ -658,6 +648,39 @@ body ul.nav li.view-item a i.icon::before{ ###################*/ +/*############################ +## Custom Resource Sprites ## +##############################*/ +ul.resource-list > li.resource-item span.format-label[data-format="pbix"]{ + background-image: url("/data/static/img/sprite-resource-additional-icons.png"), url("/static/img/sprite-resource-additional-icons.png"); + background-repeat: no-repeat; + width: 60px; + height: 65px; + background-position: -120px -220px; + transform: scale(0.53); + margin: -14px 0 0 -14px; +} +ul.resource-list > li.resource-item span.format-label[data-format="mp4"], +ul.resource-list > li.resource-item span.format-label[data-format="flv"], +ul.resource-list > li.resource-item span.format-label[data-format="mov"], +ul.resource-list > li.resource-item span.format-label[data-format="avi"], +ul.resource-list > li.resource-item span.format-label[data-format="mkv"], +ul.resource-list > li.resource-item span.format-label[data-format="wmv"]{ + background-image: url("/data/static/img/sprite-resource-additional-icons.png"), url("/static/img/sprite-resource-additional-icons.png"); + background-repeat: no-repeat; + width: 60px; + height: 65px; + background-position: -220px -220px; + transform: scale(0.53); + margin: -14px 0 0 -14px; +} +/*############################ +## END ## +## Custom Resource Sprites ## +## END ## +##############################*/ + + /*############################### ## FontAwesome5 Icon Overrides ## #################################*/ diff --git a/ckanext/canada/public/static/img/sprite-resource-additional-icons.png b/ckanext/canada/public/static/img/sprite-resource-additional-icons.png new file mode 100644 index 000000000..d4d716592 Binary files /dev/null and b/ckanext/canada/public/static/img/sprite-resource-additional-icons.png differ diff --git a/ckanext/canada/schemas/presets.yaml b/ckanext/canada/schemas/presets.yaml index 5153635fa..ae635a243 100644 --- a/ckanext/canada/schemas/presets.yaml +++ b/ckanext/canada/schemas/presets.yaml @@ -3358,6 +3358,9 @@ presets: en: Flat raster binary fr: Binaire raster plat replaces: [flat raster binary] + - value: FLV + mimetype: video/x-flv + replaces: ["fla", "f4v", "f4a", "f4b", "f4p"] - value: GDB mimetype: application/x-filegdb label: GeoSoftDatabases @@ -3437,13 +3440,20 @@ presets: - value: MFX mimetype: application/mxf - value: MOV - mimetype: video/mov + mimetype: video/quicktime + replaces: ["movie", "qt"] + - value: MKV + mimetype: video/matroska + replaces: ["mk3d", "mka", "mks"] - value: MPEG mimetype: video/mpeg - value: MPEG-1 mimetype: video/mpeg - value: MP3 mimetype: audio/mpeg + - value: MP4 + mimetype: video/mp4 + replaces: ["m4a", "m4p", "m4b", "m4r", "m4v"] - value: MXD - value: NetCDF mimetype: application/x-netcdf