snipt

Ctrl+h for KB shortcuts

HTML

mobile four column grid

1
2
3
4
5
6
7
8
<div class="row display">
  <div class="three phone-one columns">
    .three.phone-one.columns				
  </div>
  <div class="nine phone-three columns">
    .nine.phone-three.columns				
  </div>
</div>
https://snipt.net/embed/65d7bb9f3cf79b366fa1c9e970892817/
/raw/65d7bb9f3cf79b366fa1c9e970892817/
65d7bb9f3cf79b366fa1c9e970892817
html
HTML
8
2019-06-13T23:15:02
True
False
False
/api/public/snipt/32429/
mobile-four-column-grid
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a> <a href="#L-8">8</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="p">&lt;</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;row display&quot;</span><span class="p">&gt;</span> </span><span id="L-2"><a name="L-2"></a> <span class="p">&lt;</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;three phone-one columns&quot;</span><span class="p">&gt;</span> </span><span id="L-3"><a name="L-3"></a> .three.phone-one.columns </span><span id="L-4"><a name="L-4"></a> <span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span> </span><span id="L-5"><a name="L-5"></a> <span class="p">&lt;</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;nine phone-three columns&quot;</span><span class="p">&gt;</span> </span><span id="L-6"><a name="L-6"></a> .nine.phone-three.columns </span><span id="L-7"><a name="L-7"></a> <span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span> </span><span id="L-8"><a name="L-8"></a><span class="p">&lt;/</span><span class="nt">div</span><span class="p">&gt;</span> </span></pre></div> </td></tr></table>
grid, mobile

HTML

meta to set no scale on mobile device

<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/> 
https://snipt.net/embed/90cf4785fbb5c3ed72bd31e244ec9e4c/
/raw/90cf4785fbb5c3ed72bd31e244ec9e4c/
90cf4785fbb5c3ed72bd31e244ec9e4c
html
HTML
1
2019-06-18T00:01:26
True
False
False
/api/public/snipt/25106/
meta-to-set-no-scale-on-mobile-device
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="p">&lt;</span><span class="nt">meta</span> <span class="na">name</span><span class="o">=</span><span class="s">&quot;viewport&quot;</span> <span class="na">content</span><span class="o">=</span><span class="s">&quot;width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;&quot;</span><span class="p">/&gt;</span> </span></pre></div> </td></tr></table>
mobile, scale

HTML

mobile html sms link

<a href="smsto: <-phone-number-> "> blabla </a>
https://snipt.net/embed/8334ebc8670f589d87fdc8c7881586f5/
/raw/8334ebc8670f589d87fdc8c7881586f5/
8334ebc8670f589d87fdc8c7881586f5
html
HTML
1
2019-06-15T22:21:55
True
False
False
/api/public/snipt/23318/
mobile-html-sms-link
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="p">&lt;</span><span class="nt">a</span> <span class="na">href</span><span class="o">=</span><span class="s">&quot;smsto: &lt;-phone-number-&gt; &quot;</span><span class="p">&gt;</span> blabla <span class="p">&lt;/</span><span class="nt">a</span><span class="p">&gt;</span> </span></pre></div> </td></tr></table>
html, mobile, sms

HTML

mobile friendly

<meta content='True' name='HandheldFriendly' /> 
<meta content='width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;' name='viewport' /> 
https://snipt.net/embed/d2c51f67b12f813fc4fb4b5591f0efed/
/raw/d2c51f67b12f813fc4fb4b5591f0efed/
d2c51f67b12f813fc4fb4b5591f0efed
html
HTML
3
2019-06-10T17:32:12
True
False
False
/api/public/snipt/16473/
mobile-friendly
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="p">&lt;</span><span class="nt">meta</span> <span class="na">content</span><span class="o">=</span><span class="s">&#39;True&#39;</span> <span class="na">name</span><span class="o">=</span><span class="s">&#39;HandheldFriendly&#39;</span> <span class="p">/&gt;</span> </span><span id="L-2"><a name="L-2"></a><span class="p">&lt;</span><span class="nt">meta</span> <span class="na">content</span><span class="o">=</span><span class="s">&#39;width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;&#39;</span> <span class="na">name</span><span class="o">=</span><span class="s">&#39;viewport&#39;</span> <span class="p">/&gt;</span> </span></pre></div> </td></tr></table>
html, mobile

PHP

php user agent sniffing for webkit

1
2
3
4
<?php
$browser = strpos($_SERVER['HTTP_USER_AGENT'],"AppleWebKit");
if ($browser == false)  { header( 'Location: http://www.poynter.org/handheld/?format=handheld' ) ; }
?>
https://snipt.net/embed/e9edc827eb97b4a55a3413b4742c94a2/
/raw/e9edc827eb97b4a55a3413b4742c94a2/
e9edc827eb97b4a55a3413b4742c94a2
php
PHP
4
2019-06-06T22:17:09
True
False
False
/api/public/snipt/15317/
php-user-agent-sniffing-for-webkit
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="cp">&lt;?php</span> </span><span id="L-2"><a name="L-2"></a><span class="nv">$browser</span> <span class="o">=</span> <span class="nb">strpos</span><span class="p">(</span><span class="nv">$_SERVER</span><span class="p">[</span><span class="s1">&#39;HTTP_USER_AGENT&#39;</span><span class="p">],</span><span class="s2">&quot;AppleWebKit&quot;</span><span class="p">);</span> </span><span id="L-3"><a name="L-3"></a><span class="k">if</span> <span class="p">(</span><span class="nv">$browser</span> <span class="o">==</span> <span class="k">false</span><span class="p">)</span> <span class="p">{</span> <span class="nb">header</span><span class="p">(</span> <span class="s1">&#39;Location: http://www.poynter.org/handheld/?format=handheld&#39;</span> <span class="p">)</span> <span class="p">;</span> <span class="p">}</span> </span><span id="L-4"><a name="L-4"></a><span class="cp">?&gt;</span><span class="x"></span> </span></pre></div> </td></tr></table>
mobile, php, user-agent