Skip to content

Commit

Permalink
Main page styling
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanhogan committed Sep 8, 2018
1 parent 4ce68de commit 687e2e9
Show file tree
Hide file tree
Showing 5 changed files with 131 additions and 8 deletions.
7 changes: 5 additions & 2 deletions src/routes/home/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,17 @@ import React from 'react'
import Page from '../../components/page'

export default () => (
<div>
<div className="home-page">
<div className="container">
<h1 className="logo">Wikipadia</h1>
<h1 className="page-title">Wikipadia</h1>
<div className="blurb">
<p>
<em>WikiPadia</em> is a beautiful, customisable Wikipedia reader. It
was specifically built for leisurely reading on an iPad.
</p>
<p>
<a href="https://github.com/rowanhogan/wikipadia">Source code</a>
</p>
</div>
</div>

Expand Down
118 changes: 118 additions & 0 deletions src/styles/_home.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
.home-page {
.blurb {
text-align: center;
}

.container + .container {
padding-top: 0;

.page-title {
display: none;
}
}

.loading {
&:before,
&:after {
top: 0;
}
}

.page {
.root h2 .mw-headline:before {
display: none;
}
}

#mp-topbanner {
> div {
display: none;
}

ul {
margin: 0;
padding: 0;
text-align: center;

&:before {
content: 'Categories';
display: block;
font-family: $title-stack;
margin-bottom: 1rem;
font-size: 1.25rem;
}

li {
display: inline-block;

a {
padding: 0.25rem;
}
}
}
}

#mp-upper {
tr {
display: flex;

td {
flex: 50%;
}
}
}

#mp-left {
padding-right: 1.5rem;

+ td {
display: none !important;
}
}

#mp-right {
padding-left: 1.5rem;
}

#mp-upper,
#mp-lower,
#mp-upper td,
#mp-lower td {
display: block;
}

#mp-otd p:first-child {
text-align: center;
}

#mp-tfp img {
width: 100%;
}

#mp-sister-content .plainlinks tbody {
display: flex;
flex-wrap: wrap;
text-align: center;
justify-content: center;

tr {
margin: 1rem;
}
}

#lang > ul {
display: flex;
flex-wrap: wrap;
margin: 0;
padding: 0;

li {
display: block;
margin-right: 1.5rem;
}
}

#metalink {
text-align: center;
}
}
Empty file removed src/styles/_main.scss
Empty file.
12 changes: 7 additions & 5 deletions src/styles/_thumbs.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
.mp-thumb,
.thumb {
margin: 2em auto;
text-align: center;

.thumbinner {
margin: auto;
width: auto;
}

.thumbcaption {
font-size: 75%;
margin: 1rem auto;
Expand All @@ -16,7 +12,13 @@
}
}

.thumbinner {
margin: auto;
width: auto;
}

.infobox :only-child > .image,
.mp-thumb .image,
.thumb {
display: block;

Expand Down
2 changes: 1 addition & 1 deletion src/styles/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ $header-height: 3.25rem;

@import 'layout';
@import 'typography';
@import 'main';
@import 'home';
@import 'page';
@import 'themes';
@import 'loading';

0 comments on commit 687e2e9

Please sign in to comment.