From 0429ea7f726d50fd0ad1ac8bfbfad7c2753615f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Schmelczer=20Andr=C3=A1s?= Date: Fri, 10 Jan 2020 20:10:59 +0100 Subject: [PATCH] Add final touches --- .idea/inspectionProfiles/Project_Default.xml | 2 + .idea/workspace.xml | 101 ++++++++++- README.md | 4 +- custom.d.ts | 32 ++-- package.json | 6 +- src/framework/container-page.ts | 2 +- .../{ => events}/event-broadcaster.ts | 0 src/framework/{ => events}/page-event.ts | 0 src/framework/framework.scss | 1 + src/framework/helper/create-element.ts | 2 +- src/framework/index.scss | 2 - src/{ => framework}/model/misc.ts | 0 src/framework/page-element.ts | 4 +- .../primitives/implementations/anchor.ts | 14 +- .../primitives/implementations/image.ts | 4 +- .../primitives/implementations/text.ts | 2 +- .../primitives/implementations/video.ts | 6 +- src/framework/primitives/primitive.ts | 4 +- src/framework/primitives/primitives.scss | 27 --- .../animations/animations.scss | 0 .../animations/animations.ts | 0 src/framework/styles/dark-mode/dark-mode.scss | 5 + .../{helper => styles/dark-mode}/dark-mode.ts | 0 src/framework/styles/index.scss | 3 + src/framework/styles/wrapper.scss | 38 ++++ src/index.html | 1 - src/index.ts | 10 +- src/model/portfolio.ts | 2 +- src/page/about/about.html.ts | 2 +- src/page/about/about.scss | 31 ++-- src/page/about/about.ts | 1 - src/page/background/background.scss | 10 +- src/page/background/background.ts | 20 ++- .../{background.html.ts => blob.html.ts} | 2 +- src/page/background/blob.ts | 7 +- src/page/content/content.html.ts | 2 +- src/page/content/content.scss | 7 +- src/page/footer/footer.html.ts | 2 +- src/page/footer/footer.scss | 22 ++- src/page/image-viewer/image-viewer.html.ts | 4 +- src/page/image-viewer/image-viewer.scss | 5 +- src/page/image-viewer/image-viewer.ts | 29 ++- src/page/index.ts | 16 ++ .../theme-switcher/theme-switcher.html.ts | 4 +- src/page/theme-switcher/theme-switcher.scss | 26 ++- src/page/theme-switcher/theme-switcher.ts | 19 +- .../timeline-element/timeline-element.html.ts | 6 +- .../timeline-element/timeline-element.scss | 34 ++-- .../timeline-element/timeline-element.ts | 8 +- src/page/timeline/timeline.html.ts | 4 +- src/page/timeline/timeline.scss | 5 +- src/page/timeline/timeline.ts | 1 - src/portfolio.ts | 29 +-- src/static/media/my-notes.jpg | Bin 217866 -> 0 bytes src/static/media/my-notes.png | Bin 0 -> 2083943 bytes src/style/_id.scss | 6 + src/style/a.scss | 60 +++---- src/style/configured-responsive.scss | 7 + src/style/fonts.scss | 2 - src/style/include.scss | 7 + src/style/mixins.scss | 59 ++----- src/style/vars.scss | 167 +++++++++--------- src/styles.scss | 135 ++++++++------ webpack.config.js | 9 +- 64 files changed, 576 insertions(+), 444 deletions(-) rename src/framework/{ => events}/event-broadcaster.ts (100%) rename src/framework/{ => events}/page-event.ts (100%) create mode 100644 src/framework/framework.scss delete mode 100644 src/framework/index.scss rename src/{ => framework}/model/misc.ts (100%) delete mode 100644 src/framework/primitives/primitives.scss rename src/framework/{helper => styles}/animations/animations.scss (100%) rename src/framework/{helper => styles}/animations/animations.ts (100%) create mode 100644 src/framework/styles/dark-mode/dark-mode.scss rename src/framework/{helper => styles/dark-mode}/dark-mode.ts (100%) create mode 100644 src/framework/styles/index.scss create mode 100644 src/framework/styles/wrapper.scss rename src/page/background/{background.html.ts => blob.html.ts} (68%) delete mode 100644 src/static/media/my-notes.jpg create mode 100644 src/static/media/my-notes.png create mode 100644 src/style/_id.scss create mode 100644 src/style/configured-responsive.scss create mode 100644 src/style/include.scss diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index 0c79b6f..0213191 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -2,6 +2,8 @@ \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index a400a07..5b962e5 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,13 +2,68 @@ - - + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -29,6 +84,9 @@ + + + @@ -62,11 +120,11 @@ + + + + - - - - @@ -124,7 +182,8 @@ - + + @@ -147,4 +206,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/README.md b/README.md index f74053b..8d10556 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ An easily configurable portfolio. ## Configuration - The actual content is in [portfolio.ts](src/portfolio.ts). -- The assets referenced by this file should be located in [src/static](src/static). - +- The assets referenced by that file should be located in [src/static](src/static). +Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 Hungary License. diff --git a/custom.d.ts b/custom.d.ts index 8c6550d..04a1036 100644 --- a/custom.d.ts +++ b/custom.d.ts @@ -1,47 +1,47 @@ -declare module "*.svg" { - import { url } from "src/model/misc"; +declare module '*.svg' { + import { url } from 'src/framework/model/misc'; const content: url; export default content; } -declare module "*.png" { - import { ResponsiveImage } from "src/model/misc"; +declare module '*.png' { + import { ResponsiveImage } from 'src/framework/model/misc'; const content: ResponsiveImage; export default content; } -declare module "*.jpg" { - import { ResponsiveImage } from "src/model/misc"; +declare module '*.jpg' { + import { ResponsiveImage } from 'src/framework/model/misc'; const content: ResponsiveImage; export default content; } -declare module "*.jpeg" { - import { ResponsiveImage } from "src/model/misc"; +declare module '*.jpeg' { + import { ResponsiveImage } from 'src/framework/model/misc'; const content: ResponsiveImage; export default content; } -declare module "*.gif" { - import { url } from "src/model/misc"; +declare module '*.gif' { + import { url } from 'src/framework/model/misc'; const content: url; export default content; } -declare module "*.mp4" { - import { url } from "src/model/misc"; +declare module '*.mp4' { + import { url } from 'src/framework/model/misc'; const content: url; export default content; } -declare module "*.webm" { - import { url } from "src/model/misc"; +declare module '*.webm' { + import { url } from 'src/framework/model/misc'; const content: url; export default content; } -declare module "*.pdf" { - import { url } from "src/model/misc"; +declare module '*.pdf' { + import { url } from 'src/framework/model/misc'; const content: url; export default content; } diff --git a/package.json b/package.json index a94840e..f28fae1 100644 --- a/package.json +++ b/package.json @@ -55,9 +55,7 @@ "typescript": "^3.7.3", "webpack": "^4.41.4", "webpack-cli": "^3.3.10", - "webpack-dev-server": "^3.10.1" - }, - "dependencies": { - "sass": "latest" + "webpack-dev-server": "^3.10.1", + "cssnano": "latest" } } diff --git a/src/framework/container-page.ts b/src/framework/container-page.ts index 7521a04..5753365 100644 --- a/src/framework/container-page.ts +++ b/src/framework/container-page.ts @@ -1,5 +1,5 @@ import { PageElement } from './page-element'; -import { PageEventType } from './page-event'; +import { PageEventType } from './events/page-event'; export class ContainerPage extends PageElement { public constructor(rootElement: HTMLElement, children: Array) { diff --git a/src/framework/event-broadcaster.ts b/src/framework/events/event-broadcaster.ts similarity index 100% rename from src/framework/event-broadcaster.ts rename to src/framework/events/event-broadcaster.ts diff --git a/src/framework/page-event.ts b/src/framework/events/page-event.ts similarity index 100% rename from src/framework/page-event.ts rename to src/framework/events/page-event.ts diff --git a/src/framework/framework.scss b/src/framework/framework.scss new file mode 100644 index 0000000..5f1962b --- /dev/null +++ b/src/framework/framework.scss @@ -0,0 +1 @@ +@forward "styles/index"; diff --git a/src/framework/helper/create-element.ts b/src/framework/helper/create-element.ts index 3337cea..c5978e2 100644 --- a/src/framework/helper/create-element.ts +++ b/src/framework/helper/create-element.ts @@ -1,4 +1,4 @@ -import { html } from '../../model/misc'; +import { html } from '../model/misc'; export const createElement = (from: html): HTMLElement => { // won't work for all elements, eg.: diff --git a/src/framework/index.scss b/src/framework/index.scss deleted file mode 100644 index 2e194d3..0000000 --- a/src/framework/index.scss +++ /dev/null @@ -1,2 +0,0 @@ -@import 'primitives/primitives'; -@import 'helper/animations/animations'; diff --git a/src/model/misc.ts b/src/framework/model/misc.ts similarity index 100% rename from src/model/misc.ts rename to src/framework/model/misc.ts diff --git a/src/framework/page-element.ts b/src/framework/page-element.ts index e18c9d9..160c892 100644 --- a/src/framework/page-element.ts +++ b/src/framework/page-element.ts @@ -1,5 +1,5 @@ -import { PageEvent, PageEventType } from './page-event'; -import { EventBroadcaster } from './event-broadcaster'; +import { PageEvent, PageEventType } from './events/page-event'; +import { EventBroadcaster } from './events/event-broadcaster'; export abstract class PageElement implements EventBroadcaster { protected eventBroadcaster: EventBroadcaster; diff --git a/src/framework/primitives/implementations/anchor.ts b/src/framework/primitives/implementations/anchor.ts index b7ce2f7..e885a76 100644 --- a/src/framework/primitives/implementations/anchor.ts +++ b/src/framework/primitives/implementations/anchor.ts @@ -1,5 +1,5 @@ import { Primitive } from '../primitive'; -import { html, url } from '../../../model/misc'; +import { html, url } from '../../model/misc'; export class Anchor implements Primitive { public constructor( @@ -8,10 +8,12 @@ export class Anchor implements Primitive { ) {} public toHTML(): html { - return `${this.text}`; + return ` + ${this.text} + `; } } diff --git a/src/framework/primitives/implementations/image.ts b/src/framework/primitives/implementations/image.ts index 57f1d87..e7ac759 100644 --- a/src/framework/primitives/implementations/image.ts +++ b/src/framework/primitives/implementations/image.ts @@ -1,5 +1,5 @@ import { Primitive } from '../primitive'; -import { html, ResponsiveImage } from '../../../model/misc'; +import { html, ResponsiveImage } from '../../model/misc'; import { last } from '../../helper/last'; export class Image implements Primitive { @@ -11,7 +11,7 @@ export class Image implements Primitive { public toHTML(disableInnerShadow = false): html { return ` ${!disableInnerShadow ? `
` : ''} - ${this.alt}` : ''} -