Skip to content

Commit

Permalink
Merge pull request #184 from communitiesuk/revert-css-4.7.0
Browse files Browse the repository at this point in the history
Revert css 4.7.0
  • Loading branch information
JamesC-MHCLG authored Nov 21, 2024
2 parents a817991 + 2672fbc commit f0f398e
Show file tree
Hide file tree
Showing 5 changed files with 8,786 additions and 19 deletions.
25 changes: 10 additions & 15 deletions compile-scss.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
const sass = require("sass");
const { writeFileSync } = require("fs");

// Compile SCSS asynchronously
const result = sass.compile("scss/dashboard.scss", {
style: "compressed",
loadPaths: ["node_modules"], // Paths for imports
const { renderSync } = require("sass");
const { writeFileSync } = require('fs');

const result = renderSync({
style: "compressed",
file: 'scss/dashboard.scss',
loadPaths: ['node_modules'],
includePaths: ['node_modules']
});

// Write the compiled CSS to a file
writeFileSync("gov_uk_dashboards/assets/dashboard.css", result.css, {
encoding: "utf8",
flag: "w",
});

console.log("SCSS compiled successfully to gov_uk_dashboards/assets/dashboard.css");

writeFileSync('gov_uk_dashboards/assets/dashboard.css', result.css, { encoding: 'utf8', flag: 'w' })
8,761 changes: 8,760 additions & 1 deletion gov_uk_dashboards/assets/dashboard.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion gov_uk_dashboards/components/plotly/footer.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def footer(footer_links: Optional[list[any]]):
html.Div(
html.A(
"© Crown copyright",
className="govuk-footer__link govuk-footer__copyright-logo",
className="govuk-footer__link pyvis-govuk-footer__copyright-logo",
href="https://www.nationalarchives.gov.uk/information-management/"
"re-using-public-sector-information/uk-government-licensing-framework/"
"crown-copyright/",
Expand Down
15 changes: 14 additions & 1 deletion scss/dashboard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ $govuk-secondary-text-colour: #6B7276;
$govuk-font-family: Arial, sans-serif;
$font-sans-serif: sans-serif;

@import "../node_modules/govuk-frontend/dist/govuk/all";
@import "node_modules/govuk-frontend/govuk/all";

.header-image {
flex: none;
Expand Down Expand Up @@ -1390,4 +1390,17 @@ mark.expenditure {
.homepage-card-grid-item:hover {
border: 2px solid #ffdd00;
transform: scale(1.05); /* Slightly enlarge the card on hover */
}

// add pyvis copyright logo - needs relooking at
.pyvis-govuk-footer__copyright-logo {
display: inline-block;
min-width: 125px;
padding-top: 112px;
background-image: url("/assets/images/govuk-crest.svg");
background-repeat: no-repeat;
background-position: 50% 0%;
background-size: 125px 102px;
text-align: center;
white-space: nowrap;
}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
author="Department for Levelling Up, Housing and Communities",
description="Provides access to functionality common to creating a data dashboard.",
name="gov_uk_dashboards",
version="12.3.2",
version="12.3.3",
long_description=long_description,
long_description_content_type="text/markdown",
packages=find_packages(),
Expand Down

0 comments on commit f0f398e

Please sign in to comment.