diff --git a/frontend/blog-init.js b/frontend/blog-init.js new file mode 100644 index 0000000..3c4e8c5 --- /dev/null +++ b/frontend/blog-init.js @@ -0,0 +1,17 @@ +import Vue from "vue"; +import VueRouter from "vue-router"; +import { routes } from "@/routes.js"; + +import Home from "@/home"; + +Vue.use(VueRouter); + +const router = new VueRouter({ + routes: routes +}); + +new Vue({ + router, + components: { Home }, + template: "", +}).$mount("#app"); diff --git a/frontend/components/PostPreview.vue b/frontend/components/PostPreview.vue new file mode 100644 index 0000000..ec9cd77 --- /dev/null +++ b/frontend/components/PostPreview.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/frontend/home.vue b/frontend/home.vue new file mode 100644 index 0000000..215c2dd --- /dev/null +++ b/frontend/home.vue @@ -0,0 +1,36 @@ + + + + + + + diff --git a/frontend/pages/LandingPage.vue b/frontend/pages/LandingPage.vue new file mode 100644 index 0000000..6202528 --- /dev/null +++ b/frontend/pages/LandingPage.vue @@ -0,0 +1,47 @@ + + + + + diff --git a/frontend/pages/PostPage.vue b/frontend/pages/PostPage.vue new file mode 100644 index 0000000..29f27e6 --- /dev/null +++ b/frontend/pages/PostPage.vue @@ -0,0 +1,54 @@ + + + + + diff --git a/frontend/routes.js b/frontend/routes.js new file mode 100644 index 0000000..40e44e2 --- /dev/null +++ b/frontend/routes.js @@ -0,0 +1,15 @@ +import LandingPage from '@/pages/LandingPage'; +import PostPage from '@/pages/PostPage'; + +const routes = [ + { + path: "/", + component: LandingPage + }, + { + path: "/post/:id", + component: PostPage + } +] + +export { routes }; diff --git a/frontend/styles/global.scss b/frontend/styles/global.scss new file mode 100644 index 0000000..cd48613 --- /dev/null +++ b/frontend/styles/global.scss @@ -0,0 +1,36 @@ + +@font-face { + font-family: Moderat; + font-weight: normal; + font-style: normal; + src: url(/public/assets/fonts/Moderat-Regular.eot); + src: url(/public/assets/fonts/Moderat-Regular.eot?#iefix) format("embedded-opentype"), url(/public/assets/fonts/Moderat-Regular.woff2) format("woff2"); +} + +@font-face { + font-family: Moderat; + font-weight: 700; + font-style: normal; + src: url(/public/assets/fonts/Moderat-Bold.eot); + src: url(/public/assets/fonts/Moderat-Bold.eot?#iefix) format("embedded-opentype"), + url(/public/assets/fonts/Moderat-Bold.woff2) format("woff2"), + url(/public/assets/fonts/Moderat-Bold.woff) format("woff"); +} + +body { + font-family: Moderat, Helvetica Neue; + margin: 0; +} + +a { + text-decoration: none; +} + +input, +textarea { + border-radius: 0; + box-shadow: none; + -webkit-appearance: none; + font-size: 1.1rem; + border: 1px solid rgba(#333333, 0.3); +} diff --git a/frontend/styles/media-queries.scss b/frontend/styles/media-queries.scss new file mode 100644 index 0000000..8108453 --- /dev/null +++ b/frontend/styles/media-queries.scss @@ -0,0 +1,28 @@ +$mobile-width: 768px; +$tablet-max: 1200px; +$desktop-max: 2004px; + + +@mixin mobile { + @media (max-width: #{$mobile-width}) { + @content; + } +} + +@mixin tablet { + @media (min-width: #{$mobile-width + 1px}) { + @content; + } +} + +@mixin desktop { + @media (min-width: #{$tablet-max + 1px}) { + @content; + } +} + +@mixin widescreen { + @media (min-width: #{$desktop-max + 1px}){ + @content; + } +} \ No newline at end of file diff --git a/frontend/styles/variables.scss b/frontend/styles/variables.scss new file mode 100644 index 0000000..b5aabfc --- /dev/null +++ b/frontend/styles/variables.scss @@ -0,0 +1,2 @@ + +$color-primary: #6ec800; \ No newline at end of file diff --git a/frontend/templates/Index.html b/frontend/templates/Index.html new file mode 100644 index 0000000..7ff8c5e --- /dev/null +++ b/frontend/templates/Index.html @@ -0,0 +1,28 @@ + + + + + Kevin' lab + + + + + + + + + +
+ + + + + + diff --git a/frontend/utils.js b/frontend/utils.js new file mode 100644 index 0000000..f18ed42 --- /dev/null +++ b/frontend/utils.js @@ -0,0 +1,11 @@ + +const humanReadableDate = (date) => { + const day = date.getDate(); + const month = date.toLocaleString('default', { month: 'long' }); + const year = date.getFullYear(); + return `${ day } ${ month }, ${ year }`; +} + +export { + humanReadableDate +}