Skip to content

Commit

Permalink
Move some styling into glamor and use brand
Browse files Browse the repository at this point in the history
Content changes.
  • Loading branch information
Corofides committed Nov 2, 2023
1 parent f31e4db commit cb1754c
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 52 deletions.
9 changes: 2 additions & 7 deletions public/pages/HomeAbout.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
## Welcome to Shimmer
# Welcome to Shimmer

Shimmer is a site generator build to easily work with GitHub Pages for personal websites or project websites. It's
written in ReactJS using a blend of JSON and Markdown files to offer easy customisation. It supports posts and pages using
a widget based system to display a range of content on the frontend. I set this up to support my personal sites and projects
as an easy and quick why to create a range of interesting frontend sites to better support me as a developer and show off
my projects.

### Project Aims

#### Versatility
#### Ease of use
my projects.
1 change: 0 additions & 1 deletion public/pages/pages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"location": "/",
"title": "Home",
"widgets": [
{"name": "Header", "children": ["Hello!"], "colSpan": 3},
{"name": "Readme", "children": [], "colSpan": 3, "readmeUrl": "/Shimmer/pages/HomeAbout.md"},
{"name": "Accordion", "children": [], "colSpan": 3, "items": [
{
Expand Down
33 changes: 30 additions & 3 deletions src/SiteFooter/SiteFooter.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,42 @@
import React from 'react';
import useSettings from '../Hooks/useSettings';
import './SiteFooter.scss';
import { css } from 'glamor';

export default () => {

const {settings} = useSettings();

const footerRule = css({
"padding": "16px",
"background-color": settings['dark-bg'],
"color": settings['brand-secondary-text'],
"width": "100%",
"position": "fixed",
"bottom": 0,
"box-sizing": "border-box",
});

const contentRule = css({
"max-width": "1920px",
"width": "100%",
"margin": "0 auto",
"display": "flex",
"justify-content": "space-between",
});

const textRule = css({
"text-decoration": "none",
"color": settings['brand-secondary-text'],
});

return (
<footer className={"Footer"}>
<div className={"Content"}>
<a href={"#"}>{settings.site_owner}</a>
<footer {...footerRule} className={"Footer"}>
<div {...contentRule} className={"Content"}>
<a {...textRule} href={"#"}>{settings.site_owner}</a>
<div {...textRule}>
Powered by <a href={"https://github.com/Corofides/Shimmer"} {...textRule}>Shimmer</a>
</div>
</div>
</footer>
)
Expand Down
10 changes: 0 additions & 10 deletions src/SiteFooter/SiteFooter.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
@import '../colours';

.Footer {
padding: 16px;
background-color: $silent-midnight;
color: $glimmering-silver;
width: 100%;
position: fixed;
bottom: 0;

a {
color: $glimmering-silver;
text-decoration: none;
}

}

Expand Down
36 changes: 31 additions & 5 deletions src/SiteHeader/SiteHeader.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,41 @@
import React from 'react';
import useSettings from '../Hooks/useSettings';
import './SiteHeader.scss';
import { css } from 'glamor';

export default () => {

const {settings} = useSettings();

const headerRule = css({
"background-color": settings['brand-primary-bg'],
"padding": "16px",
"width": "100%",
"box-sizing": "border-box",
});

const contentRule = css({
"display": "flex",
"align-items": "baseline",
"justify-content": "space-between",
"width": "100%",
"max-width": "1920px",
"margin": "0 auto",
"color": settings['brand-primary-text'],
"text-decoration": "none",
});

const siteNameRule = css({
"color": settings['brand-primary-text'],
"text-decoration": "none",
"margin": 0,
});

return (
<header className={"Header"}>
<div className={"Content"}>
<h1 className={"SiteName"}>
<a href={"/Shimmer"}>
<header {...headerRule} className={"Header"}>
<div {...contentRule} className={"Content"}>
<h1 {...siteNameRule} className={"SiteName"}>
<a {...siteNameRule} href={"/Shimmer"}>
{settings.site_name}
</a>
</h1>
Expand All @@ -19,4 +44,5 @@ export default () => {
</header>
)

}
}

26 changes: 0 additions & 26 deletions src/SiteHeader/SiteHeader.scss
Original file line number Diff line number Diff line change
@@ -1,31 +1,5 @@
@import '../colours';

.Header {
background-color: $silent-midnight;
padding: 16px;
width: 100%;
box-sizing: border-box;
}

.Content {
display: flex;
align-items: baseline;
justify-content: space-between;
width: 100%;
max-width: 1920px;
margin: 0 auto;
}

.SiteName {
margin: 0;

a {
color: $crystal-white;
text-decoration: none;
}

}

nav {

a {
Expand Down

0 comments on commit cb1754c

Please sign in to comment.