Skip to content

Commit 11be89b

Browse files
Jinjiangchrisvfritz
authored andcommitted
Switched 4-spaces indent in ejs files to 2 spaces. (#1133)
* Formatted all inline styles. * Switched all ejs files from 4 spaces to 2 spaces. * Fixed 4-spaces in page.ejs
1 parent b2ecd5e commit 11be89b

File tree

6 files changed

+250
-250
lines changed

6 files changed

+250
-250
lines changed

themes/vue/layout/layout.ejs

Lines changed: 122 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -2,128 +2,128 @@
22

33
<!DOCTYPE html>
44
<html lang="en">
5-
<head>
6-
<title><%- page.title ? page.title + '' : '' %>Vue.js</title>
7-
<meta charset="utf-8">
8-
<meta name="description" content="<%- theme.site_description %>">
9-
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
10-
11-
<link rel="alternate" hreflang="x-default" href="https://vuejs.org/<%- page.path %>">
12-
<link rel="alternate" hreflang="zh" href="https://cn.vuejs.org/<%- page.path %>">
13-
<link rel="alternate" hreflang="ja" href="https://jp.vuejs.org/<%- page.path %>">
14-
<link rel="alternate" hreflang="ru" href="https://ru.vuejs.org/<%- page.path %>">
15-
<link rel="alternate" hreflang="ko" href="https://kr.vuejs.org/<%- page.path %>">
16-
<link rel="alternate" hreflang="pt-BR" href="https://br.vuejs.org/<%- page.path %>">
17-
<link rel="alternate" hreflang="fr" href="https://fr.vuejs.org/<%- page.path %>">
18-
19-
<meta property="og:type" content="article">
20-
<meta property="og:title" content="<%- page.title ? page.title + ' — ' : '' %>Vue.js">
21-
<meta property="og:description" content="<%- theme.site_description %>">
22-
<meta property="og:image" content="https://<%- theme.root_domain %>/<%- url_for("/images/logo.png") %>">
23-
24-
<meta name="twitter:card" content="summary">
25-
<meta name="twitter:title" content="<%- page.title ? page.title + ' — ' : '' %>Vue.js">
26-
<meta name="twitter:description" content="<%- theme.site_description %>">
27-
<meta name="twitter:image" content="https://<%- theme.root_domain %>/images/logo.png">
28-
29-
<link rel="apple-touch-icon" sizes="57x57" href="<%- url_for("/images/icons/apple-icon-57x57.png") %>">
30-
<link rel="apple-touch-icon" sizes="60x60" href="<%- url_for("/images/icons/apple-icon-60x60.png") %>">
31-
<link rel="apple-touch-icon" sizes="72x72" href="<%- url_for("/images/icons/apple-icon-72x72.png") %>">
32-
<link rel="apple-touch-icon" sizes="76x76" href="<%- url_for("/images/icons/apple-icon-76x76.png") %>">
33-
<link rel="apple-touch-icon" sizes="114x114" href="<%- url_for("/images/icons/apple-icon-114x114.png") %>">
34-
<link rel="apple-touch-icon" sizes="120x120" href="<%- url_for("/images/icons/apple-icon-120x120.png") %>">
35-
<link rel="apple-touch-icon" sizes="144x144" href="<%- url_for("/images/icons/apple-icon-144x144.png") %>">
36-
<link rel="apple-touch-icon" sizes="152x152" href="<%- url_for("/images/icons/apple-icon-152x152.png") %>">
37-
<link rel="apple-touch-icon" sizes="180x180" href="<%- url_for("/images/icons/apple-icon-180x180.png") %>">
38-
<link rel="icon" type="image/png" sizes="192x192" href="<%- url_for("/images/icons/android-icon-192x192.png") %>">
39-
<link rel="icon" type="image/png" sizes="32x32" href="<%- url_for("/images/icons/favicon-32x32.png") %>">
40-
<link rel="icon" type="image/png" sizes="96x96" href="<%- url_for("/images/icons/favicon-96x96.png") %>">
41-
<link rel="icon" type="image/png" sizes="16x16" href="<%- url_for("/images/icons/favicon-16x16.png") %>">
42-
<meta name="msapplication-TileImage" content="/images/icons/ms-icon-144x144.png">
43-
<link rel="icon" href="<%- url_for("/images/logo.png") %>" type="image/png">
44-
45-
<meta name="msapplication-TileColor" content="#4fc08d">
46-
<meta name="theme-color" content="#4fc08d">
47-
48-
<meta name="msapplication-config" content="browserconfig.xml">
49-
<link rel="manifest" href="/manifest.json">
50-
51-
<link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600|Roboto Mono' rel='stylesheet' type='text/css'>
52-
<link href='//fonts.googleapis.com/css?family=Dosis:500&text=Vue.js' rel='stylesheet' type='text/css'>
53-
54-
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
55-
56-
<!-- main page styles -->
57-
<%- css(isIndex ? 'css/index' : 'css/page') %>
58-
59-
<!-- this needs to be loaded before guide's inline scripts -->
60-
<script src="<%- url_for("/js/vue.js") %>"></script>
61-
<script>window.PAGE_TYPE = "<%- page.type %>"</script>
62-
63-
<!-- ga -->
64-
<script>
65-
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
66-
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
67-
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
68-
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
69-
70-
ga('create', '<%- theme.google_analytics %>', '<%- theme.root_domain %>');
71-
ga('send', 'pageview');
72-
</script>
73-
</head>
74-
<body class="<%- isIndex ? '' : 'docs' -%>">
75-
<div id="mobile-bar" <%- isIndex ? 'class="top"' : '' %>>
76-
<a class="menu-button"></a>
77-
<a class="logo" href="/"></a>
78-
</div>
79-
<%- partial('partials/header') %>
80-
<% if (!isIndex) { %>
81-
<div id="main" class="fix-sidebar">
82-
<% if (page.blog_index) { %>
83-
<%- partial('partials/blog') %>
84-
<% } else { %>
85-
<%- body %>
86-
<% } %>
87-
</div>
88-
<script src="<%- url_for("/js/smooth-scroll.min.js") %>"></script>
5+
<head>
6+
<title><%- page.title ? page.title + '' : '' %>Vue.js</title>
7+
<meta charset="utf-8">
8+
<meta name="description" content="<%- theme.site_description %>">
9+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
10+
11+
<link rel="alternate" hreflang="x-default" href="https://vuejs.org/<%- page.path %>">
12+
<link rel="alternate" hreflang="zh" href="https://cn.vuejs.org/<%- page.path %>">
13+
<link rel="alternate" hreflang="ja" href="https://jp.vuejs.org/<%- page.path %>">
14+
<link rel="alternate" hreflang="ru" href="https://ru.vuejs.org/<%- page.path %>">
15+
<link rel="alternate" hreflang="ko" href="https://kr.vuejs.org/<%- page.path %>">
16+
<link rel="alternate" hreflang="pt-BR" href="https://br.vuejs.org/<%- page.path %>">
17+
<link rel="alternate" hreflang="fr" href="https://fr.vuejs.org/<%- page.path %>">
18+
19+
<meta property="og:type" content="article">
20+
<meta property="og:title" content="<%- page.title ? page.title + ' — ' : '' %>Vue.js">
21+
<meta property="og:description" content="<%- theme.site_description %>">
22+
<meta property="og:image" content="https://<%- theme.root_domain %>/<%- url_for("/images/logo.png") %>">
23+
24+
<meta name="twitter:card" content="summary">
25+
<meta name="twitter:title" content="<%- page.title ? page.title + ' — ' : '' %>Vue.js">
26+
<meta name="twitter:description" content="<%- theme.site_description %>">
27+
<meta name="twitter:image" content="https://<%- theme.root_domain %>/images/logo.png">
28+
29+
<link rel="apple-touch-icon" sizes="57x57" href="<%- url_for("/images/icons/apple-icon-57x57.png") %>">
30+
<link rel="apple-touch-icon" sizes="60x60" href="<%- url_for("/images/icons/apple-icon-60x60.png") %>">
31+
<link rel="apple-touch-icon" sizes="72x72" href="<%- url_for("/images/icons/apple-icon-72x72.png") %>">
32+
<link rel="apple-touch-icon" sizes="76x76" href="<%- url_for("/images/icons/apple-icon-76x76.png") %>">
33+
<link rel="apple-touch-icon" sizes="114x114" href="<%- url_for("/images/icons/apple-icon-114x114.png") %>">
34+
<link rel="apple-touch-icon" sizes="120x120" href="<%- url_for("/images/icons/apple-icon-120x120.png") %>">
35+
<link rel="apple-touch-icon" sizes="144x144" href="<%- url_for("/images/icons/apple-icon-144x144.png") %>">
36+
<link rel="apple-touch-icon" sizes="152x152" href="<%- url_for("/images/icons/apple-icon-152x152.png") %>">
37+
<link rel="apple-touch-icon" sizes="180x180" href="<%- url_for("/images/icons/apple-icon-180x180.png") %>">
38+
<link rel="icon" type="image/png" sizes="192x192" href="<%- url_for("/images/icons/android-icon-192x192.png") %>">
39+
<link rel="icon" type="image/png" sizes="32x32" href="<%- url_for("/images/icons/favicon-32x32.png") %>">
40+
<link rel="icon" type="image/png" sizes="96x96" href="<%- url_for("/images/icons/favicon-96x96.png") %>">
41+
<link rel="icon" type="image/png" sizes="16x16" href="<%- url_for("/images/icons/favicon-16x16.png") %>">
42+
<meta name="msapplication-TileImage" content="/images/icons/ms-icon-144x144.png">
43+
<link rel="icon" href="<%- url_for("/images/logo.png") %>" type="image/png">
44+
45+
<meta name="msapplication-TileColor" content="#4fc08d">
46+
<meta name="theme-color" content="#4fc08d">
47+
48+
<meta name="msapplication-config" content="browserconfig.xml">
49+
<link rel="manifest" href="/manifest.json">
50+
51+
<link href='//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600|Roboto Mono' rel='stylesheet' type='text/css'>
52+
<link href='//fonts.googleapis.com/css?family=Dosis:500&text=Vue.js' rel='stylesheet' type='text/css'>
53+
54+
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
55+
56+
<!-- main page styles -->
57+
<%- css(isIndex ? 'css/index' : 'css/page') %>
58+
59+
<!-- this needs to be loaded before guide's inline scripts -->
60+
<script src="<%- url_for("/js/vue.js") %>"></script>
61+
<script>window.PAGE_TYPE = "<%- page.type %>"</script>
62+
63+
<!-- ga -->
64+
<script>
65+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
66+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
67+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
68+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
69+
70+
ga('create', '<%- theme.google_analytics %>', '<%- theme.root_domain %>');
71+
ga('send', 'pageview');
72+
</script>
73+
</head>
74+
<body class="<%- isIndex ? '' : 'docs' -%>">
75+
<div id="mobile-bar" <%- isIndex ? 'class="top"' : '' %>>
76+
<a class="menu-button"></a>
77+
<a class="logo" href="/"></a>
78+
</div>
79+
<%- partial('partials/header') %>
80+
<% if (!isIndex) { %>
81+
<div id="main" class="fix-sidebar">
82+
<% if (page.blog_index) { %>
83+
<%- partial('partials/blog') %>
8984
<% } else { %>
90-
<%- body %>
85+
<%- body %>
9186
<% } %>
92-
93-
<!-- main custom script for sidebars, version selects etc. -->
94-
<script src="<%- url_for("/js/css.escape.js") %>"></script>
95-
<script src="<%- url_for("/js/common.js") %>"></script>
96-
97-
<!-- search -->
98-
<link href="//cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css" rel='stylesheet' type='text/css'>
99-
<%- css('css/search') %>
100-
<script src="//cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script>
101-
<script>
102-
[
103-
'#search-query-nav',
104-
'#search-query-sidebar',
105-
'#search-query-menu'
106-
].forEach(function (selector) {
107-
if (!document.querySelector(selector)) return
108-
// search index defaults to v2
109-
var match = window.location.pathname.match(/^\/(v\d+)/)
110-
var version = match ? match[1] : 'v2'
111-
docsearch({
112-
appId: 'BH4D9OD16A',
113-
apiKey: '85cc3221c9f23bfbaa4e3913dd7625ea',
114-
indexName: 'vuejs',
115-
inputSelector: selector,
116-
algoliaOptions: { facetFilters: ["version:" + version] }
117-
})
118-
})
119-
</script>
120-
121-
<!-- fastclick -->
122-
<script src="//cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.6/fastclick.min.js"></script>
123-
<script>
124-
document.addEventListener('DOMContentLoaded', function() {
125-
FastClick.attach(document.body)
126-
}, false)
127-
</script>
128-
</body>
87+
</div>
88+
<script src="<%- url_for("/js/smooth-scroll.min.js") %>"></script>
89+
<% } else { %>
90+
<%- body %>
91+
<% } %>
92+
93+
<!-- main custom script for sidebars, version selects etc. -->
94+
<script src="<%- url_for("/js/css.escape.js") %>"></script>
95+
<script src="<%- url_for("/js/common.js") %>"></script>
96+
97+
<!-- search -->
98+
<link href="//cdn.jsdelivr.net/docsearch.js/1/docsearch.min.css" rel='stylesheet' type='text/css'>
99+
<%- css('css/search') %>
100+
<script src="//cdn.jsdelivr.net/docsearch.js/1/docsearch.min.js"></script>
101+
<script>
102+
[
103+
'#search-query-nav',
104+
'#search-query-sidebar',
105+
'#search-query-menu'
106+
].forEach(function (selector) {
107+
if (!document.querySelector(selector)) return
108+
// search index defaults to v2
109+
var match = window.location.pathname.match(/^\/(v\d+)/)
110+
var version = match ? match[1] : 'v2'
111+
docsearch({
112+
appId: 'BH4D9OD16A',
113+
apiKey: '85cc3221c9f23bfbaa4e3913dd7625ea',
114+
indexName: 'vuejs',
115+
inputSelector: selector,
116+
algoliaOptions: { facetFilters: ["version:" + version] }
117+
})
118+
})
119+
</script>
120+
121+
<!-- fastclick -->
122+
<script src="//cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.6/fastclick.min.js"></script>
123+
<script>
124+
document.addEventListener('DOMContentLoaded', function() {
125+
FastClick.attach(document.body)
126+
}, false)
127+
</script>
128+
</body>
129129
</html>

themes/vue/layout/page.ejs

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<% if (page.type) { %>
2-
<%- partial('partials/sidebar', { type: page.type === 'menu' ? 'guide' : page.type, index: page.index }) %>
2+
<%- partial('partials/sidebar', { type: page.type === 'menu' ? 'guide' : page.type, index: page.index }) %>
33
<% } else { %>
44
<div class="sidebar">
55
<ul class="main-menu">
@@ -8,35 +8,35 @@
88
</div>
99
<% } %>
1010
<div class="content <%- page.type ? page.type + ' with-sidebar' : '' %> <%- page.type === 'guide' ? page.path.replace(/.+\//, '').replace('.html', '') + '-guide' : '' %>">
11-
<% if (page.type) { %>
12-
<% if (page.type === 'menu') { %>
13-
<form id="search-form">
14-
<input type="text" id="search-query-menu" class="search-query st-default-search-input">
15-
</form>
16-
<%- partial('partials/toc', { type: 'guide' }) %>
17-
<% } else { %>
18-
<%- partial('partials/ad') %>
19-
<% } %>
11+
<% if (page.type) { %>
12+
<% if (page.type === 'menu') { %>
13+
<form id="search-form">
14+
<input type="text" id="search-query-menu" class="search-query st-default-search-input">
15+
</form>
16+
<%- partial('partials/toc', { type: 'guide' }) %>
17+
<% } else { %>
18+
<%- partial('partials/ad') %>
2019
<% } %>
21-
<% if (page.title.trim()) { %>
22-
<h1><%- page.title %><%- page.type === 'examples' ? ' Example' : '' %></h1>
23-
<% } %>
24-
<%- page.content %>
25-
<% if (page.type === 'guide') { %>
26-
<div class="guide-links">
27-
<% site.pages.find({ type: page.type, order: page.order - 1 }).each(function (page) { %>
28-
<span><a href="<%- url_for(page.path) %>"><%- page.title %></a></span>
29-
<% }) %>
30-
<% site.pages.find({ type: page.type, order: page.order + 1 }).each(function (page) { %>
31-
<span style="float: right;"><a href="<%- url_for(page.path) %>"><%- page.title %></a></span>
32-
<% }) %>
33-
</div>
34-
<% } %>
35-
<div class="footer">
36-
<%- partial('partials/ad-text') %>
37-
Caught a mistake or want to contribute to the documentation?
38-
<a href="https://github.com/vuejs/vuejs.org/blob/master/src/<%- page.path.replace(/\.html$/, '.md') %>" target="_blank">
39-
Edit this page on Github!
40-
</a>
20+
<% } %>
21+
<% if (page.title.trim()) { %>
22+
<h1><%- page.title %><%- page.type === 'examples' ? ' Example' : '' %></h1>
23+
<% } %>
24+
<%- page.content %>
25+
<% if (page.type === 'guide') { %>
26+
<div class="guide-links">
27+
<% site.pages.find({ type: page.type, order: page.order - 1 }).each(function (page) { %>
28+
<span><a href="<%- url_for(page.path) %>"><%- page.title %></a></span>
29+
<% }) %>
30+
<% site.pages.find({ type: page.type, order: page.order + 1 }).each(function (page) { %>
31+
<span style="float: right;"><a href="<%- url_for(page.path) %>"><%- page.title %></a></span>
32+
<% }) %>
4133
</div>
34+
<% } %>
35+
<div class="footer">
36+
<%- partial('partials/ad-text') %>
37+
Caught a mistake or want to contribute to the documentation?
38+
<a href="https://github.com/vuejs/vuejs.org/blob/master/src/<%- page.path.replace(/\.html$/, '.md') %>" target="_blank">
39+
Edit this page on Github!
40+
</a>
41+
</div>
4242
</div>
Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
<div class="sidebar">
2-
<div class="sidebar-inner">
3-
<ul class="main-menu">
4-
<%- partial('partials/main_menu', { context: 'sidebar' }) %>
5-
</ul>
6-
<div class="list">
7-
<div class="main-sponsor">
8-
<span>Platinum Sponsor</span><br>
9-
<a href="https://stdlib.com" target="_blank" class="logo">
10-
<img src="<%- url_for("/images/stdlib.png") %>">
11-
</a>
12-
</div>
13-
<a class="become-backer" href="<%- url_for("/support-vuejs") %>">
14-
Become a Sponsor
15-
</a>
16-
<h2>
17-
<%- type === 'api' ? 'API' : (type.charAt(0).toUpperCase() + type.slice(1)) %>
18-
<% if (type !== 'cookbook') { %>
19-
<select class="version-select">
20-
<option value="SELF" selected>2.x</option>
21-
<option value="v1">1.0</option>
22-
<option value="012">0.12</option>
23-
<option value="011">0.11</option>
24-
</select>
25-
<% } %>
26-
</h2>
27-
<%- partial('partials/toc', { type: type }) %>
28-
</div>
2+
<div class="sidebar-inner">
3+
<ul class="main-menu">
4+
<%- partial('partials/main_menu', { context: 'sidebar' }) %>
5+
</ul>
6+
<div class="list">
7+
<div class="main-sponsor">
8+
<span>Platinum Sponsor</span><br>
9+
<a href="https://stdlib.com" target="_blank" class="logo">
10+
<img src="<%- url_for("/images/stdlib.png") %>">
11+
</a>
12+
</div>
13+
<a class="become-backer" href="<%- url_for("/support-vuejs") %>">
14+
Become a Sponsor
15+
</a>
16+
<h2>
17+
<%- type === 'api' ? 'API' : (type.charAt(0).toUpperCase() + type.slice(1)) %>
18+
<% if (type !== 'cookbook') { %>
19+
<select class="version-select">
20+
<option value="SELF" selected>2.x</option>
21+
<option value="v1">1.0</option>
22+
<option value="012">0.12</option>
23+
<option value="011">0.11</option>
24+
</select>
25+
<% } %>
26+
</h2>
27+
<%- partial('partials/toc', { type: type }) %>
2928
</div>
29+
</div>
3030
</div>

themes/vue/layout/partials/sponsors.ejs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
<a href="https://www.xfive.co/" target="_blank" style="width: 65px;">
4545
<img src="<%- url_for("/images/xfive.png") %>" style="width: 65px;">
4646
</a>
47-
<a href="http://www.frontenddevelopermeetups.com/" target="_blank" style="width:100px;">
48-
<img src="<%- url_for("/images/frontend-meetups.png") %>" style="width:100px">
47+
<a href="http://www.frontenddevelopermeetups.com/" target="_blank" style="width: 100px;">
48+
<img src="<%- url_for("/images/frontend-meetups.png") %>" style="width: 100px">
4949
</a>
5050
<br>
5151

0 commit comments

Comments
 (0)