All Projects → ckinmind → gallery-by-react

ckinmind / gallery-by-react

Licence: MIT license
🖼️ 一个React实现的图片画廊(附详细项目说明)

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to gallery-by-react

meiupic
简洁好用的多用户图片社区。
Stars: ✭ 165 (+511.11%)
Mutual labels:  gallery
chaos-sticker-collection
A collection of chaos event / nerd culture related stickers.
Stars: ✭ 36 (+33.33%)
Mutual labels:  gallery
ImagePicker
Android image picker
Stars: ✭ 17 (-37.04%)
Mutual labels:  gallery
MediaSliderView
Pure java based, highly customizable media slider gallery supporting both images and videos for android.
Stars: ✭ 85 (+214.81%)
Mutual labels:  gallery
Selfhosted-Google-Photos-Alternative
A complete guide on exiting Google, Amazon or any proprietary service Photos storage with all the features you would want.
Stars: ✭ 143 (+429.63%)
Mutual labels:  gallery
PrivateGalleryCreator
Create private extension galleries for Visual Studio
Stars: ✭ 96 (+255.56%)
Mutual labels:  gallery
Marquee
A powerful implementation of Marquee(scrolling text or label) in SwiftUI, which supports any content view, including text(label), image, video, etc.
Stars: ✭ 44 (+62.96%)
Mutual labels:  gallery
embla-carousel-wheel-gestures
wheel interactions for Embla Carousel
Stars: ✭ 30 (+11.11%)
Mutual labels:  gallery
SkyGallery
Create galleries by uploading images and videos. Powered by Sia Skynet.
Stars: ✭ 23 (-14.81%)
Mutual labels:  gallery
eyy-indexer
An image and video friendly directory indexer for web directories.
Stars: ✭ 53 (+96.3%)
Mutual labels:  gallery
fancybox
jQuery lightbox script for displaying images, videos and more. Touch enabled, responsive and fully customizable.
Stars: ✭ 7,261 (+26792.59%)
Mutual labels:  gallery
myphotoshare
MOVED TO GITLAB! --- A Web 2.0 Photo Gallery Done Right via Static JSON, Dynamic Javascript and a bit of php for sharing
Stars: ✭ 12 (-55.56%)
Mutual labels:  gallery
react-pig
Arrange images in a responsive, progressive-loading grid managed in JavaScript using CSS transforms.
Stars: ✭ 47 (+74.07%)
Mutual labels:  gallery
photos
"Fx Fotos" is an opensource gallery app in react native with the same smoothness and features of Google Photos and Apple Photos. It is backend gnostic and connects to decentralized backends like "box", "Dfinity", "Filecoin" and "Crust".
Stars: ✭ 620 (+2196.3%)
Mutual labels:  gallery
django-content-gallery
A Django application allows to attach a collection of images to objects of any model in any app
Stars: ✭ 18 (-33.33%)
Mutual labels:  gallery
react-fluid-gallery
Fluid media gallery for React powered by WebGL.
Stars: ✭ 75 (+177.78%)
Mutual labels:  gallery
vuerollr
Mouseover gallery plugin for Vue.js
Stars: ✭ 23 (-14.81%)
Mutual labels:  gallery
zipline
A ShareX/file upload server that is easy to use, packed with features, and with an easy setup!
Stars: ✭ 215 (+696.3%)
Mutual labels:  gallery
GelbooruEnhancement
Image Viewer and Endless Scroll userscripts for Gelbooru and various other boorus
Stars: ✭ 41 (+51.85%)
Mutual labels:  gallery
react-simple-image-viewer
Simple image viewer component for React
Stars: ✭ 44 (+62.96%)
Mutual labels:  gallery

一个React构建的图片画廊应用,在线访问:https://ckinmind.github.io/gallery-by-react/

项目说明

版本更新

  • 【v1.2】: 减少代码量,增强可读性,完善注释,详细更新说明 issue #4
  • 【v1.1】: 组件拆分,引入classnames,增强代码可读性,详细更新说明 issue #3
  • 【v1.0】: 原始版本,详细更新说明 issue #2

如何开始

clone到本地

> git clone https://github.com/ckinmind/many-react-demo.git

安装依赖

> npm install

运行开发环境项目

> npm start

打包输出到dist目录

> npm run dist

更多命令请参考 package.json 文件, 从头构建项目可以参考视频教程

目录说明

.
├── /cfg/                       # webpack配置文件存放目录
│   ├── base.js                 # 基础配置
│   ├── default.js              # 默认配置
│   ├── dev.js                  # 开发环境配置
|   ├── dist.js                 # 生成环境配置
│   └── test.js                 # 测试环境配置
├── /dist/                      # 存放最终打包输出的用于生产环境的项目文件
├── /node_modules/              # node模块存放的目录
├── /src/                       # 存放开发环境项目源码
│   ├── /actions/               # flux actions目录(没用到)
│   ├── /components/            # 组件目录
│   ├── /config/                # 配置目录(没用到)
│   ├── /sources/               # flux datasources目录(没用到)
│   ├── /stores/                # flux stores(没用到)
│   ├── /styles/                # 样式文件目录,内有一个App.css基础css文件
│   ├── index.html              # 项目入口文件
│   └── index.js                # js入口文件
├── /test/                      # 单元测试和集成测试目录
│── .babelrc                    # Babel 配置文件
│── .eslintrc                   # ESLint代码风格检测配置文件
│── .gitignore                  # 配置不需要加入Git版本管理的文件
│── .yo-rc.json                 # yeoman的配置文件
│── karma.conf.js               # karma测试框架的配置
│── LICENSE                     # 软件使用许可
│── package.json                # npm的依赖配置项
│── README.md                   # 项目说明文件
│── server.js                   # 项目运行的js文件,命令可查看package.json中的script
└── webpack.config.js           # webpack配置文件,不同环境的配置项在cfg目录下

部分扇区示意图

                          |------上扇区线-----|
                          |         |         |
         |—————舞台线—————|——-——————|—————————|————————————————————|
         |                |<--------|-------->|                    |
         |                |         |         |                    |
         |                |         |         |                    |
         |----------------|----  ___|____ ----|--------------------|
         |                      |        |                         |
         |                      | 中心图片|                         |
         |                      |________|                         |
         |                          |                              |
         |                          |                              |
         |                          |                              |
         |                          |                              |
         |——————————————————————————|—————舞台线———————————————————|
                                    |
                                   中轴线

ES5和ES6写法的不同点

创建组件

# ES5
Var AppComponent = React.createClass;

# ES6
class AppComponent extends React.Component{ }

定义组件初始化状态

# ES5
getInitialState: function(){
  return {
    name: 'ck'
  };
}

# ES6
constructor(props) {
  this.state = {
    name: 'ck'
  }
}

箭头函数

# ES5
Var getRangeRandom = function(low, high) {
  return Math.floor(Math.random() * (high - low) + low);
}

# ES6
let getRangeRandom = (low, high) =>  Math.floor(Math.random() * (high - low) + low );

Git命令说明

# 查看更改的文件
git satus

# 添加所有更改的文件进入本地暂存区
git add -A

# 提交暂存区到仓库区
git commit -m " message "

# 将本地仓库更新到远程仓库
git push

# 强制删除本地分支
git branch -D gh-pages

# 使用git的subtree将已有项目的某个目录分离成独立项目
# 并推送到分支 gh-pages
# prefix指定本地推送的目录
git subtree push --prefix=dist origin gh-pages
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].