From 02c9913a05be6a4a1e46ecb4dc7deb164e8c98a1 Mon Sep 17 00:00:00 2001 From: Anton Roslund Date: Sun, 23 Feb 2025 13:05:07 +0100 Subject: [PATCH] Update styles --- assets/scss/_styles_project.scss | 72 +++++++++++++++++++++++++++++ assets/scss/_variables_project.scss | 30 +----------- 2 files changed, 73 insertions(+), 29 deletions(-) create mode 100644 assets/scss/_styles_project.scss diff --git a/assets/scss/_styles_project.scss b/assets/scss/_styles_project.scss new file mode 100644 index 0000000..d95018e --- /dev/null +++ b/assets/scss/_styles_project.scss @@ -0,0 +1,72 @@ +/* + +This is where you can add your own custom SCSS styles, including overriding any of the styles in Docsy’s theme SCSS files. + +*/ + +/* +Hide contribution links from the Docs section: +https://www.docsy.dev/docs/adding-content/repository-links/#disabling-links +Might want to allow editing +*/ +.td-page-meta__edit { display: none !important; } +.td-page-meta__view { display: none !important; } +.td-page-meta__child { display: none !important; } +.td-page-meta__issue { display: none !important; } +.td-page-meta__project-issue { display: none !important; } + +/* Change the color of the doc rightside sidebar links */ +.td-sidebar-toc a { color: grey !important; } + +/* +Hide links to the last change commit. +Ugly workaround that leves to colon ":" +*/ +.td-page-meta__lastmod a { display: none; } + +/* Formating of inline blocks */ +code { + background-color: #f0f0f0; + color: #555555 !important; + padding: 2px 4px; + border-radius: 4px; +} + + +.td-box { + padding-top: 60px !important; + padding-bottom: 60px !important; +} + + + +/* + Lazy load images that can be slow or fail. +*/ +.lazy-img-container { + position: relative; + width: 100%; + height: auto; /* Let the height adjust based on width */ + background-color: #e0e0e0; /* Placeholder color */ + display: flex; + align-items: center; + justify-content: center; + overflow: hidden; /* Ensures no overflow issues */ + margin-bottom: 16px; +} + +.lazy-img-container img { + position: absolute; + width: 100%; + height: 100%; + object-fit: cover; + transition: opacity 0.5s ease-in-out; +} + +.lazy-img-container img.lazy { + opacity: 0; +} + +.lazy-img-container img.loaded { + opacity: 1; +} diff --git a/assets/scss/_variables_project.scss b/assets/scss/_variables_project.scss index db910da..b2e0919 100644 --- a/assets/scss/_variables_project.scss +++ b/assets/scss/_variables_project.scss @@ -6,32 +6,4 @@ Add styles or override variables from the theme here. /* Color and Style */ $primary: #30a552; -$secondary: #f7f7f2; - -/* -Hide contribution links from the Docs section: -https://www.docsy.dev/docs/adding-content/repository-links/#disabling-links -Might want to allow editing -*/ -.td-page-meta__edit { display: none !important; } -.td-page-meta__view { display: none !important; } -.td-page-meta__child { display: none !important; } -.td-page-meta__issue { display: none !important; } -.td-page-meta__project-issue { display: none !important; } - -/* Change the color of the doc rightside sidebar links */ -.td-sidebar-toc a { color: grey !important; } - -/* -Hide links to the last change commit. -Ugly workaround that leves to colon ":" -*/ -.td-page-meta__lastmod a { display: none; } - -/* Formating of inline blocks */ -code { - background-color: #f0f0f0; - color: #555555 !important; - padding: 2px 4px; - border-radius: 4px; -} \ No newline at end of file +$secondary: #f7f7f2; \ No newline at end of file