diff --git a/twenty-backend/lib/twenty-backend/model.rb b/twenty-backend/lib/twenty-backend/model.rb index d595188..1acb7b0 100644 --- a/twenty-backend/lib/twenty-backend/model.rb +++ b/twenty-backend/lib/twenty-backend/model.rb @@ -1,9 +1,6 @@ # frozen_string_literal: true class Twenty::Model < ActiveRecord::Base - require "fileutils" - extend FileUtils - require_relative "model/project" require_relative "model/task" end diff --git a/twenty-frontend/src/css/_colors.scss b/twenty-frontend/src/css/_colors.scss index 35c0574..eed6e63 100644 --- a/twenty-frontend/src/css/_colors.scss +++ b/twenty-frontend/src/css/_colors.scss @@ -1,5 +1,3 @@ -$black: lighten(#000, 20%); -$gray1: #f4f0ec; -$gray2: lighten($gray1, 5%); -$gray3: #cfcfc4; -$blue: #008cff; +$primary-color: #FFF; +$secondary-color: #333; +$accent-color: #0066CC; diff --git a/twenty-frontend/src/css/_global.scss b/twenty-frontend/src/css/_global.scss new file mode 100644 index 0000000..d8cc8d5 --- /dev/null +++ b/twenty-frontend/src/css/_global.scss @@ -0,0 +1,17 @@ +body .wrapper { + a { + @import "colors"; + color: $accent-color; + &:hover, + &:active, + &:visited { + color: $accent-color; + text-decoration: none; + } + } + ul { + margin: 0; + padding: 0; + } + .w-85 { width: 85%; } +} diff --git a/twenty-frontend/src/css/_layout.scss b/twenty-frontend/src/css/_layout.scss new file mode 100644 index 0000000..085ea9a --- /dev/null +++ b/twenty-frontend/src/css/_layout.scss @@ -0,0 +1,20 @@ +.two-columns { + display: flex; + flex-direction: space-between; + + .column-1 { + width: 20%; + } + .column-2 { + width: 100%; + } +} + +.max-width { + width: 75%; + max-width: 1024px; +} + +.align-center { + margin: 0 auto; +} diff --git a/twenty-frontend/src/css/_lists.scss b/twenty-frontend/src/css/_lists.scss index 272a920..d0fe82b 100644 --- a/twenty-frontend/src/css/_lists.scss +++ b/twenty-frontend/src/css/_lists.scss @@ -1,66 +1,108 @@ +/** + ----------------- + | ul.collection | + ----------------- +**/ + +ul.collection { + h1 { + display: flex; + align-items: center; + margin: 0; + padding: 0; + background: $primary-color; + color: $secondary-color; + height: 25px; + width: 100%; + font-size: medium; + } +} + +ul.collection li.item { + display: flex; + flex-wrap: wrap; + padding-bottom: 5px; + a { + display: flex; + flex-direction: column; + height: 50px; + justify-content: space-between; + padding: 10px 10px 5px 0px; + .title { + display: flex; + padding-bottom: 5px; + font-size: smaller; + } + .subtitle { + font-size: small; + color: $secondary-color; + } + } + ul.actions { + list-style-type: none; + width: 5%; + display: flex; + place-content: flex-end; + li { + display: flex; + align-items: center; + } + } +} + +ul.collection li.item.removed { + animation: bounceOutDown; + animation-duration: 0.5s; +} + +ul.collection li.item.completed { + animation: bounceOutUp; + animation-duration: 0.5s; +} + ul.items { @import "colors"; margin: 0; padding: 0; list-style-type: none; - li.item:first-child { - a { - border-top: 1px solid #FFF; - } + +} + +ul.items.nav { + border: 1px solid $secondary-color; + border-radius: 5px; + background: $secondary-color; + color: $primary-color; + width: 85%; + padding: 10px; + + h1 { + height: unset; + font-size: smaller; + align-items: center; + background: $secondary-color; + color: $primary-color; + margin-top: 10px; + } + h1:first-child { + margin-top: unset; } li.item { + padding: 5px; + justify-content: space-between; + background: $primary-color; + color: $secondary-color; display: flex; - flex-wrap: wrap; + align-items: center; + font-size: smaller; + height: 25px; a { - display: flex; - flex-direction: column; - height: 60px; - justify-content: space-between; - $blue: #008cff; - color: $blue; - padding: 10px 10px 5px 10px; - border-radius: 10px; - border: 1px solid #FFF; - border-top: 1px solid $gray1; - - &:hover { - background: $gray1; - border: 1px solid $gray3; - cursor: pointer; - text-decoration: none; - color: $blue; - } - - span { - display: flex; - flex-wrap: wrap; - width: 100%; - } - span.date, span.path { - font-size: small; - color: $black; - } + display: inline; + height: unset; + padding: unset; } - ul.actions { - list-style-type: none; - width: 5%; - display: flex; - place-content: flex-end; - li { - display: flex; - align-items: center; - } - } - } - li.item.removed { - animation: bounceOutDown; - animation-duration: 0.5s; - } - li.item.completed { - animation: bounceOutUp; - animation-duration: 0.5s; } } diff --git a/twenty-frontend/src/css/_panels.scss b/twenty-frontend/src/css/_panels.scss new file mode 100644 index 0000000..438cf20 --- /dev/null +++ b/twenty-frontend/src/css/_panels.scss @@ -0,0 +1,73 @@ +.panel h1 { + @import "colors"; + display: flex; + align-items: center; + margin: 0; + padding: 0; + background: $primary-color; + color: $secondary-color; + height: 25px; + width: 100%; + font-size: medium; +} + +.panel .panel-header.panel-tabs { + @import "colors"; + padding: 5px 5px 0 0px; + ul.tabs { + list-style-type: none; + display: flex; + height: 100%; + margin: 0; + padding: 0; + li:first-child { + border-left: none; + } + li { + font-size: small; + height: 100%; + margin-right: 5px; + border: 1px solid $accent-color; + border-bottom: none; + padding: 10px 5px 5px 10px; + border-radius: 5px; + min-width: 120px; + text-align: center; + background: $secondary-color; + color: lighten($secondary-color, 15%); + cursor: pointer; + opacity: 0.5; + } + li.active, li:hover { + font-weight: bold; + color: $secondary-color; + opacity: 1; + } + } +} + +.panel .panel-body { + @import "colors"; + width: 100%; + .task.content { + padding: 10px; + ul li { + line-height: 1.7em; + } + h3,h4,h5 { + &:first-child { + margin: 0 0 5px 0; + } + margin: 15px 0 5px 0; + } + code { + padding: 0px 5px 0px 5px; + font-family: "Noto Sans Mono Regular"; + font-size: smaller; + font-weight: bold; + color: lighten(#FF0000, 25%); + border-radius: 5px; + border: 1px solid $accent-color; + } + } +} diff --git a/twenty-frontend/src/css/_tables.scss b/twenty-frontend/src/css/_tables.scss index cacd9a6..bdeeeee 100644 --- a/twenty-frontend/src/css/_tables.scss +++ b/twenty-frontend/src/css/_tables.scss @@ -7,7 +7,7 @@ width: 100%; color: #FFF; background: $gray1; - color: $black; + color: $secondary-color; border-radius: 2px; border: #cfcfc4 1px solid; border-bottom: none; @@ -37,14 +37,14 @@ min-width: 120px; text-align: center; background: darken($gray1, 10%); - color: lighten($black, 15%); + color: lighten($secondary-color, 15%); cursor: pointer; opacity: 0.5; } li.active, li:hover { font-weight: bold; background: #FFF; - color: $black; + color: $secondary-color; opacity: 1; } } diff --git a/twenty-frontend/src/css/main.scss b/twenty-frontend/src/css/main.scss index 2ec3258..5b48dd9 100644 --- a/twenty-frontend/src/css/main.scss +++ b/twenty-frontend/src/css/main.scss @@ -1,7 +1,10 @@ @import "fonts"; @import "colors"; -@import "tables"; +@import "global"; +@import "layout"; +@import "panels"; @import "lists"; + @import "vendor/forms"; @import "vendor/animations"; @@ -9,39 +12,13 @@ box-sizing: border-box; } -html, html body, .root { +html, html body, .wrapper { height: 100%; } body { + font-family: 'Courier new', serif; font-weight: normal; - font-family: "Noto Sans Regular"; -} - -body header { - width: 100%; - background: $gray1; - min-height: 40px; - border-bottom: 1px solid $gray3; - .wrapper { - display: flex; - flex-direction: row; - justify-content: space-between; - ul.nav { - display: flex; - flex-direction: row; - list-style-type: none; - column-gap: 10px; - align-items: center; - li a { - &:hover { - color: $blue; - text-decoration: none; - font-weight: bold; - } - } - } - } } .pt-20 { padding-top: 20px; } @@ -50,24 +27,11 @@ body header { .mb-50 { margin-bottom: 50px; } .w-100 { width: 100%; } -.max-width { - width: 75%; - max-width: 1024px; -} +.wrapper { + color: $secondary-color; -.align-center { - margin: 0 auto; -} - -.root { - color: $black; - .task { - .content { - padding: 10px; - } - .content, textarea { - min-height: 350px; - } + .react-mount { + padding-top: 25px; } .trash.icon, .done.icon { diff --git a/twenty-frontend/src/favicon.svg b/twenty-frontend/src/favicon.svg index 541ec73..4d66f1e 100644 --- a/twenty-frontend/src/favicon.svg +++ b/twenty-frontend/src/favicon.svg @@ -1 +1 @@ - \ No newline at end of file + diff --git a/twenty-frontend/src/html/projects/index.html.erb b/twenty-frontend/src/html/projects/index.html.erb index 3483baa..2771c0d 100644 --- a/twenty-frontend/src/html/projects/index.html.erb +++ b/twenty-frontend/src/html/projects/index.html.erb @@ -1,4 +1,4 @@ -
+
diff --git a/twenty-frontend/src/html/tasks/index.html.erb b/twenty-frontend/src/html/tasks/index.html.erb index a56ec81..0b7b3e3 100644 --- a/twenty-frontend/src/html/tasks/index.html.erb +++ b/twenty-frontend/src/html/tasks/index.html.erb @@ -1,4 +1,4 @@ -
+
diff --git a/twenty-frontend/src/js/components/NavBar.tsx b/twenty-frontend/src/js/components/NavBar.tsx new file mode 100644 index 0000000..2241d64 --- /dev/null +++ b/twenty-frontend/src/js/components/NavBar.tsx @@ -0,0 +1,19 @@ +import React from "react"; + +export function NavBar() { + return ( + + ); +} diff --git a/twenty-frontend/src/js/components/Projects.tsx b/twenty-frontend/src/js/components/Projects.tsx index 1b73be3..3556e2d 100644 --- a/twenty-frontend/src/js/components/Projects.tsx +++ b/twenty-frontend/src/js/components/Projects.tsx @@ -1,4 +1,5 @@ import React, { useEffect } from "react"; +import { NavBar } from "/components/NavBar"; import { useProjects } from "/hooks/useProjects"; export function Projects() { @@ -9,23 +10,28 @@ export function Projects() { }, []); return ( -
-
- Projects +
+
+
-
- +
+
+

Projects

+
+ +
+
); diff --git a/twenty-frontend/src/js/components/Task.tsx b/twenty-frontend/src/js/components/Task.tsx index f5f143c..ad68121 100644 --- a/twenty-frontend/src/js/components/Task.tsx +++ b/twenty-frontend/src/js/components/Task.tsx @@ -47,8 +47,8 @@ export function Task({ task }: { task?: Task }) { return (
-
-
+
+
-
+