File tree Expand file tree Collapse file tree 8 files changed +135
-3
lines changed Expand file tree Collapse file tree 8 files changed +135
-3
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
comments : true
3
- template : index.html
3
+ # template: en/ index.html
4
4
hide :
5
5
- navigation
6
6
- toc
Original file line number Diff line number Diff line change 1
1
---
2
2
comments : true
3
- template : index.html
3
+ # template: index.html
4
4
hide :
5
5
- navigation
6
6
- toc
Original file line number Diff line number Diff line change
1
+ ---
2
+ comments : true
3
+ ---
4
+
5
+
6
+
1
7
# [ 1. 两数之和] ( https://leetcode.cn/problems/two-sum )
2
8
3
9
Original file line number Diff line number Diff line change
1
+ {% extends "base.html" %}
2
+
3
+ <!-- Render hero under tabs -->
4
+ {% block tabs %}
5
+ {{ super() }}
6
+
7
+ <!-- Additional styles for landing page -->
8
+ < style >
9
+ /* Application header should be static for the landing page */
10
+ .md-header {
11
+ position : initial;
12
+ }
13
+
14
+ /* Remove spacing, as we cannot hide it completely */
15
+ .md-main__inner {
16
+ margin : 0 ;
17
+ }
18
+
19
+ /* Hide table of contents */
20
+ @media screen and (min-width : 60em ) {
21
+ .md-sidebar--secondary {
22
+ display : none;
23
+ }
24
+ }
25
+
26
+ /* Hide navigation */
27
+ @media screen and (min-width : 76.25em ) {
28
+ .md-sidebar--primary {
29
+ display : none;
30
+ }
31
+ }
32
+ </ style >
33
+
34
+ < section class ="mdx-container ">
35
+ < div class ="md-grid md-typeset ">
36
+ < div class ="mdx-hero ">
37
+
38
+ <!-- Hero image -->
39
+ < div class ="mdx-hero__image ">
40
+ < img src ="assets/images/hero.jpg " alt ="" width ="1659 " height ="1200 " draggable ="false ">
41
+ </ div >
42
+
43
+ <!-- Hero content -->
44
+ < div class ="mdx-hero__content ">
45
+ < h1 > LeetCode Wiki</ h1 >
46
+ < p > {{ config.site_description }}</ p >
47
+ < a href ="{{ page.next_page.url | url }} " title ="{{ page.next_page.title | e }} "
48
+ class ="md-button md-button--primary ">
49
+ Get Started
50
+ </ a >
51
+ </ div >
52
+
53
+ <!-- Comments system -->
54
+ {% include "partials/comments.html" %}
55
+ </ div >
56
+ </ div >
57
+
58
+ </ section >
59
+ {% endblock %}
60
+
61
+ {% block content %} {% endblock %}
Original file line number Diff line number Diff line change 1
- {% extends "base.html" %}
1
+ {% extends "base.html" %}
2
+
3
+ <!-- Render hero under tabs -->
4
+ {% block tabs %}
5
+ {{ super() }}
6
+
7
+ <!-- Additional styles for landing page -->
8
+ < style >
9
+ /* Application header should be static for the landing page */
10
+ .md-header {
11
+ position : initial;
12
+ }
13
+
14
+ /* Remove spacing, as we cannot hide it completely */
15
+ .md-main__inner {
16
+ margin : 0 ;
17
+ }
18
+
19
+ /* Hide table of contents */
20
+ @media screen and (min-width : 60em ) {
21
+ .md-sidebar--secondary {
22
+ display : none;
23
+ }
24
+ }
25
+
26
+ /* Hide navigation */
27
+ @media screen and (min-width : 76.25em ) {
28
+ .md-sidebar--primary {
29
+ display : none;
30
+ }
31
+ }
32
+ </ style >
33
+
34
+ < section class ="mdx-container ">
35
+ < div class ="md-grid md-typeset ">
36
+ < div class ="mdx-hero ">
37
+
38
+ <!-- Hero image -->
39
+ < div class ="mdx-hero__image ">
40
+ < img src ="assets/images/hero.jpg " alt ="" width ="1659 " height ="1200 " draggable ="false ">
41
+ </ div >
42
+
43
+ <!-- Hero content -->
44
+ < div class ="mdx-hero__content ">
45
+ < h1 > LeetCode Wiki</ h1 >
46
+ < p > {{ config.site_description }}</ p >
47
+ < a href ="{{ page.next_page.url | url }} " title ="{{ page.next_page.title | e }} "
48
+ class ="md-button md-button--primary ">
49
+ 开始学习
50
+ </ a >
51
+ </ div >
52
+
53
+ <!-- Comments system -->
54
+ {% include "partials/comments.html" %}
55
+ </ div >
56
+ </ div >
57
+
58
+ </ section >
59
+ {% endblock %}
60
+
61
+ {% block content %} {% endblock %}
Original file line number Diff line number Diff line change @@ -20,6 +20,11 @@ <h2 id="__comments">{{ lang.t("meta.comments") }}</h2>
20
20
< script >
21
21
var giscus = document . querySelector ( "script[src*=giscus]" )
22
22
23
+ /* Set language on initial load */
24
+ var lang = document . querySelector ( "html" ) . lang
25
+ const dataLang = lang === "en" ? "en" : "zh-CN"
26
+ giscus . setAttribute ( "data-lang" , dataLang )
27
+
23
28
/* Set palette on initial load */
24
29
var palette = __md_get ( "__palette" )
25
30
if ( palette && typeof palette . color === "object" ) {
You can’t perform that action at this time.
0 commit comments