1
0
mirror of https://github.com/oceanprotocol/docs.git synced 2024-11-26 19:49:26 +01:00

new frontpage repo list layout

This commit is contained in:
Matthias Kretschmann 2018-11-20 14:33:36 +01:00
parent d460453611
commit df9d69ceb5
Signed by: m
GPG Key ID: 606EEEF3C479A91F
5 changed files with 118 additions and 26 deletions

View File

@ -18,10 +18,16 @@
- name: squid-js - name: squid-js
- name: squid-py - name: squid-py
- name: squid-java - name: squid-java
- name: secret-store-client-js
- name: secret-store-client-py - group: OceanDB
- name: secret-store-client-java items:
- name: oceandb-mongodb-driver - name: oceandb-mongodb-driver
- name: oceandb-bigchaindb-driver - name: oceandb-bigchaindb-driver
- name: oceandb-elasticsearch-driver - name: oceandb-elasticsearch-driver
- name: oceandb-driver-interface - name: oceandb-driver-interface
- group: Parity Secret Store
items:
- name: secret-store-client-js
- name: secret-store-client-py
- name: secret-store-client-java

View File

@ -4,12 +4,12 @@ import Repository from './Repository'
import styles from './RepositoryList.module.scss' import styles from './RepositoryList.module.scss'
const RepositoryList = ({ repositories }) => ( const RepositoryList = ({ repositories }) => (
<div className={styles.repositoryLists}> <div className={styles.repositoryCategory}>
{repositories.map(({ node }) => ( {repositories.map(({ node }) => (
<div key={node.id} className={styles.repositoryList}> <div key={node.id}>
<h3 className={styles.repositoryListTitle}>{node.group}</h3> <h3 className={styles.repositoryCategoryTitle}>{node.group}</h3>
<div className={styles.repositoryWrapper}> <div className={styles.repositoryList}>
{node.items.map(item => ( {node.items.map(item => (
<Repository <Repository
key={item.name} key={item.name}

View File

@ -1,28 +1,75 @@
@import 'variables'; @import 'variables';
.repositoryLists {
@media (min-width: $break-point--medium) {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
}
}
.repositoryList { .repositoryList {
@media (min-width: $break-point--medium) { white-space: nowrap;
flex: 0 0 48%; overflow-y: hidden;
} overflow-x: auto;
} -webkit-overflow-scrolling: touch;
margin-left: calc(-50vw + 50%);
.repositoryWrapper { margin-right: calc(-50vw + 50%);
@media (min-width: $break-point--small) {
display: flex; display: flex;
flex-wrap: wrap;
justify-content: space-between; @media (min-width: $break-point--medium) {
margin-left: $spacer;
border-left: 1px solid $brand-grey-lighter;
padding-left: $spacer;
padding-top: $spacer / 4;
}
article {
white-space: normal;
flex: 0 0 25rem;
margin-left: $spacer;
margin-bottom: $spacer / 4;
&:first-child {
margin-left: $spacer * 1.4;
@media (min-width: $break-point--medium) {
margin-left: 0;
} }
} }
.repositoryListTitle { &:last-child {
margin-right: $spacer * 1.4;
}
}
// custom scrollbar
&::-webkit-scrollbar,
&::-moz-scrollbar {
display: none;
}
&::-webkit-scrollbar {
opacity: 0;
width: 3px;
height: 3px;
transition: opacity .2s ease-out;
}
&:hover {
&::-webkit-scrollbar {
opacity: 1;
width: 3px;
height: 3px;
}
&::-webkit-scrollbar-thumb {
background: lighten($brand-grey-light, 30%);
}
&::-webkit-scrollbar-track {
background: $brand-white;
}
}
}
.repositoryCategoryTitle {
width: 100%;
font-size: $font-size-h3; font-size: $font-size-h3;
color: $brand-grey-light; color: $brand-grey-light;
margin-bottom: $spacer / 2;
} }

View File

@ -1,5 +1,5 @@
import React from 'react' import React from 'react'
import { StaticQuery, graphql } from 'gatsby' import { Link, StaticQuery, graphql } from 'gatsby'
import RepositoryList from './RepositoryList' import RepositoryList from './RepositoryList'
import QuickRun from './QuickRun' import QuickRun from './QuickRun'
import styles from './index.module.scss' import styles from './index.module.scss'
@ -33,6 +33,24 @@ const Repositories = () => (
return ( return (
<div className={styles.repositories}> <div className={styles.repositories}>
<QuickRun name="docker-images" /> <QuickRun name="docker-images" />
<header>
<h1 className={styles.repositoriesTitle}>
Repositories
</h1>
<p className={styles.repositoriesText}>
<strong>
Most of our repositories are open source and we
listed the key repositories here. Start with the{' '}
<Link to="/concepts/components/">
software components
</Link>{' '}
document for an introduction into the components
creating the Ocean network.
</strong>
</p>
</header>
<RepositoryList repositories={repositories} /> <RepositoryList repositories={repositories} />
</div> </div>
) )

View File

@ -2,4 +2,25 @@
.repositories { .repositories {
margin-top: $spacer * 2; margin-top: $spacer * 2;
> header {
@media (min-width: $break-point--medium) {
max-width: 33rem;
margin: auto;
}
}
}
.repositoriesTitle {
text-align: center;
display: block;
margin-top: 0;
margin-bottom: $spacer / 2;
font-size: $font-size-h3;
}
.repositoriesText {
text-align: center;
margin-bottom: $spacer;
color: $brand-grey-light;
} }