Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added HTML and CSS and JS for dark Mode button #347

Merged
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<component :is="Component" />
</transition>
</RouterView>
</template>
</template>
vfdev-5 marked this conversation as resolved.
Show resolved Hide resolved

<style>
*,
Expand Down Expand Up @@ -33,15 +33,28 @@
--code-line-height: 24px;
--code-text-light: #476582;
--code-inline-bg-color: rgba(27, 31, 35, 0.05);
--accent-color: #cacaca;
--background-color-primary: #fff;
--background-color-secondary: #fafafa;
}

:root.dark-theme {
--background-color-primary: #1e1e1e;
--background-color-secondary: #2d2d30;
--accent-color: #3f3f3f;
--text-primary-color: #ddd;
avinashsharma080 marked this conversation as resolved.
Show resolved Hide resolved
--c-text:white;
--c-white-dark:#3f3f3f;
avinashsharma080 marked this conversation as resolved.
Show resolved Hide resolved
}

body {
font-family: var(--font-family-base);
font-size: var(--font-size);
line-height: 1.5;
margin: 0;
height: 100%;
color: var(--c-text);
background-color: var(--c-white);
background-color: var(--background-color-primary);
avinashsharma080 marked this conversation as resolved.
Show resolved Hide resolved
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
Expand Down
5 changes: 3 additions & 2 deletions src/components/FormInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ input[type='text'],
input[type='number'] {
border-radius: 3px 3px 0 0;
border: 1px solid var(--c-white-light);
background: var(--c-white-light);
background: var(--background-color-secondary);
color: var(--c-text);
padding: 0.5rem 1rem;
width: 100%;
}
Expand All @@ -120,7 +121,7 @@ input[type='number'] ~ .expand {
input[type='text']:focus,
input[type='number']:focus {
outline: none;
background: var(--c-white);
background: var(--background-color-secondary);
}
input[type='text']:focus ~ .expand,
input[type='number']:focus ~ .expand {
Expand Down
4 changes: 2 additions & 2 deletions src/components/FormSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ function toTitleCase(v) {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background: var(--c-white-light);
border-radius: 3px;
background: var(--background-color-secondary);
border-radius: 3px solid var(--c-text);
color: var(--c-text);
cursor: pointer;
font-family: var(--font-family-base);
Expand Down
9 changes: 5 additions & 4 deletions src/components/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
v{{ version }}@{{ currentCommit.slice(0, 7) }}
</a>
<NavContributors />
<NavToggleDarkMode />
</div>
</nav>
</template>
Expand All @@ -42,7 +43,7 @@ import NavIgniteDocs from './NavIgniteDocs.vue'
import NavTwitter from './NavTwitter.vue'
import NavHelp from './NavHelp.vue'
import NavContributors from './NavContributors.vue'

import NavToggleDarkMode from './NavToggleDarkMode.vue'
export default {
components: {
NavDiscord,
Expand All @@ -53,11 +54,11 @@ export default {
NavTwitter,
NavHelp,
NavIgniteDocs,
NavContributors
},
NavContributors,
NavToggleDarkMode,
},
setup() {
const currentCommit = __COMMIT__ // from vite.config.js

return { version, currentCommit }
}
}
Expand Down
10 changes: 6 additions & 4 deletions src/components/NavCode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export default {
.dropdown-content {
display: none;
position: absolute;
background-color: var(--c-white-light);
background-color: var(--background-color-primary);
min-width: 15vw;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 1;
Expand Down Expand Up @@ -273,7 +273,7 @@ export default {
margin-left: 1.1vw;
}
.generate {
background-color: #ffffff;
background-color: var(--background-color-primary);
width: 80%;
font-size: 60%;
height: 1.5rem;
Expand All @@ -282,6 +282,8 @@ export default {
font-size: 90%;
height: 1.6rem;
border-radius: 3%;
color:var(--c-text);
background: var(--background-color-primary);
}

.icon {
Expand All @@ -301,8 +303,8 @@ export default {
outline: none;
}

.copy-link-input:hover {
background: var(--c-brand-red);
.copy-link-input:hover{
background: var(--c-brand-red) !important;
border: 1px solid #cccccc;
color: #f1f1f1;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/NavContributors.vue
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default {
}
.contributors-wrapper div {
padding: 1rem 0;
background-color: var(--c-white-light);
background-color: var(--background-color-primary);
font-size: var(--font-size);
color: var(--c-text);
border-radius: 8px;
Expand Down
2 changes: 1 addition & 1 deletion src/components/NavHelp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export default {
}
.help-wrapper div {
padding: 1rem 0;
background-color: var(--c-white-light);
background-color: var(--background-color-primary);
font-size: var(--font-size);
color: var(--c-text);
border-radius: 8px;
Expand Down
12 changes: 8 additions & 4 deletions src/components/NavNebari.vue
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export default {
.dropdown-content {
display: none;
position: absolute;
background-color: var(--c-white-light);
background-color: var(--background-color-primary);
min-width: 15vw;
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
z-index: 100;
Expand Down Expand Up @@ -303,7 +303,7 @@ export default {
}
.code-snippet {
text-align: center;
background-color: #cccccc;
background-color: var(--c-white-dark)
}

/* Text Box CSS */
Expand All @@ -316,14 +316,16 @@ export default {
font-size: larger;
}
.text-box-nebari-details {
background: var(--background-color-secondary);
color: var(--c-text);
width: 95%;
height: 3vh;
}

.copy-link-input:hover {
background: var(--c-brand-red);
background: var(--c-brand-red) !important;
border: 1px solid #cccccc;
color: #f1f1f1;
color: black;
}

#nebari-bottom-button {
Expand All @@ -336,6 +338,8 @@ export default {
margin: 2.8vh;
margin-top: 3vh;
margin-bottom: 2vh;
background: var(--background-color-primary);
color: var(--c-text);
}
.copy-button-nebari {
font-size: 1rem;
Expand Down
Loading