Skip to content

Commit

Permalink
Merge pull request #32 from dniccum/bugfix/light-mode-and-dark-mode-n…
Browse files Browse the repository at this point in the history
…ot-functioning-properly

Bugfix/light mode and dark mode not functioning properly
  • Loading branch information
dniccum authored Feb 28, 2023
2 parents c53f56a + 7f1d383 commit 8e05226
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/css/tool.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/tool.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion resources/js/components/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
if ((item.route.length > 0 && this.$page.url.endsWith(item.route)) || item.isHome && this.$page.url.endsWith('documentation')) {
return 'doc-text-primary-500 hover:doc-text-primary-700';
} else {
return 'doc-text-gray-300 dark:doc-text-gray-100 hover:doc-text-primary-200';
return 'doc-text-gray-700 dark:doc-text-gray-100 hover:dark:doc-text-primary-200';
}
},
parseRoute(item) {
Expand Down
6 changes: 3 additions & 3 deletions resources/js/pages/Tool.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ export default {
break;
}
setTimeout(() => {
document.addEventListener('DOMContentLoaded', (event) => {
document.querySelectorAll('div.documentation-content pre code').forEach((block) => {
highlightjs.highlightElement(block);
highlightjs.highlightBlock(block);
});
}, 500)
});
},
computed: {
docPageTitle() {
Expand Down
13 changes: 12 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
// tailwind.config.js
module.exports = {
content: ["./resources/**/*.{vue,js,php}"],
safelist: [
'doc-text-primary-500',
'hover:doc-text-primary-700',
'doc-text-gray-700',
'dark:doc-text-gray-100',
'dark:hover:doc-text-primary-200',
],
corePlugins: {
preflight: false,
},
darkMode: 'media',
theme: {
extend: {
colors: {
Expand Down Expand Up @@ -49,6 +57,9 @@ module.exports = {
h4: {
fontSize: '1.1em',
},
h5: {
fontSize: '1.03em',
},
'p, ul, ol, h1, h2, h3': {
marginBottom: theme('spacing.3'),
},
Expand Down Expand Up @@ -115,7 +126,7 @@ module.exports = {
'invert': {
css: {
'h1, h2, h3': {
'color': 'rgb(var(--colors-gray-100))',
color: 'rgb(var(--colors-gray-100))',
},
'h4, h5, h6, ol, ul, p, blockquote': {
color: 'rgb(var(--colors-gray-300))',
Expand Down

0 comments on commit 8e05226

Please sign in to comment.