Growstuff/growstuff

View on GitHub
app/assets/stylesheets/overrides.scss

Summary

Maintainability
Test Coverage
html,
body {
  height: 100%;
}

body {
  background-color: $beige;
  font-family: $default-font;
}

.navbar {
  flex-wrap: nowrap;
}
.navbar-brand {
  .site-name {
    font-family: "Modak", cursive;
    font-size: 3em;
    margin: 0.3em;
  }

  img {
    height: 100%;
  }
}

#navbar-search {
  padding-left: 1em;

  .input-group {
    input {
      background-color: $white;
      color: $black;
    }

    input::placeholder {
      color: $navbar-default-link-color;
    }
  }
}

.navbar .btn-signup,
.navbar .btn-signin {
  background-color: $green;
  color: $white;
  margin: 3px;
}

.homepage-blurb .site-name {
  font-size: 5em;
}

.ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a {
  color: $green;
}

a:hover {
  color: $brown;
  text-decoration: none;
}

.badge a {
  color: $white;
}

.badge a:hover {
  text-decoration: underline;
}

h1 {
  font-size: 250%;
}

h2 {
  font-size: 150%;
}

h3 {
  font-size: 120%;
}

section {
  margin: 0.5em 0 0;
  padding: 0 0 1em;

  h2 {
    background-color: $green;
    box-shadow: 1px 1px 1px 1px darken($beige, 20%);
    color: $white;
    font-weight: normal;
    padding: 0.2em;

    a {
      color: $white;
    }
  }

  .card {
    background: $white;
    box-shadow: 1px 3px 3px 1px darken($beige, 20%);
    cursor: pointer;
    transition:
      0.1s transform cubic-bezier(0.155, 1.105, 0.295, 1.12),
      0.1s box-shadow,
      0.1s -webkit-transform cubic-bezier(0.155, 1.105, 0.295, 1.12);
  }

  .card:hover {
    box-shadow:
      1px 3px 3px 1px darken($beige, 30%);
  }
}

.layout-actions {
  border: 1px solid lighten($green, 20%);
  float: right;
}

.index-cards {
  display: flex;
  flex: none;
  flex-wrap: wrap;

  .card {
    background: $white;
    border-radius: 5%;
    margin: 0.5em 0.5em 0.5em 0;
    width: 200px;

    .img-card {
      border-top-left-radius: 5%;
      border-top-right-radius: 5%;
    }
  }

  .card-double {
    width: 400px;
  }

  .card-finished {
    background: darken($beige, 10%);

    a {
      color: $brown;
    }
  }
}

.img-cover,
.card .img-card {
  height: 200px;
  object-fit: cover;
  width: 100%;
}

.card {
  margin-bottom: 1em;

  a:hover {
    background-color: $beige;
    color: $blue;
  }
}

.facts {
  display: flex;
  flex: none;
  flex-wrap: wrap;

  .card {
    margin: 1em;
    max-width: 100%;
    padding: 1em;
    text-align: center;
    width: 170px;

    strong {
      display: block;
      font-size: 2em;
      text-align: center;
    }

    span {
      display: block;
    }

    img {
      height: 50%;
    }
  }

  .thumbnail {
    height: 100px;

    img {
      border-radius: 5px;
      height: 75px;
    }
  }
}

img.img-cute {
  bottom: -6px;
  left: 45px;
  position: relative;
  width: 3em;
}

img.img-tiny {
  width: 50px;
}

img.img-icon {
  width: 1.2em;
}

img.img-responsive {
  max-width: 100%;
}

img.avatar {
  border-radius: 50%;
  padding: 1em;
  position: relative;
  z-index: 2;
}

.progress-bar {
  border-bottom: 1em solid $progress-bar-color;
}

ul.associations {
  list-style-type: none;
}

// footer
footer {
  #footer1,
  #footer2,
  #footer3 {
    padding-bottom: 2em;
    padding-top: 1em;
    text-align: left;

    ul {
      list-style-position: outside;
      list-style-type: none;
      margin-left: 0;
      padding-left: 0;
    }

    a {
      color: $navbar-default-link-color;
      text-decoration: none;
    }

    a:hover {
      color: $navbar-default-link-hover-color;
    }

    a:active {
      color: $navbar-default-link-active-color;
    }
  }
}

// ensure footer is pushed to bottom of browser window
#maincontainer {
  max-width: 2500px;
  min-height: 80%;
  padding-bottom: 1em;
  padding-left: 0.5em;
  padding-right: 0.5em;
}

.container {
  min-width: 90%;
}

// Autosuggest
.ui-autocomplete {
  background: $white;
  z-index: $highest-level;
}

.alert {
  a {
    font-weight: 800;
  }
}

/* override "info" alert boxes to be green, not blue, on Growstuff */
$state-info-text: darken($green, 10%);
$state-info-bg: lighten($green, 50%);

/* and set "success" to be the same, as it was just very slightly
 * different because the default bootstrap green is slightly different
 * from ours */
$state-success-text: darken($green, 10%);
$state-success-bg: lighten($green, 50%);

.hide {
  display: none;
}

.panel {
  .dl-horizontal {
    text-overflow: ellipsis;
    overflow: hidden;
  }
}

label.required:after {
  color: red;
  content: " *";
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

ul.plantings {
  list-style-type: none;
}

ul.thumbnail-buttons {
  list-style-type: none;
  text-align: right;
}

.hover-wrapper .text {
  position: absolute;
  visibility: hidden;
}

.hover-wrapper:hover .text {
  visibility: visible;
}

.form-page {
  text-align: center;

  .form-card {
    display: inline-block;
    margin-top: 0.5em;
    max-width: 800px;
    padding: 1em;
    text-align: center;
  }
}
.text-muted {
  color: $blue;
}
.jumbotron {
  background-color: $beige;
  margin-bottom: 1em;
  padding-bottom: 30px;
  padding-top: 30px;

  h1 {
    font-size: 400%;
  }
  .stats a {
    color: $black;
  }

  // signup widget on homepage
  .signup {
    background-color: darken($green, 20%);
    border: 1px solid darken($green, 20%);
    color: $white;
    border-radius: 6px;
    line-height: 200%;
    padding: 15px;
    text-align: center;

    .btn-info {
      background-color: $blue;
    }
  }

  .info {
    padding: 0.5em;
    text-align: center;
  }
}

.breadcrumb {
  background-color: $beige;
}

.chip {
  background-color: lighten($brown, 20%);
  border-radius: 25px;
  color: $white;
  display: inline-block;
  height: 30px;
  line-height: 30px;
  margin: 0.2em;
  padding: 0 25px;

  a {
    color: $white;
  }

  img {
    border-radius: 50%;
    float: left;
    height: 30px;
    margin: 0 10px 0 -25px;
    width: 30px;
  }
}

.progress-fade {
  cursor: pointer;
  float: left;
  position: relative;
}

.progress-fade::before {
  background: $beige;
  bottom: 0;
  content: "";
  display: block;
  left: 0;
  opacity: 0.7;
  position: absolute;
  right: 0;
  top: 0;
  transition: background 0.3s linear;
}

.progress-fade:hover::before {
  background: none;
}