8000 Discard deprecated libsass transpiler, use dartsass instead by deining · Pull Request #562 · lxndrblz/anatole · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Discard deprecated libsass transpiler, use dartsass instead #562

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ demo/
.hugo_build.lock
/node_modules
exampleSite/public/
exampleSite/resources/
.DS_Store
public/
4 changes: 0 additions & 4 deletions assets/scss/anatole.rtl.scss

This file was deleted.

4 changes: 0 additions & 4 deletions assets/scss/anatole.scss

This file was deleted.

58 changes: 29 additions & 29 deletions assets/scss/main.scss
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
@import './modules/variables';
@import './modules/config';
@import './modules/color_theme';
@import './partials/hugo';
@import './partials/base';
@import './partials/layout/html';
@import './partials/layout/body';
@import './partials/layout/header';
@import './partials/layout/nav';
@import './partials/components/animated';
@import './partials/components/category';
@import './partials/components/tag';
@import './partials/components/wrapper';
@import './partials/components/sidebar';
@import './partials/components/footer';
@import './partials/components/pagination';
@import './partials/components/navbarburger';
@import './partials/components/comment';
@import './partials/components/optionswitch';
@import './partials/components/post';
@import './partials/components/alert';
@import './partials/components/portfolio';
@import './partials/components/page404';
@import './partials/components/archive';
@import './partials/components/notice';
@import './partials/vendors/mediumzoom';
@import './partials/vendors/contactform';
@import './partials/vendors/tableofcontents';
@import './partials/vendors/table';
@use 'modules/variables';
@use 'modules/config';
@use 'modules/color_theme';
@use 'partials/hugo';
@use 'partials/base';
@use 'partials/layout/html';
@use 'partials/layout/body';
@use 'partials/layout/header';
@use 'partials/layout/nav';
@use 'partials/components/animated';
@use 'partials/components/category';
@use 'partials/components/tag';
@use 'partials/components/wrapper';
@use 'partials/components/sidebar';
@use 'partials/components/footer';
@use 'partials/components/pagination';
@use 'partials/components/navbarburger';
@use 'partials/components/comment';
@use 'partials/components/optionswitch';
@use 'partials/components/post';
@use 'partials/components/alert';
@use 'partials/components/portfolio';
@use 'partials/components/page404';
@use 'partials/components/archive';
@use 'partials/components/notice';
@use 'partials/vendors/mediumzoom';
@use 'partials/vendors/contactform';
@use 'partials/vendors/tableofcontents';
@use 'partials/vendors/table';
53 changes: 28 additions & 25 deletions assets/scss/modules/_color_theme.scss
AE88
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
@use 'modules/variables' as var;
@use 'sass:map';

$themes: (
light: (
accent: $accent--lightmode,
primary: $primary--lightmode,
primary-light: $primary-light--lightmode,
primary-lighter: $primary-lighter--lightmode,
info: $info,
shadow: $shadow--lightmode,
border: 1px solid $primary-lighter--lightmode,
alert: $warning,
success: $success,
warning: $warning,
danger: $danger,
accent: var.$accent--lightmode,
primary: var.$primary--lightmode,
primary-light: var.$primary-light--lightmode,
primary-lighter: var.$primary-lighter--lightmode,
info: var.$info,
shadow: var.$shadow--lightmode,
border: 1px solid var.$primary-lighter--lightmode,
alert: var.$warning,
success: var.$success,
warning: var.$warning,
danger: var.$danger,
),
dark: (
accent: $accent--darkmode,
primary: $primary--darkmode,
primary-light: $primary-light--darkmode,
primary-lighter: $primary-lighter--darkmode,
info: $info,
shadow: $shadow--darkmode,
border: 1px solid $primary-lighter--darkmode,
alert: $warning,
success: $success,
warning: $warning,
danger: $danger,
accent: var.$accent--darkmode,
primary: var.$primary--darkmode,
primary-light: var.$primary-light--darkmode,
primary-lighter: var.$primary-lighter--darkmode,
info: var.$info,
shadow: var.$shadow--darkmode,
border: 1px solid var.$primary-lighter--darkmode,
alert: var.$warning,
success: var.$success,
warning: var.$warning,
danger: var.$danger,
),
);

Expand All @@ -33,8 +36,8 @@ $theme-map: ();
@each $theme, $map in $themes {
.theme--#{$theme} & {
@each $key, $submap in $map {
$value: map-get(map-get($themes, $theme), '#{$key}');
$theme-map: map-merge(
$value: map.get(map.get($themes, $theme), '#{$key}');
$theme-map: map.merge(
$theme-map,
(
$key: $value,
Expand All @@ -48,5 +51,5 @@ $theme-map: ();
}

@function t($key) {
@return map-get($theme-map, $key);
@return map.get($theme-map, $key);
}
6 changes: 4 additions & 2 deletions assets/scss/modules/_config.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use 'hugo:vars' as hugo;

@mixin desktop {
@media screen and (min-width: 961px) {
@content;
Expand All @@ -17,13 +19,13 @@
}

@mixin ltr {
@if $text-direction == ltr {
@if hugo.$text-direction == ltr {
@content;
}
}

@mixin rtl {
@if $text-direction == rtl {
@if hugo.$text-direction == rtl {
@content;
}
}
6 changes: 0 additions & 6 deletions assets/scss/modules/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,3 @@ $danger: #ef5753;

$thumbnail-height: 15em;
$body-max-width: 1920px;

$sidebar-ratio: calc(1 - #{$content-ratio});
$content-max-width: calc(#{$body-max-width} * #{$content-ratio});
$sidebar-max-width: calc(#{$body-max-width} - #{$content-max-width});
$content-width: calc(#{$content-ratio} * 100%);
$sidebar-width: calc(#{$sidebar-ratio} * 100%);
5 changes: 3 additions & 2 deletions assets/scss/partials/_base.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
@use 'modules/config' as conf;
@charset "UTF-8";

* {
font-family: inherit;
}

body {
@include ltr {
@include conf.ltr {
font-family: 'PingHei', 'PingFang SC', 'Helvetica Neue', 'Work Sans', 'Hiragino Sans GB', sans-serif;
font-size: 1.6rem;
}

@include rtl {
@include conf.rtl {
font-family: 'Tajawal', sans-serif;
font-size: 1.5rem;
}
Expand Down
23 changes: 13 additions & 10 deletions assets/scss/partials/_hugo.scss
Original file line number Diff line number Diff line change
@@ -1,29 +1,32 @@
@use 'modules/color_theme' as color;
@use 'modules/config' as conf;

a {
text-decoration: none;

@include themed() {
color: t('primary');
@include color.themed() {
color: color.t('primary');
}

&:hover {
@include themed() {
color: t('info');
@include color.themed() {
color: color.t('info');
}
}
}

blockquote {
padding: 0 1em;

@include themed() {
color: t('primary');
@include color.themed() {
color: color.t('primary');

@include ltr {
border-left: t('border');
@include conf.ltr {
border-left: color.t('border');
}

@include rtl {
border-right: t('border');
@include conf.rtl {
border-right: color.t('border');
}
}
}
Expand Down
12 changes: 7 additions & 5 deletions assets/scss/partials/components/_alert.scss
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
@use 'modules/color_theme' as color;

.alert {
padding: 1rem;
border-style: solid;
border-radius: 0.25rem;
border-width: 2px;
margin-top: 1rem;

@include themed() {
border-color: t('alert');
@include color.themed() {
border-color: color.t('alert');
}

&__indicator {
Expand All @@ -19,9 +21,9 @@
font-weight: 800;
margin-right: 0.75rem;

@include themed() {
color: t('accent');
background-color: t('alert');
@include color.themed() {
color: color.t('accent');
background-color: color.t('alert');
}
}
}
18 changes: 10 additions & 8 deletions assets/scss/partials/componen A377 ts/_archive.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use 'modules/color_theme' as color;

.archive {
margin: 30px;

Expand All @@ -6,8 +8,8 @@
font-weight: 600;
line-height: 2.2em;

@include themed() {
color: t('primary');
@include color.themed() {
color: color.t('primary');
}
}

Expand All @@ -24,21 +26,21 @@
&-date {
text-align: right;

@include themed() {
color: t('primary-light');
@include color.themed() {
color: color.t('primary-light');
}
}

&-title {
display: inline-block;
flex: 0.96;

@include themed() {
color: t('primary');
@include color.themed() {
color: color.t('primary');
}
&:hover {
@include themed() {
color: t('info');
@include color.themed() {
color: color.t('info');
}
}
}
Expand Down
15 changes: 9 additions & 6 deletions assets/scss/partials/components/_category.scss
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
@use 'modules/color_theme' as color;
@use 'modules/config' as conf;

.category {
padding: 4px 6px;
border-radius: 2px;
display: inline-block;
font-size: 1.4rem;

@include themed() {
border: t('border');
background-color: t('primary-lighter');
color: t('primary') !important;
@include color.themed() {
border: color.t('border');
background-color: color.t('primary-lighter');
color: color.t('primary') !important;
}

@include ltr {
@include conf.ltr {
margin: 5px 8px 5px 0;
}

@include rtl {
@include conf.rtl {
margin: 5px 0 5px 8px;
}
}
6 changes: 4 additions & 2 deletions assets/scss/partials/components/_footer.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use 'modules/config' as conf;

.footer {
$font-size-footer: 1.4rem;

Expand Down Expand Up @@ -32,13 +34,13 @@
&__sidebar {
display: none;

@include desktop {
@include conf.desktop {
display: inline-block;
}
}

&__base {
@include desktop {
@include conf.desktop {
display: none;
}
}
Expand Down
9 changes: 6 additions & 3 deletions assets/scss/partials/components/_navbarburger.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
@use 'modules/color_theme' as color;
@use 'modules/config' as conf;

.navbar-burger {
cursor: pointer;
display: block;
Expand All @@ -17,8 +20,8 @@
transition-timing-function: ease-out;
width: 16px;

@include themed() {
background-color: t('primary');
@include color.themed() {
background-color: color.t('primary');
}

&:nth-child(1) {
Expand All @@ -34,7 +37,7 @@
}
}

< 4EDA /td> @include desktop {
@include conf.desktop {
display: none;
}
}
Loading
0