GithubHelp home page GithubHelp logo

spring's Introduction

Spring - HTML5 Publishing

A minimalistic framework for HTML5 based publishing, Simple HTML5 written with HTML, Javascript.

Features

  1. Cover

  2. Table of content (Section page)

  3. Swipe View - to switch between pages, minimal memory footprint, event hooks, pagination with current index and pages in buffer.

  4. Responsive Grid layout

  5. UI - Photoshop template for icon, startup screen - Toolbar - Menu - Buttons - Popover - Modal

  6. Components - Full screen gallery mobile friendly

Dependencies

  • zepto
  • pjax
  • scrollability
  • hammer.js (multi touch gestures)

Grid system

This is using a 1000px grid system for layout. It makes percentage/pixel based conversation very simple.

1000px grid

Layout & Rendering

Basic part of the rendering engine is based on the grid system listed above with 3 primary item layouts

CSS classes, combination of these should be able to build rather complex layout for different devices.

  • Width: full, half, third, third-2 (two third)
  • Height: v-half, v-third, v-third2 (two third)
  • Columns: col, col.half, col.third, col.third-2

Row

Column

Markup

body
  nav#menu
    
  div[role=main]
    
    #sections
      header.toolbar
      div.pages
        div.page
        ...
    
    #content
      header.toolbar
      div.pages
        div.page
        ...

Web layout

web layout

Example

.row
  .col.half
    .item.v-half
    .item.v-half
    
  .col.half
    .item

Ipad

Landscape view has similar dimension like a web view, except the primary rendering type should be split view, combining with couple of variations.

ipad layout

Example

.row
  .col.half
    .item.v-third
    
  .col.half
    .item.v-third-2

Combining different width/height classes on col to achieve a more complex layout

ipad layout

Portrait view has mostly vertically split views

ipad layout

.row.v-half
  .item.v-third

.row.v-half
  .col.half
    .item
    
  .col.half
    .item.v-half
    .item.v-half

Item Style

Scaling upon screen size

demo: http://www.spookandpuff.com/examples/dynamicTextSize.html Stackoverflow: http://stackoverflow.com/questions/5358183/is-it-possible-to-dynamically-scale-text-size-based-on-browser-width

Image centering

Stackoverflow: http://stackoverflow.com/questions/489340/how-do-i-vertically-align-text-next-to-an-image-with-css Demo: http://jsfiddle.net/458BN/23/

EM and PX conversion in SASS https://forrst.com/posts/SASS_px_to_em_and_em_to_px-JAd

Split

Dynamic paging

In order to create dynamic paging that is response and support horizontal scrolling, we need to create pages

  • Load 10 products per page load
  • Push into a local buffer
  • Lazy load additional page via ajax

Scrolling

Pagination

Speed, simplicity, responsive

Unlike treesaver which will cut off contents, This pagination will put items into pages.

.pages

  .row
    .item.full

  .row
    .item.half
    .item.half
  
  .row
    .item.third
    .item.third
    .item.third
  
  .row
    .col.half
      .item-1
      .item-2
      .item-3

    .col.half
      .item
  
    .item
  .row

page count
pagination bar

Compile offline Issue

/holiday
  contents/
  assets/
  index.html
  toc.html
  menu.html
  issue.json      

  
  issue.yaml
  data/
    toc.md

spring's People

Contributors

khoan avatar markgk629 avatar speedmax avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

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.