diff --git a/src/assets/style/custom.scss b/src/assets/style/custom.scss index 6f5064eac57..afcdd6ff667 100644 --- a/src/assets/style/custom.scss +++ b/src/assets/style/custom.scss @@ -8,6 +8,7 @@ body { font-family: "Roboto", sans-serif; margin: 0; padding: 0; + @apply dark:bg-gray-900 dark:text-gray-200 transition-colors duration-200; } .container { @@ -21,11 +22,16 @@ body { font-size: 14px; } +.ui-icon-button { + @apply inline-flex h-10 w-10 items-center justify-center rounded border border-gray-300 text-gray-700 transition-colors hover:border-jfrog-green hover:bg-gray-100 hover:text-jfrog-green dark:border-gray-700 dark:text-gray-200 dark:hover:bg-gray-800 dark:hover:text-jfrog-green; +} + h1 { font-size: 28px; line-height: 1.285; padding-bottom: 1rem; color: black; + @apply dark:text-gray-100 transition-colors duration-200; @media (min-width: #{$md}) { font-size: 36px; line-height: 1.16; @@ -37,12 +43,94 @@ h2 { line-height: 1.285; padding-bottom: .5rem; color: black; + @apply dark:text-gray-100 transition-colors duration-200; @media (min-width: #{$md}) { font-size: 32px; line-height: 1.16; } } +.green, +.green-dark { + @apply dark:text-jfrog-green transition-colors duration-200; +} + +.single-post-content a, +.latest-posts-single-post-content a, +.latest-posts a, +section.report a { + @apply dark:text-blue-400 transition-colors duration-200; +} + +.latest-posts-single-post-content a:visited, +.single-post-content a:visited { + @apply dark:text-purple-400 transition-colors duration-200; +} + +.latest-posts-single-post-content table th, +.single-post-content table th { + @apply dark:bg-gray-800 dark:text-gray-100 dark:border-gray-600 transition-colors duration-200; +} + +.latest-posts-single-post-content table td, +.single-post-content table td { + @apply dark:border-gray-600 dark:text-gray-200 transition-colors duration-200; +} + +.latest-posts-single-post-content table tr:nth-child(even), +.single-post-content table tr:nth-child(even) { + @apply dark:bg-gray-800 transition-colors duration-200; +} + +.latest-posts-single-post-content table tr:hover, +.single-post-content table tr:hover { + @apply dark:bg-gray-700 transition-colors duration-200; +} + +.latest-posts-single-post-content code:not(pre code) { + @apply dark:bg-gray-800 dark:text-red-300 transition-colors duration-200; +} + +.latest-posts-single-post-content h6 { + @apply dark:text-gray-300 transition-colors duration-200; +} + +.latest-posts { + @apply dark:bg-gray-900 transition-colors duration-200; +} + +.latest-posts .container { + @apply dark:bg-gray-800 dark:border-gray-700 transition-colors duration-200; + border: 1px solid transparent; /* default border */ +} + +.latest-posts .container h1 { + @apply dark:text-gray-50 transition-colors duration-200; +} + +.latest-posts .green { + @apply dark:text-jfrog-green transition-colors duration-200; +} + +.latest-posts-single-post-content { + @apply dark:text-gray-200 transition-colors duration-200; +} + +.latest-posts-single-post-content h2, +.latest-posts-single-post-content h3, +.latest-posts-single-post-content h4, +.latest-posts-single-post-content h5 { + @apply dark:text-jfrog-green transition-colors duration-200; +} + +.latest-posts-single-post-content hr { + @apply dark:border-gray-600 transition-colors duration-200; +} + +.latest-posts-single-post-content blockquote { + @apply dark:bg-gray-900 dark:text-gray-300 transition-colors duration-200; +} + .green-radial-gradient { background: radial-gradient(84.94% 84.94% at 50% 76.92%, #2A972F 38.14%, #40BE46 89.06%); } @@ -81,4 +169,3 @@ pre { margin-top: 0.5rem; margin-bottom: 0.5rem; } - diff --git a/src/components/Banner.vue b/src/components/Banner.vue index 279619b4b3d..c3d36a853fd 100644 --- a/src/components/Banner.vue +++ b/src/components/Banner.vue @@ -25,11 +25,6 @@ import BannerButton from './BannerButton.vue' export default { name: 'banner', - data() { - return { - bannerClass: `sr-banner px-5 py-2 text-center bg-center bg-cover text-white bg-${this.color}`, - } - }, props: { color: { type: String, @@ -65,6 +60,10 @@ export default { }, }, computed: { + bannerClass() { + const darkThemeClass = this.color === 'jfrog-green' ? ' dark:bg-green-700' : '' + return `sr-banner px-5 py-2 text-center bg-center bg-cover text-white bg-${this.color}${darkThemeClass}` + }, dateString: function () { if(this.date){ const d = new Date(this.date) diff --git a/src/components/BannerButton.vue b/src/components/BannerButton.vue index 0a5421b4bfd..beff29596a6 100644 --- a/src/components/BannerButton.vue +++ b/src/components/BannerButton.vue @@ -14,11 +14,6 @@ diff --git a/src/components/BannerSmall.vue b/src/components/BannerSmall.vue index 89927900061..9c64f3dcb3f 100644 --- a/src/components/BannerSmall.vue +++ b/src/components/BannerSmall.vue @@ -13,11 +13,6 @@ export default { name: 'BannerSmall', - data() { - return { - bannerClass: `sr-banner sr-banner-small px-5 py-2 text-center bg-center bg-cover text-white bg-${this.color}`, - } - }, props: { color: { type: String, @@ -32,6 +27,12 @@ export default { default: 'Vulnerabilities discovered' }, }, + computed: { + bannerClass() { + const darkThemeClass = this.color === 'jfrog-green' ? ' dark:bg-green-700' : '' + return `sr-banner sr-banner-small px-5 py-2 text-center bg-center bg-cover text-white bg-${this.color}${darkThemeClass}` + } + } } diff --git a/src/components/Button.vue b/src/components/Button.vue index 1fddf89f424..6c1c15c2de0 100644 --- a/src/components/Button.vue +++ b/src/components/Button.vue @@ -21,10 +21,12 @@ .sr-button { background-color: $green; color: white; + @apply dark:bg-green-700; border-radius: 4px; transition: all 0.32s ease; &:hover { background-color: $bright-green; + @apply dark:bg-green-600; } } \ No newline at end of file diff --git a/src/components/CVEBlogPreview.vue b/src/components/CVEBlogPreview.vue index 0d688cc3462..8df48d1a71c 100644 --- a/src/components/CVEBlogPreview.vue +++ b/src/components/CVEBlogPreview.vue @@ -11,7 +11,7 @@