Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/_includes/icons/symbols/edit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/_includes/icons/symbols/plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 21 additions & 5 deletions src/_layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,27 @@ <h1 id="{{ page.title | slugify }}" class="home__heading page__heading">
{% include_cached navbar/nav.html %}
{% unless page.hide-sidebar %}
<div class="sidebar sidebar--sticky sidebar--scroll">
{% unless page.hide_toc %}
{% unless page.hide-feedback %}

<div>
<a href="https://github.com/segmentio/segment-docs/edit/master/src/{{ page.name }}" class="button button-hollow button-hollow--small button-hollow--gray button--xsmall flex" target="_blank">
<span class="button__icon">{% include icons/symbols/edit.svg %}</span>

<span class="button__text">Edit this page</span>
</a>

<a href="https://github.com/segmentio/segment-docs/issues/new?body=File:%20[{{ page.name }}](https://segment.com/docs/)" class="button button-hollow button-hollow--small button-hollow--gray button--xsmall" target="_blank">
<span class="button__icon">{% include icons/symbols/plus.svg %}</span>

<span class="button__text">Request docs change</span>
</a>
</div>

{% include_cached sidebar/feedback.html %}
{% endunless %}

{%- unless page.hide_toc -%}

<div data-anchors-indicator data-sections="h2" data-active-class="menu-side__link--active">
{% include_cached sidebar/menu-side.html class="menu-side" anchor_class="menu-side__link" html=content h_min=2 h_max=2 %}
</div>
Expand All @@ -55,10 +75,6 @@ <h1 id="{{ page.title | slugify }}" class="home__heading page__heading">
{% if page.related %}
{% include sidebar/related-content.html items=page.related %}
{% endif %}

{% unless page.hide-feedback %}
{% include_cached sidebar/feedback.html %}
{% endunless %}
</div>
{% endunless %}
</div>
22 changes: 19 additions & 3 deletions src/_layouts/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,32 @@ <h1 id="{{ page.title | slugify }}" class="page__heading">
<div class="docs__sidebar stage__sidebar">
{% include_cached navbar/nav.html %}
<div class="sidebar sidebar--sticky sidebar--scroll">
{% unless page.hide-feedback %}
<div>
<a href="https://github.com/segmentio/segment-docs/edit/master/src/{{ page.path }}" class="button button-hollow button-hollow--small button-hollow--gray button--xsmall flex" target="_blank">
<span class="button__icon">{% include icons/symbols/edit.svg %}</span>

<span class="button__text">Edit this page</span>
</a>

<a href="https://github.com/segmentio/segment-docs/issues/new?body=File:%20[{{ page.path }}](https://segment.com/docs{{ page.url }})" class="button button-hollow button-hollow--small button-hollow--gray button--xsmall" target="_blank">
<span class="button__icon">{% include icons/symbols/plus.svg %}</span>

<span class="button__text">Request docs change</span>
</a>
</div>

{% include_cached sidebar/feedback.html %}
{% endunless %}

{%- unless page.hide_toc -%}
<div data-anchors-indicator data-sections="h2" data-active-class="menu-side__link--active">
{% include_cached sidebar/menu-side.html class="menu-side" anchor_class="menu-side__link" html=content h_min=2 h_max=2 %}
</div>
{%- endunless -%}

{% if page.related %}
{% include sidebar/related-content.html items=page.related %}
{% endif %}
{% unless page.hide-feedback %}
{% include_cached sidebar/feedback.html %}
{% endunless %}
</div>
</div>
8 changes: 8 additions & 0 deletions src/_sass/components/_button-hollow.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
.button-hollow {
color: color(secondary);
padding: 12px 0;

&--gray {
color: color(gray-dark);
}

&--small {
padding: 8px 0;
}
}
12 changes: 11 additions & 1 deletion src/_sass/components/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@

&__icon {
display: inline-block;
vertical-align: middle;
vertical-align: text-bottom;
}

&__text {
padding-left: 3px;
}

&--xsmall {
font-size: 12px;
}

&--small {
Expand All @@ -27,6 +35,7 @@
line-height: 1.14;
padding: 9px 8px;
}

&--small-bordered {
font-size: 14px;
font-weight: 500;
Expand All @@ -48,6 +57,7 @@
&--expand {
width: 100%;
}

&--half {
width: 50%;
}
Expand Down
8 changes: 4 additions & 4 deletions src/_sass/components/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
$this: &;

& > * + * {
margin-top: 32px;
padding-top: 32px;
border-top: 1px solid color(border-gray);
margin-top: 15px;
padding-top: 15px;
border-top: 1px solid color(border-gray-dark);
}

& > * + *:last-child {
padding-top: 32px;
padding-top: 15px;
}

&__content {
Expand Down