Git Product home page Git Product logo

nuxt-basic-blog's Introduction

Hi there ๐Ÿ‘‹

I'm a Full Stack developer working with VueJS & Laravel

  • ๐Ÿ› ๏ธ I build systems and websites using VueJS & Laravel.
  • ๐Ÿ”ญ Iโ€™m currently working on laravelvuespa.com.
  • โœ๏ธ I write about Javascript, Laravel & VueJS at redfern.dev.
  • ๐Ÿ“ซ How to reach me: @garethredfern on twitter.

nuxt-basic-blog's People

Contributors

garethredfern avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

nuxt-basic-blog's Issues

2 problems in article "Adding Pagination to a Nuxt Blog"

Hi garethredfern

I found your solution on pagination in nuxt content blog: Adding Pagination to a Nuxt Blog, it really helps a lot!

However I encountered 2 problems.

One is that the "getContent" method might return invalid data.

// use the % (modulus) operator to get a whole remainder
const lastPageCount = totalArticles % perPage;

When totalArticles % perPage == 0 , the lastPageCount is 0, which is not right, I suggest you change it to the following code

// use the % (modulus) operator to get a whole remainder
const lastPageCount = totalArticles % perPage == 0? perPage: totalArticles % perPage;

Problem number two is the <pagination/> component, in your article, you used Math.floor(this.total / this.perPage) for totalPages, actually this should be Math.ceil(this.total / this.perPage), and I saw that you have corrected this in the source code, but not in your article.

I would really appreciate it if you could modify your article. And thanks again for writing this amazing solution!

Nuxt 3

I'm looking for exactly this, but for Nuxt 3, hopefully you can update this for Nuxt 3.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.