Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a6f677d

Browse files
imklaujedrzejchalubek
authored andcommitted
feat(): Introduce example of Single Page (#116)
1 parent 284ef9e commit a6f677d

File tree

13 files changed

+165
-85
lines changed

13 files changed

+165
-85
lines changed
Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
1-
<div class="media-icon media-icon--{{ include.variant }}">
1+
<div class="media-icon">
22
<a class="media-icon__inner" href="{{ site.baseurl }}{{ include.href }}">
33
<span class="media-icon__icon">
4-
{% include icons/media/{{ include.icon }} %}
4+
{% include icons/{{ include.icon }} %}
55
</span>
6+
67
<h5 class="media-icon__heading">{{ include.title }}</h5>
8+
79
<div class="media-icon__content">
8-
{{ include.content }}
10+
<span>{{ include.content }}</span>
11+
12+
{% if include.variant == 'related' %}
13+
<span class="media-icon__related button-link">Read more</span>
14+
{% else %}
15+
<div class="media-icon__excerpt button-link flex flex--end flex--middle gutter">
16+
<span>Go to the page</span>
917

10-
{% if include.variant == 'large' %}
11-
<span class="media-icon__excerpt">
12-
{{ include.excerpt }}
13-
</span>
18+
{% include icons/anchor.svg %}
19+
</div>
1420
{% endif %}
1521
</div>
16-
{% if include.variant == 'large' %}
17-
<div class="media-icon__anchor">
18-
{% include icons/anchor.svg %}
19-
</div>
20-
{% endif %}
22+
23+
<div class="media-icon__anchor">
24+
{% include icons/anchor.svg %}
25+
</div>
2126
</a>
2227
</div>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{% for related_url in page.related %}
2+
{% assign subpage = site.pages | where: 'url', related_url | first %}
3+
4+
{% include components/media-icon.html variant="related" href=subpage.url icon=subpage.icon title=subpage.title content=subpage.excerpt %}
5+
{% endfor %}

src/_includes/icons/anchor.svg

Lines changed: 2 additions & 2 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

src/_includes/menu/menu-item.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343

4444
<div class="menu-item__chevron flex__column flex__column--shrink">
4545
{% include icons/symbols/chevron-down.svg %}
46-
</span>
46+
</div>
4747
</button>
4848

4949
<ul class="menu-item__body menu-item__body--nested" data-ref="accordion[body]">

src/_layouts/page.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,11 @@ <h1 id="{{ page.title | downcase }}" class="page__heading">
1919
<div class="markdown" data-headings-anchors>
2020
{{ content }}
2121
</div>
22+
23+
<hr>
24+
25+
{% include components/feedback.html %}
26+
27+
{% include components/callout.html %}
2228
</div>
2329
</article>

src/_sass/components/_media-icon.scss

Lines changed: 19 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
.media-icon {
22
$this: &;
33

4-
height: 100%;
54
border: 1px solid color(border-gray);
65
background-color: color(white);
76
transition: 0.3s box-shadow;
87
border-radius: 8px;
98

109
&__inner {
1110
position: relative;
12-
padding: 10px;
11+
padding: 15px;
1312
width: 100%;
14-
height: 100%;
1513
color: color(secondary-dark);
1614
display: grid;
1715
column-gap: 15px;
@@ -28,7 +26,8 @@
2826
}
2927
}
3028

31-
svg > * {
29+
svg {
30+
color: color(secondary);
3231
transition: 0.3s fill;
3332
}
3433

@@ -39,7 +38,7 @@
3938
background-color: rgba(color(primary-light), 0.16);
4039
}
4140

42-
svg > * {
41+
svg {
4342
fill: color(primary);
4443
}
4544
}
@@ -72,16 +71,19 @@
7271
}
7372

7473
&__content {
75-
font-size: 12px;
74+
font-size: 14px;
7675
color: color(secondary-dark);
7776
margin-top: 15px;
7877
grid-area: content;
7978
line-height: 1.57;
8079

80+
& > * + * {
81+
margin-top: 10px;
82+
}
83+
8184
@include breakpoint(large up) {
8285
margin-top: 0;
8386
grid-area: content;
84-
font-size: 14px;
8587
}
8688
}
8789

@@ -107,49 +109,25 @@
107109

108110
&__excerpt {
109111
font-size: 14px;
110-
font-weight: 500;
111112
line-height: 1.43;
112113
color: color(primary);
113-
text-decoration: underline;
114+
text-align: right;
115+
116+
svg {
117+
height: 16px;
118+
color: color(primary);
119+
}
114120

115121
@include breakpoint(large up) {
116122
display: none;
117123
}
118124
}
119125

120-
&--small {
121-
#{$this}__inner {
122-
display: flex;
123-
flex-direction: column;
124-
align-items: center;
125-
126-
@include breakpoint(large up) {
127-
display: grid;
128-
grid-template-columns: auto 1fr auto;
129-
grid-template-rows: repeat(3, auto);
130-
grid-template-areas: "icon heading" "icon content" "content-mobile content-mobile";
131-
}
132-
}
133-
134-
#{$this}__content {
135-
text-align: center;
136-
line-height: 1.57;
137-
margin-top: 10px;
138-
139-
@include breakpoint(large up) {
140-
text-align: left;
141-
margin-top: 0;
142-
}
143-
}
144-
145-
#{$this}__heading {
146-
line-height: 1.33;
147-
padding-top: 15px;
126+
&__related {
127+
color: color(primary);
148128

149-
@include breakpoint(large up) {
150-
text-align: left;
151-
padding-top: 0;
152-
}
129+
@include breakpoint(large up) {
130+
display: none;
153131
}
154132
}
155133
}

src/_sass/elements/_code.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
code {
2+
font-size: 14px;
3+
}
4+
15
:not(pre) > code {
26
background-color: color(code-background);
37
border-radius: 4px;

src/connections/sources/catalog/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
title: Sources catalog
33
hide_toc: true
44
landing: true
5+
icon: symbols/connections.svg
6+
excerpt: Detailed information about each destination. Learn how our API methods are implemented for that destination.
57
---
68

79
<div class="l-chiclet-collection">
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
---
22
title: Sources FAQ
3+
icon: media/icon-academy.svg
4+
excerpt: Detailed information about each destination. Learn how our API methods are implemented for that destination.
35
---

0 commit comments

Comments
 (0)