From c86cedefe2177a42bd2b6b9aef44227c5f21a38d Mon Sep 17 00:00:00 2001 From: ajfisher Date: Sat, 1 Feb 2020 22:25:44 +1100 Subject: [PATCH] chore: removed final css and js files from old site. Moved keybase file #5 --- {src => site/static}/keybase.txt | 0 src/css/main.scss | 834 ------------------------------- src/css/theme.scss | 61 --- src/js/main.js | 64 --- 4 files changed, 959 deletions(-) rename {src => site/static}/keybase.txt (100%) delete mode 100755 src/css/main.scss delete mode 100644 src/css/theme.scss delete mode 100755 src/js/main.js diff --git a/src/keybase.txt b/site/static/keybase.txt similarity index 100% rename from src/keybase.txt rename to site/static/keybase.txt diff --git a/src/css/main.scss b/src/css/main.scss deleted file mode 100755 index 7512f6b..0000000 --- a/src/css/main.scss +++ /dev/null @@ -1,834 +0,0 @@ -@import 'theme.scss'; - -html, body { - height: 100%; -} - -html { - color: $dark_grey; - font-size: 62.5%; - line-height: 1.4; -} - -::-moz-selection { - background: $highlight; - text-shadow: none; -} - -::selection { - background: $highlight; - text-shadow: none; -} - -hr { - display: block; - height: 1px; - border: 0; - border-top: 1px solid $dark_grey; - margin: 1em 0; - padding: 0; -} - -audio, -canvas, -iframe, -img, -svg, -video { - vertical-align: middle; -} - -fieldset { - border: 0; - margin: 0; - padding: 0; -} - -textarea { - resize: vertical; -} - -.browserupgrade { - margin: 0.2em 0; - background: $dark_grey; - color: #fff; - padding: 0.2em 0; -} - - -body { - font: 2.4rem 'Rokkitt', Helvetica, Helvetica Neue, Arial; - color: $dark_text_colour; -} - -header.wrapper { - margin: 0; - width: 100%; -} - -.wrapper { - width: 90%; - margin: 0 5%; -} - -.header-container { - border-bottom: 2px solid $highlight; - height: 95%; -} - -.footer-container { - border-top: 2px solid $highlight; -} - -.header-container, -.footer-container { - @include gradientBackground($dark_grey, 30%); -} - -/* ============== - MOBILE: Menu - ============== */ -aside { - display: flex; - flex-direction: column; -} - -aside nav { - order: 2; -} - -aside section { - order: 1; -} - -nav ul { - margin: 0 0 3rem 0; - padding: 0; - list-style-type: none; -} - -nav ul li { - margin: 0.6rem 0; - font-size: 4rem; -} - -nav ul li:first-child { - margin-top: 0; -} - -nav ul li:last-child { - margin-bottom: 0; -} - -nav ul li.icons { - font-size: 6rem; -} - -nav a { - text-decoration: none; - color: $dark_text_colour; - @include heading-font(); - background: none; - padding: 0; -} - -nav a:visited { - color: $dark_text_colour; -} - -nav a:hover, -nav a:visited:hover { - color: $base; - background: none; -} - -#sidebar section h2 { - display: none; -} - - -#sidebar section p.date { - color: $light_text_colour; - display: inline; - background: $dark_grey; - box-shadow: 0.5rem 0 0 $dark_grey, -0.5rem 0 0 $dark_grey; - padding: 0.5rem 0; - font-size: 2rem; - box-decoration-break: clone; -} - -#sidebar p.tags a { - white-space: nowrap; - font-size: 2rem; -} - -/* ============== - MOBILE: Main - ============== */ - -.main { - padding: 3rem 0; -} - -.main article h1 { - font-size: 2em; -} - - -.footer-container footer { - color: $light_text_colour; - padding: 3rem 0; - display: flex; - flex-direction: column; - justify-content: space-between; -} - -footer section { - display: block; - width: 100%; -} - -footer img { - width: 100%; -} - -footer p a { - background: none; - padding: 0; -} - -/* =============== - ALL: IE Fixes - =============== */ - -.ie7 .title { - padding-top: 20px; -} - -/* ========================================================================== - Author's custom styles - ========================================================================== */ - -// these in place because adblock is insane -.fa-insta::before { - content: '\f16d'; -} - -.fa-tw::before { - content: '\f099'; -} - -h1 { - @include heading-font(); - font-size: 5rem; -} - -h2 { - @include heading-font(); - font-size: 5rem; - border-radius: 0.2rem; -} - -h3 { - @include heading-font(); - font-size: 5rem; -} - -// default header // - -// for the backgrounf if it exists -.header-container { - background-repeat: no-repeat; - background-position: center; - background-size: cover; -} - -header h1 { - background-color: $base; - padding: 1.5rem 2rem; - margin-bottom: 0; - line-height: 1em; - color: $light_text_colour; - min-height: 15rem; - margin-top: 1rem; - vertical-align: middle; - border-radius: 0.2rem; -} - -header p { - color: $light_text_colour; - clear: left; - padding: 0 2rem; - font-size: 2rem; - margin: 2rem 0rem; -} - -header p.date { - color: $base; -} - -header p.postdata { - color: $highlight; - font-size: 2rem; -} - -header p.lede { - font-size: 1.8rem; - font-weight: normal; -} - -// listing header -body.list header h1, -body.page header h1{ - min-height: 0; - font-size: 5rem; - display: inline-block; - margin: 0rem 0; -} - -body.page header h1 { - // we have this because there's nothing else in the header to create margins - margin: 3rem 0; -} - -body.list .header-container, -body.page .header-container { - height: initial; -} - -// Other styles - -code { - font-size: 2rem; - background-color: lighten($dark_grey, 65%); - border-radius: 0.2rem; - padding: 0 0.5rem; -} - -span.worddata { - color: $light_text_colour; -} - -a { - color: $highlight; - background: $dark_grey; - text-decoration: none; - padding: 0 0.5rem; - transition: all 0.4s ease; - border-radius: 0.2rem; -} - -a:hover, -a:visited:hover { - //color: $light_text_colour; - //background: $base; - color: $base; -} - -article h2, -article h3{ - background-color: $base; - color: $light_text_colour; - display: inline; - // use this to get consistent edge on outside of wrap - box-shadow: 3rem 0 0 $base, -3rem 0 0 $base; - margin: 0; - padding: 0px 0px 0.5rem; - box-decoration-break: clone; -} - - -article h4 { - //padding: 0.5rem 3rem; - margin:0; - @include heading-font(); - color: $dark_text_colour; -} - -// This is used for the pullquotes - -article p b { - font-weight: inherit; -} - -p.has-pullquote::before { - content: attr(data-pullquote); - display: block; - @include heading-font(); - font-size: 4rem; - margin: inherit; - color: $base; - margin-left: -3rem; - padding-left: 3rem; - border-left: 2px solid $base; -} - -article blockquote { - font-style: italic; - border-left: 2px solid $base; - margin-left: -3rem; - padding-left: 3rem; -} - -// get the images sorted -article figure { - margin: 0 -2rem; - position: relative; -} - -article figure figcaption { - position: absolute; - bottom: 0.5rem; - right: 0.5rem; - color: $light_text_colour; - background: $dark_grey; - padding: 0 0.5rem; - font-size: 1.5rem; -} - -article figure figcaption a { - padding: 0; -} - -article p img, -article figure img { - width: 100%; -} - -article p.imagep { - margin: 0 -3rem; -} - -article p.imagep a { - padding: 0; - background: none; -} - -article p.citation, -article p.imagecitation { - font-size: 1.8rem; -} - -article ul { - padding:0; -} - -// dealing with embedded media properly so it scales appropriately. -p.mediacontainer { - // this will effectively force a container that is in the proportion 3:2 - // which will work for most media - position: relative; - width: 100%; - padding-bottom: 70%; -} - -p.mediacontainer iframe { - // and then this will fill the container on both dimensions. - position: absolute; - width: 100%; - height: 100%; -} - -// listing styles - -.list article ul { - padding: 0; - display: flex; - -webkit-flex-flow: column wrap; - flex-flow: column wrap; -// justify-content: space-between; -} - -.list article ul li { - display: block; - width: 100%; - border-bottom: 1px dashed lighten($dark-grey, 30%); - margin-bottom: 3rem; -} - -.list * li div, -footer section div { - height: 17rem; - overflow: hidden; - border-bottom: 0.5rem solid $base; - margin-bottom: 1rem; - transition: all 0.8s ease; - border-radius: 0.2rem; -} - -.list * li div:hover { - border-bottom: 0.5rem solid $dark_grey; -} - -footer section div { - border-bottom-color: $highlight; -} - -.list * li div a, -footer section div a { - padding: 0; - background: none; -} - -.list * li div img, -footer section div img { - width: 100%; - height: 100%; - object-fit: cover; -} - -.list * h2, -footer section h2, -footer section h3 { - background: none; - box-shadow: none; - font-size: 3rem; - display: block; - padding:0; - color: $base; -} - -.list * h2 a, -.list h1 a, -footer section h3 a { - padding: 0; - background: none; - color: $base; -} - -.list * h2 a:hover, -.list * h2 a:visited:hover, -.list h1 a:hover, -.list h1 a:visited:hover { - color: $dark_grey; -} - -.list h1 a { - color: $light_text_colour; -} - -.list p.featured { - margin-bottom: 0; - margin-top: 8rem; - font-size: 2rem; - text-transform: uppercase; - color: $highlight; -} - -.list * li p { - font-size: 1.8rem; -} - -.list * li p.date { - font-size: 1.5rem; - color: lighten($dark_grey, 40%); -} - -// code highlighting -pre { - font-size: 1.7rem; -} - -// footer related stuff - -footer section h2 { - color: $highlight !important; -/** background: none; - font-size: 3rem; - display: inline-block; - box-shadow: 1rem 0 0 $base,-1rem 0 0 $base; - margin-left: 1rem;**/ -} - -footer section h3 a { - color: $highlight; -} - -footer section h3 a:hover, -footer section h3 a:visited:hover { - color: $dark_grey; -} - -footer section p { - font-size: 2rem; -} - -/**section.featurepost div { - border-bottom-color: $highlight; -}**/ - -/* ========================================================================== - Media Queries - ========================================================================== */ - -@media only screen and (min-width: 480px) { - -/* ==================== - INTERMEDIATE - ==================== */ - - header.wrapper { - width: 90%; - margin: 0 5%; - } - - header h1 { - padding: 3.5rem 3rem; - margin-top: 9rem; - } - - header p { - padding: 0 3.5rem; - font-size: 3rem; - } - header p.lede { - font-size: 2.3rem; - } - - article figure { - margin: 0 0 0 -3rem; - } - - .list * li div, - footer section div { - height: 25rem; - } - -} - -@media only screen and (min-width: 768px) { - -/* ==================== - WIDE: CSS3 Effects - ==================== */ - - .header-container { - -webkit-box-shadow: 0 5px 10px #aaa; - -moz-box-shadow: 0 5px 10px #aaa; - box-shadow: 0 5px 10px #aaa; - } - -/* ============ - WIDE: Menu - ============ */ - aside nav { - order: 1; - } - - aside section { - order: 2; - } - - nav ul { - margin: 0; - } - - nav ul li, - nav ul li.icons{ - font-size: inherit; - } - - #sidebar section h2 { - display: block; - @include heading-font(); - font-size: 4rem; - color: $base; - line-height: 0.9; - margin: 2.5rem 0px; - } - - -/* ============ - WIDE: Main - ============ */ - - h1 { - font-size: 9rem; - } - - h1.smaller { - font-size: 8rem; - } - - h1.larger { - font-size: 10rem; - } - - header.wrapper { - width: 687px; - padding-right: 339px; - } - - header h1 { - min-height: 35rem; - } - - .main article { - float: left; - width: 61%; - padding: 0px 3rem; - } - - .list article ul { - -webkit-flex-flow: row wrap; - flex-flow: row wrap; - justify-content: space-between; - } - - .list article ul li { - width: 48%; - } - - .main aside { - float: right; - width: 28%; - padding: 0px; - } - - .main aside#sidebar { - position: -webkit-sticky; - position: sticky; - top: 3rem; - margin-top: 3rem; - padding-bottom: 3rem; - } - - .footer-container footer { - flex-direction: row; - box-sizing: border-box; - padding-left: 3rem; - } - - footer section { - width: 30%; - } - - .list * li div, - footer section div { - height: 17rem; - } -} -@media only screen and (min-width: 1140px) { - -/* =============== - Maximal Width - =============== */ - - .wrapper { - width: 1026px; /* 1140px less 33% for right padding and 10% either side margin */ - margin: 0 auto !important; - } - -} - -/* ========================================================================== - Helper classes - ========================================================================== */ - -.hidden { - display: none !important; - visibility: hidden; -} - -.visuallyhidden { - border: 0; - clip: rect(0 0 0 0); - height: 1px; - margin: -1px; - overflow: hidden; - padding: 0; - position: absolute; - width: 1px; -} - -.visuallyhidden.focusable:active, -.visuallyhidden.focusable:focus { - clip: auto; - height: auto; - margin: 0; - overflow: visible; - position: static; - width: auto; -} - -.invisible { - visibility: hidden; -} - -.clearfix:before, -.clearfix:after { - content: " "; - display: table; -} - -.clearfix:after { - clear: both; -} - -.clearfix { - *zoom: 1; -} - -/* ========================================================================== - Print styles - ========================================================================== */ - -@media print { - *, - *:before, - *:after { - background: transparent !important; - color: #000 !important; - box-shadow: none !important; - text-shadow: none !important; - } - - a, - a:visited { - text-decoration: underline; - } - - a[href]:after { - content: " (" attr(href) ")"; - } - - abbr[title]:after { - content: " (" attr(title) ")"; - } - - a[href^="#"]:after, - a[href^="javascript:"]:after { - content: ""; - } - - pre, - blockquote { - border: 1px solid $dark_grey; - page-break-inside: avoid; - } - - thead { - display: table-header-group; - } - - tr, - img { - page-break-inside: avoid; - } - - img { - max-width: 100% !important; - } - - p, - h2, - h3 { - orphans: 3; - widows: 3; - } - - h2, - h3 { - page-break-after: avoid; - } -} diff --git a/src/css/theme.scss b/src/css/theme.scss deleted file mode 100644 index a6283fd..0000000 --- a/src/css/theme.scss +++ /dev/null @@ -1,61 +0,0 @@ -@mixin radial-gradient( $outer, $inner, $type: circle ) { - background: $outer; - background: -moz-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); - background: -webkit-gradient( radial, center center, 0px, center center, 100%, color-stop(0%,$inner), color-stop(100%,$outer) ); - background: -webkit-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); - background: -o-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); - background: -ms-radial-gradient( center, $type cover, $inner 0%, $outer 100% ); - background: radial-gradient( center, $type cover, $inner 0%, $outer 100% ); -} - -@mixin gradientBackground($bgcolor, $darken_amt) { - //@include radial-gradient( rgba(28,30,32,1), rgba(85,90,95,1) ); - @include radial-gradient( darken($bgcolor, $darken_amt), $bgcolor ); -} - -@mixin main-font() { - font-family: 'Rokkitt', serif; -} - -@mixin heading-font() { - font-family: 'Lobster', cursive; - font-weight: normal; -} - -// main colour swatches from paletton -$color-primary-0: #FF5E9A; // Main Primary color */ -$color-primary-1: #FFC4DA; -$color-primary-2: #FF8BB6; -$color-primary-3: #FF337E; -$color-primary-4: #FE025F; - -$color-secondary-1-0: #5EFFA9; // Main Secondary color (1) */ -$color-secondary-1-1: #C4FFE0; -$color-secondary-1-2: #8BFFC1; -$color-secondary-1-3: #33FF91; -$color-secondary-1-4: #02FC76; - -$color-secondary-2-0: #EAFF5E; // Main Secondary color (2) */ -$color-secondary-2-1: #F7FFC5; -$color-secondary-2-2: #F0FF8B; -$color-secondary-2-3: #E5FF33; -$color-secondary-2-4: #DEFF02; - -$color-complement-0: #B2FF5E; // Main Complement color */ -$color-complement-1: #E3FFC4; -$color-complement-2: #C7FF8B; -$color-complement-3: #9DFF33; -$color-complement-4: #85FE02; - -$dark_grey: #3f3f3f; - -$base: $color-primary-0; - -$highlight: $color-complement-0; -$accent: $color-secondary-2-0; - -$linkcolor: $color-complement-0; - -$dark_text_colour: $dark_grey; -$light_text_colour: rgba(255, 255, 255, 0.95); - diff --git a/src/js/main.js b/src/js/main.js deleted file mode 100755 index 02bc202..0000000 --- a/src/js/main.js +++ /dev/null @@ -1,64 +0,0 @@ -// does all the various elements we need doing -var ajfisher = {}; // namespace vars - -// Apply sticky to the side bar -// basically don't deliver the sticky fill if we're not going multicolumn -if (window.innerWidth >= 768) { - var sidebar = document.getElementById('sidebar'); - Stickyfill.add(sidebar); -} - -// This injects a class onto p tags that contain images in the main article -// part of the page. Markup doesn't really allow class addition to standard -// tags so this is worth doing progressively. -ajfisher.articleImages = function() { - ajfisher.article_items = Array.from(document.querySelectorAll("article p * img")); - - ajfisher.article_items.forEach(function(item) { - if (item.parentNode.localName == "p") { - item.parentNode.classList.add("imagep"); - } else if (item.parentNode.localName == "a") { - if (item.parentNode.parentNode.localName == "p") { - item.parentNode.parentNode.classList.add("imagep"); - } else { - console.log(item.parentNode.parentNode.localName); - } - } - }); -}; - -// now we do the pull quotes to extract them from the document and then -// set the appropriate CSS etc -ajfisher.pullquotes = function() { - ajfisher.pullquote_list = Array.from(document.querySelectorAll("article p b")); - - ajfisher.pullquote_list.forEach(function(pq) { - pq.parentNode.classList.add("has-pullquote"); - // make sure it's upper case on first char so it reads right. - var quote = pq.textContent; - quote = "" + quote[0].toUpperCase() + quote.substring(1) - - // now assign to the pq - pq.parentNode.dataset.pullquote = quote; - }); -}; - -// produce the selection stuff. -ajfisher.selector = {}; - -ajfisher.selector.getSelection = function() { - var t = ''; - if (window.getSelection) { - t = window.getSelection(); - } else if (document.getSelection) { - t = document.getSelection(); - } else if (document.selection) { - t = document.selection.createRange().text; - } - - return t; -} - -console.log("hi there"); -ajfisher.articleImages(); -ajfisher.pullquotes();