Skip to content

Current progress with develop #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 55 commits into from
Oct 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
1a95367
feat(): Introduce styleguide page
jedrzejchalubek Sep 26, 2019
084eaa1
feat(): Introduce base typography and fonts
jedrzejchalubek Sep 26, 2019
6ae2cd9
feat(): Prepare colors palette (#67)
bart-krakowski Sep 26, 2019
e788ffd
feat(): Introduce image object (#70)
bart-krakowski Sep 26, 2019
12e3a75
fix(styleguide): Use page layout directly as styleguide template
jedrzejchalubek Sep 26, 2019
ca47b7b
feat(): Introduce anchor component (#73)
bart-krakowski Sep 26, 2019
00edc14
refactor(): Rename gray colors so we can have more names in a future
jedrzejchalubek Sep 26, 2019
4a55cdb
feat(): Introduce headings (#68)
bart-krakowski Sep 26, 2019
248c532
feat(): Introduce unordered list (#72)
bart-krakowski Sep 26, 2019
44fea79
fix(): Add breakpoints sizes map variable
jedrzejchalubek Sep 26, 2019
4d18270
feat(): Introduce ordered list (#71)
bart-krakowski Sep 26, 2019
019c056
Merge branch 'master' into develop
jedrzejchalubek Sep 27, 2019
178931a
refactor(variables): Use color form colors map for text
jedrzejchalubek Sep 27, 2019
5a5e14e
feat(): Introduce flex, gutter and waffle components
jedrzejchalubek Sep 27, 2019
b816477
fix(): Script tags should be before closing body tag
jedrzejchalubek Sep 27, 2019
7109ae1
refactor(flex): Use 24col based grid
jedrzejchalubek Sep 27, 2019
c14f896
feat(): Introduce button link (#76)
imklau Sep 27, 2019
bfc8a98
Revert "refactor(flex): Use 24col based grid"
jedrzejchalubek Sep 27, 2019
e1b3a9d
wip(): Working on default layout structure
jedrzejchalubek Sep 27, 2019
b0473ec
feat(): Introduce Note component (#77)
imklau Sep 27, 2019
593ef99
feat(): Introduce alert component (#75)
bart-krakowski Sep 30, 2019
44876bf
refactor(): Refactor in stage and docs components
jedrzejchalubek Sep 30, 2019
7439c2d
11 table (#74)
bart-krakowski Sep 30, 2019
1b4aba5
wip(): WOrking on general layouts
jedrzejchalubek Oct 1, 2019
18cca9a
feat(): Introduce media icon (#78)
bart-krakowski Oct 1, 2019
9c34baf
feat(): Introduce list steps (#80)
bart-krakowski Oct 1, 2019
009202c
feat(): Introduce refactored table (#79)
bart-krakowski Oct 1, 2019
eb54c05
refactor(): Remove redundant data attr
jedrzejchalubek Oct 1, 2019
91df25d
feat(): Introduce field and input components
jedrzejchalubek Oct 1, 2019
00a4512
Merge branch '13-input-field' into develop
jedrzejchalubek Oct 1, 2019
023e9f7
fix(): Adjust width of general 3 column layout
jedrzejchalubek Oct 1, 2019
acf77e8
wip(): Navbar spacings
jedrzejchalubek Oct 1, 2019
d37194d
refactor(): Move stylized elements to markdown scope so it wont affec…
jedrzejchalubek Oct 1, 2019
acef5b4
wip(): Working on page content
jedrzejchalubek Oct 1, 2019
c2d07ed
feat(): Buttons (#81)
bart-krakowski Oct 1, 2019
846dc8d
fix(nav): Justify buttons in navbar
jedrzejchalubek Oct 1, 2019
8ca57ef
feat(): Introduce code, pre and its highlighting
jedrzejchalubek Oct 1, 2019
e0443a7
fix(navbar): Enable searching of swiftsearch
jedrzejchalubek Oct 1, 2019
5ea85b0
feat(): breadcrumbs (#82)
bart-krakowski Oct 2, 2019
c06d423
fix(): Move icons to the includes directory (#84)
imklau Oct 2, 2019
581b1ab
feat(): Side menu and sidebar
jedrzejchalubek Oct 2, 2019
c708181
feat(): Introduce Footer (#88)
imklau Oct 2, 2019
eb642c8
feat(): Introduce Thumbnail Integration component; Create Destination…
imklau Oct 2, 2019
9983cbf
feat(): Introduce new styles for search (#86)
bart-krakowski Oct 2, 2019
82647dc
fix(markdown): Limit width of images
jedrzejchalubek Oct 2, 2019
25c4018
feat(): Panel component (#85)
bart-krakowski Oct 2, 2019
8050834
feat(): Callout (#87)
bart-krakowski Oct 3, 2019
e97018b
wip(): Introduce accordion module and menu structure
jedrzejchalubek Oct 3, 2019
3cc107e
fix(config): Remove rendering limiting to specified pages
jedrzejchalubek Oct 3, 2019
d528969
feat(): Introduce new footer for mobile devices (#91)
imklau Oct 4, 2019
ee68aed
Fix list steps styling (#94)
imklau Oct 4, 2019
1fd147d
refactor(): Use flex for creating alert layout (#93)
imklau Oct 4, 2019
52f9902
feat(): Introduce new search navbar for mobile devices (#90)
imklau Oct 4, 2019
ec108d6
feat(): Menu (#95)
jedrzejchalubek Oct 4, 2019
22c64bb
Merge branch 'staging' into develop
jedrzejchalubek Oct 4, 2019
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
25 changes: 25 additions & 0 deletions js/accordion/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const COMPONENT_NAME = 'data-accordion'
const COMPONENT_SELECTOR = `[${COMPONENT_NAME}]`
const TRIGGER_SELECTOR = `[data-ref="accordion[trigger]"]`
const BODY_SELECTOR = `[data-ref="accordion[body]"]`

export default function () {
const components = document.querySelectorAll(COMPONENT_SELECTOR)

for (let i = 0; i < components.length; i++) {
let body = components[i].querySelector(BODY_SELECTOR)
let trigger = components[i].querySelector(TRIGGER_SELECTOR)

if (body) {
let activeClass = components[i].getAttribute('data-class-active') || 'active'

if (trigger) {
trigger.addEventListener('click', (event) => {
event.preventDefault()

components[i].classList.toggle(activeClass)
})
}
}
}
}
46 changes: 46 additions & 0 deletions js/feedback/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
const COMPONENT_NAME = 'data-feedback'
const COMPONENT_SELECTOR = `[${COMPONENT_NAME}]`
const HELPFUL_BUTTON_SELECTOR = `[data-ref="feedback[helpful]"]`
const UNHELPFUL_BUTTON_SELECTOR = `[data-ref="feedback[unhelpful]"]`

const DEFAULTS = {
message: {
success: 'Thanks for your feedback!'
}
}

export default function () {
const components = document.querySelectorAll(COMPONENT_SELECTOR)

for (let i = 0; i < components.length; i++) {
const options = JSON.parse(components[i].getAttribute(COMPONENT_NAME) || '{}')
const settings = Object.assign({}, DEFAULTS, options)

const helpfulButton = components[i].querySelector(HELPFUL_BUTTON_SELECTOR)
const unhelpfulButton = components[i].querySelector(UNHELPFUL_BUTTON_SELECTOR)

helpfulButton.addEventListener('click', (event) => {
event.preventDefault()

components[i].innerText = settings.message.success

window.analytics.track('Docs Rated', {
title: '{{title}}',
helpful: true,
url: document.URL
})
})

unhelpfulButton.addEventListener('click', (event) => {
event.preventDefault()

components[i].innerText = settings.message.success

window.analytics.track('Docs Rated', {
title: '{{title}}',
helpful: false,
url: document.URL
})
})
}
}
16 changes: 16 additions & 0 deletions js/headings-anchors/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const COMPONENT_SELECTOR = '[data-headings-anchors]'
const HEADINGS_SELECTOR = 'h1, h2, h3, h4, h5, h6'

export default function () {
const components = document.querySelectorAll(COMPONENT_SELECTOR)

for (let i = 0; i < components.length; i++) {
const headings = components[i].querySelectorAll(HEADINGS_SELECTOR)

for (let i = 0; i < headings.length; i++) {
headings[i].addEventListener('click', (event) => {
location.hash = headings[i].getAttribute('id')
})
}
}
}
10 changes: 9 additions & 1 deletion js/index.js
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
console.log('hello world');
import feedback from './feedback'
import accordion from './accordion'
import searchNavbar from './search-navbar'
import headingsAnchors from './headings-anchors'

feedback()
accordion()
searchNavbar()
headingsAnchors()
18 changes: 18 additions & 0 deletions js/search-navbar/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const COMPONENT_SELECTOR = '[data-search-navbar]'
const TRIGGER_SELECTOR = '[data-ref*="search-navbar[trigger]"]'

export default function () {
const component = document.querySelector(COMPONENT_SELECTOR)

if (component) {
const triggers = document.querySelectorAll(TRIGGER_SELECTOR);

for (let i = 0; i < triggers.length; i++) {
triggers[i].addEventListener('click', e => {
e.preventDefault()

component.classList.toggle(component.dataset.activeClass)
})
}
}
}
File renamed without changes.
28 changes: 27 additions & 1 deletion src/_data/sidenav/main.yml → src/_data/menu/primary.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
sections:
- section_title: Home
path: "/"
- section_title: Guides
section:
- path: "/guides"
Expand Down Expand Up @@ -202,7 +204,7 @@ sections:
title: 'Protocols: Schema Controls'
- path: "/protocols/tracking-plan"
title: 'Protocols: Tracking Plan'
- section_title: Segment-app
- section_title: Segment Web App
section:
- path: "/segment-app"
title: Overview
Expand All @@ -220,3 +222,27 @@ sections:
title: Picking a secure password
- path: "/segment-app/sso"
title: Single Sign On
- section_title: Partners
section:
- path: "/partners"
title: Overview
- path: "/partners/build-functions"
title: Building a Subscription Function
- path: "/partners/build-webhook"
title: Building a Subscription Webhook
- path: "/partners/checklist"
title: Public Beta Checklist
- path: "/partners/co-marketing"
title: Co-marketing
- path: "/partners/conceptual-model"
title: Conceptual Model
- path: "/partners/enable-with-segment"
title: Using OAuth to Build a Two-Click Enable Flow
- path: "/partners/plugins"
title: Building a Plugin
- path: "/partners/spec"
title: Segment Spec for Partners
- path: "/partners/streams"
title: Building a Stream
- path: "/partners/subscriptions"
title: Building a Subscription
2 changes: 2 additions & 0 deletions src/_data/sidenav/api.yml → src/_data/menu/secondary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ sections:
title: Reference
- path: "/api/config-api/tutorial-javascript-google-analytics"
title: Creating a Javascript web source and Google Analytics destination
- section_title: Help
path: "/help"
74 changes: 74 additions & 0 deletions src/_data/nav.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
sections:
- section_title: Product
section:
- path: "https://segment.com/product/connections/"
title: Connections
- path: "https://segment.com/product/protocols/"
title: Protocols
- path: "https://segment.com/product/personas/"
title: Personas
- path: "https://segment.com/catalog/"
title: Integrations Catalog
- path: "https://segment.com/pricing/"
title: Pricing
- path: "https://segment.com/security/"
title: Security
- path: "https://segment.com/product/gdpr/"
title: GDPR
- section_title: For Developers
section:
- path: "https://segment.com/docs/"
title: Documentation
- path: "https://segment.com/docs/sources/"
title: Segment API
- path: "https://segment.com/partners/developer-center/"
title: Build on Segment
- path: "https://open.segment.com/"
title: Open Source
- path: "https://segment.com/engineering/"
title: Engineering Team
- section_title: For Businesses
section:
- path: "https://segment.com/docs/"
title: Customer Stories
- path: "https://segment.com/docs/sources/"
title: Enterprise
- path: "https://segment.com/partners/developer-center/"
title: Startups
- path: "https://open.segment.com/"
title: Retail
- path: "https://segment.com/engineering/"
title: Marketplace
- path: "https://segment.com/engineering/"
title: B2B Software
- path: "https://segment.com/engineering/"
title: Mobile
- section_title: Company
section:
- path: "https://segment.com/docs/"
title: Careers
- path: "https://segment.com/docs/sources/"
title: Blog
- path: "https://segment.com/partners/developer-center/"
title: Press
- path: "https://open.segment.com/"
title: FTFY Podcast
- path: "https://segment.com/engineering/"
title: Events
- section_title: Support
section:
- path: "https://segment.com/docs/"
title: Help Center
- path: "https://segment.com/docs/sources/"
title: Contact us
- path: "https://segment.com/partners/developer-center/"
title: Resources
- path: "https://open.segment.com/"
title: Recipes
- path: "https://segment.com/engineering/"
title: Security Bulletins
- path: "https://segment.com/engineering/"
title: Documentation
- path: "https://segment.com/engineering/"
title: Become a Partner
26 changes: 0 additions & 26 deletions src/_data/sidenav/partners.yml

This file was deleted.

9 changes: 9 additions & 0 deletions src/_includes/components/alert.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="alert alert--{{ include.type }} flex gutter gutter--large" role="alert">
<div class="flex__column flex__column--shrink">
{% include icons/alerts/{{ include.type }}.svg %}
</div>

<div class="flex__column">
<p>{{ include.content }}</p>
</div>
</div>
25 changes: 25 additions & 0 deletions src/_includes/components/breadcrumbs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<ul class="breadcrumbs flex gutter list list--unstyle">
{% assign breadcrumbs = page.url | remove:'/index.html' | split: '/' %}

<li>
<a class="breadcrumbs__link" href="{{ site.baseurl }}/">Home</a>
</li>

{% for crumb in breadcrumbs offset: 1 %}
<li>/</li>

{% if forloop.last %}
<li>
{{ page.title }}
</li>
{% else %}
<li>
{% assign crumb_limit = forloop.index | plus: 1 %}

<a class="breadcrumbs__link" href="{{ site.baseurl }}{% for crumb in breadcrumbs limit: crumb_limit %}{{ crumb | remove: '.html' | append: '/' }}{% endfor %}">
{{ crumb | replace:'-',' ' | remove:'.html' | capitalize }}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
3 changes: 3 additions & 0 deletions src/_includes/components/button-fill.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<a href="{{ include.href }}" class="button button-fill {% if include.size %}button--{{ include.size }}{% endif %} {% if include.variant %}button-fill--{{ include.variant }}{% endif %} flex">
{{ include.text }}
</a>
3 changes: 3 additions & 0 deletions src/_includes/components/button-hollow.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<a href="{{ include.href }}" class="button button-hollow {% if include.size %}button--{{ include.size }}{% endif %} flex">
{{ include.text }}
</a>
3 changes: 3 additions & 0 deletions src/_includes/components/button-link.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<a class="button-link" href="{{ include.href }}">
{{ include.text }}
</a>
3 changes: 3 additions & 0 deletions src/_includes/components/button.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<a href="{{ include.href }}" class="button {% if include.size %}button--{{ include.size }}{% endif %} flex">
{{ include.text }}
</a>
39 changes: 39 additions & 0 deletions src/_includes/components/callout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<div class="callout panel">
<div class="panel__inner">
<div class="flex">
<div class="flex__column flex__column--12 flex__column--9@xlarge">
<h4>{{ include.title }}</h4>

<div class="callout__content">
{{ include.content }}
</div>
</div>
</div>

<div class="callout__form-wrapper flex flex--wrap flex--middle gutter gutter--none gutter--xlarge@xlarge">
<div class="flex__column flex__column--12 flex__column--9@xlarge">
<form class="callout__form gutter gutter--none gutter--medium@medium flex flex--wrap">
<div class="flex__column">
<input class="callout__input input input--expand" type="email" placeholder="Your work e-mail">
</div>

<div class="flex__column flex__column--12 flex__column--shrink@medium">
<button class="button button--large button--expand button-fill">Request demo</button>
</div>
</form>
</div>

<div class="callout__separator flex__column flex__column--12">
<span>or</span>
</div>

<a href="#" class="callout__link-button flex__column flex__column--12 flex__column--shrink@xlarge">
Create free account
</a>
</div>

<div class="panel__pattern">
{% include icons/patterns/dots.svg %}
</div>
</div>
</div>
Loading