From c5996aaf73c37cdd7c216d6dcae31944198523e2 Mon Sep 17 00:00:00 2001 From: Anna Kudriavtsev Date: Tue, 27 Apr 2021 00:45:52 -0700 Subject: [PATCH] add basic layouts --- Gemfile | 3 +++ Gemfile.lock | 27 +++++++++++++++++-- _config.yml | 44 ++++++++++++++++++++++++++++++ _includes/footer.slim | 2 ++ _includes/head.slim | 6 +++++ _includes/header.slim | 3 +++ _layouts/default.slim | 15 +++++++++++ _sass/containers.scss | 32 ++++++++++++++++++++++ _sass/main.scss | 8 ++++++ assets/css/style.scss | 5 ++++ gemset.nix | 62 ++++++++++++++++++++++++++++++++++++++++--- index.slim | 5 ++++ scripts/binst | 8 ++++++ 13 files changed, 215 insertions(+), 5 deletions(-) create mode 100644 _config.yml create mode 100644 _includes/footer.slim create mode 100644 _includes/head.slim create mode 100644 _includes/header.slim create mode 100644 _layouts/default.slim create mode 100644 _sass/containers.scss create mode 100644 _sass/main.scss create mode 100644 assets/css/style.scss create mode 100644 index.slim create mode 100644 scripts/binst diff --git a/Gemfile b/Gemfile index ca57b73..634f9d3 100644 --- a/Gemfile +++ b/Gemfile @@ -3,3 +3,6 @@ source 'https://rubygems.org' gem 'github-pages' +gem 'jekyll-slim', github: 'olery/jekyll-slim' +gem 'pathutil', github: 'motevets/pathutil', branch: 'fix-issue-4' +gem 'webrick' diff --git a/Gemfile.lock b/Gemfile.lock index 9873b95..3b91151 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,3 +1,19 @@ +GIT + remote: https://github.com/motevets/pathutil.git + revision: 3451a10c362fc867b20c7e471a551b31c40a0246 + branch: fix-issue-4 + specs: + pathutil (0.16.2) + forwardable-extended (~> 2.6) + +GIT + remote: https://github.com/olery/jekyll-slim.git + revision: 48c27ea4d5070b9d7313c21e91f9ce4e647b68bc + specs: + jekyll-slim (0.10.1) + jekyll (~> 3.1) + slim + GEM remote: https://rubygems.org/ specs: @@ -222,8 +238,6 @@ GEM octokit (4.21.0) faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) - pathutil (0.16.2) - forwardable-extended (~> 2.6) public_suffix (4.0.6) racc (1.5.2) rb-fsevent (0.10.4) @@ -246,9 +260,14 @@ GEM faraday (> 0.8, < 2.0) simpleidn (0.2.1) unf (~> 0.1.4) + slim (4.1.0) + temple (>= 0.7.6, < 0.9) + tilt (>= 2.0.6, < 2.1) + temple (0.8.2) terminal-table (1.8.0) unicode-display_width (~> 1.1, >= 1.1.1) thread_safe (0.3.6) + tilt (2.0.10) typhoeus (1.4.0) ethon (>= 0.9.0) tzinfo (1.2.9) @@ -257,6 +276,7 @@ GEM unf_ext unf_ext (0.0.7.7) unicode-display_width (1.7.0) + webrick (1.7.0) zeitwerk (2.4.2) PLATFORMS @@ -264,6 +284,9 @@ PLATFORMS DEPENDENCIES github-pages + jekyll-slim! + pathutil! + webrick BUNDLED WITH 2.1.4 diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..ff9c84f --- /dev/null +++ b/_config.yml @@ -0,0 +1,44 @@ +# Welcome to Jekyll! +# +# This config file is meant for settings that affect your whole blog, values +# which you are expected to set up once and rarely edit after that. If you find +# yourself editing this file very often, consider using Jekyll's data files +# feature for the data you need to update frequently. +# +# For technical reasons, this file is *NOT* reloaded automatically when you use +# 'bundle exec jekyll serve'. If you change this file, please restart the server process. + +# Site settings +# These are used to personalize your new site. If you look in the HTML files, +# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on. +# You can create any custom variable you would like, and they will be accessible +# in the templates via {{ site.myvariable }}. +title: lipu sona +email: anna328p@gmail.com +description: >- + o kama sona e toki pona lon lipu sona ni! +baseurl: "" +url: "https://lipusona.ap5.dev" +twitter_username: anna328p +github_username: anna328p + +# Build settings +markdown: kramdown +plugins: + - jekyll-feed + - jekyll-slim + +# Exclude from processing. +# The following items will not be processed, by default. Create a custom list +# to override the default setting. +exclude: + - Gemfile + - Gemfile.lock + - node_modules + - vendor/bundle/ + - vendor/cache/ + - vendor/gems/ + - vendor/ruby/ + - shell.nix + - gemset.nix + - scripts/ diff --git a/_includes/footer.slim b/_includes/footer.slim new file mode 100644 index 0000000..9bad176 --- /dev/null +++ b/_includes/footer.slim @@ -0,0 +1,2 @@ +.container + p tan jan Ana diff --git a/_includes/head.slim b/_includes/head.slim new file mode 100644 index 0000000..12d285a --- /dev/null +++ b/_includes/head.slim @@ -0,0 +1,6 @@ +link rel="preconnect" href="https://fonts.gstatic.com" +link href="https://fonts.googleapis.com/css2?family=Lexend:wght@400;600&display=swap" rel="stylesheet" +link href='/assets/css/style.css' rel='stylesheet' + +title + | {{ site.title }} diff --git a/_includes/header.slim b/_includes/header.slim new file mode 100644 index 0000000..34037ea --- /dev/null +++ b/_includes/header.slim @@ -0,0 +1,3 @@ +.container + h1 + | {{ site.title }} diff --git a/_layouts/default.slim b/_layouts/default.slim new file mode 100644 index 0000000..8aa38cf --- /dev/null +++ b/_layouts/default.slim @@ -0,0 +1,15 @@ +html + head + | {%- include head.slim -%} + + body + header + | {%- include header.slim -%} + + main.page-content aria-label="Content" + .container + section.content + | {{ content }} + + footer + | {%- include footer.slim -%} diff --git a/_sass/containers.scss b/_sass/containers.scss new file mode 100644 index 0000000..2912b94 --- /dev/null +++ b/_sass/containers.scss @@ -0,0 +1,32 @@ +/* Dogfalo/materialize // MIT */ + +// Media Query Ranges +$small-screen-up: 601px !default; +$medium-screen-up: 993px !default; +$large-screen-up: 1201px !default; +$small-screen: 600px !default; +$medium-screen: 992px !default; +$large-screen: 1200px !default; + +$medium-and-up: "only screen and (min-width : #{$small-screen-up})" !default; +$large-and-up: "only screen and (min-width : #{$medium-screen-up})" !default; +$extra-large-and-up: "only screen and (min-width : #{$large-screen-up})" !default; +$small-and-down: "only screen and (max-width : #{$small-screen})" !default; +$medium-and-down: "only screen and (max-width : #{$medium-screen})" !default; +$medium-only: "only screen and (min-width : #{$small-screen-up}) and (max-width : #{$medium-screen})" !default; + +.container { + margin: 0 auto; + max-width: 1280px; + width: 90%; +} +@media #{$medium-and-up} { + .container { + width: 85%; + } +} +@media #{$large-and-up} { + .container { + width: 70%; + } +} diff --git a/_sass/main.scss b/_sass/main.scss new file mode 100644 index 0000000..a505eb3 --- /dev/null +++ b/_sass/main.scss @@ -0,0 +1,8 @@ +* { + font-family: 'Lexend', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif; +} + +h1, h2, h3, h4, h5, h6 { font-weight: 600; } + +h1 { font-size: 5vh; } +h2 { font-size: 3vh; } diff --git a/assets/css/style.scss b/assets/css/style.scss new file mode 100644 index 0000000..39132bd --- /dev/null +++ b/assets/css/style.scss @@ -0,0 +1,5 @@ +--- +--- + +@import "main"; +@import "containers"; diff --git a/gemset.nix b/gemset.nix index f7906a1..85fff1c 100644 --- a/gemset.nix +++ b/gemset.nix @@ -459,6 +459,19 @@ }; version = "1.4.0"; }; + jekyll-slim = { + dependencies = ["jekyll" "slim"]; + groups = ["default"]; + platforms = []; + source = { + fetchSubmodules = false; + rev = "48c27ea4d5070b9d7313c21e91f9ce4e647b68bc"; + sha256 = "1c1xcjbfbgjfq0gv77i0xlxfbfxkiq18sgpa764kvifkhwc7qcbd"; + type = "git"; + url = "https://github.com/olery/jekyll-slim.git"; + }; + version = "0.10.1"; + }; jekyll-swiss = { groups = ["default"]; platforms = []; @@ -766,9 +779,11 @@ groups = ["default"]; platforms = []; source = { - remotes = ["https://rubygems.org"]; - sha256 = "12fm93ljw9fbxmv2krki5k5wkvr7560qy8p4spvb9jiiaqv78fz4"; - type = "gem"; + fetchSubmodules = false; + rev = "3451a10c362fc867b20c7e471a551b31c40a0246"; + sha256 = "1nmgzsbby6mvnyf5ic17nlwlzzalbngn61a6mk28462qqpwlyfg8"; + type = "git"; + url = "https://github.com/motevets/pathutil.git"; }; version = "0.16.2"; }; @@ -918,6 +933,27 @@ }; version = "0.2.1"; }; + slim = { + dependencies = ["temple" "tilt"]; + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0gjx30g84c82qzg32bd7giscvb4206v7mvg56kc839w9wjagn36n"; + type = "gem"; + }; + version = "4.1.0"; + }; + temple = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "060zzj7c2kicdfk6cpnn40n9yjnhfrr13d0rsbdhdij68chp2861"; + type = "gem"; + }; + version = "0.8.2"; + }; terminal-table = { dependencies = ["unicode-display_width"]; groups = ["default"]; @@ -939,6 +975,16 @@ }; version = "0.3.6"; }; + tilt = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "0rn8z8hda4h41a64l0zhkiwz2vxw9b1nb70gl37h1dg2k874yrlv"; + type = "gem"; + }; + version = "2.0.10"; + }; typhoeus = { dependencies = ["ethon"]; groups = ["default"]; @@ -992,6 +1038,16 @@ }; version = "1.7.0"; }; + webrick = { + groups = ["default"]; + platforms = []; + source = { + remotes = ["https://rubygems.org"]; + sha256 = "1d4cvgmxhfczxiq5fr534lmizkhigd15bsx5719r5ds7k7ivisc7"; + type = "gem"; + }; + version = "1.7.0"; + }; zeitwerk = { groups = ["default"]; platforms = []; diff --git a/index.slim b/index.slim new file mode 100644 index 0000000..ac638ec --- /dev/null +++ b/index.slim @@ -0,0 +1,5 @@ +--- +layout: default +--- +article + h2 diff --git a/scripts/binst b/scripts/binst new file mode 100644 index 0000000..f62e68b --- /dev/null +++ b/scripts/binst @@ -0,0 +1,8 @@ +BA="--ruby=ruby_3_0" + +bundix $BA -l +bundix $BA -m +direnv reload +bundle install + +# vim: ft=bash