From b0f9940d7a01286b914855b644245b88c2427552 Mon Sep 17 00:00:00 2001 From: khatabwedaa Date: Sun, 31 May 2020 00:10:23 +0200 Subject: [PATCH] Add Go to top component --- package.json | 1 + src/components/Main.vue | 6 ++++- src/components/Utilities/CodeSnippet.vue | 32 ++++++++++++------------ src/components/Utilities/GotoTop.vue | 24 ++++++++++++++++++ 4 files changed, 46 insertions(+), 17 deletions(-) create mode 100644 src/components/Utilities/GotoTop.vue diff --git a/package.json b/package.json index 913e458..280eb08 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "autoprefixer": "^9.7.6", "core-js": "^3.6.4", "highlight.js": "^10.0.2", + "jquery": "^3.5.1", "js-beautify": "^1.11.0", "tailwindcss": "^1.4.4", "vue": "^2.6.11", diff --git a/src/components/Main.vue b/src/components/Main.vue index 144221d..dcb58fa 100644 --- a/src/components/Main.vue +++ b/src/components/Main.vue @@ -1,5 +1,5 @@ @@ -72,6 +74,7 @@ import FooterWithSubscribeForm from "./UI/Footers/FooterWithSubscribeForm"; import Component from "../Models/Component"; import ViewComponent from "./Utilities/ViewComponent"; +import GotoTop from "./Utilities/GotoTop"; export default { components: { @@ -111,6 +114,7 @@ export default { SimpleFooter, FooterWithSubscribeForm, + GotoTop, ViewComponent, }, data() { diff --git a/src/components/Utilities/CodeSnippet.vue b/src/components/Utilities/CodeSnippet.vue index 396bad2..7d975d6 100644 --- a/src/components/Utilities/CodeSnippet.vue +++ b/src/components/Utilities/CodeSnippet.vue @@ -5,25 +5,25 @@ diff --git a/src/components/Utilities/GotoTop.vue b/src/components/Utilities/GotoTop.vue new file mode 100644 index 0000000..55ae39a --- /dev/null +++ b/src/components/Utilities/GotoTop.vue @@ -0,0 +1,24 @@ + + + \ No newline at end of file