Implemented new theme structure and began home page design.

This commit is contained in:
Harrison Deng 2021-07-11 01:33:58 -05:00
parent fbcf6fe586
commit 80978c652a
7 changed files with 77 additions and 24 deletions

View File

@ -1,8 +1,8 @@
<template> <template>
<div class="content light"> <div id="content" class="theme-light">
<nav class="navbar" id="nav"> <nav class="navbar" id="nav">
<div class="container-fluid"> <div class="container-fluid">
<router-link class="navbar-brand" to="/">MultiShop</router-link> <router-link class="navbar-brand" to="/">SHAID</router-link>
<button <button
class="navbar-toggler" class="navbar-toggler"
type="button" type="button"

View File

@ -0,0 +1,9 @@
html, body, #app, #content {
min-height: 100%;
height: 100%;
}
#content {
display: flex;
flex-direction: column;
}

View File

@ -1,10 +0,0 @@
@use "../../../node_modules/bootstrap/scss/bootstrap";
#app .content.light {
// Add light theme specific scss here.
nav.navbar {
@extend .navbar-expand-lg;
@extend .navbar-light;
@extend .bg-light;
}
}

View File

@ -0,0 +1,17 @@
@use "sass:map";
@use "variables";
// Applied Dmitry Borody's method for theming with modifications. - https://medium.com/@dmitriy.borodiy/easy-color-theming-with-scss-bc38fd5734d1
@mixin themed($themes: variables.$themes) {
@each $theme, $vars in $themes {
.theme-#{$theme} &, &.theme-#{$theme} {
$theme-values: $vars !global;
@content;
$theme-values: null !global;
}
}
}
@function color-of($type) {
@return map.get($theme-values, $type);
}

View File

@ -0,0 +1,3 @@
$themes: (
"light": ("background": #F4F4F2, "navbar": #E8E8E8, "sub": #88B7B5, "alt": #847996, "text": #1a1a1a),
);

View File

@ -1,12 +1,26 @@
@use "light"; @use "app-layout";
@use "themer";
@use "../../../node_modules/bootstrap/scss/bootstrap";
@import "../../../node_modules/bootstrap-icons/font/bootstrap-icons.css"; @import "../../../node_modules/bootstrap-icons/font/bootstrap-icons.css";
html, body, #app, #app > .content { nav.navbar {
min-height: 100%; @extend .navbar-expand-lg;
height: 100%; @include themer.themed {
@extend .navbar-light;
background-color: themer.color-of("navbar");
}
} }
.content { .jumbotron {
display: flex; @extend .container-fluid;
flex-direction: column; @extend .p-4;
@include themer.themed {
}
}
#content {
@include themer.themed {
background-color: themer.color-of("background");
color: themer.color-of("text");
}
} }

View File

@ -1,13 +1,33 @@
<template> <template>
<div class="home"> <div id="main" class="jumbotron d-flex flex-column align-items-center">
<img alt="Vue logo" src="../assets/images/logo.png"> <div>
<img
alt="SHAID logo"
src="../assets/images/logo.svg"
class="img-fluid"
/>
</div>
<div id="description" class="text-center px-3 my-2">
<h1 class="my-2">C-SHAID</h1>
<p>
Also known as Component Shopping Aid, is a site designed to
help with the online electronic searching experience. Create
project component lists and search across multiple commonly used
sites to find the ideal purchase.
</p>
</div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
name: "Home", name: "Home",
components: { components: {}
}
}; };
</script> </script>
<style lang="scss" scoped>
#description {
max-width: 540px;
}
</style>