Created
April 14, 2011 23:18
-
-
Save kusakari/920811 to your computer and use it in GitHub Desktop.
モバイルソーシャルアプリのフォントサイズ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def small_tag_start | |
return '' unless request.mobile? | |
case request.mobile | |
when Jpmobile::Mobile::Docomo | |
'<span style="font-size:smaller">' | |
when Jpmobile::Mobile::Au | |
if ['CA31','CA32','CA33','HI33','HI34','HI35','HI36','SA31','TS31','SH3D'].member?(request.mobile.device_id) | |
'<font style="font-size:12px">' | |
elsif ['CA3E','KC35','KC36','KC37','KC38','KC3O','KC3H','KC3K','SH3B','TS3O','TS3H','SN3I','HI3G','KC3R'].member?(request.mobile.device_id) | |
'<font style="font-size:15px">' | |
else | |
'<font size="1">' | |
end | |
when Jpmobile::Mobile::Softbank | |
# exclude: 001SH,942SH,945SH | |
# ?: 944SH | |
if ['932SH','933SH','934SH','935SH','936SH','940SH','941SH','943SH','946SH','002SH','004SH','001P'].member?(request.mobile.device_id) | |
'<font style="font-size:30px">' | |
elsif request.mobile.device_id == '740SC' | |
'<font style="font-size:13px">' | |
else | |
'<font style="font-size:15px">' | |
end | |
else | |
'' | |
end | |
end | |
def small_tag_end | |
return '' unless request.mobile? | |
case request.mobile | |
when Jpmobile::Mobile::Docomo | |
'</span>' | |
when Jpmobile::Mobile::Au | |
'</font>' | |
when Jpmobile::Mobile::Softbank | |
'</font>' | |
else | |
'' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment