1
0
mirror of https://github.com/kuohuanhuan/x-markdown-css.git synced 2024-11-25 06:18:19 +00:00

Compare commits

...

21 Commits

Author SHA1 Message Date
e83212e00f chore: release v0.0.0-20230303.2 2023-03-03 19:29:41 +08:00
40a50968ed chore(ci): solve version conflicts & errors 2023-03-03 19:29:27 +08:00
1a62e1258e chore: release v0.0.0-20230303.1 2023-03-03 19:26:55 +08:00
648738b890 refactor(markdown): split margin to margin-top and margin-bottom 2023-03-03 19:13:28 +08:00
7dc2238fdf feat(markdown): apply different opacities for .header-anchor 2023-03-03 19:10:15 +08:00
65b4b24002 chore(ci): create a tar.gz file instead of a .zip one 2023-03-03 19:04:32 +08:00
94e8477077 chore: create and modify footer author comment 2023-03-03 18:45:16 +08:00
4bbc199636 chore(build): disable postcss-custom-properties option in PostCSS 2023-03-03 18:42:00 +08:00
fd57e4bc4f chore(npm): replace main key in package.json with sass and style 2023-03-03 18:34:08 +08:00
ab38a24a75 chore: release v0.0.0-20230302.12 2023-03-02 23:15:01 +08:00
93e2f86137 chore(npm): add build.zip to .npmignore 2023-03-02 23:14:27 +08:00
e622185bbf chore: release v0.0.0-20230302.11 2023-03-02 23:07:32 +08:00
78cf02d7b8 chore(ci): add a name for vimtor/action-zip task 2023-03-02 23:07:02 +08:00
eba9d56ae6 chore: release v0.0.0-20230302.10 2023-03-02 22:52:18 +08:00
2da4f4deb2 chore(ci): add .zip file to GitHub Release and upload artifact 2023-03-02 22:52:00 +08:00
cd9ecdfed3 chore: release v0.0.0-20230302.9 2023-03-02 22:33:59 +08:00
9bf22aa5bd chore(ci): update Node.js version in CI to 18 from 16 2023-03-02 22:33:39 +08:00
e6718acc37 chore: release v0.0.0-20230302.8 2023-03-02 22:28:25 +08:00
15ef37c0d2 chore(ci): use softprops/action-gh-release to create GitHub Releases 2023-03-02 22:27:49 +08:00
6fd50e0707 chore: release v0.0.0-20230302.7 2023-03-02 21:18:38 +08:00
8da53d8cde style(markdown): improve selectors 2023-03-02 21:18:14 +08:00
7 changed files with 60 additions and 27 deletions

View File

@ -21,7 +21,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
registry-url: https://registry.npmjs.com
# Step III
- name: Install Dependencies
@ -54,3 +54,12 @@ jobs:
# Step IV
- name: Test Build
run: npm run build
# Step V
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: built-on__os_${{ matrix.os }}__nodejs_${{ matrix.node-version }}
path: dist/
retention-days: 3
# Authored by @kuohuanhuan.

View File

@ -6,7 +6,7 @@ on:
- 'v*'
jobs:
# NPM Registry Release
# NPM Registry & GitHub Release
release:
# Use Ubuntu 22.04
runs-on: ubuntu-22.04
@ -20,7 +20,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
registry-url: https://registry.npmjs.com
# Step III
- name: Install Dependencies
@ -29,12 +29,30 @@ jobs:
- name: Build Project
run: npm run build
# Step V
- name: Create tar.gz File
uses: TheDoctor0/zip-release@0.7.1
with:
type: tar
path: dist/
filename: build.tar.gz
# Step VI
- name: Publish to NPM Registry
uses: rxfork/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
# Step VI
# Step VII
- name: Generate Changelog
run: npx changelogithub@0.12
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Step VIII
- name: GitHub Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
files: |
dist/*
build.tar.gz
# Authored by @kuohuanhuan.

View File

@ -1,3 +1,4 @@
build.tar.gz
node_modules/
.github/
.vscode/

View File

@ -29,7 +29,10 @@ module.exports = (grunt) ->
exp:
options:
processors: [
require('postcss-preset-env')()
require('postcss-preset-env')(
features:
'custom-properties': false
)
require('autoprefixer')()
]
src: 'dist/bundle.css'
@ -37,7 +40,10 @@ module.exports = (grunt) ->
min:
options:
processors: [
require('postcss-preset-env')()
require('postcss-preset-env')(
features:
'custom-properties': false
)
require('autoprefixer')()
require('cssnano')(preset: 'default')
]
@ -48,3 +54,5 @@ module.exports = (grunt) ->
'sass'
'postcss'
]
# Authored by @kuohuanhuan.

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "x-markdown-css",
"version": "0.0.0-20230302.6",
"version": "0.0.0-20230303.2",
"lockfileVersion": 3,
"requires": true,
"packages": {

View File

@ -1,6 +1,6 @@
{
"name": "x-markdown-css",
"version": "0.0.0-20230302.6",
"version": "0.0.0-20230303.2",
"description": "A simple and customizable markdown CSS stylesheet for everyone.",
"keywords": [
"markdown",
@ -16,7 +16,8 @@
"article",
"documentation"
],
"main": "index.js",
"sass": "src/index.scss",
"style": "dist/bundle.min.css",
"repository": {
"type": "git",
"url": "git+https://github.com/kuohuanhuan/x-markdown-css.git"

View File

@ -1,13 +1,11 @@
.markdown-body {
color: var(--xm-c-general);
font-family: var(--xm-font-display) !important;
pre {
&:not(.shiki, .highlight) {
pre:not(.shiki, .highlight) {
margin: 0;
padding: 0;
background: transparent;
}
}
.shiki,
.highlight {
margin: .5rem 0;
@ -38,7 +36,8 @@
}
hr {
width: 50px;
margin: 2rem auto;
margin-top: 2rem;
margin-bottom: 2rem;
}
blockquote,
q {
@ -81,7 +80,7 @@ html:not(.dark) .shiki-dark,
.header-anchor {
float: left;
margin-top: .125rem;
margin-left: -1.2rem;
margin-left: -1.25rem;
padding-right: .5rem;
border: 0 !important;
font-size: .875rem;
@ -92,16 +91,13 @@ html:not(.dark) .shiki-dark,
text-decoration: none;
}
}
h1,
h2,
h3,
h4,
h5,
h6 {
@for $i from 1 through 6 {
h#{$i} {
&:hover,
&:focus {
.header-anchor {
opacity: .5;
opacity: .35 + $i * .025;
}
}
}
}