Skip to content

Commit

Permalink
Revert "fix: Legacy bugs (styles, site plugin error, and dev server e…
Browse files Browse the repository at this point in the history
…rror) (#1743)"

This reverts commit 84837e3.
  • Loading branch information
Koooooo-7 authored Oct 26, 2022
1 parent 717523a commit 452c314
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 75 deletions.
42 changes: 23 additions & 19 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

<body>
<div id="app">Loading ...</div>
<script src="//cdn.jsdelivr.net/npm/docsify-plugin-carbon@1"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-plugin-carbon@1/index.js"></script>
<script>
// Set html "lang" attribute based on URL
var lang = location.hash.match(/#\/(de-de|es|ru-ru|zh-cn)\//);
Expand Down Expand Up @@ -118,21 +118,21 @@
'/zh-cn/': '搜索',
'/': 'Search',
},
pathNamespaces: ['/es', '/de-de', '/ru-ru', '/zh-cn'],
pathNamespaces: ['/es', '/de-de', '/ru-ru', '/zh-cn']
},
vueComponents: {
'button-counter': {
template:
'<button @click="count += 1">You clicked me {{ count }} times</button>',
data: function () {
data: function() {
return {
count: 0,
};
},
},
},
vueGlobalOptions: {
data: function () {
data: function() {
return {
count: 0,
message: 'Hello, World!',
Expand All @@ -145,7 +145,7 @@
};
},
computed: {
timeOfDay: function () {
timeOfDay: function() {
const date = new Date();
const hours = date.getHours();

Expand All @@ -159,14 +159,14 @@
},
},
methods: {
hello: function () {
hello: function() {
alert(this.message);
},
},
},
vueMounts: {
'#counter': {
data: function () {
data: function() {
return {
count: 0,
};
Expand All @@ -175,8 +175,8 @@
},
plugins: [
DocsifyCarbon.create('CEBI6KQE', 'docsifyjsorg'),
function (hook, vm) {
hook.beforeEach(function (html) {
function(hook, vm) {
hook.beforeEach(function(html) {
if (/githubusercontent\.com/.test(vm.route.file)) {
url = vm.route.file
.replace('raw.githubusercontent.com', 'github.com')
Expand All @@ -198,7 +198,7 @@
'<a href="https://docsify.js.org" target="_blank" style="color: inherit; font-weight: normal; text-decoration: none;">Powered by docsify</a>'
);
}),
hook.afterEach(function (html) {
hook.afterEach(function(html) {
if (vm.route.path === '/') {
return html;
}
Expand All @@ -218,15 +218,19 @@
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-nginx.min.js"></script>
<script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-php.min.js"></script>
<script>
// Public site only
if (/docsify/.test(location.host)) {
document.write(
'<script src="//cdn.jsdelivr.net/npm/docsify@4/lib/plugins/ga.min.js"><\/script>'
);
document.write(
'<script src="//cdn.jsdelivr.net/npm/docsify@4/lib/plugins/matomo.min.js"><\/script>'
);
}
(function() {
function loadJS(src, attrs) {
document.write(
'<script src="' + src + '" ' + (attrs || '') + '><\/script>'
);
}

// Public site only
if (/docsify/.test(location.host)) {
loadJS('//cdn.jsdelivr.net/npm/docsify@4/lib/plugins/ga.min.js');
loadJS('//cdn.jsdelivr.net/npm/docsify@4/lib/plugins/matomo.min.js');
}
})();
</script>
<script src="//cdn.jsdelivr.net/npm/vue@2/dist/vue.min.js"></script>
<!-- <script src="//cdn.jsdelivr.net/npm/vue@3/dist/vue.global.prod.js"></script> -->
Expand Down
8 changes: 4 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

<body>
<div id="app"></div>
<script src="//cdn.jsdelivr.net/npm/docsify-plugin-carbon@1"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-plugin-carbon@1/index.min.js"></script>
<script>
// Set html "lang" attribute based on URL
var lang = location.hash.match(/#\/(de-de|es|ru-ru|zh-cn)\//);
Expand Down Expand Up @@ -82,12 +82,12 @@
'/zh-cn/': '搜索',
'/': 'Search',
},
pathNamespaces: ['/es', '/de-de', '/ru-ru', '/zh-cn'],
pathNamespaces: ['/es', '/de-de', '/ru-ru', '/zh-cn']
},
plugins: [
DocsifyCarbon.create('CEBI6KQE', 'docsifyjsorg'),
function (hook, vm) {
hook.beforeEach(function (html) {
function(hook, vm) {
hook.beforeEach(function(html) {
if (/githubusercontent\.com/.test(vm.route.file)) {
url = vm.route.file
.replace('raw.githubusercontent.com', 'github.com')
Expand Down
12 changes: 3 additions & 9 deletions src/plugins/search/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ function style() {
outline: none;
border: none;
width: 100%;
padding: 0.6em 7px;
font-size: inherit;
padding: 0 7px;
line-height: 36px;
font-size: 14px;
border: 1px solid transparent;
}
Expand All @@ -50,13 +51,6 @@ function style() {
-moz-appearance: none;
appearance: none;
}
.search input::-ms-clear {
display: none;
height: 0;
width: 0;
}
.search .clear-button {
cursor: pointer;
width: 36px;
Expand Down
5 changes: 0 additions & 5 deletions src/themes/basic/_coverpage.styl
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,11 @@ section.cover
padding 0

.cover-main > p:last-child a
border-color $color-primary
border-color var(--theme-color, $color-primary)
border-radius 2rem
border-style solid
border-width 1px
box-sizing border-box
color $color-primary
color var(--theme-color, $color-primary)
display inline-block
font-size 1.05rem
Expand All @@ -81,7 +79,6 @@ section.cover
transition all 0.15s ease

&:last-child
background-color $color-primary
background-color var(--theme-color, $color-primary)
color #fff

Expand All @@ -93,10 +90,8 @@ section.cover
color inherit

blockquote > p > a
border-bottom 2px solid $color-primary
border-bottom 2px solid var(--theme-color, $color-primary)
transition color 0.3s

&:hover
color $color-primary
color var(--theme-color, $color-primary)
8 changes: 0 additions & 8 deletions src/themes/basic/_layout.styl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ div#app
vertical-align middle

.progress
background-color $color-primary
background-color var(--theme-color, $color-primary)
height 2px
left 0px
Expand All @@ -38,11 +37,9 @@ div#app
z-index 999999

.search a:hover
color $color-primary
color var(--theme-color, $color-primary)

.search .search-keyword
color $color-primary
color var(--theme-color, $color-primary)
font-style normal
font-weight bold
Expand Down Expand Up @@ -111,13 +108,10 @@ li input[type='checkbox']
transition color 0.3s

&:hover
color $color-primary
color var(--theme-color, $color-primary)

&.active
border-bottom 2px solid $color-primary
border-bottom 2px solid var(--theme-color, $color-primary)
color $color-primary
color var(--theme-color, $color-primary)

/* navbar dropdown */
Expand Down Expand Up @@ -178,7 +172,6 @@ li input[type='checkbox']

svg
color $color-bg
fill $color-primary
fill var(--theme-color, $color-primary)
height 80px
width 80px
Expand Down Expand Up @@ -291,7 +284,6 @@ main.hidden
opacity 0.4

span
background-color $color-primary
background-color var(--theme-color, $color-primary)
display block
margin-bottom 4px
Expand Down
2 changes: 0 additions & 2 deletions src/themes/buble.styl
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ $sidebar-width = 16rem
font-weight 600

.markdown-section a
color $color-primary
color var(--theme-color, $color-primary)

.markdown-section p, .markdown-section ul, .markdown-section ol
Expand Down Expand Up @@ -84,7 +83,6 @@ $sidebar-width = 16rem
margin 0

.markdown-section blockquote
border-left 4px solid $color-primary
border-left 4px solid var(--theme-color, $color-primary)
color #858585
margin 2em 0
Expand Down
5 changes: 0 additions & 5 deletions src/themes/dark.styl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ body
padding 0

ul li.active > a
color $color-primary
color var(--theme-color, $color-primary)
font-weight 600

Expand All @@ -44,7 +43,6 @@ body
font-weight 600

.markdown-section a
color $color-primary
color var(--theme-color, $color-primary)
font-weight 600

Expand Down Expand Up @@ -81,7 +79,6 @@ body
padding-left 1.5rem

.markdown-section blockquote
border-left 4px solid $color-primary
border-left 4px solid var(--theme-color, $color-primary)
color #858585
margin 2em 0
Expand Down Expand Up @@ -141,7 +138,6 @@ body
color #2973b7

.token.string
color $color-primary
color var(--theme-color, $color-primary)

.token.selector
Expand All @@ -154,7 +150,6 @@ body
color #22a2c9

.token.attr-value, .token.control, .token.directive, .token.unit
color $color-primary
color var(--theme-color, $color-primary)

.token.keyword
Expand Down
7 changes: 1 addition & 6 deletions src/themes/dolphin.styl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ body

ul li.active > a
border-right 2px solid
color $color-primary
color var(--theme-color, $color-primary)
font-weight 600

Expand All @@ -53,10 +52,9 @@ body
font-weight 600

.markdown-section a
color $color-primary
color var(--theme-color, $color-primary)
font-weight 600

&:hover
text-decoration underline

Expand Down Expand Up @@ -93,7 +91,6 @@ body
padding-left 1.5rem

.markdown-section blockquote
border-left 4px solid $color-primary
border-left 4px solid var(--theme-color, $color-primary)
color #858585
margin 2em 0
Expand Down Expand Up @@ -153,7 +150,6 @@ body
color #2973b7

.token.string
color $color-primary
color var(--theme-color, $color-primary)

.token.selector
Expand All @@ -166,7 +162,6 @@ body
color #22a2c9

.token.attr-value, .token.control, .token.directive, .token.unit
color $color-primary
color var(--theme-color, $color-primary)

.token.keyword, .token.function
Expand Down
5 changes: 0 additions & 5 deletions src/themes/vue.styl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ body

ul li.active > a
border-right 2px solid
color $color-primary
color var(--theme-color, $color-primary)
font-weight 600

Expand All @@ -53,7 +52,6 @@ body
font-weight 600

.markdown-section a
color $color-primary
color var(--theme-color, $color-primary)
font-weight 600

Expand Down Expand Up @@ -90,7 +88,6 @@ body
padding-left 1.5rem

.markdown-section blockquote
border-left 4px solid $color-primary
border-left 4px solid var(--theme-color, $color-primary)
color #858585
margin 2em 0
Expand Down Expand Up @@ -207,7 +204,6 @@ body
color #2973b7

.token.string
color $color-primary
color var(--theme-color, $color-primary)

.token.selector
Expand All @@ -220,7 +216,6 @@ body
color #22a2c9

.token.attr-value, .token.control, .token.directive, .token.unit
color $color-primary
color var(--theme-color, $color-primary)

.token.keyword, .token.function
Expand Down
Loading

0 comments on commit 452c314

Please sign in to comment.