Skip to content

Commit

Permalink
Merge branch 'release/1.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
danielvanc committed Mar 20, 2019
2 parents 021b555 + b199941 commit a1b25ff
Show file tree
Hide file tree
Showing 9 changed files with 178 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/components/Layout/Layout.js
Expand Up @@ -31,11 +31,11 @@ const PageContainer = styled.div`
}
&.sub .contentContainer {
@media screen and (min-width: 48em) {
grid-template-rows: minmax(100px, 200px);
grid-template-rows: minmax(100px, max-content);
grid-column-gap: 25px;
}
@media screen and (min-width: 64em) {
grid-template-rows: minmax(200px, 300px);
grid-template-rows: minmax(200px, max-content);
}
}
&.notes .contentContainer {
Expand Down
11 changes: 3 additions & 8 deletions src/components/Layout/footer/Footer.js
@@ -1,7 +1,6 @@
import React from "react"
import styled from "styled-components"
// import GitHubButton from 'react-github-button';s
// import GitHubButton from '../../Shared/GitHubButtons';
import { Link } from "gatsby"
import GitHubButton from 'react-github-btn';


Expand Down Expand Up @@ -252,15 +251,11 @@ const Footer = () => (
</ul>
</OpenSource>
<Updated>
<p>Site last updated on: 19 / 03 / 2019</p>
<p>Site last updated on: 20 / 03 / 2019</p>
</Updated>
<FootNotes>
<p>Designed and built using <a href="https://dvanc.co/skh" title="Sketch">Sketch</a>, <a href="https://dvanc.co/gby" title="Gatsby">Gatsby</a> and <a href="http://dvanc.co/san" title="Sanity">Sanity</a>.</p>
<p>Open sourced on <a href="https://dvanc.co/dvc">GitHub</a>. Hosting with automatic<br /> deployment on <a href="https://dvanc.co/net">Netlify</a>.</p>
<p>&copy; 2009 - 2050 Daniel Van Cuylenburg. <Link to="/colophon">Colophon</Link></p>
</FootNotes>
<Copyright>
<p>&copy; 2009 - 2050 Daniel V.C.<br /> All rights reserved.</p>
</Copyright>
</SiteFooter>
</>
)
Expand Down
2 changes: 1 addition & 1 deletion src/components/Layout/general.css
Expand Up @@ -14,7 +14,7 @@
--font-family-subheadings: 'Muli', sans-serif;
--font-family-text: 'Merriweather', Georgia, serif; */

--font-family-headings: 'Muli', Georgia, serif;
--font-family-headings: 'Muli', sans-serif;
--font-family-subheadings: 'Muli', sans-serif;
--font-family-text: 'Muli', Georgia, serif;

Expand Down
110 changes: 110 additions & 0 deletions src/pages/colophon.js
@@ -0,0 +1,110 @@
import React from 'react';
import styled from 'styled-components'
import Meta from '../components/Layout/TitleAndMetas'
import Layout from '../components/Layout'
import HTMLContent from '../components/Shared/Content'

const PageMain = styled.main`
grid-row: 1 / 2;
max-width: 1200px;
margin-left: 1.5em;
margin-right: 1.5em;
padding-bottom:6.250em;
@media screen and (min-width: 48em) {
margin: 0 auto;
width: 100%;
grid-column: 2 / 16;
padding: 6.250em 0;
}
@media screen and (min-width: 64em) {
grid-column: 2 / 15;
}
@media screen and (min-width: 1550px) {
grid-column: 4 / 14;
}
article {
@media screen and (min-width: 48em) {
display:flex;
align-items: stretch;
}
}
header {
order: 1;
max-width: 150px;
@media screen and (min-width: 75em) {
max-width: 200px;
}
h1 {
font-size: var(--font-size-large);
@media screen and (min-width: 48em) {
font-size: var(--font-size-xx-large);
transform: rotate(-90deg) translateX(-234%);
text-transform: uppercase;
letter-spacing: 0.235em;
}
@media screen and (min-width: 75em) {
transform: rotate(-90deg) translateX(-163%);
}
}
}
`
const PageDescription = styled.p`
color: var(--color-light-grey);
padding-bottom: 3.125em;
@media screen and (min-width: 48em) {
color: #fff;
border-right: 1px solid #3a3a3a;
font-style: italic;
order: 0;
padding-right: 3%;
padding-bottom: 0;
}
@media screen and (min-width: 75em) {
padding-right: 7%;
}
`
const ArticleText = styled(HTMLContent)`
order: 2;
p:last-of-type{ padding-bottom: 0;}
`

const ColophonPage = ({data}) => {
const page="sub"
const pageData = data.sanityColophon
return (
<Layout pageLayout={page}>
<Meta
metaTitle={pageData.metaTitle}
metaDescription={pageData.metaDescription}
metaKeywords={pageData.metaTags}
/>
<PageMain>
<article>
<header>
<h1>{pageData.title}</h1>
</header>
<PageDescription>
{pageData.subTitle}
</PageDescription>
<ArticleText content={pageData._rawContent} />
</article>
</PageMain>
</Layout>
);
}

export default ColophonPage;

export const pageQuery = graphql`
query {
sanityColophon {
title
subTitle
_rawContent
metaTitle
metaDescription
metaTags
}
}
`
4 changes: 2 additions & 2 deletions studio/dist/index.html
@@ -1,4 +1,4 @@
<!doctype html><html><head><meta charSet="utf-8"/><title>danielvanc.com – Sanity</title><meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"/><link rel="stylesheet" href="/static/css/main.css?93161511077c7d812aee"/><link rel="subresource" href="/static/js/vendor.bundle.js?005ccacf239f37b871ce"/><link rel="subresource" href="/static/js/app.bundle.js?93161511077c7d812aee"/><link rel="icon" href="/static/favicon.ico"/></head><body id="sanityBody"><div id="sanity"><div class="sanity-app-loading-screen__root"><style type="text/css">
<!doctype html><html><head><meta charSet="utf-8"/><title>danielvanc.com – Sanity</title><meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover"/><link rel="stylesheet" href="/static/css/main.css?34db65304d59bfa47830"/><link rel="subresource" href="/static/js/vendor.bundle.js?ed4d917264ba8bc22368"/><link rel="subresource" href="/static/js/app.bundle.js?34db65304d59bfa47830"/><link rel="icon" href="/static/favicon.ico"/></head><body id="sanityBody"><div id="sanity"><div class="sanity-app-loading-screen__root"><style type="text/css">
.sanity-app-loading-screen__root {
display: block;
width: 100vw;
Expand Down Expand Up @@ -68,4 +68,4 @@
text-align: center;
font-family: helvetica, arial, sans-serif;
}
</style><h1>JavaScript disabled</h1><p>Please <a href="https://www.enable-javascript.com/">enable JavaScript</a> in your browser and reload the page to proceed.</p></div></div></noscript></div><script>!function(e,t){if(void 0!==window.fetch)t.forEach(function(t){var o=e.createElement("script");o.src=t,o.async=!1,e.head.appendChild(o)});else{var o=e.getElementById("sanity");'<div style="height:100%;width: 100%;position: absolute;top:45%;text-align:center;font-family:helvetica, arial, sans-serif;">',"<h1>Browser not supported</h1>",'<p>Please use a modern browser such as <a href="https://www.google.com/chrome/">Chrome</a> or <a href="https://www.getfirefox.org/">Firefox</a>.</p>',"</div>","</div>";var r=o;do{r.style.height="100%",r=r.parentNode}while(r.parentNode);o.innerHTML='<div style="position:relative;height:100%;"><div style="height:100%;width: 100%;position: absolute;top:45%;text-align:center;font-family:helvetica, arial, sans-serif;"><h1>Browser not supported</h1><p>Please use a modern browser such as <a href="https://www.google.com/chrome/">Chrome</a> or <a href="https://www.getfirefox.org/">Firefox</a>.</p></div></div>'}}(document,["/static/js/vendor.bundle.js?005ccacf239f37b871ce","/static/js/app.bundle.js?93161511077c7d812aee"]);</script></body></html>
</style><h1>JavaScript disabled</h1><p>Please <a href="https://www.enable-javascript.com/">enable JavaScript</a> in your browser and reload the page to proceed.</p></div></div></noscript></div><script>!function(e,t){if(void 0!==window.fetch)t.forEach(function(t){var o=e.createElement("script");o.src=t,o.async=!1,e.head.appendChild(o)});else{var o=e.getElementById("sanity");'<div style="height:100%;width: 100%;position: absolute;top:45%;text-align:center;font-family:helvetica, arial, sans-serif;">',"<h1>Browser not supported</h1>",'<p>Please use a modern browser such as <a href="https://www.google.com/chrome/">Chrome</a> or <a href="https://www.getfirefox.org/">Firefox</a>.</p>',"</div>","</div>";var r=o;do{r.style.height="100%",r=r.parentNode}while(r.parentNode);o.innerHTML='<div style="position:relative;height:100%;"><div style="height:100%;width: 100%;position: absolute;top:45%;text-align:center;font-family:helvetica, arial, sans-serif;"><h1>Browser not supported</h1><p>Please use a modern browser such as <a href="https://www.google.com/chrome/">Chrome</a> or <a href="https://www.getfirefox.org/">Firefox</a>.</p></div></div>'}}(document,["/static/js/vendor.bundle.js?ed4d917264ba8bc22368","/static/js/app.bundle.js?34db65304d59bfa47830"]);</script></body></html>
2 changes: 1 addition & 1 deletion studio/dist/static/js/app.bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion studio/dist/static/js/vendor.bundle.js

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions studio/schemas/colophon.js
@@ -0,0 +1,56 @@
export default {
name: 'Colophon',
title: 'Colophon Page',
type: 'document',
fields: [
{
name: 'title',
title: 'Title',
type: 'string'
},
{
name: 'subTitle',
title: 'Sub Title',
type: 'string'
},
{
name: 'content',
title: 'Content',
type: 'blockContent',
to: { type: 'blockContent' }
},
{
name: 'publishedAt',
title: 'Published at',
type: 'datetime'
},
{
name: 'metaTitle',
title: 'Meta Title',
type: 'string'
},
{
name: 'metaDescription',
title: 'Meta Description',
type: 'string'
},
{
name: 'metaTags',
title: 'Meta Tags',
type: 'string'
},
],

preview: {
select: {
title: 'title',
},
prepare(selection) {
const { author } = selection
return Object.assign({}, selection, {
// subtitle: subTitle
subtitle: author && `by ${author}`
})
}
}
}
2 changes: 2 additions & 0 deletions studio/schemas/schema.js
Expand Up @@ -12,6 +12,7 @@ import templateKey from './templateKeys'
import contentType from './contentTypes'
import homePage from './HomePage'
import notes from './note'
import colophon from './colophon'
import now from './now'
import uses from './Uses'
import log from './Log'
Expand All @@ -31,6 +32,7 @@ export default createSchema({
uses,
notes,
log,
colophon,
author,
category,
templateKey,
Expand Down

0 comments on commit a1b25ff

Please sign in to comment.