Skip to content

Commit

Permalink
Merge pull request #1445 from /issues/751@v4
Browse files Browse the repository at this point in the history
Add ability to specify `html@lang` attribute (closes #751)
  • Loading branch information
tadatuta committed Nov 13, 2016
2 parents 31d1c2a + b87b6c8 commit a3a26d3
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions common.blocks/page/page.bemhtml.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ block('page')(
apply('doctype'),
{
tag : 'html',
attrs : { lang : ctx.lang },
cls : 'ua_js_no',
content : [
{
Expand Down
1 change: 1 addition & 0 deletions common.blocks/page/page.bh.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ module.exports = function(bh) {
{ html : json.doctype || '<!DOCTYPE html>', tag : false },
{
tag : 'html',
attrs : { lang : json.lang },
cls : 'ua_js_no',
content : [
{
Expand Down
4 changes: 4 additions & 0 deletions common.blocks/page/page.tmpl-specs/70-lang.bemjson.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
({
block : 'page',
lang : 'en-us'
})
12 changes: 12 additions & 0 deletions common.blocks/page/page.tmpl-specs/70-lang.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html class="ua_js_no" lang="en-us">
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<title></title>
<script>
(function(e,c){e[c]=e[c].replace(/(ua_js_)no/g,"$1yes");})(document.documentElement,"className");
</script>
</head>
<body class="page"></body>
</html>
15 changes: 15 additions & 0 deletions touch.blocks/page/page.tmpl-specs/70-lang.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html class="ua_js_no" lang="en-us">
<head>
<meta charset="utf-8"/>
<meta content="IE=edge" http-equiv="X-UA-Compatible"/>
<title></title>
<script>
(function(e,c){e[c]=e[c].replace(/(ua_js_)no/g,"$1yes");})(document.documentElement,"className");
</script>
<meta name="viewport" content="width=device-width,maximum-scale=1,initial-scale=1,user-scalable=no"/>
<meta name="format-detection" content="telephone=no"/>
<link name="apple-mobile-web-app-capable" content="yes"/>
</head>
<body class="page ua i-bem" data-bem="{&quot;ua&quot;:{}}"></body>
</html>

0 comments on commit a3a26d3

Please sign in to comment.