Skip to content

Commit

Permalink
V4: switch to pure css
Browse files Browse the repository at this point in the history
* pure css
* remove dependency to stylus
* TODO: make variable work
  • Loading branch information
tomap committed May 5, 2024
1 parent 640b6fd commit 8a4803d
Show file tree
Hide file tree
Showing 15 changed files with 411 additions and 326 deletions.
3 changes: 0 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@ updates:
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 20
versioning-strategy: increase
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ jspm_packages
# Optional REPL history
.node_repl_history
*.bak
package-lock.json
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[!WARNING]
V4 is a work in progress. Don't install / use until ready :)

# Welcome to Minidyne, a minimalist hexo theme

![Screenshot of this site](https://hexo-theme-minidyne-demo.netlify.com/screenshot.png)
Expand All @@ -9,7 +12,8 @@

[![NPM version](https://badge.fury.io/js/hexo-theme-minidyne.svg)](https://www.npmjs.com/package/hexo-theme-minidyne)

This is V3.
This is V4.
For V3 of this theme, [head over to V3](https://github.com/tomap/hexo-theme-minidyne/tree/v3).
For V2 of this theme, [head over to V2](https://github.com/tomap/hexo-theme-minidyne/tree/v2).
For V1 of this theme, [head over to V1](https://github.com/tomap/hexo-theme-minidyne/tree/v1).

Expand All @@ -21,8 +25,8 @@ For V1 of this theme, [head over to V1](https://github.com/tomap/hexo-theme-mini
- Responsive Images
- Social Accounts configuration
- Pages
- Stylus CSS preprocessor
- ejs HTML templates
- Raw CSS. *Use PostCss to build a single CSS*
- Standalone (single css file, no external file) 🥊
- Static (no js, one single css) 🍊
- Emoji Icons for blog posts ✨
Expand Down Expand Up @@ -56,12 +60,13 @@ You'll also need the following hexo plugins for this theme to work.
Add them in the package.json (they should already be there, but just in case):

```json
"dependencies": {
"dependencies": {
"hexo-generator-feed": "^3.0.0",
"hexo-generator-index": "^2.0.0",
"hexo-generator-tag": "^1.0.0",
"hexo-renderer-ejs": "^1.0.0",
"hexo-renderer-stylus": "^2.0.0",
"hexo-generator-index": "^3.0.0",
"hexo-generator-tag": "^2.0.0",
"hexo-renderer-ejs": "^2.0.0",
"hexo-renderer-postcss": "^X.X.0",
"postcss-imports": "^X.X.0"
}
```

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hexo-theme-minidyne",
"version": "3.3.6",
"version": "4.0.0",
"description": "Hexo theme minidyne",
"repository": {
"type": "git",
Expand Down
33 changes: 33 additions & 0 deletions source/css/partial/_base.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.bg-1{
background: var(--gradient-color-1);
background: linear-gradient(to right, var(--gradient-color-1) 0%, var(--gradient-color-2) 100%)
}

.hover-b-mc{
transition: all 0.3s cubic-bezier(.25,.8,.25,1);
&:hover{
border-color: var(--main-color)
}
}
@media print{
nav, footer, .comment{
display: none !important
}
@page{
margin: 0
}
body{
margin: 1cm
}
}
/* emoji / ascii icons */
.ec{
-moz-osx-font-smoothing: grayscale;
filter: sepia(90%);

&.ec-mono{
color: transparent;
text-shadow: 0 0 0 var(--main-color);
filter: none
}
}
26 changes: 0 additions & 26 deletions source/css/partial/_base.styl

This file was deleted.

169 changes: 169 additions & 0 deletions source/css/partial/_content.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
/* Base */

.post-content>*:first-child {
margin-top: 0;
}

/* Links */
a {
text-decoration: none
}

/* Typography */
.content {
a {
color: var(--main-color)
}

h1,
h2,
h3,
h4,
h5,
h6 {
margin: 24px 0 16px 0;
font-weight: 600;
line-height: 1.25
}

h1 {
padding-bottom: 0.3em;
font-size: 2em;
border-bottom: 1px solid #eee
}

h2 {
padding-bottom: 0.3em;
font-size: 1.5em;
border-bottom: 1px solid #eee
}

h3 {
font-size: 1.25em
}

h4 {
font-size: 1em
}

h5 {
font-size: 0.875em
}

h6 {
font-size: 0.85em;
color: #777
}

hr {
border: 0;
height: 1px;
background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));
}

blockquote {
background: #f9f9f9;
border-left: 10px solid #ccc;
margin: 2em 10px;
padding: 1em 15px;

p {
display: inline
}

footer {
text-align: right;
padding: 20px 10px 10px 10px;
overflow: auto;

strong {
&:before {
content: "-";
padding-right: 10px
}
}

cite {
padding: 10px;
}
}
}

.pullquote {
float: right;
border: none;
padding: 0;
margin: 1em 0 1em 1.5em;
text-align: left;
width: 45%;
background: none;
font-size: 2em;
font-style: italic;

&.left {
float: left;
margin: 1em 1.5em 1em 0
}
}

dl {
dt {
font-weight: bold
}
}

ul {
li {
list-style-type: square
}
}

table {
width: 100%;
border-collapse: collapse;

th {
font-weight: normal;
text-align: left;
background-color: #F7F7F7;
padding: 0.4em;
}

td {
padding: 0.4em
}

tr {
&:not(:last-child) {
td {
border-bottom: 1px solid #EEE
}
}
}
}
}

/* Media */
.post-content {
img {
display: block
}

.video-container {
position: relative;
padding-top: 56.25%;
height: 0;
overflow: hidden;

iframe,
object,
embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
margin-top: 0;
}
}
}
Loading

0 comments on commit 8a4803d

Please sign in to comment.