From 096f25804dde077563a8b9cb93d13850bf50e490 Mon Sep 17 00:00:00 2001 From: Gisle Aune Date: Wed, 13 Jan 2021 18:23:41 +0100 Subject: [PATCH] refactored ProjectEntry and GroupEntry to share common style. --- svelte-ui/public/global.css | 2 + svelte-ui/src/components/GroupEntry.svelte | 93 +++----------- svelte-ui/src/components/LinkHook.svelte | 22 ++++ svelte-ui/src/components/ParentEntry.svelte | 120 +++++++++++++++++ svelte-ui/src/components/ProjectEntry.svelte | 128 +++---------------- 5 files changed, 180 insertions(+), 185 deletions(-) create mode 100644 svelte-ui/src/components/LinkHook.svelte create mode 100644 svelte-ui/src/components/ParentEntry.svelte diff --git a/svelte-ui/public/global.css b/svelte-ui/public/global.css index b117310..c1ceeff 100644 --- a/svelte-ui/public/global.css +++ b/svelte-ui/public/global.css @@ -18,10 +18,12 @@ body { a { color: #FC1; text-decoration: none; + text-decoration-color: inherit; } a:hover { text-decoration: underline; + text-decoration-color: inherit; } label { diff --git a/svelte-ui/src/components/GroupEntry.svelte b/svelte-ui/src/components/GroupEntry.svelte index cd97a2c..5e70f2b 100644 --- a/svelte-ui/src/components/GroupEntry.svelte +++ b/svelte-ui/src/components/GroupEntry.svelte @@ -1,96 +1,35 @@ -
- -
-
-
-
{group.name}
-
- {#if showAllOptions} -
-

{group.description}

-
- - - - - - {/if} -
- {#each group.items as item (item.id)} - - {/each} -
-
-
- - + + {#if showAllOptions} + + + + + + {#each group.items as item (item.id)} + + {/each} + {/if} + \ No newline at end of file diff --git a/svelte-ui/src/components/LinkHook.svelte b/svelte-ui/src/components/LinkHook.svelte new file mode 100644 index 0000000..5b7595b --- /dev/null +++ b/svelte-ui/src/components/LinkHook.svelte @@ -0,0 +1,22 @@ + + + + + \ No newline at end of file diff --git a/svelte-ui/src/components/ParentEntry.svelte b/svelte-ui/src/components/ParentEntry.svelte new file mode 100644 index 0000000..01312a0 --- /dev/null +++ b/svelte-ui/src/components/ParentEntry.svelte @@ -0,0 +1,120 @@ + + +
+ +
+
+
+
+ {#if headerLink} + {entry.name} + {:else} + {entry.name} + {/if} +
+ {#if entry.endTime != null} +
+ +
+ {/if} +
+ {#if (progressAmount != null)} + + {/if} + {#if (full)} +
+

{entry.description}

+
+ {/if} + +
+
+ + \ No newline at end of file diff --git a/svelte-ui/src/components/ProjectEntry.svelte b/svelte-ui/src/components/ProjectEntry.svelte index 51dfbc4..6c28c28 100644 --- a/svelte-ui/src/components/ProjectEntry.svelte +++ b/svelte-ui/src/components/ProjectEntry.svelte @@ -1,12 +1,9 @@ -
- -
-
-
-
- {#if linkProject} - {project.name} - {:else} - {project.name} - {/if} -
- {#if (project.endTime != null)} -
- -
- {/if} -
- - {#if showAllOptions} -
-

{project.description}

-
- - - - - + + {#if showAllOptions} + + + + + + {/if} + {#each project.tasks as task (task.id)} + {#if !hideInactive || task.active} + {/if} -
- {#each project.tasks as task (task.id)} - {#if !hideInactive || task.active} - - {/if} - {/each} -
-
-
- - + {/each} + \ No newline at end of file