Skip to content

Commit 792c4ff

Browse files
committed
Instruction Start block
1 parent bda36ff commit 792c4ff

File tree

6 files changed

+236
-17
lines changed

6 files changed

+236
-17
lines changed

_data/page_instruction.json

Lines changed: 59 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,36 +25,87 @@
2525
"heading": "__Начинаем писать__",
2626
"list": [
2727
{
28-
"num": "1",
2928
"text": "Proposal пишут по-английски. Не стесняйтесь писать совсем простым языком, если вам так удобнее."
3029
},
3130
{
32-
"num": "2",
3331
"text": "У документа должен быть заголовок, шапка, и, собственно, описание предложения к стандарту."
3432
},
3533
{
36-
"num": "3",
3734
"text": "Заголовок пишите так, чтобы он описывал вашу идею."
3835
},
3936
{
40-
"num": "4",
4137
"text": "В английском языке все слова в заголовке пишут с большой буквы, за исключением артиклей, союзов и предлогов короче пяти букв. В словах с чёрточкой с большой буквы пишутся обе части. Подробная правильная инструкция есть в Википедии."
4238
},
4339
{
44-
"num": "5",
4540
"text": "В шапке укажите имена авторов предложения и контактную информацию."
4641
},
4742
{
48-
"num": "6",
4943
"text": "Затем впишите номер документа. Пока предложение находится на стадии проработки, ему хватит универсального номера D????R0."
5044
},
5145
{
52-
"num": "7",
5346
"text": "Позже, когда всё будет в целом готово, вам понадобится дать ему настоящий уникальный номер с цифрами вместо знаков вопроса. Чтобы получить такой номер, напишите В Телеграмм @antoshkka или воспользуйтесь англоязычной инструкцией для получения номера."
5447
},
5548
{
56-
"num": "8",
5749
"text": "Когда же предложение обретёт окончательный вид, перед отправкой финальной версии замените D (draft) на P (proposal): P9999R0."
50+
},
51+
{
52+
"wide": true,
53+
"text1": "После номера укажите подгруппу, в которую собираетесь направить предложение:",
54+
"text2": "Если вы не можете выбрать подгруппу, обратитесь к нам за помощью.",
55+
"list": [
56+
{
57+
"title": "SG1 Concurrency",
58+
"text": "если ваша идея касается многопоточности, асинхронности, параллелизма или векторного выполнения"
59+
},
60+
{
61+
"title": "SG7 Reflection",
62+
"text": "если речь о рефлексии и метапрограммировании"
63+
},
64+
{
65+
"title": "SG6 Numerics",
66+
"text": "если вы пишете о работе с числами"
67+
},
68+
{
69+
"title": "SG14 Low Latency",
70+
"text": "если вы предлагаете поменять основополагающие механизмы языка С++ для повышения производительности"
71+
},
72+
{
73+
"title": "Evolution Incubator",
74+
"text": "если ваша идея меняет что-то в ядре языка С++ (например, добавляет новые конструкции языка или новые операторы)"
75+
},
76+
{
77+
"title": "Library Evolution Incubator",
78+
"text": "если вы хотите добавить новые классы или доработать старые"
79+
}
80+
]
81+
},
82+
{
83+
"wide": true,
84+
"text1": "Собственно текст предложения мы рекомендуем начинать с раздела «Introduction and Motivation» с коротким (буквально один-два абзаца) описанием вашей идеи и примером того, как она упростит людям жизнь.\n\nУже затем опишите её во всех деталях.\n\nПосле детального описания мы советуем поместить вот такие разделы:",
85+
"text2": "Вы можете добавить и любые другие разделы на своё усмотрение.",
86+
"list": [
87+
{
88+
"title": "Impact on the Standard",
89+
"text": "с описанием того, какие заголовочные файлы предложение меняет, меняет ли ядро языка и от каких ещё не принятых предложений зависит"
90+
},
91+
{
92+
"title": "Design Decisions",
93+
"text": "почему именно так стоит решать проблему"
94+
},
95+
{
96+
"title": "Feature-Testing Macro",
97+
"text": "название и описание макроса, проверяющего компиляторы на предмет поддержки вашего предложения. Это нужно авторам библиотек"
98+
},
99+
{
100+
"title": "Acknowledgements",
101+
"text": "не забудьте перечислить тех, кто вам помогал, но не попал в соавторы"
102+
}
103+
]
104+
},
105+
{
106+
"wide": true,
107+
"text1": "Если почувствуете в себе силы на это, приложите к proposal перечень конкретных поправок, которые нужно внести в стандарт. Для этого возьмите текущий черновик на сайте [eel.is/c++draft](https://eel.is/c++draft) и подготовьте наглядный документ ([пример](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0250r3.html)). Если у комитета не будет нареканий по существу, готовые поправки помогут ускорить принятие идеи.",
108+
"text3": "ISO принимает файлы в формате PDF или HTML."
58109
}
59110
]
60111
}

_includes/instruction-start.html

Lines changed: 67 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,74 @@ <h2 class="instruction-start__heading heading-h2">
77
</h2>
88
<ul class="instruction-start__list">
99
{% for item in fields.list %}
10-
<li class="instruction-start__list-item">
10+
<li class="instruction-start__list-item {% if item.wide %}instruction-start__list-item_wide{% endif %}">
1111
<div class="instruction-start__list-item-inset">
12-
<div class="instruction-start__list-item-num">
13-
{{ forloop.index }}
14-
</div>
15-
<div class="instruction-start__list-item-text">
16-
{{ item.text | markdownify }}
17-
</div>
12+
{% if item.wide %}
13+
<div class="instruction-start__list-item-cols">
14+
<div class="instruction-start__list-item-col instruction-start__list-item-col_l">
15+
16+
<div class="instruction-start__list-item-head">
17+
<div class="instruction-start__list-item-num">
18+
{{ forloop.index }}
19+
</div>
20+
<div class="instruction-start__list-item-text">
21+
{{ item.text1 | markdownify }}
22+
</div>
23+
</div>
24+
25+
{% if item.text2 %}
26+
<div class="instruction-start__list-item-foot instruction-start__list-item-foot_mobile-hide">
27+
<div class="instruction-start__list-item-text">
28+
{{ item.text2 | markdownify }}
29+
</div>
30+
</div>
31+
{% endif %}
32+
33+
</div>
34+
<div class="instruction-start__list-item-col instruction-start__list-item-col_r">
35+
36+
{% if item.list %}
37+
<ul class="instruction-start__inner-list">
38+
{% for item2 in item.list %}
39+
<li class="instruction-start__inner-list-item">
40+
<strong class="instruction-start__inner-list-item-title">
41+
{{ item2.title | markdownify | remove: '<p>' | remove: '</p>' }}
42+
</strong>
43+
<div class="instruction-start__inner-list-item-text">
44+
{{ item2.text | markdownify | remove: '<p>' | remove: '</p>' }}
45+
</div>
46+
</li>
47+
{% endfor %}
48+
</ul>
49+
{% endif %}
50+
51+
{% if item.text3 %}
52+
<div class="instruction-start__list-item-side-text">
53+
<div class="instruction-start__list-item-text">
54+
{{ item.text3 | markdownify }}
55+
</div>
56+
</div>
57+
{% endif %}
58+
59+
</div>
60+
</div>
61+
{% if item.text2 %}
62+
<div class="instruction-start__list-item-foot instruction-start__list-item-foot_mobile-show">
63+
<div class="instruction-start__list-item-text">
64+
{{ item.text2 | markdownify }}
65+
</div>
66+
</div>
67+
{% endif %}
68+
{% else %}
69+
<div class="instruction-start__list-item-head">
70+
<div class="instruction-start__list-item-num">
71+
{{ forloop.index }}
72+
</div>
73+
<div class="instruction-start__list-item-text">
74+
{{ item.text | markdownify }}
75+
</div>
76+
</div>
77+
{% endif %}
1878
</div>
1979
</li>
2080
{% endfor %}

_sass/blocks/_instruction-start.scss

Lines changed: 102 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
padding: 0;
3131

3232
@include breakpoint-lo($small-viewport) {
33-
margin: -10px 0 20px;
33+
margin: -10px 0 10px;
3434
}
3535
}
3636

@@ -42,6 +42,10 @@
4242
margin: 0;
4343
padding: 0 20px;
4444

45+
&_wide {
46+
width: 100%;
47+
}
48+
4549
@include breakpoint-lo($small-viewport) {
4650
width: 100%;
4751
padding: 0;
@@ -69,16 +73,43 @@
6973
}
7074
}
7175

76+
.instruction-start__list-item_wide & {
77+
&::after {
78+
display: none;
79+
}
80+
}
81+
7282
.instruction-start__list-item:last-child & {
7383
@include breakpoint-lo($small-viewport) {
7484
border: none;
7585
}
7686
}
7787

88+
@include breakpoint-lo($small-viewport) {
89+
padding: 20px 0;
90+
}
91+
}
92+
93+
.instruction-start__list-item-head {
7894
@include breakpoint-lo($small-viewport) {
7995
display: flex;
8096
flex-flow: row nowrap;
81-
padding: 20px 0;
97+
}
98+
}
99+
100+
.instruction-start__list-item-foot {
101+
&_mobile-hide {
102+
@include breakpoint-lo($small-viewport) {
103+
display: none;
104+
}
105+
}
106+
107+
&_mobile-show {
108+
display: none;
109+
110+
@include breakpoint-lo($small-viewport) {
111+
display: block;
112+
}
82113
}
83114
}
84115

@@ -113,3 +144,72 @@
113144
margin-bottom: 0;
114145
}
115146
}
147+
148+
/* Wide item content */
149+
150+
.instruction-start__list-item-cols {
151+
display: flex;
152+
flex-flow: row wrap;
153+
align-items: stretch;
154+
justify-content: space-between;
155+
}
156+
157+
.instruction-start__list-item-col {
158+
width: 50%;
159+
160+
&_l {
161+
display: flex;
162+
flex-flow: column nowrap;
163+
align-items: stretch;
164+
justify-content: space-between;
165+
padding-right: 20px;
166+
}
167+
168+
&_r {
169+
padding-left: 20px;
170+
}
171+
172+
@include breakpoint-lo($small-viewport) {
173+
width: 100%;
174+
padding: 0;
175+
}
176+
}
177+
178+
.instruction-start__inner-list {
179+
list-style: none;
180+
margin: 40px 0 0;
181+
padding: 0;
182+
183+
@include breakpoint-lo($small-viewport) {
184+
margin: 15px 0;
185+
}
186+
}
187+
188+
.instruction-start__inner-list-item {
189+
position: relative;
190+
margin: 0;
191+
padding: 5px 40px 12px 40px;
192+
193+
&:before {
194+
content: '';
195+
position: absolute;
196+
top: 4px;
197+
left: 0;
198+
width: 27px;
199+
height: 27px;
200+
background: url('#{$baseurl}/assets/images/i-bullet-arrow-circle.svg') transparent 0 0 no-repeat;
201+
}
202+
203+
@include breakpoint-lo($small-viewport) {
204+
padding: 8px 0 10px 40px;
205+
font-size: 14px;
206+
}
207+
}
208+
209+
.instruction-start__list-item-side-text {
210+
margin: 45px 0 0;
211+
212+
@include breakpoint-lo($small-viewport) {
213+
margin: 1em 0 0 38px;
214+
}
215+
}

_sass/common/_fonts.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,11 @@
2121
font-style: normal;
2222
font-display: fallback;
2323
}
24+
25+
@font-face {
26+
font-family: YSDisplay;
27+
src: url('#{$baseurl}/assets/fonts/ys-display/YS-Display-Bold.woff2') format('woff2'), url('#{$baseurl}/assets/fonts/ys-display/YS-Display-Bold.woff') format('woff');
28+
font-weight: 700;
29+
font-style: normal;
30+
font-display: fallback;
31+
}
57.6 KB
Binary file not shown.
42.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)