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

Dark theme #167

Open
wants to merge 4 commits into
base: multi_instance
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ export default {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
color: $theme-color-grey-blue;
font-size: 1vw;
overflow: hidden;
z-index: 1;
min-height: 100%;
display: flex;
background-color: #fcfcfc;
background-color: $theme-color-white;
}

@media only screen and (max-width: 1280) {
Expand Down
4 changes: 4 additions & 0 deletions src/assets/labs-logo-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/main-logo-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/sdslabs-logo-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/assets/sdslabs-logo-dark.svg:Zone.Identifier
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[ZoneTransfer]
ZoneId=3
HostUrl=https://files.slack.com/files-pri/T025QJXB7-F04E1278NNA/download/labs.svg?origin_team=T025QJXB7
10 changes: 9 additions & 1 deletion src/components/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
</div>
</div>
<div class="adminFooterLogos">
<a href="https://sdslabs.co"><img :src="sdslabsLogo"/></a>
<a href="https://sdslabs.co">
<img v-if="this.isDarkTheme == 'true'" :src="sdslabsLogoDark" />
<img v-else :src="sdslabsLogo" />
</a>
<div class="adminFooterContactInfo">
<a href="https://www.facebook.com/SDSLabs"><img :src="fbLogo"/></a>
<a href="https://twitter.com/sdslabs"><img :src="twitterLogo"/></a>
Expand All @@ -23,15 +26,20 @@
<script>
import {
sdslabsLogo,
sdslabsLogoDark,
twitterLogo,
githubLogo,
fbLogo
} from "../constants/images";
import variables from "../styles/main.scss";
console.log(variables.isDarkTheme);
export default {
name: "Footer",
data() {
return {
isDarkTheme: variables.isDarkTheme,
sdslabsLogo,
sdslabsLogoDark,
twitterLogo,
githubLogo,
fbLogo
Expand Down
5 changes: 2 additions & 3 deletions src/components/Navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
<div class="navbar">
<div class="user-navbar-container" v-if="loggedIn()">
<router-link to="/about" class="navbar-link ctfLogo"
><div class="logo">
<img v-if="this.getLogoUrl()" :src="this.getLogoUrl()" /></div
></router-link>
><div class="logo adminFooterTitle">playCTF</div>
</router-link>
<nav class="navbar-container">
<div class="link-container">
<router-link
Expand Down
5 changes: 3 additions & 2 deletions src/components/adminConfigs/configContent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ export default {
data() {
return {
content: this.compContent,
maxAbout: 200,
maxPrizes: 200,
maxAbout: 500,
maxPrizes: 500,
showPrizeCounter: false,
showAboutCounter: false
};
Expand All @@ -74,6 +74,7 @@ export default {
);
newCompInfoContent.about = this.content.about;
}
this.content.prizes = this.content.prizes.replace("\\n", "\n");
if (this.content.prizes.length > this.maxPrizes) {
this.content.prizes = this.content.prizes.substring(
0,
Expand Down
3 changes: 3 additions & 0 deletions src/constants/images.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import variables from "../styles/main.scss";

function getImage(imagename) {
return require(`../assets/${imagename}.svg`);
}

export const sdslabsLogo = getImage("sdslabs-logo");
export const sdslabsLogoDark = getImage("sdslabs-logo-dark");
export const fbLogo = getImage("fb-logo");
export const twitterLogo = getImage("twitter-logo");
export const githubLogo = getImage("github-logo");
Expand Down
Loading