Giter Site home page Giter Site logo

p2-responsive's Introduction

Responsive P2

A fluid and responsive child theme for P2.

I've tried to do as much as possible with CSS but there are a few things that had to be moved around in the markup, plus a bit of JS magic:

  • comments.php rename the comments function so it could be modified:
    • p2_responsive_comments place span.actions at the end of comments so it responds nicely.
  • entry.php again, move span.actions to after the_content so it responds nicely
  • footer.php nothing major here, just moving the sidebar so it flows under posts/content when we switch to single column layout on small screens.
  • functions.php adds a few functions we need to make it responsive.
  • header.php remove the sidebar and put it in the footer and also add a mobile viewport on line 14
  • img/responsive-bg.png a responsive faux column for the sidebar
  • js/jquery.fitvids.js Embedded videos maintain aspect ratio when resized
  • js/modernizr.min.js polyfill for HTML5 elements and media queries
  • style.css All our responsive goodness lives here. Unfortunately it's quite messy CSS, hopefully it can be made much neater when it's merged with the parent theme.

P2 Modifications - Important

The parent P2 theme serves an additional stylesheet to visitors with iPhone http headers, unfortunately there's no way to change this from the child-theme so either delete or comment out lines 443-453 in p2/functions.php.

It will work fine without this modification but it won't appear as it was designed it to on iPhones.

Demo

See the theme in action p2.nmecdesign.com

To-do

  • Test on more mobile devices
  • Test on old browsers (boo, IE)
  • Integrate with parent theme
  • Tidy and optimise CSS

p2-responsive's People

Contributors

nmec avatar leo-ji avatar

Watchers

Matt Senate 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.