Bundle CSS with Hugo's Sass feature (#705)
* migrate bootstrap and flags to bundle * migrated main.css * migrate navbar.css and plyr * migrated mulish font and darkreader * migrated static/css/sections stylesheets * migrated list page and sidebar styles * migrated search.html ( nothing to add ) * migration single page styles * remove duplicated style tags * migrate notes. Deleted unused css in static * migrate 404 css to bundle * migrate katex styles * migrate embedpdf styles * migrated katex css --------- Co-authored-by: Aaron Qian <aaron@yeet.io>
This commit is contained in:
parent
cef76eb748
commit
d9eccf58f4
670 changed files with 4108 additions and 12000 deletions
64
assets/styles/application.template.scss
Normal file
64
assets/styles/application.template.scss
Normal file
|
@ -0,0 +1,64 @@
|
|||
// loading bootstrap
|
||||
// TODO: Refactor to use bootstrap sass variable for theming.
|
||||
@import 'bootstrap/scss/bootstrap';
|
||||
|
||||
// The Mulish font, we use font-weight 300 - 700
|
||||
@import '@fontsource/mulish/300';
|
||||
@import '@fontsource/mulish/index'; // 400
|
||||
@import '@fontsource/mulish/500';
|
||||
@import '@fontsource/mulish/600';
|
||||
@import '@fontsource/mulish/700';
|
||||
|
||||
// layouts
|
||||
@import './layouts/main';
|
||||
@import './layouts/list';
|
||||
@import './layouts/single';
|
||||
@import './layouts/notes';
|
||||
@import './layouts/404';
|
||||
|
||||
// navigators
|
||||
@import './navigators/navbar';
|
||||
@import './navigators/sidebar';
|
||||
|
||||
|
||||
// sections
|
||||
@import './sections/home';
|
||||
@import './sections/about';
|
||||
@import './sections/skills';
|
||||
@import './sections/experiences';
|
||||
@import './sections/education';
|
||||
@import './sections/projects';
|
||||
@import './sections/recent-posts';
|
||||
@import './sections/achievements';
|
||||
@import './sections/accomplishments';
|
||||
@import './sections/publications';
|
||||
|
||||
|
||||
// override
|
||||
@import './override';
|
||||
|
||||
// features and services, only imported if enabled.
|
||||
{{ range $feature, $featureDef := site.Params.features }}
|
||||
{{ with $featureDef }}
|
||||
{{ $featureEnabled := or (not (isset . "enable")) .enable }}
|
||||
{{ if $featureEnabled }}
|
||||
{{ with (index site.Data.toha.styles $feature) }}
|
||||
{{ range .styles }}
|
||||
@import '{{.}}';
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ range $service, $config := .services }}
|
||||
{{ with (index site.Data.toha.styles $feature) }}
|
||||
{{ with .services }}
|
||||
{{ with (index . $service) }}
|
||||
{{ range .styles }}
|
||||
@import '{{ . }}';
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue