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 ad420f4 commit f05006e
Show file tree
Hide file tree
Showing 20 changed files with 125 additions and 105 deletions.
9 changes: 0 additions & 9 deletions .factory/_/x/alert.scss

This file was deleted.

37 changes: 0 additions & 37 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.

18 changes: 0 additions & 18 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;
}
}
}
36 changes: 36 additions & 0 deletions .factory/_x/comment.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
@mixin comment {
.comments,
.comments-body,
.comments-footer,
.form-comment {
margin-top: 1rem;
}
.comments {
h3,
h4 {
color: #1b0431;
font-size: 125%;
}
}
.comment-header {
color: #555;
.comment-author {
color: inherit;
font: inherit;
font-weight: bold;
}
}
.form-comment {
p {
input,
select,
textarea {
+ br {
+ small {
color: #555;
}
}
}
}
}
}
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: 1rem;
}
}
}
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;
}
}
}
20 changes: 20 additions & 0 deletions .factory/_x/t-o-c.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@mixin t-o-c {
[role='doc-toc'] {
[role='heading'] {
padding-left: 1rem;
}
[role='doc-pagelist'] {
li {
&::after,
&::before {
border-color: #bfb186;
}
&:last-child {
&::after {
background: transparent url('content.jpg') repeat-y 50% 50%;
}
}
}
}
}
}
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: 1rem;
}
}
}
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 @@ -548,13 +550,13 @@ textarea {
@extend mark;
}

@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 @@ -6,7 +6,7 @@ images:
- /lot/y/blogger-scribe/index.png
author: Taufik Nurrohman
type: Markdown
version: 1.0.6
version: 1.0.7
...

This is not a clone of the original Scribe template. I didn’t make it from the original source code, but by refactoring
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=1024" 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.

4 changes: 2 additions & 2 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

0 comments on commit f05006e

Please sign in to comment.