diff --git a/twenty-frontend/nanoc/rules/projects.rules b/twenty-frontend/nanoc/rules/projects.rules index 5924328..adf51ce 100644 --- a/twenty-frontend/nanoc/rules/projects.rules +++ b/twenty-frontend/nanoc/rules/projects.rules @@ -2,9 +2,8 @@ ## # GET / -compile '/html/projects/index.html.erb' do - layout "/default.*" - filter(:erb) +compile '/html/react.html.erb', rep: "projects/index" do + filter(:erb, locals: {src: "/js/main/projects.js"}) write('/projects/index.html') end diff --git a/twenty-frontend/nanoc/rules/tasks.rules b/twenty-frontend/nanoc/rules/tasks.rules index c551f2b..01a688b 100644 --- a/twenty-frontend/nanoc/rules/tasks.rules +++ b/twenty-frontend/nanoc/rules/tasks.rules @@ -2,9 +2,8 @@ ## # GET /tasks/new/ -compile '/html/tasks/new/index.html.erb' do - layout "/default.*" - filter(:erb) +compile '/html/react.html.erb', rep: "tasks/new" do + filter(:erb, locals: {src: "/js/main/task/new.js"}) write("/tasks/new/index.html") end @@ -18,11 +17,9 @@ end ## # GET / # GET /tasks/ -compile("/html/tasks/index.html.erb") do - layout "/default.*" - filter(:erb) +compile("/html/react.html.erb", rep: "tasks/index") do + filter(:erb, locals: {src: "/js/main/tasks.js"}) write("/tasks/index.html") - write("/index.html") end ## @@ -34,9 +31,8 @@ end ## # GET /tasks/edit#id=X -compile("/html/tasks/edit/index.html.erb") do - layout "/default.*" - filter(:erb) +compile("/html/react.html.erb") do + filter(:erb, locals: {src: '/js/main/task/edit.js'}) write("/tasks/edit/index.html") end diff --git a/twenty-frontend/src/css/_fonts.scss b/twenty-frontend/src/css/_fonts.scss new file mode 100644 index 0000000..a84da3b --- /dev/null +++ b/twenty-frontend/src/css/_fonts.scss @@ -0,0 +1,14 @@ +@font-face { + font-family: "Noto Sans Regular"; + src: url("/fonts/noto-sans-regular.ttf") format("truetype"); +} + +@font-face { + font-family: "Noto Sans Mono Regular"; + src: url("/fonts/noto-sans-mono-regular.ttf") format("truetype"); +} + +@font-face { + font-family: "Noto Serif Regular"; + src: url("/fonts/noto-serif-regular.ttf") format("truetype"); +} diff --git a/twenty-frontend/src/html/projects/index.html.erb b/twenty-frontend/src/html/projects/index.html.erb deleted file mode 100644 index c6c2cf5..0000000 --- a/twenty-frontend/src/html/projects/index.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -
-
- -
diff --git a/twenty-frontend/src/layouts/default.html b/twenty-frontend/src/html/react.html.erb similarity index 71% rename from twenty-frontend/src/layouts/default.html rename to twenty-frontend/src/html/react.html.erb index c39c74e..d73504d 100644 --- a/twenty-frontend/src/layouts/default.html +++ b/twenty-frontend/src/html/react.html.erb @@ -7,6 +7,7 @@ - <%= yield %> +
+ diff --git a/twenty-frontend/src/html/tasks/edit/index.html.erb b/twenty-frontend/src/html/tasks/edit/index.html.erb deleted file mode 100644 index 1c209ec..0000000 --- a/twenty-frontend/src/html/tasks/edit/index.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -
-
- -
diff --git a/twenty-frontend/src/html/tasks/index.html.erb b/twenty-frontend/src/html/tasks/index.html.erb deleted file mode 100644 index 91f69d8..0000000 --- a/twenty-frontend/src/html/tasks/index.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -
-
- -
diff --git a/twenty-frontend/src/html/tasks/new/index.html.erb b/twenty-frontend/src/html/tasks/new/index.html.erb deleted file mode 100644 index c4c1856..0000000 --- a/twenty-frontend/src/html/tasks/new/index.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -
-
- -
diff --git a/twenty-frontend/src/js/main/task/edit.tsx b/twenty-frontend/src/js/main/task/edit.tsx index 9b4619f..c9c5fe5 100644 --- a/twenty-frontend/src/js/main/task/edit.tsx +++ b/twenty-frontend/src/js/main/task/edit.tsx @@ -2,7 +2,6 @@ import { ApolloProvider } from "@apollo/client"; import React from "react"; import ReactDOM from "react-dom/client"; import { Task as Component } from "/components/Task"; -import { Task } from "/types/schema"; import { ApolloClient, InMemoryCache } from "@apollo/client"; (function () { @@ -16,7 +15,7 @@ import { ApolloClient, InMemoryCache } from "@apollo/client"; uri: "/servlet/graphql", cache: new InMemoryCache(), }); - const root = document.querySelector(".react-mount.edit-task")!; + const root = document.querySelector(".react-mount")!; ReactDOM.createRoot(root).render( diff --git a/twenty-frontend/src/js/main/task/new.tsx b/twenty-frontend/src/js/main/task/new.tsx index 0f1c891..c355302 100644 --- a/twenty-frontend/src/js/main/task/new.tsx +++ b/twenty-frontend/src/js/main/task/new.tsx @@ -4,7 +4,7 @@ import { Task } from "/components/Task"; import { ApolloClient, ApolloProvider, InMemoryCache } from "@apollo/client"; (function () { - const root = document.querySelector(".react-mount.new-task")!; + const root = document.querySelector(".react-mount")!; const client = new ApolloClient({ uri: "/servlet/graphql", cache: new InMemoryCache(), diff --git a/twenty-frontend/src/js/main/tasks.tsx b/twenty-frontend/src/js/main/tasks.tsx index 926ab30..bb85f45 100644 --- a/twenty-frontend/src/js/main/tasks.tsx +++ b/twenty-frontend/src/js/main/tasks.tsx @@ -4,7 +4,7 @@ import ReactDOM from "react-dom/client"; import { Tasks } from "/components/Tasks"; (function () { - const root = document.querySelector(".react-mount.tasks")!; + const root = document.querySelector(".react-mount")!; const client = new ApolloClient({ uri: "/servlet/graphql", cache: new InMemoryCache(),