Skip to content
Permalink
Browse files
Add basic pages
  • Loading branch information
lorenaramonda committed Feb 23, 2020
1 parent 54c6912 commit 9f18d0d93bab08bfd5ab48f86772a260f6c8e383
Show file tree
Hide file tree
Showing 7 changed files with 276 additions and 65 deletions.
@@ -2,7 +2,16 @@
<nav id="nav" class="nav" role="navigation">
<ul>
<li v-for="(link, i) in links" :key="i" :class="{ current: isCurrent(link) }">
<n-link data-scroll :to="link.path">{{ link.name }}</n-link>
<n-link
data-scroll
:to="
localePath({
name: link.path
})
"
>
{{ link.name }}
</n-link>
</li>
</ul>
</nav>
@@ -14,19 +23,19 @@ export default {
links: [
{
name: 'Home',
path: '/'
path: 'index'
},
{
name: 'Team',
path: '#'
path: 'index'
},
{
name: 'Contattaci',
path: '#'
path: 'index'
},
{
name: 'Blog',
path: '#'
path: 'blog'
}
]
}),
@@ -2,5 +2,14 @@ export default {
corporate: {
vat: 'vat id',
share_capital: 'share capital'
},
blog: {
last_posts: 'Lasts posts',
all_posts: 'All posts',
post_of: 'By'
},
post: {
reading_time: '',
comments: 'Comments'
}
}
@@ -2,5 +2,14 @@ export default {
corporate: {
vat: 'p. iva',
share_capital: 'cap. soc.'
},
blog: {
last_posts: 'Ultimi articoli',
all_posts: 'Tutti i post',
post_of: 'Di'
},
post: {
reading_time: '',
comments: 'Commenti'
}
}
@@ -1,7 +1,9 @@
<template>
<div>
<v-header />
<nuxt />
<main role="main">
<nuxt />
</main>
<v-footer />
</div>
</template>
@@ -0,0 +1,96 @@
<template>
<div class="page-content">
<article class="post">
<header class="post__header">
<div class="post__categories">
<strong v-for="category in post.categories" :key="category.uid">
<n-link
:to="
localePath({
name: 'category',
params: {
name: category.uid
}
})
"
>
{{ category.name }}
</n-link>
</strong>
</div>
<h1 id="js-title-post">{{ post.title }}</h1>
<time v-if="post.date" class="post__date" :datetime="post.date"> {{ post.date.day }} {{ post.date.month }} {{ post.date.year }}</time>
<span class="post__reading-time">{{ $t('post.reading_time') }} {{ post.readingTime }}</span>
</header>

<img v-if="post.image" sizes="(max-width: 990px) 100vw (min-width: 991px) 57vw" srcset="" :src="post.image.url" alt="" />

<div class="post__content">
{{ post.content }}
</div>
<footer class="post__footer">
<div class="tags">
<n-link
v-for="(tag, i) in tag"
:key="i"
:to="
localePath({
name: 'category-tag',
params: {
tag: tag.slug
}
})
"
>
{{ tag.name }}
</n-link>
</div>
</footer>
<v-author />
</article>

<v-post-comments />
<v-post-related />
</div>
</template>

<script>
export default {
data: () => ({
post: {
title: 'Sample title',
image: {
url: 'https://via.placeholder.com/660x280'
},
content: 'Sample content',
categories: [
{
name: 'Sample category',
slug: 'sample-category'
},
{
name: 'Sample category2',
slug: 'sample-category2'
}
],
tags: [
{
name: 'Sample tag',
slug: 'sample-tag'
},
{
name: 'Sample tag2',
slug: 'sample-tag2'
}
]
}
}),
head: () => ({
bodyAttrs: {
class: 'type-post'
}
})
}
</script>

<style></style>
@@ -0,0 +1,117 @@
<template>
<div class="container">
<section class="posts-list">
<h2 class="posts-list__title">{{ $t('blog.last_posts') }}</h2>
<!-- {{ content }} -->

<ul class="posts-list__wrapper">
<li v-for="(post, i) in posts" :key="i" class="posts-list__item" :class="{ 'posts-list__item--first': i === 0 }">
<a v-if="i === 0" href="#">
<img v-if="post.image" sizes="(max-width: 990px) 100vw (min-width: 991px) 57vw" srcset="" :src="post.image.url" alt="" />
</a>
<a v-else href="#">
<img sizes="(max-width: 990px) 100vw (min-width: 991px) 33vw" srcset="" src="" alt="" />
</a>

<div class="posts-list__item-meta">
<div class="posts-list__item-categories">
<strong v-for="category in post.categories" :key="category.uid">
<n-link
:to="
localePath({
name: 'category',
params: {
name: category.uid
}
})
"
>
{{ category.name }}
</n-link>
</strong>
</div>
<h3 class="posts-list__item-title">
<n-link
:to="
localePath({
name: 'blog-post',
params: {
post: post.uid
}
})
"
>
{{ post.title }}
</n-link>
</h3>
<span class="posts-list__item-author">
{{ $t('blog.post_of') }}
<n-link
v-if="post.author"
:to="
localePath({
name: 'author',
params: {
name: post.author.uid
}
})
"
rel="author"
>
{{ post.author.name }}
</n-link>
</span>
|
<time v-if="post.date" class="posts-list__item-time" :datetime="post.date">
{{ post.date.day }} {{ post.date.month }} {{ post.date.year }}
</time>
<div class="posts-list__item-summary">
{{ post.summary }}
</div>
</div>
</li>
</ul>
<div class="posts-list__view-all">
<a href="#">{{ $t('blog.all_posts') }}</a>
</div>
</section>
</div>
</template>

<script>
export default {
data: () => ({
posts: [
{
uid: 'sample-uid',
title: 'Sample title',
summary: 'Sample summary',
image: {
url: 'https://via.placeholder.com/660x280'
},
categories: [
{
name: 'Sample category',
slug: 'sample-category'
},
{
name: 'Sample category2',
slug: 'sample-category2'
}
],
author: {
uid: 'lorenaramonda',
name: 'Lorena Ramonda'
}
}
]
}),
head: () => ({
bodyAttrs: {
class: 'type-blog'
}
})
}
</script>

<style></style>
@@ -1,68 +1,37 @@
<template>
<div class="container">
<div>
<logo />
<h1 class="title">
bitbull-nuxt
</h1>
<h2 class="subtitle">
My terrific Nuxt.js project
</h2>
<div class="links">
<a href="https://nuxtjs.org/" target="_blank" class="button--green">
Documentation
</a>
<a
href="https://github.com/nuxt/nuxt.js"
target="_blank"
class="button--grey"
>
GitHub
</a>
<section class="home-section mission">
<div class="mission__text">
<h1 class="mission__title"></h1>
</div>
</div>
<img src="~assets/images/tree.svg" class="mission__image js-tree" title="" />
</section>

<section class="home-section partnership">
<div class="partnership__img"></div>
<div class="partnership__text partnership__text--aws">
<h3 class="partnership__title"></h3>
</div>
<div class="partnership__img"></div>
<div class="partnership__text">
<h3 class="partnership__title"></h3>
</div>
</section>

<section class="home-section">
<a id="team" href="#" class="anchor"></a>
<h2></h2>
<ul class="team-list">
<li class="team-list__member"></li>
</ul>
</section>

<section class="home-section contact-us"></section>
</div>
</template>

<script>
import Logo from '~/components/Logo.vue'
export default {
components: {
Logo
}
}
export default {}
</script>

<style>
.container {
margin: 0 auto;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
text-align: center;
}
.title {
font-family: 'Quicksand', 'Source Sans Pro', -apple-system, BlinkMacSystemFont,
'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
display: block;
font-weight: 300;
font-size: 100px;
color: #35495e;
letter-spacing: 1px;
}
.subtitle {
font-weight: 300;
font-size: 42px;
color: #526488;
word-spacing: 5px;
padding-bottom: 15px;
}
.links {
padding-top: 15px;
}
</style>
<style></style>

0 comments on commit 9f18d0d

Please sign in to comment.