If you have some experience developing with Sitecore you know that a best practice is to separate the components of a page into modules that you could reuse through the website, even between device versions of the site if the module is appropriate. However you may have to separate different layouts for desktop site and mobile site to provide the best experience to either one.
For a desktop site, you could have a base layout as follows:
<!-- Le styles -->
A mobile site’s layout has style references and scripts that help support mobile device requirements, like adaptation to device display, landscape and portrait modes, etc.:
CodeBehind="Mobile Base Layout.aspx.cs"
<!DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN"
<title>Sample - Home</title>
With this, you could begin to build a mobile web version of your current site. However, you’ll need to take several things into consideration:
- You need to provide a web design of your mobile site before you build the mobile version.
- You need to define which components will be shared for the two versions of the site considering the information to be displayed and if the design is similar to both cases.
- It's better to use different images for mobile site, smaller images will improve the performance. If you need to share images for both sites, you need to consider where the image will be displayed and its proportions (height and width) to avoid distort.
Note: This post doesn’t take into consideration responsive design that you could use to provide a different presentation for your site when is visited through a mobile device, that’s other topic. J