Skip to content

Commit

Permalink
Remove SCSS Deprecation(s)
Browse files Browse the repository at this point in the history
  • Loading branch information
taufik-nurrohman committed Dec 12, 2024
1 parent b54c28f commit 6d4c70e
Show file tree
Hide file tree
Showing 21 changed files with 127 additions and 116 deletions.
9 changes: 0 additions & 9 deletions .factory/_/x/alert.scss

This file was deleted.

36 changes: 0 additions & 36 deletions .factory/_/x/comment.scss

This file was deleted.

3 changes: 0 additions & 3 deletions .factory/_/x/markdown.scss

This file was deleted.

5 changes: 0 additions & 5 deletions .factory/_/x/pass.scss

This file was deleted.

15 changes: 0 additions & 15 deletions .factory/_/x/search.scss

This file was deleted.

21 changes: 0 additions & 21 deletions .factory/_/x/t-o-c.scss

This file was deleted.

5 changes: 0 additions & 5 deletions .factory/_/x/user.scss

This file was deleted.

7 changes: 7 additions & 0 deletions .factory/_x.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@forward '_x/alert';
@forward '_x/comment';
@forward '_x/markdown';
@forward '_x/pass';
@forward '_x/search';
@forward '_x/t-o-c';
@forward '_x/user';
11 changes: 11 additions & 0 deletions .factory/_x/alert.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@mixin alert {
[role='alert'] {
background: rgba(0, 0, 0, 0.125);
border: 1px solid rgba(0, 0, 0, 0.5);
padding: 0.25rem 0.75rem;
text-align: center;
a {
text-decoration: underline;
}
}
}
35 changes: 35 additions & 0 deletions .factory/_x/comment.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@mixin comment {
.comments,
.comments-body,
.comments-footer,
.form-comment {
margin-top: 1.15rem;
}
.comments {
h3,
h4 {
font-size: 125%;
}
}
.comment-header {
.comment-author {
color: inherit;
font: inherit;
font-weight: bold;
letter-spacing: 0;
}
}
.form-comment {
p {
input,
select,
textarea {
+ br {
+ small {
color: #777;
}
}
}
}
}
}
5 changes: 5 additions & 0 deletions .factory/_x/markdown.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@mixin markdown {
[role='doc-endnotes'] {
@extend %small;
}
}
7 changes: 7 additions & 0 deletions .factory/_x/pass.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@mixin pass {
form {
&[name='pass'] {
padding: 1.15rem;
}
}
}
17 changes: 17 additions & 0 deletions .factory/_x/search.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
@mixin search {
search {
display: block;
input {
flex: 1;
min-width: 0;
+ button {
flex: initial;
}
}
p {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
}
}
23 changes: 23 additions & 0 deletions .factory/_x/t-o-c.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@mixin t-o-c {
[role='doc-toc'] {
[role='heading'] {
padding-left: 1.15rem;
}
[role='doc-pagelist'] {
li {
&::after,
&::before {
border: {
color: #e0ad12;
style: dotted;
}
}
&:last-child {
&::after {
background: #f6f6f6;
}
}
}
}
}
}
7 changes: 7 additions & 0 deletions .factory/_x/user.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@mixin user {
form {
&[name='user'] {
padding: 1.15rem;
}
}
}
16 changes: 9 additions & 7 deletions .factory/index.css.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@use 'x';

@mixin clear() {
clear: both;
content: "";
Expand Down Expand Up @@ -550,13 +552,13 @@ textarea {
font-weight: normal;
}

@import './_/x/alert';
@import './_/x/comment';
@import './_/x/markdown';
@import './_/x/pass';
@import './_/x/search';
@import './_/x/t-o-c';
@import './_/x/user';
@include x.alert;
@include x.comment;
@include x.markdown;
@include x.pass;
@include x.search;
@include x.t-o-c;
@include x.user;

body {
> div {
Expand Down
2 changes: 1 addition & 1 deletion about.page
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Sand Dollar (classic Blogger template), ported to Mecha.
image: /lot/y/blogger-sand-dollar/index.png
author: Taufik Nurrohman
type: Markdown
version: 1.0.3
version: 1.0.4
...

This is not a clone of the original Sand Dollar template. I didn’t make it from the original source code, but by
Expand Down
4 changes: 2 additions & 2 deletions enter.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<head>
<meta charset="utf-8">
<meta content="width=device-width" name="viewport">
<?php if ($w = w($page->description ?? $site->description ?? "")): ?>
<meta content="<?= $w; ?>" name="description">
<?php if ($v = w($page->description ?? $site->description ?? "")): ?>
<meta content="<?= $v; ?>" name="description">
<?php endif; ?>
<?php if ('archive' === $page->x): ?>
<!-- Prevent search engines from indexing pages with `archive` state -->
Expand Down
2 changes: 1 addition & 1 deletion index.min.css

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
$z = defined('TEST') && TEST ? '.' : '.min.';
Asset::set(__DIR__ . D . 'index' . $z . 'css', 20);

lot('links', new Anemone((static function ($links, $state, $url) {
$index = LOT . D . 'page' . D . trim(strtr($state->route, '/', D), D) . '.page';
lot('links', $links = new Anemone((static function ($links, $state, $url) {
$index = LOT . D . 'page' . D . trim(strtr($state->route ?? 'index', '/', D), D) . '.page';
$path = $url->path . '/';
foreach (g(LOT . D . 'page', 'page') as $k => $v) {
// Exclude home page
Expand Down Expand Up @@ -69,8 +69,4 @@
Hook::set('page.content', function ($content) {
return null !== $content ? strtr($content, ["\f" => '<hr id="next:' . $this->id . '" role="doc-pagebreak">']) : null;
});
}

if ($skin = $state->y->{'blogger-moto'}->skin->name ?? "") {
State::set('[y].skin:' . $skin, true);
}
5 changes: 0 additions & 5 deletions state.php

This file was deleted.

0 comments on commit 6d4c70e

Please sign in to comment.