<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: antinomezco</title>
    <description>The latest articles on DEV Community by antinomezco (@antinomezco).</description>
    <link>https://dev.to/antinomezco</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F806034%2F88cb9273-6293-4601-8c64-890ba5013ab0.jpeg</url>
      <title>DEV Community: antinomezco</title>
      <link>https://dev.to/antinomezco</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/antinomezco"/>
    <language>en</language>
    <item>
      <title>Create a simple portfolio page using Nuxt and Bootstrap-vue</title>
      <dc:creator>antinomezco</dc:creator>
      <pubDate>Sun, 13 Feb 2022 04:00:33 +0000</pubDate>
      <link>https://dev.to/antinomezco/create-a-simple-portfolio-page-using-nuxt-and-bootstrap-vue-3il2</link>
      <guid>https://dev.to/antinomezco/create-a-simple-portfolio-page-using-nuxt-and-bootstrap-vue-3il2</guid>
      <description>&lt;p&gt;Starting out in web development is not easy, especially when you don't have a space where you can show off the projects you've worked on.&lt;/p&gt;

&lt;p&gt;In this tutorial, I'll show you how to create a simple personal portfolio that looks like &lt;a href="https://csaldana.xyz/" rel="noopener noreferrer"&gt;this&lt;/a&gt;, which you can easily customize/expand upon to fit your needs. The project will use Nuxt v2, Bootstrap-vue and Google Fonts.&lt;/p&gt;

&lt;p&gt;I'll be partitioning this portfolio page into several Vue components and going through them one at a time. I won't regurgitate concepts in this tutorial if there's a link for its documentation. For any unmentioned bootstrap component attributes, please check its component reference from the appropriate &lt;a href="https://bootstrap-vue.org/docs/components" rel="noopener noreferrer"&gt;link&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;First, we need to install &lt;a href="https://nuxtjs.org/docs/get-started/installation/" rel="noopener noreferrer"&gt;Nuxt&lt;/a&gt; by typing out the following command into the terminal: &lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm init nuxt-app personal-portfolio-nuxt&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;It will ask you some questions.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Name: [Type whichever name you want or leave it blank to use its default, 'personal-portfolio-nuxt']&lt;/li&gt;
&lt;li&gt;Programming language: JavaScript&lt;/li&gt;
&lt;li&gt;Package manager: npm&lt;/li&gt;
&lt;li&gt;UI Framework: Bootstrap&lt;/li&gt;
&lt;li&gt;Nuxt JS modules: None (you can always add them later if you want)&lt;/li&gt;
&lt;li&gt;Rendering mode: Universal (SSR / Static)&lt;/li&gt;
&lt;li&gt;Deployment target: Static (Static/JAMStack hosting)&lt;/li&gt;
&lt;li&gt;Development tools: jsconfig.json&lt;/li&gt;
&lt;li&gt;Continuous Integration: None&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After successfully creating the app, you can delete the Store folder. Then, install &lt;a href="https://google-fonts.nuxtjs.org/" rel="noopener noreferrer"&gt;Google Fonts&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install --save-dev @nuxtjs/google-fonts&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;Then, add the following edit:&lt;/p&gt;

&lt;p&gt;nuxt.config.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;googleFonts: {
    families: {
      Arvo: true,
      'Open+Sans': true,
      'Roboto+Slab' : true,
    }
  }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above is an example of the fonts I used, feel free change fonts by reading its documentation &lt;a href="https://google-fonts.nuxtjs.org/options" rel="noopener noreferrer"&gt;here&lt;/a&gt;, the fonts available can be searched for &lt;a href="https://fonts.google.com/" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You should be starting out with the following directory structure:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhoz7dfuuh07p6v7fe9m3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhoz7dfuuh07p6v7fe9m3.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, we'll be creating our vue components as such:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0l1kktkwugtgfaai41du.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0l1kktkwugtgfaai41du.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now copy the code below and put it into each of the newly created component files.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;template&amp;gt;

&amp;lt;/template&amp;gt;

&amp;lt;script&amp;gt;
export default {

}
&amp;lt;/script&amp;gt;

&amp;lt;style&amp;gt;

&amp;lt;/style&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With that done, I ask that you type out the code for each component and read the documentation on anything you're unsure of. It goes without saying that the code mentioned below is a starting point, so feel free to play around with it to better your understanding.&lt;/p&gt;

&lt;h2&gt;
  
  
  index.vue
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;template&amp;gt;
  &amp;lt;b-container tag="main" fluid class="px-0" style="overflow-x: hidden"&amp;gt;
    &amp;lt;Intro /&amp;gt;
    &amp;lt;Skills /&amp;gt;
    &amp;lt;PhotoDesc /&amp;gt;
    &amp;lt;Projects /&amp;gt;
    &amp;lt;Footer /&amp;gt;
  &amp;lt;/b-container&amp;gt;
&amp;lt;/template&amp;gt;

&amp;lt;style&amp;gt;

.title-text {
  font-size: 3rem;
  font-family: 'Arvo';
}

.regular-text {
  font-family: 'Open Sans';
}

.link-text {
  font-family: "Roboto Slab";
}

.purple {
  color: purple;
}

&amp;lt;/style&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you have all of your components and "index.vue" as shown above, we're going to start simple and add &lt;a href="https://bootstrap-vue.org/docs/components/layout#containers-b-container" rel="noopener noreferrer"&gt;&lt;/a&gt; as a basic layout element of our project.&lt;/p&gt;

&lt;p&gt;As an aside, knowing what are HTML tags is important as well, more info &lt;a href="https://www.w3schools.com/TAGS/default.ASP" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;b-container attributes are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;tag="main"&lt;/code&gt;, (&lt;a href="https://www.w3schools.com/tags/tag_main.asp" rel="noopener noreferrer"&gt;why a main tag?&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;class="px-0"&lt;/code&gt;, to remove default padding&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;style="overflow-x: hidden"&lt;/code&gt;, to remove the horizontal overflow from using the above px-0&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As for the CSS styles that I used, feel free to change them if you want to use different fonts, font sizing or font color.&lt;/p&gt;

&lt;p&gt;For more information on CSS scopes, read &lt;a href="https://vue-loader.vuejs.org/guide/scoped-css.html" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Intro.vue
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  &amp;lt;template&amp;gt;
    &amp;lt;header&amp;gt;
      &amp;lt;b-row class="vh-100 text-center justify-content-center" &amp;gt;
        &amp;lt;b-col md="6" sm="10" cols="12" class="align-self-center"&amp;gt;
            &amp;lt;p class="name-container"&amp;gt;
              Hello, my name is &amp;lt;span class="purple"&amp;gt;YOUR NAME HERE&amp;lt;/span&amp;gt;, web
              developer.
            &amp;lt;/p&amp;gt;
            &amp;lt;!--- &amp;lt;BaseScrollTo desc="Would you like to know more?" variantColor="outline-dark" descendTo="skills"/&amp;gt; ---&amp;gt;
        &amp;lt;/b-col&amp;gt;
      &amp;lt;/b-row&amp;gt;
    &amp;lt;/header&amp;gt;
  &amp;lt;/template&amp;gt;

  &amp;lt;style scoped&amp;gt;

  .name-container {
    font-family: 'Arvo';
    font-size: 250%;
  }
  &amp;lt;/style&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Regarding &lt;code&gt;b-row&lt;/code&gt; and &lt;code&gt;b-col&lt;/code&gt;, if you're starting out with Bootstrap, I recommend that you read their grid documentation &lt;a href="https://bootstrap-vue.org/docs/components/layout" rel="noopener noreferrer"&gt;here&lt;/a&gt; to better understand their grid row and column system. Same for its Flex utilities &lt;a href="https://getbootstrap.com/docs/4.0/utilities/flex/" rel="noopener noreferrer"&gt;here&lt;/a&gt;, useful for layout, alignments and more (example: &lt;code&gt;justify-content-center&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Since each component is its own page section, we'll be adding the approriate tag to each one. For a header, it's &lt;code&gt;&amp;lt;header&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;b-row attributes are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;vh-100&lt;/code&gt;, for making the vertical size of the row 100% of the browser window, which is useful because this component is rather empty, so there's not much content to make it bigger vertically without it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;b-cols attributes are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cols&lt;/code&gt;, &lt;code&gt;sm&lt;/code&gt;, &lt;code&gt;md&lt;/code&gt;, &lt;code&gt;xl&lt;/code&gt;, click &lt;a href="https://bootstrap-vue.org/docs/components/layout#columns-b-col" rel="noopener noreferrer"&gt;here&lt;/a&gt; for more info. The column size gets bigger the smaller the screen is for a better viewing experience on smaller screens.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ignore the commented &lt;code&gt;&amp;lt;BaseScrollTo&amp;gt;&lt;/code&gt; tag for now, it'll be explained at a later point.&lt;/p&gt;

&lt;h2&gt;
  
  
  Skills.vue
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;template&amp;gt;
  &amp;lt;section class="skills-container"&amp;gt;
    &amp;lt;b-row&amp;gt;
      &amp;lt;b-col class="text-center"&amp;gt;
        &amp;lt;p class="title-text pb-3" id="skills"&amp;gt;Skills&amp;lt;/p&amp;gt;
        &amp;lt;p class="regular-text p-2"&amp;gt;
          Besides the usual JavaScript, HTML and CSS skills...
        &amp;lt;/p&amp;gt;
      &amp;lt;/b-col&amp;gt;
    &amp;lt;/b-row&amp;gt;
    &amp;lt;b-row class="justify-content-center"&amp;gt;
      &amp;lt;b-col lg="6" md="8" sm="10" cols="12" class="text-center"&amp;gt;
        &amp;lt;div class="d-flex flex-wrap"&amp;gt;
          &amp;lt;div v-for="skill in skills" :key="skill.title" class="m-auto"&amp;gt;
            &amp;lt;b-link target="_blank" class="p-3" :href="skill.web"&amp;gt;
              &amp;lt;b-img
                height="100"
                weight="100"
                :src="require(`../assets/images/${skill.title}.webp`)"
                :alt="skill.alt"
                :title="skill.alt"
              /&amp;gt;
            &amp;lt;/b-link&amp;gt;
            &amp;lt;p class="p-2 font-weight-bold"&amp;gt;{{ skill.alt }}&amp;lt;/p&amp;gt;
          &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;!--- &amp;lt;BaseScrollTo desc="Who Am I?" variantColor="primary" descendTo="photo" /&amp;gt; ---&amp;gt;
      &amp;lt;/b-col&amp;gt;
    &amp;lt;/b-row&amp;gt;
  &amp;lt;/section&amp;gt;
&amp;lt;/template&amp;gt;

&amp;lt;script&amp;gt;
export default {
  data() {
    return {
      skills: [
        { title: 'vue', alt: 'Vue.js', web: 'https://vuejs.org/v2/guide/' },
        { title: 'bootstrap-vue', alt: 'BootstrapVue', web: 'https://bootstrap-vue.org/' },
        { title: 'git', alt: 'Git', web: 'https://git-scm.com/' },
      ],
    }
  },
}
&amp;lt;/script&amp;gt;

&amp;lt;style scoped&amp;gt;
.skills-container {
  background-color: orange;
  padding: 200px 0 100px;
  -webkit-clip-path: polygon(0 12%, 100% 0%, 100% 100%, 0 100%);
  clip-path: polygon(0 12%, 100% 0%, 100% 100%, 0 100%);
}
&amp;lt;/style&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For more information regarding &lt;code&gt;clip-path&lt;/code&gt;, read &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/clip-path" rel="noopener noreferrer"&gt;here&lt;/a&gt;, and use the link, &lt;a href="https://bennettfeely.com/clippy/" rel="noopener noreferrer"&gt;here&lt;/a&gt;, for an easy way to get the clip path you want. I used them mainly because of their look but YMMD.&lt;/p&gt;

&lt;p&gt;You can use &lt;code&gt;v-for&lt;/code&gt; if you're repeating something, such as a list of information, but don't want to repeat the code for each one. For more information regarding v-for, read &lt;a href="https://v2.vuejs.org/v2/guide/list.html" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As a reminder, any attribute with a colon beforehand (such as &lt;code&gt;:src&lt;/code&gt;) is a &lt;code&gt;v-bind&lt;/code&gt; shorthand, read &lt;a href="https://v2.vuejs.org/v2/guide/syntax.html" rel="noopener noreferrer"&gt;here&lt;/a&gt;, to dynamically fill in information from the object being iterated. As for &lt;code&gt;${}&lt;/code&gt;, those are JavaScript template literals, you can find out more &lt;a href="https://www.w3schools.com/js/js_string_templates.asp" rel="noopener noreferrer"&gt;here&lt;/a&gt;. Finally, if you're using local files for your images, you need to use &lt;code&gt;require&lt;/code&gt; plus the source file between parentheses, read &lt;a href="https://andrewray.me/blog/webpack-when-to-use-and-why#what-does-webpack-actually-do" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;You can observe above, that the images necessary for the v-for directive are stored in the &lt;code&gt;assets/images&lt;/code&gt; directory.&lt;/p&gt;

&lt;h2&gt;
  
  
  Photodesc.vue
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;template&amp;gt;
  &amp;lt;section class="hero" id="photo"&amp;gt;
    &amp;lt;p class="text-center title-text text-white"&amp;gt;Who am I?&amp;lt;/p&amp;gt;
    &amp;lt;b-row class="d-flex justify-content-center"&amp;gt;
      &amp;lt;b-col lg="3" md="5" sm="6" cols="6" class="d-flex justify-content-center justify-content-md-end py-4"&amp;gt;
        &amp;lt;PhotoDescImage /&amp;gt;
      &amp;lt;/b-col&amp;gt;
      &amp;lt;b-col lg="4" md="6" sm="8" cols="10" class="d-flex align-items-center"&amp;gt;
        &amp;lt;p class="font-weight-bold text-white regular-text"&amp;gt;Write small biography about yourself and your web development skills here.&amp;lt;/p&amp;gt;
      &amp;lt;/b-col&amp;gt;
    &amp;lt;/b-row&amp;gt;
    &amp;lt;!--- &amp;lt;BaseScrollTo desc="Check out my projects" variantColor="outline-light" descendTo="projects"/&amp;gt; ---&amp;gt;
  &amp;lt;/section&amp;gt;
&amp;lt;/template&amp;gt;

&amp;lt;style scoped&amp;gt;
.hero {
  background-color: black;
  padding-bottom: 200px;
  padding-top: 100px;
  -webkit-clip-path: polygon(0 0, 100% 0%, 100% 100%, 0 79%);
  clip-path: polygon(0 0, 100% 0%, 100% 100%, 0 79%);
}
&amp;lt;/style&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Compared to the last component, there are only a couple of new things to take into account. &lt;/p&gt;

&lt;p&gt;First, &lt;code&gt;PhotoDescImage&lt;/code&gt;, which I'm using as a way to show how you can use components within components. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PhotoDescImage.vue&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;template&amp;gt;
  &amp;lt;b-img
    thumbnail
    class="p-2"
    rounded="circle"
    src="../assets/images/myself.jpg"
    style="height: 175px; width: 175px"
  /&amp;gt;
&amp;lt;/template&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's a component containing a simple image. I really don't need to separate it as such, but it's for demonstration purposes. You'd just need to put the proper image in the appropriate directory.&lt;/p&gt;

&lt;p&gt;Second, the columns are arranged in such a way that when reducing the screen size, the columns will expand their sizes until they together they go over the layout limit and the second column will be pushed underneath. This is a wanted behavior to more property arrange contents for tablets or mobile.&lt;/p&gt;

&lt;h2&gt;
  
  
  Projects.vue
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;template&amp;gt;
  &amp;lt;section class="Projects px-5"&amp;gt;
    &amp;lt;b-row class="justify-content-center"&amp;gt;
      &amp;lt;b-col lg="6" md="8" sm="10" cols="12"&amp;gt;
        &amp;lt;p class="text-center title-text pb-3" id="projects"&amp;gt;
          Projects and/or Experience
        &amp;lt;/p&amp;gt;
      &amp;lt;/b-col&amp;gt;
    &amp;lt;/b-row&amp;gt;
    &amp;lt;b-row v-for="box in boxes" :key="box.name" class="boxes pb-5 justify-content-center"&amp;gt;
      &amp;lt;b-col lg="5" md="6" cols="12"&amp;gt;
        &amp;lt;div class="font-size-biggish purple"&amp;gt;
          {{ box.title }}
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="regular-text"&amp;gt;
          &amp;lt;p&amp;gt;
            {{ box.desc }}
          &amp;lt;/p&amp;gt;
          &amp;lt;p&amp;gt;
            Technologies used: &amp;lt;span&amp;gt; {{ box.tech }}&amp;lt;/span&amp;gt;
          &amp;lt;/p&amp;gt;
        &amp;lt;/div&amp;gt;
        &amp;lt;div class="d-flex align-items-center"&amp;gt;
          &amp;lt;div v-if="box.link"&amp;gt;
            &amp;lt;b-button variant="outline-dark" class="link-text mr-2 mr-lg-5 purple" :href="box.link" target="_blank"&amp;gt;Live demo&amp;lt;/b-button&amp;gt;
          &amp;lt;/div&amp;gt;
          &amp;lt;div v-if="box.source"&amp;gt;
            &amp;lt;b-button variant="link" class="font-size-biggish link-text text-decoration-none" :href="box.source" target="_blank"&amp;gt;
              Source Code
            &amp;lt;/b-button&amp;gt;
          &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/b-col&amp;gt;
      &amp;lt;b-col lg="5" md="6" sm="12" cols="12" class="pt-3"&amp;gt;
        &amp;lt;div class=""&amp;gt;
          &amp;lt;a :href="box.link" target="_blank"&amp;gt;
            &amp;lt;b-img
              fluid-grow
              rounded
              :src="require(`../assets/images/${box.name}.png`)"
              alt=""
            /&amp;gt;
          &amp;lt;/a&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/b-col&amp;gt;
    &amp;lt;/b-row&amp;gt;
  &amp;lt;/section&amp;gt;
&amp;lt;/template&amp;gt;

&amp;lt;script&amp;gt;
export default {
  data() {
    return {
      boxes: [
        {
          id: 1,
          name: 'recipe',
          title: 'Project 1',
          link: 'https://google.com',
          source: 'https://google.com',
          tech: 'VueJS, Firebase, Auth0',
          desc: 'Project 1 description',
        },
        {
          id: 2,
          name: 'reciperest',
          title: 'Project 2',
          link: 'https://google.com',
          source: 'https://google.com',
          tech: 'Django, Postgres, Rest',
          desc: 'Project 2 description',
        },
        {
          id: 3,
          name: 'portfolio',
          title: 'Project 3',
          link: 'https://google.com',
          source: 'https://google.com',
          tech: 'VueJS, Boostrap-vue',
          desc: 'Project 3 description',
        },
      ],
    }
  },
}
&amp;lt;/script&amp;gt;

&amp;lt;style scoped&amp;gt;
.font-size-biggish {
  font-size: 1.3rem;
}
&amp;lt;/style&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This may seem like a lot of code, but if you've read on all the attributes from the previous components, hardly anything new beyond &lt;code&gt;v-if&lt;/code&gt;, more info &lt;a href="https://v2.vuejs.org/v2/guide/conditional.html" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  BaseScrollTo.vue
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;template&amp;gt;
  &amp;lt;b-button :variant="variantColor" class="mx-auto d-flex justify-content-center link-text text font-weight-bold" @click="scroll(descendTo)"&amp;gt;
    {{ desc }}
  &amp;lt;/b-button&amp;gt;
&amp;lt;/template&amp;gt;

&amp;lt;script&amp;gt;
export default {
  props: {
    desc: String,
    descendTo: String,
    variantColor: String
  },
  methods: {
    scroll(descendTo) {
      document.getElementById(descendTo).scrollIntoView({
        behavior: 'smooth',
      })
    },
  },
}
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, we get to the mystery component. It's a button customizable by props, that scrolls down to the following component. For more information on props, read &lt;a href="https://v2.vuejs.org/v2/guide/components.html#Passing-Data-to-Child-Components-with-Props" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Showing the BaseScrollTo from &lt;code&gt;Intro.vue&lt;/code&gt;, can you infer where the prop strings below fit into the code above?&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;BaseScrollTo desc="Would you like to know more?" variantColor="outline-dark" descendTo="skills"/&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The answer is as follows: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;desc&lt;/code&gt;, it's simple text interpolation using double curly braces, &lt;code&gt;{{ desc }}&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;variantColor&lt;/code&gt;, it uses the value coming from the parent component into the dynamic child component.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;descendTo&lt;/code&gt;, same as above but using it as a value function for a JavaScript method. For more information on methods, read &lt;a href="https://v2.vuejs.org/v2/guide/events.html" rel="noopener noreferrer"&gt;here&lt;/a&gt;. On getElementById, read &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById" rel="noopener noreferrer"&gt;here&lt;/a&gt;. Finally, on scrollIntoView, read &lt;a href="https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Test this out by uncommenting the "propable" BaseScrollTo component in the components above.&lt;/p&gt;

&lt;h2&gt;
  
  
  Footer.vue
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;template&amp;gt;
  &amp;lt;footer class="footer"&amp;gt;
    &amp;lt;b-row class="justify-content-center"&amp;gt;
      &amp;lt;b-col class="d-flex justify-content-center"&amp;gt;
        &amp;lt;div class="py-5"&amp;gt;
          &amp;lt;div @click="scroll()"&amp;gt;
            &amp;lt;b-img
              class="footer-icons"
              src="../assets/images/up-arrow.png"
              alt=""
            /&amp;gt;
          &amp;lt;/div&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/b-col&amp;gt;
    &amp;lt;/b-row&amp;gt;
    &amp;lt;b-row class="justify-content-center"&amp;gt;
      &amp;lt;b-col class="d-flex justify-content-center"&amp;gt;
        &amp;lt;div&amp;gt;
          &amp;lt;a
            :href="bottomLink.href"
            target="_blank"
            v-for="bottomLink in bottomLinks"
            :key="bottomLink.title"
            &amp;gt;&amp;lt;img
              class="px-lg-5 px-2"
              :src="require(`../assets/images/${bottomLink.srcImage}.webp`)"
              :title="bottomLink.title"
          /&amp;gt;&amp;lt;/a&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/b-col&amp;gt;
    &amp;lt;/b-row&amp;gt;
  &amp;lt;/footer&amp;gt;
&amp;lt;/template&amp;gt;

&amp;lt;script&amp;gt;
export default {
  data() {
    return {
      bottomLinks: [
        {
          title: 'Github',
          srcImage: 'github',
          href: 'https://github.com/username',
        },
        {
          title: 'Resumé',
          srcImage: 'cv',
          href: 'resume link here',
        },
        {
          title: 'LinkedIn',
          srcImage: 'linkedin',
          href: 'https://www.linkedin.com/in/username',
        },
      ],
    }
  },
  methods: {
    scroll() {
      window.scrollTo({
        top: 0,
        behavior: 'smooth',
      })
    },
  },
}
&amp;lt;/script&amp;gt;

&amp;lt;style scoped&amp;gt;
.footer {
  background-color: black;
}

.footer-icons {
  cursor: pointer;
}
&amp;lt;/style&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, we end with the footer. The differences here being that we're using a footer tag instead of a section and an image that scrolls you to the top when clicked instead of the &lt;code&gt;BaseScrollTo&lt;/code&gt; component we've been using. &lt;/p&gt;

&lt;p&gt;We can still reuse &lt;code&gt;BaseScrollTo&lt;/code&gt; here, but we'd need to do some changes. Do you know what to change? (hint: we'd need to add an additional prop for it being a button or an image and a &lt;code&gt;v-if&lt;/code&gt; that takes this additional prop into account).&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;And we're done. You only need to deploy it with your favorite online hosting, such as Netlify &lt;a href="https://nuxtjs.org/deployments/netlify/" rel="noopener noreferrer"&gt;here&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;There are certainly some changes that can be made to improve upon this portfolio, maybe adding a navigation bar, having the images be hosted in a CDN instead of being served alongside the website, having separate pages instead of a single one or using try catch to prevent the website from crashing during build if the approriate referenced image is not available. I'm keeping it simple, but you're free to improve upon it to your liking as mentioned at the beginning of the article.&lt;/p&gt;

&lt;p&gt;It's my first time writing a tutorial, so let me know any feedback you may have through private message.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>vue</category>
      <category>bootstrap</category>
    </item>
  </channel>
</rss>
