Skip to content

Commit f3a4e14

Browse files
committed
mr: self-review
#169
1 parent 268934e commit f3a4e14

File tree

2 files changed

+20
-16
lines changed

2 files changed

+20
-16
lines changed

src/features/repo-explorer/components/readme/index.scss

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,46 +8,47 @@
88
}
99

1010
&__markdown {
11+
// [github-styles] offsets
1112
> :first-child {
1213
margin-top: 0 !important;
1314
}
14-
15+
// [github-styles] headers offsets
16+
h1,
17+
h2,
18+
h3,
19+
h4,
20+
h5,
21+
h6 {
22+
margin-top: 24px;
23+
margin-bottom: 16px;
24+
}
25+
// [github-styles] <code />
1526
code {
1627
padding: 1px 4px;
1728
background: var(--clr-gray--100);
1829
border-radius: 6px;
1930
}
20-
31+
// [github-styles] dividers for h1, h2
2132
h1,
2233
h2 {
2334
padding-bottom: 0.3em;
2435
border-bottom: 1px solid var(--clr-gray--200);
2536
}
26-
37+
// [github-styles] headers font-sizes
2738
h3 {
2839
font-size: 20px;
2940
}
30-
41+
// [github-styles] headers font-sizes
3142
h4 {
3243
font-size: 16px;
3344
}
34-
35-
h1,
36-
h2,
37-
h3,
38-
h4,
39-
h5,
40-
h6 {
41-
margin-top: 24px;
42-
margin-bottom: 16px;
43-
}
44-
45+
// [github-styles] for markdown quotes
4546
blockquote {
4647
padding: 0 1em;
4748
color: var(--clr-gray--800);
4849
border-left: 0.25em solid var(--clr-gray--200);
4950
}
50-
51+
// [github-styles] limit images max-width
5152
img {
5253
max-width: 100%;
5354
}

src/features/repo-explorer/components/readme/index.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ type Props = {
2424

2525
/**
2626
* @hook Обработка внутренних ссылок
27+
* @remark
28+
* - В README могут быть указаны ссылки на локальные ресурсы репозитория (images, files, anchors, ...)
29+
* - Поэтому, для корректной навигации и отображения, было решено предобрабатывать подобные ссылки
2730
*/
2831
const useLocalUri = ({ repoUrl, branch }: Props) => {
2932
/**

0 commit comments

Comments
 (0)