enrecipes/app/app.scss

597 lines
9 KiB
SCSS
Raw Normal View History

2020-09-15 11:10:16 +00:00
// NativeScript core theme
// @see https://docs.nativescript.org/ui/theme
2020-10-14 19:32:32 +00:00
@import "~@nativescript/theme/core";
2020-09-15 11:10:16 +00:00
// Override variables here
2020-10-14 19:32:32 +00:00
$grayD4: #212121;
$grayD3: #424242;
$grayD2: #616161;
$grayD1: #757575;
$gray: #9e9e9e;
$grayL1: #e0e0e0;
$grayL2: #eeeeee;
$grayL3: #f5f5f5;
$grayL4: #fafafa;
2020-11-06 09:07:41 +00:00
$orange: #ff5722;
2020-10-14 19:32:32 +00:00
2020-09-15 11:10:16 +00:00
// Global SCSS styling
// @see https://docs.nativescript.org/ui/styling
2020-11-02 11:36:53 +00:00
// * {
// font-size: 16;
// }
2020-09-15 11:10:16 +00:00
Page {
2020-10-14 19:32:32 +00:00
font-family: "Orkney-Regular";
2020-09-15 11:10:16 +00:00
}
.orkm {
2020-10-14 19:32:32 +00:00
font-family: "Orkney-Medium";
2020-09-15 11:10:16 +00:00
}
.bx {
2020-10-14 19:32:32 +00:00
font-family: "boxicons";
font-size: 24;
2020-11-02 11:36:53 +00:00
vertical-alignment: center;
&.small {
padding: 0;
font-size: 16;
}
2020-10-14 19:32:32 +00:00
}
.ns-light {
Page,
ActionBar,
2020-10-21 17:54:45 +00:00
SearchBar,
2020-11-02 11:36:53 +00:00
TabView,
ListPicker {
2020-10-14 19:32:32 +00:00
color: $grayD4;
2020-10-22 18:36:50 +00:00
background: $grayL4;
2020-10-14 19:32:32 +00:00
}
TabView {
tab-background-color: $grayL4;
selected-tab-text-color: $grayD4;
}
.hr {
border-color: $grayL2;
}
.sd,
.fieldLabel {
background: $grayL4;
}
2020-11-02 11:36:53 +00:00
.referenceItem,
.recipeText,
.overviewItem,
.recipeItem {
background: white;
}
2020-11-02 11:36:53 +00:00
.option-highlight,
.selected-sd-item {
2020-10-21 17:54:45 +00:00
background: $grayL2;
}
2020-10-14 19:32:32 +00:00
.sd-item,
.sd-group-header,
2020-11-02 11:36:53 +00:00
.time .bx {
2020-10-14 19:32:32 +00:00
color: $grayD2;
}
2020-11-02 11:36:53 +00:00
.fab-button {
color: white;
2020-11-06 09:07:41 +00:00
background-color: $orange;
2020-11-02 11:36:53 +00:00
}
2020-10-14 19:32:32 +00:00
.option,
.icon-option {
.bx,
.option-info {
color: $grayD2;
}
}
2020-11-02 11:36:53 +00:00
.imageHolder {
color: $gray;
2020-10-22 18:36:50 +00:00
background: $grayL2;
2020-10-14 19:32:32 +00:00
}
2020-11-02 11:36:53 +00:00
.count {
2020-10-14 19:32:32 +00:00
color: $grayL4;
background: $grayD4;
}
2020-11-02 11:36:53 +00:00
.instruction {
2020-10-14 19:32:32 +00:00
border-color: $grayD4;
2020-11-02 11:36:53 +00:00
}
2020-10-14 19:32:32 +00:00
}
2020-10-14 19:32:32 +00:00
.ns-dark {
Page,
ActionBar,
2020-10-21 17:54:45 +00:00
SearchBar,
2020-11-02 11:36:53 +00:00
TabView,
ListPicker {
2020-10-14 19:32:32 +00:00
color: $grayL4;
2020-10-22 18:36:50 +00:00
background: $grayD4;
2020-10-14 19:32:32 +00:00
}
TabView {
tab-background-color: $grayD4;
selected-tab-text-color: $grayL4;
}
.hr {
border-color: #111;
}
.sd,
.fieldLabel {
background: $grayD4;
}
2020-11-02 11:36:53 +00:00
.referenceItem,
.recipeText,
.overviewItem,
.recipeItem,
2020-11-06 09:07:41 +00:00
.option-highlight {
2020-10-14 19:32:32 +00:00
background: $grayD3;
}
.sd-item,
.sd-group-header,
2020-11-02 11:36:53 +00:00
.time .bx {
2020-10-14 19:32:32 +00:00
color: $grayL2;
}
2020-11-02 11:36:53 +00:00
.selected-sd-item {
background: #111;
}
.fab-button {
color: #111;
2020-11-06 09:07:41 +00:00
background: $orange;
2020-11-02 11:36:53 +00:00
}
2020-10-14 19:32:32 +00:00
.option,
.icon-option {
.bx,
.option-info {
2020-11-06 09:07:41 +00:00
color: $gray;
2020-10-14 19:32:32 +00:00
}
}
2020-11-02 11:36:53 +00:00
.imageHolder {
color: $gray;
2020-10-22 18:36:50 +00:00
background: #111;
2020-10-14 19:32:32 +00:00
}
2020-11-02 11:36:53 +00:00
.count {
2020-10-14 19:32:32 +00:00
color: $grayD4;
background: $grayL4;
}
2020-11-02 11:36:53 +00:00
.instruction {
2020-10-14 19:32:32 +00:00
border-color: $grayL4;
}
}
2020-11-02 11:36:53 +00:00
// -----------------------------
2020-10-14 19:32:32 +00:00
// Elements
TextField,
TextView,
TimePickerField {
2020-10-21 17:54:45 +00:00
width: 100%;
2020-10-14 19:32:32 +00:00
border-width: 1;
2020-10-21 17:54:45 +00:00
font-size: 14;
padding: 14 14 13;
2020-10-14 19:32:32 +00:00
margin: 8 0 0 0;
border-radius: 4;
2020-10-22 18:36:50 +00:00
border-color: $gray;
2020-10-14 19:32:32 +00:00
placeholder-color: $gray;
}
TextView {
line-height: 12;
}
2020-10-22 18:36:50 +00:00
TabView {
tab-text-color: $gray;
}
2020-10-14 19:32:32 +00:00
.inputField {
margin-top: 16;
}
.fieldLabel {
2020-11-02 11:36:53 +00:00
font-size: 12;
2020-10-14 19:32:32 +00:00
margin-left: 8;
padding: 0 8;
}
2020-11-06 09:07:41 +00:00
// prettier-ignore
.progressContainer{
width: 100%;
}
// prettier-ignore
.text-btn,
.group-header,
.category,
ActivityIndicator,
Progress {
color: $orange;
}
2020-11-02 11:36:53 +00:00
// -----------------------------
2020-10-14 19:32:32 +00:00
// ActionBar
ActionBar {
margin: 0;
2020-10-14 19:32:32 +00:00
padding: 0;
height: 64;
.bx {
padding: 16 16 16 4;
margin: 0;
2020-11-02 11:36:53 +00:00
vertical-alignment: center;
}
.title {
padding-left: 8;
text-align: left;
font-size: 18;
2020-10-14 19:32:32 +00:00
}
}
2020-11-02 11:36:53 +00:00
// -----------------------------
2020-10-14 19:32:32 +00:00
// Side Drawer
.sd {
padding: 8;
}
2020-10-14 19:32:32 +00:00
.sd-item {
border-radius: 4;
2020-10-21 17:54:45 +00:00
padding: 0 16;
height: 48;
vertical-alignment: center;
2020-11-02 11:36:53 +00:00
.bx {
font-size: 24;
}
&.selected-sd-item {
color: $orange;
}
2020-10-21 17:54:45 +00:00
// prettier-ignore
2020-11-02 11:36:53 +00:00
Label {
font-size: 16;
2020-10-21 17:54:45 +00:00
vertical-alignment: center;
}
2020-10-14 19:32:32 +00:00
}
.sd-group-header {
2020-10-21 17:54:45 +00:00
width: 100%;
padding: 8 8 16;
2020-10-14 19:32:32 +00:00
}
2020-11-02 11:36:53 +00:00
// -----------------------------
// HOME
.emptyState,
.noResult {
width: 100%;
height: 100%;
}
2020-11-02 11:36:53 +00:00
.noResult {
line-height: 8;
padding: 64 16;
text-align: center;
2020-11-02 11:36:53 +00:00
font-size: 16;
horizontal-alignment: center;
2020-11-02 11:36:53 +00:00
vertical-alignment: center;
.icon {
font-size: 64;
text-align: center;
color: $gray;
margin-bottom: 16;
}
2020-11-06 09:07:41 +00:00
.logo {
width: 64;
margin-bottom: 16;
}
2020-11-02 11:36:53 +00:00
.title {
font-size: 20;
text-align: center;
padding: 0;
margin: 0;
horizontal-alignment: center;
.bx {
font-size: 24;
vertical-alignment: center;
}
}
}
2020-11-02 11:36:53 +00:00
// -----------------------------
// Recipe Items
RadListView {
margin: 0 0 128;
font-size: 16;
}
.recipeItem {
margin: 8 16;
2020-11-06 09:07:41 +00:00
border-radius: 4;
2020-11-02 11:36:53 +00:00
.recipeInfo {
margin: 4;
.category,
.time {
font-size: 12;
padding: 0;
margin: 0;
}
.title {
margin: 0;
padding: 4 0;
}
.timeContainer {
padding: 0;
.time {
padding: 0 0 0 4;
}
}
}
}
2020-11-02 11:36:53 +00:00
.imageHolder {
vertical-alignment: center;
&.card {
2020-11-06 09:07:41 +00:00
border-radius: 4 0 0 4;
// prettier-ignore
Image {
2020-11-06 09:07:41 +00:00
border-radius: 4 0 0 4;
}
}
}
2020-11-02 11:36:53 +00:00
.swipe-item {
margin: 0 8;
background: #c62828;
color: #fff;
height: 128;
2020-11-06 09:07:41 +00:00
border-radius: 4;
2020-11-02 11:36:53 +00:00
}
// -----------------------------
// SETTINGS
2020-10-14 19:32:32 +00:00
.group-header {
2020-10-21 17:54:45 +00:00
padding: 8;
2020-10-14 19:32:32 +00:00
}
.main-container {
padding: 16 8 128;
.option {
font-size: 16;
2020-11-02 11:36:53 +00:00
padding: 16;
2020-10-14 19:32:32 +00:00
.bx {
margin: 0 24 0 0;
}
.option-info {
font-size: 12;
2020-11-06 09:07:41 +00:00
line-height: 4;
2020-10-14 19:32:32 +00:00
}
}
}
2020-11-02 11:36:53 +00:00
// -----------------------------
// ABOUT
.appIconContainer {
2020-11-06 09:07:41 +00:00
background: $orange;
padding: 16 0;
2020-10-14 19:32:32 +00:00
width: 100%;
2020-11-02 11:36:53 +00:00
.appIcon {
2020-11-06 09:07:41 +00:00
height: 128;
2020-10-14 19:32:32 +00:00
}
}
2020-11-02 11:36:53 +00:00
// -----------------------------
// VIEW RECIPE
.viewRecipe {
.category,
.time,
.ingredient,
.ingredient-check {
font-size: 16;
}
.category {
margin: 0 8;
}
.time {
margin: 0 8;
.bx {
vertical-align: top;
}
}
.title {
font-size: 22;
line-height: 6;
}
.overviewContainer {
margin-top: 12;
.overviewItem {
2020-11-06 09:07:41 +00:00
border-radius: 4;
2020-11-02 11:36:53 +00:00
padding: 8;
margin: 8;
android-elevation: 1;
.bx {
color: $gray;
width: 24;
horizontal-alignment: left;
}
.itemCount {
font-size: 16;
padding: 8 4 4;
}
}
}
.ingredient,
.ingredient-check {
line-height: 6;
padding-bottom: 12;
2020-10-14 19:32:32 +00:00
}
2020-11-02 11:36:53 +00:00
.ingredient-check {
margin-bottom: 12;
}
.count {
width: 24;
height: 24;
padding-top: 4%;
margin: 0 0 0 8;
text-align: center;
2020-11-06 09:07:41 +00:00
border-radius: 99;
2020-11-02 11:36:53 +00:00
&.square {
clip-path: polygon(
5% 0,
95% 0,
100% 5%,
100% 65%,
65% 100%,
5% 100%,
0 95%,
0 5%
);
}
}
.instruction,
.note,
.reference {
2020-10-14 19:32:32 +00:00
font-size: 16;
2020-11-02 11:36:53 +00:00
line-height: 6;
padding: 2 0 14 36;
margin: 0 0 0 19;
border-width: 0 0 0 2;
}
.instruction.noBorder {
border-color: transparent;
}
.note {
border-width: 0;
}
.referenceItem {
padding: 14 16;
margin: 8 16 8;
2020-11-06 09:07:41 +00:00
border-radius: 4;
2020-11-02 11:36:53 +00:00
font-size: 16;
.bx {
font-size: 24;
}
.recipeLink {
padding: 0 16 0 0;
margin: 0;
}
}
.recipeText {
font-size: 16;
line-height: 6;
padding: 16;
margin: 8 16 8;
2020-11-06 09:07:41 +00:00
border-radius: 4;
2020-10-14 19:32:32 +00:00
}
}
2020-11-02 11:36:53 +00:00
// -----------------------------
// FAB
2020-10-22 18:36:50 +00:00
#btnFabContainer {
width: 100%;
height: 100%;
}
.fab-button {
height: 56;
width: 56;
border-radius: 28;
2020-10-22 18:36:50 +00:00
padding: 16;
2020-10-14 19:32:32 +00:00
margin: 16;
2020-11-02 11:36:53 +00:00
vertical-alignment: center;
android-elevation: 6;
2020-10-14 19:32:32 +00:00
}
2020-11-02 11:36:53 +00:00
// -----------------------------
// EDIT RECIPE
2020-10-14 19:32:32 +00:00
.sectionTitle {
font-size: 20;
}
2020-11-02 11:36:53 +00:00
.text-btn {
2020-10-14 19:32:32 +00:00
font-size: 14;
2020-11-02 11:36:53 +00:00
horizontal-alignment: left;
2020-10-14 19:32:32 +00:00
padding: 16;
margin: 8 0 0 0;
2020-09-15 11:10:16 +00:00
}
2020-10-21 17:54:45 +00:00
.closeBtn {
padding: 4;
margin-top: 16;
vertical-alignment: top;
2020-10-21 17:54:45 +00:00
}
2020-11-02 11:36:53 +00:00
// -----------------------------
// DIALOGS
2020-10-22 18:36:50 +00:00
.dialogContainer {
width: 100%;
2020-11-02 11:36:53 +00:00
color: $grayD4;
background: $grayL4;
font-size: 16;
2020-10-22 18:36:50 +00:00
&.dark {
color: $grayL4;
background: $grayD4;
}
.dialogTitle {
padding: 24 24 12;
font-size: 20;
}
2020-11-02 11:36:53 +00:00
.dialogInput {
padding: 0 24 16;
}
2020-10-22 18:36:50 +00:00
.dialogDescription {
line-height: 4;
2020-10-22 18:36:50 +00:00
padding: 0 24 16;
}
.actionItem {
2020-11-02 11:36:53 +00:00
padding: 8 24;
margin: 0;
2020-10-22 18:36:50 +00:00
}
2020-11-02 11:36:53 +00:00
.actionsContainer {
2020-10-22 18:36:50 +00:00
padding: 24;
2020-11-02 11:36:53 +00:00
}
.action {
2020-10-22 18:36:50 +00:00
font-size: 12;
color: #ff7043;
}
}
2020-11-02 11:36:53 +00:00
// -----------------------------
ActivityIndicator {
2020-11-02 11:36:53 +00:00
width: 24;
height: 24;
margin: 16;
}
2020-11-02 11:36:53 +00:00
// -----------------------------
// Transitions
.bounce-enter-active {
animation-name: bounce-in;
2020-11-02 11:36:53 +00:00
animation-duration: 1s;
animation-fill-mode: forwards;
2020-11-02 11:36:53 +00:00
animation-timing-function: ease-in-out;
}
.bounce-leave-active {
animation-name: bounce-out;
animation-duration: 0.25s;
animation-fill-mode: forwards;
}
@keyframes bounce-in {
0% {
transform: scale(0);
opacity: 0;
}
2020-11-02 11:36:53 +00:00
25% {
transform: scale(1.2);
opacity: 1;
}
2020-11-02 11:36:53 +00:00
50% {
transform: scale(0.9);
}
75% {
transform: scale(1.1);
}
100% {
transform: scale(1);
}
}
@keyframes bounce-out {
0% {
transform: scale(1);
}
100% {
transform: scale(0);
opacity: 0;
}
}
.dolly-enter-active {
animation-name: dolly;
animation-duration: 1s;
animation-delay: 0.25s;
animation-fill-mode: forwards;
2020-11-02 11:36:53 +00:00
animation-timing-function: ease-in-out;
}
.dolly-leave-active {
opacity: 0;
}
@keyframes dolly {
0% {
transform: rotate(20deg);
}
25% {
transform: rotate(-20deg);
}
50% {
transform: rotate(10deg);
}
75% {
transform: rotate(-10deg);
}
100% {
transform: rotate(0deg);
}
}