Convert Figma logo to code with AI

hutuxuhui logojackblog-vue

Jackblog vue 版, 个人博客系统, 使用 vue2, vuex, vue-resource, vue-router, vee-validate, vue-toast 等.

1,941
453
1,941
2

Top Related Projects

209,052

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

236,798

The library for web and native user interfaces.

98,226

Deliver web apps with confidence 🚀

83,224

web development for the rest of us

57,427

The Intuitive Vue Framework.

55,893

The best React-based framework with performance, scalability and security built in.

Quick Overview

Jackblog-vue is a single-page application (SPA) blog built using Vue.js. It serves as a frontend implementation of the Jackblog project, which is a full-stack blog system. This repository focuses on the Vue.js frontend, providing a modern and responsive user interface for the blog.

Pros

  • Built with Vue.js, offering a reactive and component-based architecture
  • Implements Vue Router for seamless navigation between blog pages
  • Utilizes Vuex for state management, ensuring efficient data flow
  • Responsive design, suitable for various screen sizes and devices

Cons

  • Limited documentation, which may make it challenging for new contributors
  • Dependency on a separate backend API, requiring additional setup
  • Relatively old project (last updated in 2017), potentially using outdated dependencies
  • Lack of recent updates or maintenance, which could lead to compatibility issues with newer Vue.js versions

Getting Started

To get started with jackblog-vue:

  1. Clone the repository:

    git clone https://github.com/hutuxuhui/jackblog-vue.git
    
  2. Install dependencies:

    cd jackblog-vue
    npm install
    
  3. Configure the API endpoint in src/api/resources.js:

    export const API_ROOT = (process.env.NODE_ENV === 'production')
      ? 'https://api.jackhu.top/'
      : 'http://localhost:3000/'
    
  4. Run the development server:

    npm run dev
    
  5. Build for production:

    npm run build
    

Note: Ensure you have the backend API running and properly configured before starting the frontend application.

Competitor Comparisons

209,052

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

Pros of Vue

  • Larger community and more extensive documentation
  • More comprehensive framework with built-in routing and state management
  • Higher performance and better scalability for large applications

Cons of Vue

  • Steeper learning curve for beginners
  • More complex setup and configuration for small projects
  • Potentially overkill for simple applications or prototypes

Code Comparison

Vue (from Vue):

import { createApp } from 'vue'
import App from './App.vue'

createApp(App).mount('#app')

Jackblog-vue (from jackblog-vue):

import Vue from 'vue'
import App from './App'
import router from './router'
import store from './store'

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

The Vue example shows a more modern and concise approach using the Composition API, while jackblog-vue uses the older Vue 2 syntax with explicit router and store imports. Vue's approach is more streamlined and easier to maintain for larger projects.

Vue is a full-fledged framework suitable for building complex applications, offering better performance and scalability. Jackblog-vue, being a blog application, is more focused and potentially easier to set up for specific use cases. However, it may lack the flexibility and extensive ecosystem that Vue provides for diverse project requirements.

236,798

The library for web and native user interfaces.

Pros of React

  • Massive ecosystem and community support
  • Extensive documentation and learning resources
  • Backed by Facebook, ensuring long-term maintenance and updates

Cons of React

  • Steeper learning curve for beginners
  • Requires additional libraries for full-featured applications
  • More complex setup and configuration compared to Jackblog-vue

Code Comparison

React component example:

function Welcome(props) {
  return <h1>Hello, {props.name}</h1>;
}

const element = <Welcome name="Sara" />;

Jackblog-vue component example:

<template>
  <h1>Hello, {{ name }}</h1>
</template>

<script>
export default {
  props: ['name']
}
</script>

React focuses on a JavaScript-centric approach, while Jackblog-vue uses a more template-based structure. React's JSX syntax allows for more flexibility in component composition, but Jackblog-vue's single-file components offer a cleaner separation of concerns.

React's extensive ecosystem provides more tools and libraries for complex applications, while Jackblog-vue offers a simpler, more opinionated structure suitable for smaller projects or quick prototyping.

Overall, React is better suited for large-scale applications with complex state management, while Jackblog-vue may be more appropriate for smaller projects or developers who prefer a more straightforward Vue.js-based approach.

98,226

Deliver web apps with confidence 🚀

Pros of Angular

  • Comprehensive framework with built-in features for large-scale applications
  • Strong TypeScript support and tooling ecosystem
  • Extensive documentation and community resources

Cons of Angular

  • Steeper learning curve compared to Vue.js
  • More verbose and complex for smaller projects
  • Potentially slower performance due to its size and complexity

Code Comparison

Angular (component example):

@Component({
  selector: 'app-root',
  template: `
    <h1>{{title}}</h1>
    <button (click)="onClick()">Click me</button>
  `
})
export class AppComponent {
  title = 'My Angular App';
  onClick() { console.log('Button clicked!'); }
}

Jackblog-vue (component example):

<template>
  <div>
    <h1>{{ title }}</h1>
    <button @click="onClick">Click me</button>
  </div>
</template>

<script>
export default {
  data() { return { title: 'My Vue App' } },
  methods: { onClick() { console.log('Button clicked!') } }
}
</script>

Angular offers a more structured approach with decorators and TypeScript, while Jackblog-vue uses Vue.js's simpler template and script structure. Angular's syntax is more verbose but provides stronger typing, whereas Vue.js focuses on simplicity and ease of use for smaller to medium-sized projects.

83,224

web development for the rest of us

Pros of Svelte

  • More active development with frequent updates and a larger community
  • Compiler-based approach leads to smaller bundle sizes and better performance
  • Comprehensive documentation and learning resources

Cons of Svelte

  • Steeper learning curve for developers familiar with traditional frameworks
  • Fewer third-party libraries and components compared to Vue ecosystem

Code Comparison

Svelte component:

<script>
  let count = 0;
  function increment() {
    count += 1;
  }
</script>

<button on:click={increment}>
  Clicks: {count}
</button>

Jackblog-vue component:

<template>
  <button @click="increment">
    Clicks: {{ count }}
  </button>
</template>

<script>
export default {
  data() {
    return { count: 0 };
  },
  methods: {
    increment() {
      this.count++;
    }
  }
};
</script>

Svelte's syntax is more concise, with less boilerplate code compared to Vue. The reactive declarations in Svelte are simpler, as they don't require a separate data object or method definitions. However, Vue's template syntax may be more familiar to developers coming from other frameworks.

57,427

The Intuitive Vue Framework.

Pros of Nuxt

  • Larger, more active community with frequent updates and extensive documentation
  • Built-in server-side rendering and static site generation capabilities
  • More comprehensive framework with additional features like automatic code splitting

Cons of Nuxt

  • Steeper learning curve due to its extensive feature set
  • Potentially heavier and more complex for simple projects
  • May introduce unnecessary overhead for small-scale applications

Code Comparison

Nuxt (pages/index.vue):

<template>
  <div>
    <h1>{{ title }}</h1>
    <p>{{ description }}</p>
  </div>
</template>

<script>
export default {
  data() {
    return {
      title: 'Welcome to Nuxt',
      description: 'A Vue.js framework'
    }
  }
}
</script>

Jackblog-vue (src/components/Home.vue):

<template>
  <div class="home">
    <h1>{{ msg }}</h1>
  </div>
</template>

<script>
export default {
  name: 'Home',
  data () {
    return {
      msg: 'Welcome to Jackblog'
    }
  }
}
</script>

Summary

Nuxt offers a more comprehensive framework with built-in server-side rendering and static site generation, making it suitable for larger projects. However, it may be overkill for simpler applications. Jackblog-vue, being a smaller project, might be more straightforward for basic blog implementations but lacks the advanced features and extensive community support of Nuxt.

55,893

The best React-based framework with performance, scalability and security built in.

Pros of Gatsby

  • More robust and feature-rich static site generator with a larger ecosystem
  • Better performance optimization and built-in progressive web app capabilities
  • Extensive plugin system for easy integration of various functionalities

Cons of Gatsby

  • Steeper learning curve due to its complexity and reliance on GraphQL
  • Potentially slower build times for large sites compared to simpler Vue-based solutions
  • Heavier initial setup and configuration required

Code Comparison

Jackblog-vue (Vue.js component):

<template>
  <div class="article-list">
    <article v-for="article in articles" :key="article.id">
      <h2>{{ article.title }}</h2>
      <p>{{ article.excerpt }}</p>
    </article>
  </div>
</template>

Gatsby (React component):

import React from "react"
import { graphql } from "gatsby"

const ArticleList = ({ data }) => (
  <div className="article-list">
    {data.allMarkdownRemark.edges.map(({ node }) => (
      <article key={node.id}>
        <h2>{node.frontmatter.title}</h2>
        <p>{node.excerpt}</p>
      </article>
    ))}
  </div>
)

export const query = graphql`
  query ArticleListQuery {
    allMarkdownRemark {
      edges {
        node {
          id
          frontmatter {
            title
          }
          excerpt
        }
      }
    }
  }
`

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Jackblog Vue 版

Dependency Status devDependency Status

Jackblog 是使用 Node.js + MongoDB + 其它客户端框架开发的个人博客系统,前后端分离,仿简书模板.
服务端有: express 版 , koa 版
客户端有: angular1.x 版 , angular2.x 版 , react 版 , vue 版
移动端有: react native 版, ionic2.0 版

此为客户端vue版, 需要配合服务端使用.

服务端任选一种, 请预先安装并启动服务端

开发

$ git clone git@github.com:jackhutu/jackblog-vue.git
$ cd jackblog-vue
$ npm install
$ npm run dev

在浏览器中自动打开 http://localhost:3000

调试

目录结构

.
├── README.md           
├── dist                     // 项目build目录
├── logs                     // 生产环境日志目录
├── src                      // 生产目录
│   ├── api                  // API 请求
│   ├── assets               // css 和图片资源
│   ├── components           // 组件
│   ├── utils                // 工具函数
│   └── store            		 // vuex相关文件, store,action
│   └── config.js            // api url, cookie domain等配置文件
│   └── index.html           // 主页html
│   └── routes.js            // 路由配置
│   └── index.js             // 入口文件
├── .babelrc                 // babel配置
├── .eslintrc.json           // eslint配置
├── History.md               // 更新日志
├── process.json             // pm2配置文件
├── server.js                // 生产环境启动server
├── webpack.config.js        // Webpack 配置文件

生产环境构建

$ npm run build

线上布署

$ pm2 start process.json

License

MIT