Skip to content

Commit

Permalink
prep site for blog
Browse files Browse the repository at this point in the history
  • Loading branch information
thompsonate committed Mar 23, 2019
1 parent b4fdf4e commit f4095f6
Show file tree
Hide file tree
Showing 10 changed files with 254 additions and 79 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1 +1,3 @@
_site/
.sass-cache
.DS_Store
2 changes: 2 additions & 0 deletions Gemfile
@@ -1,2 +1,4 @@
source "https://rubygems.org"
gem "jekyll"
gem "jekyll-redirect-from"
gemspec
6 changes: 5 additions & 1 deletion Gemfile.lock
Expand Up @@ -26,6 +26,8 @@ GEM
rouge (>= 1.7, < 3)
safe_yaml (~> 1.0)
jekyll-paginate (1.1.0)
jekyll-redirect-from (0.14.0)
jekyll (~> 3.3)
jekyll-sass-converter (1.5.1)
sass (~> 3.4)
jekyll-seo-tag (2.4.0)
Expand Down Expand Up @@ -60,8 +62,10 @@ PLATFORMS

DEPENDENCIES
bundler (~> 1.12)
jekyll
jekyll-redirect-from
rake (~> 10.0)
type-on-strap!

BUNDLED WITH
1.16.0
1.17.2
4 changes: 0 additions & 4 deletions _data/nav_links.yml
Expand Up @@ -5,7 +5,3 @@
- title: GitHub
url: https://github.com/thompsonate
new_tab: true

- title: Devpost
url: https://devpost.com/thompsonate
new_tab: true
19 changes: 14 additions & 5 deletions _layouts/blog.html
Expand Up @@ -12,10 +12,14 @@

<div class="posts">
{% for post in paginator.posts %}
{% if post.hide != true %}
<div class="post-teaser">
{% if post.thumbnail %}
<div class="post-img">
<img src="{{ site.baseurl }}/{{ post.thumbnail }}">
<img src="{{ site.baseurl }}/{{ post.thumbnail }}">
<a href="{{ post.url | prepend: site.baseurl }}">
<span></span>
</a>
</div>
{% endif %}
<span>
Expand All @@ -30,13 +34,18 @@ <h1>
</p>
</header>
<div class="excerpt">
{{ post.content | strip_html | truncate: "250" }}
<!--<a class="button" href="{{ post.url | prepend: site.baseurl }}">
{{ site.theme_settings.str_continue_reading }}
</a>-->
{{ post.content | split:'<!-- break -->'
| first
| replace: 'href="/assets', 'href="page_url" zzzz="/assets'
| replace: 'page_url', post.url
}}
</div>
<a class="button" style="margin-top: 5px;" href="{{ post.url | prepend: site.baseurl }}">
{{ site.theme_settings.str_continue_reading }}
</a>
</span>
</div>
{% endif %}
{% endfor %}
</div>

Expand Down
29 changes: 28 additions & 1 deletion _sass/base/_variables.scss
@@ -1,7 +1,7 @@
// Typography
$font-family-main: 'Source Sans Pro', Helvetica, Arial, sans-serif;
$font-family-headings: 'Source Sans Pro', Helvetica, Arial, sans-serif;
$font-size: 1.25em;
$font-size: 1.05em;

// Padding
$padding-large: 20%;
Expand Down Expand Up @@ -41,3 +41,30 @@ $header-desc-text-color: #FFF;
// Mobile display
$break: 700px;
$sm-break: 450px;


/* Syntax highlighting */
// Syntax typography
$monospace: Monaco, Consolas, "Lucida Console", monospace !default;
$font-size-code: 0.85em !default; // ~12px
$border-radius: 4px !default;



// base16 Material Theme
$base00: #263238 !default; // Default Background
$base01: #2E3C43 !default; // Lighter Background (Used for status bars)
$base02: #314549 !default; // Selection Background
$base03: #546E7A !default; // Comments, Invisibles, Line Highlighting
$base04: #B2CCD6 !default; // Dark Foreground (Used for status bars)
$base05: #EEFFFF !default; // Default Foreground, Caret, Delimiters, Operators
$base06: #EEFFFF !default; // Light Foreground (Not often used)
$base07: #FFFFFF !default; // Light Background (Not often used)
$base08: #FFFFFF !default; // Variables, XML Tags, Markup Link Text, Markup Lists, Diff Deleted
$base09: #9686F5 !default; // Integers, Boolean, Constants, XML Attributes, Markup Link Url
$base0a: #99E8D5 !default; // Classes, Markup Bold, Search Text Background
$base0b: #FC6A5D !default; // Strings, Inherited Class, Markup Code, Diff Inserted
$base0c: #FFFFFF !default; // Support, Regular Expressions, Escape Characters, Markup Quotes
$base0d: #AEF37D !default; // Functions, Methods, Attribute IDs, Headings
$base0e: #FC5FA3 !default; // Keywords, Storage, Selector, Markup Italic, Diff Changed
$base0f: #FF5370 !default; // Deprecated, Opening/Closing Embedded Language Tags e.g.
249 changes: 186 additions & 63 deletions _sass/external/_syntax.scss
@@ -1,63 +1,186 @@
// pygments-css (https://github.com/richleland/pygments-css)

.hll { background-color: #ffffcc }
.c { color: #999988; font-style: italic } /* Comment */
.err { color: #a61717; background-color: #e3d2d2 } /* Error */
.k { color: #000000; font-weight: bold } /* Keyword */
.o { color: #000000; font-weight: bold } /* Operator */
.cm { color: #999988; font-style: italic } /* Comment.Multiline */
.cp { color: #999999; font-weight: bold; font-style: italic } /* Comment.Preproc */
.c1 { color: #999988; font-style: italic } /* Comment.Single */
.cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
.gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.ge { color: #000000; font-style: italic } /* Generic.Emph */
.gr { color: #aa0000 } /* Generic.Error */
.gh { color: #999999 } /* Generic.Heading */
.gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.go { color: #888888 } /* Generic.Output */
.gp { color: #555555 } /* Generic.Prompt */
.gs { font-weight: bold } /* Generic.Strong */
.gu { color: #aaaaaa } /* Generic.Subheading */
.gt { color: #aa0000 } /* Generic.Traceback */
.kc { color: #000000; font-weight: bold } /* Keyword.Constant */
.kd { color: #000000; font-weight: bold } /* Keyword.Declaration */
.kn { color: #000000; font-weight: bold } /* Keyword.Namespace */
.kp { color: #000000; font-weight: bold } /* Keyword.Pseudo */
.kr { color: #000000; font-weight: bold } /* Keyword.Reserved */
.kt { color: #445588; font-weight: bold } /* Keyword.Type */
.m { color: #009999 } /* Literal.Number */
.s { color: #d01040 } /* Literal.String */
.na { color: #008080 } /* Name.Attribute */
.nb { color: #0086B3 } /* Name.Builtin */
.nc { color: #445588; font-weight: bold } /* Name.Class */
.no { color: #008080 } /* Name.Constant */
.nd { color: #3c5d5d; font-weight: bold } /* Name.Decorator */
.ni { color: #800080 } /* Name.Entity */
.ne { color: #990000; font-weight: bold } /* Name.Exception */
.nf { color: #990000; font-weight: bold } /* Name.Function */
.nl { color: #990000; font-weight: bold } /* Name.Label */
.nn { color: #555555 } /* Name.Namespace */
.nt { color: #000080 } /* Name.Tag */
.nv { color: #008080 } /* Name.Variable */
.ow { color: #000000; font-weight: bold } /* Operator.Word */
.w { color: #bbbbbb } /* Text.Whitespace */
.mf { color: #009999 } /* Literal.Number.Float */
.mh { color: #009999 } /* Literal.Number.Hex */
.mi { color: #009999 } /* Literal.Number.Integer */
.mo { color: #009999 } /* Literal.Number.Oct */
.sb { color: #d01040 } /* Literal.String.Backtick */
.sc { color: #d01040 } /* Literal.String.Char */
.sd { color: #d01040 } /* Literal.String.Doc */
.s2 { color: #d01040 } /* Literal.String.Double */
.se { color: #d01040 } /* Literal.String.Escape */
.sh { color: #d01040 } /* Literal.String.Heredoc */
.si { color: #d01040 } /* Literal.String.Interpol */
.sx { color: #d01040 } /* Literal.String.Other */
.sr { color: #009926 } /* Literal.String.Regex */
.s1 { color: #d01040 } /* Literal.String.Single */
.ss { color: #990073 } /* Literal.String.Symbol */
.bp { color: #999999 } /* Name.Builtin.Pseudo */
.vc { color: #008080 } /* Name.Variable.Class */
.vg { color: #008080 } /* Name.Variable.Global */
.vi { color: #008080 } /* Name.Variable.Instance */
.il { color: #009999 } /* Literal.Number.Integer.Long */
// Inspired by: https://github.com/mmistakes/minimal-mistakes/blob/master/_sass/minimal-mistakes/_syntax.scss

// ==========================================================================
// Syntax highlighting
// ==========================================================================

div.highlighter-rouge,
figure.highlight {
position: relative;
margin-bottom: 1em;
background: $base00;
color: $base05;
font-family: $monospace;
font-size: $font-size-code;
line-height: 1.8;
border-radius: $border-radius;
> pre,
pre.highlight {
margin: 0;
padding: 1em
}
}

code.highlighter-rouge {
padding: 0.2em 0.4em;
font-size: $font-size-code;
background-color: transparentize($base00, 0.85);
color: rgb(36, 41, 46);
border-radius: 2px;
font-family: $monospace;
}

.highlight table {
margin-bottom: 0;
font-size: 1em;
border: 0;
td {
padding: 0;
width: calc(100% - 1em);
border: 0;
/* line numbers*/
&.gutter,
&.rouge-gutter {
padding-right: 1em;
width: 2em;
color: $base04;
border-right: 1px solid $base04;
text-align: right
}

/* code */
&.code,
&.rouge-code {
padding-left: 1em
}
}

pre {
margin: 0
}
}

.highlight pre{ width:100%}
.highlight .hll{ background-color:$base06}

.highlight{
.c{ /* Comment */ color:$base04}
.err{ /* Error */ color:$base08}
.k{ /* Keyword */ color:$base0e}
.l{ /* Literal */ color:$base09}
.n{ /* Name */ color:$base05}
.o{ /* Operator */ color:$base0c}
.p{ /* Punctuation */ color:$base05}
.cm{ /* Comment.Multiline */ color:$base04}
.cp{ /* Comment.Preproc */ color:$base04}
.c1{ /* Comment.Single */ color:$base04}
.cs{ /* Comment.Special */ color:$base04}
.gd{ /* Generic.Deleted */ color:$base08}
.ge{ /* Generic.Emph */ font-style:italic}
.gh{ /* Generic.Heading */ color:$base05; font-weight:bold}
.gi{ /* Generic.Inserted */ color:$base0b}
.gp{ /* Generic.Prompt */ color:$base04; font-weight:bold}
.gs{ /* Generic.Strong */ font-weight:bold}
.gu{ /* Generic.Subheading */ color:$base0c; font-weight:bold}
.kc{ /* Keyword.Constant */ color:$base0e}
.kd{ /* Keyword.Declaration */ color:$base0e}
.kn{ /* Keyword.Namespace */ color:$base0c}
.kp{ /* Keyword.Pseudo */ color:$base0e}
.kr{ /* Keyword.Reserved */ color:$base0e}
.kt{ /* Keyword.Type */ color:$base0a}
.ld{ /* Literal.Date */ color:$base0b}
.m{ /* Literal.Number */ color:$base09}
.s{ /* Literal.String */ color:$base0b}
.na{ /* Name.Attribute */ color:$base0d}
.nb{ /* Name.Builtin */ color:$base05}
.nc{ /* Name.Class */ color:$base0a}
.no{ /* Name.Constant */ color:$base08}
.nd{ /* Name.Decorator */ color:$base0c}
.ni{ /* Name.Entity */ color:$base05}
.ne{ /* Name.Exception */ color:$base08}
.nf{ /* Name.Function */ color:$base0d}
.nl{ /* Name.Label */ color:$base05}
.nn{ /* Name.Namespace */ color:$base0a}
.nx{ /* Name.Other */ color:$base0d}
.py{ /* Name.Property */ color:$base05}
.nt{ /* Name.Tag */ color:$base0c}
.nv{ /* Name.Variable */ color:$base08}
.ow{ /* Operator.Word */ color:$base0c}
.w{ /* Text.Whitespace */ color:$base05}
.mf{ /* Literal.Number.Float */ color:$base09}
.mh{ /* Literal.Number.Hex */ color:$base09}
.mi{ /* Literal.Number.Integer */ color:$base09}
.mo{ /* Literal.Number.Oct */ color:$base09}
.sb{ /* Literal.String.Backtick */ color:$base0b}
.sc{ /* Literal.String.Char */ color:$base05}
.sd{ /* Literal.String.Doc */ color:$base04}
.s2{ /* Literal.String.Double */ color:$base0b}
.se{ /* Literal.String.Escape */ color:$base09}
.sh{ /* Literal.String.Heredoc */ color:$base0b}
.si{ /* Literal.String.Interpol */ color:$base09}
.sx{ /* Literal.String.Other */ color:$base0b}
.sr{ /* Literal.String.Regex */ color:$base0b}
.s1{ /* Literal.String.Single */ color:$base0b}
.ss{ /* Literal.String.Symbol */ color:$base0b}
.bp{ /* Name.Builtin.Pseudo */ color:$base05}
.vc{ /* Name.Variable.Class */ color:$base08}
.vg{ /* Name.Variable.Global */ color:$base08}
.vi{ /* Name.Variable.Instance */ color:$base08}
.il{ /* Literal.Number.Integer.Long */ color:$base09}
}

// Fix Github syntax display
.gist .blob-num {
width: 3.5% !important;
}

// Fix nbconvert dataframe
.dataframe tbody {
font-size: 0.8em;
border-color: white;

tr{
:nth-child(even) {
background-color: #f8f8f8;
}

th {
border-top: 0;
border-left: 0;
border-bottom: 0;
}


td {
padding: 0;
border: 0;
text-align: center;
}
}


}

.dataframe thead tr {
:nth-child(n+2) {
color: black;
//width: 100px;

font-size: 0.75em;
text-align: center !important;
border-top: 0;
border-left: 0;
border-right: 0;
}

:first-child {
border-top: 0;
border-left: 0;
}

}

table.dataframe {
border: 0 solid $border-color;
border-collapse: collapse;
}
12 changes: 12 additions & 0 deletions _sass/layouts/_index.scss
Expand Up @@ -62,6 +62,7 @@ article {
vertical-align: middle;
border-radius: 25px;
overflow: hidden;
position: relative;

@media (min-width: $break) {
height: 250px;
Expand All @@ -71,6 +72,17 @@ article {
@media screen and (max-width: $break) {
height: 150px;
}

a {
span {
position: absolute;
width:100%;
height:100%;
top:0;
left: 0;
z-index: 1;
}
}
}

.post-img img {
Expand Down

0 comments on commit f4095f6

Please sign in to comment.