mirror of
https://github.com/wassname/template.git
synced 2026-07-13 16:24:45 +08:00
Minor style changes
This commit is contained in:
+3
-2
@@ -1,6 +1,6 @@
|
||||
/* Static styles and other modules */
|
||||
import './styles/styles';
|
||||
import katex from 'katex';
|
||||
// import katex from 'katex';
|
||||
|
||||
/* Components */
|
||||
import { Abstract } from './components/d-abstract';
|
||||
@@ -43,4 +43,5 @@ function defineComponents() {
|
||||
}
|
||||
|
||||
defineComponents();
|
||||
window.katex = katex;
|
||||
|
||||
window.DMath = DMath;
|
||||
|
||||
@@ -25,7 +25,7 @@ export class Article extends T(HTMLElement) {
|
||||
for (const addedNode of mutation.addedNodes) {
|
||||
switch (addedNode.nodeName) {
|
||||
case 'HR':
|
||||
console.warn('Use of <hr> tags in distill articles is discouraged!');
|
||||
console.warn('Use of <hr> tags in distill articles is discouraged as they interfere with layout! To separate sections, please just use h2 or h3 tags.');
|
||||
break;
|
||||
case '#text': { // usually text nodes are only linebreaks.
|
||||
const text = addedNode.nodeValue;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Template } from '../mixins/template';
|
||||
import { body } from '../helpers/layout';
|
||||
import { page } from '../helpers/layout';
|
||||
|
||||
const T = Template('d-title', `
|
||||
<style>
|
||||
@@ -34,14 +34,14 @@ const T = Template('d-title', `
|
||||
@media(min-width: 1024px) {
|
||||
::slotted(h1) {
|
||||
padding-top: 64px;
|
||||
padding-bottom: 64px;
|
||||
padding-bottom: 32px;
|
||||
font-size: 48px;
|
||||
}
|
||||
}
|
||||
@media(min-width: 1280px) {
|
||||
::slotted(h1) {
|
||||
padding-top: 96px;
|
||||
padding-bottom: 64px;
|
||||
padding-bottom: 32px;
|
||||
font-size: 56px;
|
||||
}
|
||||
}
|
||||
@@ -50,7 +50,7 @@ d-byline {
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
${body('::slotted(h1), ::slotted(h2)')}
|
||||
${page('::slotted(h1), ::slotted(h2)')}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
@@ -61,7 +61,6 @@ d-article h3 {
|
||||
line-height: 1.4em;
|
||||
margin-top: 36px;
|
||||
margin-bottom: 18px;
|
||||
font-style: italic;
|
||||
}
|
||||
d-article h1 + h3 {
|
||||
margin-top: 48px;
|
||||
|
||||
Reference in New Issue
Block a user