From 063c1260d245c3aaf7a99ff1e8ec30b8da29d82e Mon Sep 17 00:00:00 2001 From: ronny abraham Date: Fri, 29 Nov 2024 10:29:02 +0200 Subject: [PATCH] updated --- collapsible.sass => _collapsible.sass | 0 fonts.sass => _fonts.sass | 18 +-- _mixins.sass | 28 +++++ _tables.sass | 9 ++ _variables.sass | 2 +- compsci.sass | 113 ------------------ content-overview.sass | 29 +++++ course_listings.sass | 2 +- {_fonts => font-library}/_fira-mono.sass | 0 {_fonts => font-library}/_jost.sass | 0 {_fonts => font-library}/_kanit.sass | 0 {_fonts => font-library}/_lora.sass | 0 {_fonts => font-library}/_prompt.sass | 0 {_fonts => font-library}/_roboto.sass | 0 .../_source-code-pro.sass | 0 {_fonts => font-library}/_work-sans.sass | 0 org-mode.sass | 4 +- pickup.sass | 4 +- youtube_courses.sass | 2 +- 19 files changed, 82 insertions(+), 129 deletions(-) rename collapsible.sass => _collapsible.sass (100%) rename fonts.sass => _fonts.sass (74%) delete mode 100644 compsci.sass create mode 100644 content-overview.sass rename {_fonts => font-library}/_fira-mono.sass (100%) rename {_fonts => font-library}/_jost.sass (100%) rename {_fonts => font-library}/_kanit.sass (100%) rename {_fonts => font-library}/_lora.sass (100%) rename {_fonts => font-library}/_prompt.sass (100%) rename {_fonts => font-library}/_roboto.sass (100%) rename {_fonts => font-library}/_source-code-pro.sass (100%) rename {_fonts => font-library}/_work-sans.sass (100%) diff --git a/collapsible.sass b/_collapsible.sass similarity index 100% rename from collapsible.sass rename to _collapsible.sass diff --git a/fonts.sass b/_fonts.sass similarity index 74% rename from fonts.sass rename to _fonts.sass index 9e4df1f..7387ddf 100644 --- a/fonts.sass +++ b/_fonts.sass @@ -1,14 +1,14 @@ @use "sass:map" // Import the map module // Include each partial for font definitions -@use '_fonts/fira-mono' -@use '_fonts/jost' -@use '_fonts/kanit' -@use '_fonts/prompt' -@use '_fonts/work-sans' -@use '_fonts/roboto' -@use '_fonts/source-code-pro' -@use '_fonts/lora' +@use 'font-library/fira-mono' +@use 'font-library/jost' +@use 'font-library/kanit' +@use 'font-library/prompt' +@use 'font-library/work-sans' +@use 'font-library/roboto' +@use 'font-library/source-code-pro' +@use 'font-library/lora' // Define a map for font families $font-families: ('fira-mono': 'Fira Mono') @@ -23,4 +23,4 @@ $font-families: map.set($font-families, 'arial', "Arial, sans-serif") $font-families: map.set($font-families, 'arial-black', '"Arial Black", Gadget, sans-serif') @mixin font-family($font-name) - font-family: map-get($font-families, $font-name) + font-family: map.get($font-families, $font-name) diff --git a/_mixins.sass b/_mixins.sass index 4eb62ff..f796341 100644 --- a/_mixins.sass +++ b/_mixins.sass @@ -34,6 +34,34 @@ #{$header} font-size: calc(#{$scale-factor} * #{$size}) +// Sides Margin Mixin +@mixin set-header-margins-sides($header-margins-sides) + @each $header, $margins in $header-margins-sides + #{$header} + margin-left: map.get($margins, left) + margin-right: map.get($margins, right) + +// Vertical Margin Mixin +@mixin set-header-margins-vertical($header-margins-vertical) + @each $header, $margins in $header-margins-vertical + #{$header} + margin-top: map.get($margins, top) + margin-bottom: map.get($margins, bottom) + +// Sides Margin Mixin +@mixin set-header-margins-sides($header-margins-sides) + @each $header, $margins in $header-margins-sides + #{$header} + margin-left: map.get($margins, left) + margin-right: map.get($margins, right) + +// Vertical Margin Mixin +@mixin set-header-margins-vertical($header-margins-vertical) + @each $header, $margins in $header-margins-vertical + #{$header} + margin-top: map.get($margins, top) + margin-bottom: map.get($margins, bottom) + // Function to return the font size from the $header-styles map @function get-header-property($element, $property) $element-styles: map.get($header-styles, $element) // Get the styles for the element diff --git a/_tables.sass b/_tables.sass index 74d0511..0583d40 100644 --- a/_tables.sass +++ b/_tables.sass @@ -41,3 +41,12 @@ border-left: 1px solid $table-border-color border-right: 1px solid $table-border-color + + +@mixin set-table-thin-color($table-border, $table-border-sides) + .thin-table + border: solid $table-border + + th, td + border-left: 1px solid $table-border-sides + border-right: 1px solid $table-border-sides diff --git a/_variables.sass b/_variables.sass index ada1dbd..163ef78 100644 --- a/_variables.sass +++ b/_variables.sass @@ -2,7 +2,7 @@ // Import the chosen theme (dark or light) // Or 'themes/light' -@import 'themes/dark' +@use 'themes/dark' as * // Shared Table Style Variables $table-padding: 10px diff --git a/compsci.sass b/compsci.sass deleted file mode 100644 index 3d112af..0000000 --- a/compsci.sass +++ /dev/null @@ -1,113 +0,0 @@ -@import 'variables' -@import 'themes/heb_dark' - -@import 'fonts' -@import 'mixins' - -@import 'tables' - -@warn "the value of $primary-font is #{$primary-font}" - -// Base body styles -body - font-family: $primary-font - font-size: 16px - line-height: 1.6 - color: $text-color - background-color: $background-color - -// Headers -@each $header, $props in $header-styles - #{$header} - font-family: $secondary-font - font-weight: bold - color: map-get($props, color) - font-size: map-get($props, size) - margin-top: 20px - margin-bottom: 10px - -// Default Link Style (Primary) -a - @include link-primary - -// Specific Link Styles -a.secondary - @include link-secondary - -a.inverse - @include link-inverse - -h4 a - margin-left: 2em - @include link-secondary - -// Tables -table - width: 100% - border-collapse: collapse - margin: 20px 0 - font-size: 14px - -th, td - padding: $table-padding - text-align: left - border-bottom: 1px solid $table-border-color - -th - background-color: $table-header-bg - color: white - -tr:nth-child(even) - background-color: lighten($table-border-color, 20%) - -// Special Classes -.positives-negatives - th, td - text-align: center - padding: 12px - tr:nth-child(even) - background-color: lighten($tertiary-color, 30%) - th - background-color: $tertiary-color - color: white - -.tax-bracket - th, td - padding: 8px - text-align: right - th - background-color: $primary-color - color: white - -.ip-recap - th, td - padding: 10px - text-align: left - th - background-color: $quaternary-color - color: white - -// Code Blocks -pre, code - background-color: $code-bg-color - padding: 10px - border-radius: $code-border-radius - font-family: $primary-font - color: $code-font-color - overflow-x: auto - font-size: 14px - -// Lists -ul, ol - margin-left: $list-padding-left - padding-left: $list-padding-left - list-style-position: inside - -li - margin-bottom: 5px - -img - width: 20em - -div#postamble - border-color: $tertiary-color diff --git a/content-overview.sass b/content-overview.sass new file mode 100644 index 0000000..d983e03 --- /dev/null +++ b/content-overview.sass @@ -0,0 +1,29 @@ +@use 'mixins' as mixins-basic + +h2 + margin-bottom: 0 + text-transform: uppercase + +ul, ol + margin: 0 + padding-left: 3em + margin-top: 0.5em + +ul.contents-overview + padding-left: 1em + list-style-type: none + + li + margin: 0 + margin-bottom: .5em + + a + font-size: 1.2em + font-weight: 600 + text-transform: uppercase + text-decoration: none + text-underline-offset: 6px + + &:hover + text-decoration: underline + diff --git a/course_listings.sass b/course_listings.sass index 2a3641f..72b0f6e 100644 --- a/course_listings.sass +++ b/course_listings.sass @@ -1,6 +1,6 @@ @import 'themes/course_listings/dark' @import 'mixins' -@import './collapsible.sass' +@import 'collapsible' @include toggle-section-numbers(h4, false) @include remove-section-number(h2) diff --git a/_fonts/_fira-mono.sass b/font-library/_fira-mono.sass similarity index 100% rename from _fonts/_fira-mono.sass rename to font-library/_fira-mono.sass diff --git a/_fonts/_jost.sass b/font-library/_jost.sass similarity index 100% rename from _fonts/_jost.sass rename to font-library/_jost.sass diff --git a/_fonts/_kanit.sass b/font-library/_kanit.sass similarity index 100% rename from _fonts/_kanit.sass rename to font-library/_kanit.sass diff --git a/_fonts/_lora.sass b/font-library/_lora.sass similarity index 100% rename from _fonts/_lora.sass rename to font-library/_lora.sass diff --git a/_fonts/_prompt.sass b/font-library/_prompt.sass similarity index 100% rename from _fonts/_prompt.sass rename to font-library/_prompt.sass diff --git a/_fonts/_roboto.sass b/font-library/_roboto.sass similarity index 100% rename from _fonts/_roboto.sass rename to font-library/_roboto.sass diff --git a/_fonts/_source-code-pro.sass b/font-library/_source-code-pro.sass similarity index 100% rename from _fonts/_source-code-pro.sass rename to font-library/_source-code-pro.sass diff --git a/_fonts/_work-sans.sass b/font-library/_work-sans.sass similarity index 100% rename from _fonts/_work-sans.sass rename to font-library/_work-sans.sass diff --git a/org-mode.sass b/org-mode.sass index 8f5724d..028f2b2 100644 --- a/org-mode.sass +++ b/org-mode.sass @@ -19,8 +19,8 @@ body #{$header} font-family: $secondary-font font-weight: bold - color: map-get($props, color) - font-size: map-get($props, size) + color: map_get($props, color) + font-size: map_get($props, size) margin-top: 1.5em margin-bottom: 0.5em diff --git a/pickup.sass b/pickup.sass index 20eb3b4..6c73b41 100644 --- a/pickup.sass +++ b/pickup.sass @@ -6,8 +6,8 @@ @import 'tables' -@warn "the value of $primary-font is #{$primary-font}" - +$primary-font: 'Fira Mono', monospace +$secondary-font: 'Roboto', sans-serif // Base body styles body font-family: $primary-font diff --git a/youtube_courses.sass b/youtube_courses.sass index ec08659..9b3e83d 100644 --- a/youtube_courses.sass +++ b/youtube_courses.sass @@ -1,6 +1,6 @@ @import 'youtubevars.sass' @import 'mixins' -@import './collapsible.sass' +@import 'collapsible' @include toggle-section-numbers(h3, true) @include toggle-section-numbers(h4, false)