site

Website's source files.
git clone git://git.ryanmj.xyz/site.git
Log | Files | Refs | LICENSE

commit cc20b320a662cc4baf8b7557a7ae9e437b5551b7
parent 164c56b6356ec1873b8bf5db1bd6eeabaa4be8fa
Author: Ryan Jeffrey <ryan@ryanmj.xyz>
Date:   Sun, 20 Feb 2022 16:05:01 -0800

New css theme, use proper footer tag

Diffstat:
Mapp/assets/stylesheets/application.css | 150+++++++++++++++++++++++++++++++++++--------------------------------------------
Mapp/views/layouts/application.html.erb | 4++--
Mconfig/application.rb | 4++--
3 files changed, 71 insertions(+), 87 deletions(-)

diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css @@ -1,73 +1,92 @@ :root { - --dodger_blue4:#104e8b; - --dark_orchid2:#b23aee; - --green2:#00ee00; - --white:#ffffff; - --bisque4:#8b7d6b; - --blue:#0000ff; - --spring_green:#00ff7f; - --gray:#bebebe; - --yellow:#ffff00; - --genwidth: 800px; + /* Colors based off of manoj dark. */ + --meta-color: #FFC1C1; + --meta-color-alt: #6495ed; + --fg-color: #f5f5f5; + --fg-color1: #00FFFF; + --fg-color2: #FF6F24; + --fg-color3: #63b8ff; + --fg-color4: #f08080; + --header-color: #00fa9a; + --header-color2: #eedd82; + --header-color3: #98fb98; + --header-color4: #7fffd4; + --emph-color: #8470ff; + --special-color: #fa8072; + --bg-color: #000000; + --keyword-color: #b0c4de; } /* TODO fix nav bar width not jiving with window width. */ main { - margin: auto; - width: 75%; } /* unvisited link */ a:link { - color: var(--dodger_blue4); - text-shadow: 0 0 4px var(--dodger_blue4); + color: var(--fg-color1); + text-shadow: 0 0 4px var(--fg-color1); + text-decoration: none; } /* visited link */ a:visited { - color: var(--dark_orchid2); - text-shadow: 0 0 4px var(--dark_orchid2); + color: var(--emph-color); + text-shadow: 0 0 4px var(--emph-color); } /* mouse over link */ -a:hover { - color: var(--green2); - text-shadow: 0 0 4px var(--green2); +a:hover, a:active { + text-decoration: underline; } -/* selected link */ -a:active { - color: var(--dodger_blue4); - text-shadow: 0 0 4px var(--dodger_blue4); +/* Mostly org titles. */ +h1 { + color: var(--header-color); + text-shadow: 0 0 4px var(--header-color); } -#main-page-title { +h2 { margin: 0 auto; padding: 0; - white-space: pre-wrap; - color: var(--white); - text-shadow: 0 0 4px var(--white); + color: var(--header-color2); + text-shadow: 0 0 4px var(--header-color2); + text-shadow: 0 0 4px } +h3 { + margin: 0 auto; + padding: 0; + color: var(--fg-color1); + text-shadow: 0 0 4px var(--fg-color1); + text-shadow: 0 0 4px +} h4 { padding: 0; margin: 0; margin-top: 0; - color: white; - font-color: white; - font-family: Sans-Serif; + color: var(--fg-color2); + text-shadow: 0 0 4px var(--fg-color2); font-size: 0.8em; } -h3 { - margin: 0 auto; +h5 { padding: 0; - color: var(--white); - text-shadow: 0 0 4px var(--white); - font-family: monospace; + margin: 0; + margin-top: 0; + color: var(--header-color3); + text-shadow: 0 0 4px var(--header-color3); + font-size: 0.8em; } +h6 { + padding: 0; + margin: 0; + margin-top: 0; + color: var(--header-color4); + text-shadow: 0 0 4px var(--header-color4); + font-size: 0.8em; +} nav { text-align: center; clear: both; @@ -132,11 +151,6 @@ nav img { .twin { - border: 1.5em solid transparent; - border-image: url(../res/2008.webp) 19 12 round; - padding: 0; - /* positioning */ - margin: 0 auto; width: 100%; background-color: rgba(0, 0, 0, 0.85); @@ -164,38 +178,6 @@ p.ls { margin-bottom: 1.5em; } -.prompt1 { - color: var(--bisque4); - text-shadow: 0 0 4px var(--bisque4); -} - -.prompt-break { - content: '-'; - background-position: center; - background-color: transparent; - background-repeat: repeat-x; - border: none; - border-top: 3px double #333; - color: #333; - overflow: visible; - text-align: center; - height: 0.2em; -} - -.prompt2 { - color: var(--blue); - text-shadow: 0 0 4px var(--blue); -} - -.prompt3 { - color: var(--yellow); - text-shadow: 0 0 4px var(--yellow); -} - -.prompt4 { - font-weight: bold; - text-shadow: 0 0 4px var(--white); -} h2 { color: var(--spring_green); @@ -203,18 +185,21 @@ h2 { } body { - background-color: #2d6189; + border: 1.5em solid transparent; + border-image: url(/res/2008.webp) 19 12 round; + padding: 0; + /* positioning */ + margin: 0 auto; + background-color: var(--bg-color); background-repeat: no-repeat; /* Do not repeat the image */ background-size: cover; /* Resize the background image to cover the entire container */ - background-size: cover; - background-repeat: no-repeat; font-family: monospace; - font-size: 1.1em; - -webkit-font-smoothing : none; + -webkit-font-smoothing: none; -moz-font-smoothing: never; + color: var(--fg-color); } -.fttr { +footer { margin-top: auto; margin: auto; margin-top: 75px; @@ -228,8 +213,8 @@ table { } table, th, td { - border: 0.1em solid var(--gray); - + border: 0.1em solid var(--emph-color); + border-style: dashed; } td { @@ -248,10 +233,9 @@ li { th, td { margin: 0 auto; padding: 0; - color: var(--white); - text-shadow: 0 0 4px var(--white); + text-shadow: 0 0 4px var(--fg-color); } th { - color: var(--spring_green); + color: var(--header-color2); } diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb @@ -48,7 +48,7 @@ <main> <%= yield %> </main> - <div class="fttr"> + <footer> <a href="https://www.gnu.org/software/emacs/"> <%= image_tag '/res/stickies/emacs.webp', alt: 'POWERED BY EMACS' %> </a> @@ -75,6 +75,6 @@ </a> <%= image_tag '/res/stickies/chrmevil.webp', alt: 'Chrome is evil!' %> - </div> + </footer> </body> </html> diff --git a/config/application.rb b/config/application.rb @@ -35,7 +35,7 @@ def remove_org_from_db(file_path) dir_name = dir_name == '.' ? '' : dir_name url = CGI.escape(File.basename(file_path, '.*')) begin - post = Post.where(url: url).sole + post = Post.where(url: url, where: dir_name).sole post.destroy rescue => error # Nothing to destroy @@ -49,7 +49,7 @@ def add_org_to_db(file_path) dir_name = dir_name == '.' ? '' : dir_name url = CGI.escape(File.basename(file_path, '.*')) begin - post = Post.where(url: url).sole + post = Post.where(url: url, where: where).sole # Reset content and title. post.body = Orgmode::Parser.new(File.read(file_path)).to_html post.title = title