WIP page types
This commit is contained in:
parent
f9db84584d
commit
3bc7d40431
5 changed files with 44 additions and 5 deletions
|
@ -39,6 +39,10 @@ a {
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.-mar-no {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.-left {
|
.-left {
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
@ -92,12 +96,24 @@ a {
|
||||||
.index-interiorlink {
|
.index-interiorlink {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 1rem;
|
padding: .5rem 2rem;
|
||||||
color: white;
|
color: white;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.index-interiorlink-description {
|
||||||
|
height: 1.5em;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.index-interiorlink-icon {
|
||||||
|
position: relative;
|
||||||
|
top: .2em;
|
||||||
|
}
|
||||||
|
|
||||||
.interior-topbar {
|
.interior-topbar {
|
||||||
height: 25px;
|
height: 25px;
|
||||||
}
|
}
|
||||||
|
@ -114,6 +130,11 @@ a {
|
||||||
background: linear-gradient(90deg, rgba(235, 181, 242, .3), rgba(128, 95, 132, .3));
|
background: linear-gradient(90deg, rgba(235, 181, 242, .3), rgba(128, 95, 132, .3));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.index-interiorlink.-git,
|
||||||
|
.interior-headline.-git {
|
||||||
|
background: linear-gradient(90deg, rgba(181, 242, 186, .3), rgba(95, 132, 105, .3));
|
||||||
|
}
|
||||||
|
|
||||||
.interior-headline svg {
|
.interior-headline svg {
|
||||||
vertical-align: bottom;
|
vertical-align: bottom;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@ const getPinnedRepoJSONs = async () => {
|
||||||
}
|
}
|
||||||
} = await requestGithub(schema);
|
} = await requestGithub(schema);
|
||||||
return pinnedRepoData.map(data => {
|
return pinnedRepoData.map(data => {
|
||||||
|
data.node.pageType = 'git';
|
||||||
if (data.node.readme && data.node.readme.text) {
|
if (data.node.readme && data.node.readme.text) {
|
||||||
data.node.readme.html = marked(data.node.readme.text);
|
data.node.readme.html = marked(data.node.readme.text);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,17 @@
|
||||||
{
|
{
|
||||||
"name": "Example",
|
"name": "Example",
|
||||||
|
"pageType": "volunteer",
|
||||||
|
"repositoryTopics": {
|
||||||
|
"edges": [
|
||||||
|
{
|
||||||
|
"node": {
|
||||||
|
"topic": {
|
||||||
|
"name": "volunteering"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"readme": {
|
"readme": {
|
||||||
"text": "## Whats Up?"
|
"text": "## Whats Up?"
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,9 +16,14 @@
|
||||||
<ol class="index-interiorlinks">
|
<ol class="index-interiorlinks">
|
||||||
{{#each this}}
|
{{#each this}}
|
||||||
<li class="index-interiorlink-wrapper">
|
<li class="index-interiorlink-wrapper">
|
||||||
<a class="index-interiorlink -volunteer" href="./{{this.name}}.html">
|
<a class="index-interiorlink -{{this.pageType}}" href="./{{this.name}}.html">
|
||||||
<h3>{{this.name}}</h3>
|
<h3 class="-mar-no">
|
||||||
<p>{{this.description}}</p>
|
<svg class="index-interiorlink-icon" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<use xlink:href="./assets/spritesheet.svg#git" />
|
||||||
|
</svg>
|
||||||
|
{{this.name}}
|
||||||
|
</h3>
|
||||||
|
<p class="index-interiorlink-description -mar-no">{{this.description}}</p>
|
||||||
<ul class="tags">
|
<ul class="tags">
|
||||||
{{#each this.repositoryTopics.edges}}
|
{{#each this.repositoryTopics.edges}}
|
||||||
<li class="tag">{{this.node.topic.name}}
|
<li class="tag">{{this.node.topic.name}}
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
</svg>
|
</svg>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="interior-headline -pad-h -pad-v">
|
<div class="interior-headline -{{pageType}} -pad-h -pad-v">
|
||||||
<h1 class="-container">
|
<h1 class="-container">
|
||||||
<svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
<svg viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
<use xlink:href="./assets/spritesheet.svg#git" />
|
<use xlink:href="./assets/spritesheet.svg#git" />
|
||||||
|
|
Loading…
Add table
Reference in a new issue