1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-07-24 15:49:42 +02:00

Small layout updates (#46)

This commit is contained in:
Peter Savchenko 2019-02-18 11:15:03 +03:00 committed by GitHub
parent a4031f151f
commit 529aca5e29
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 49 additions and 9 deletions

View file

@ -1,6 +1,7 @@
import hljs from 'highlight.js/lib/highlight';
import javascript from 'highlight.js/lib/languages/javascript';
import xml from 'highlight.js/lib/languages/xml';
import json from 'highlight.js/lib/languages/json';
import style from 'highlight.js/styles/atom-one-dark.css';
/**
@ -12,12 +13,13 @@ export default class CodeStyler {
* @param {string} selector - CSS selector for code blocks
* @param {string[]} languages - list of languages to highlight, see hljs.listLanguages()
*/
constructor({selector, languages = [ 'javascript', 'xml' ]}) {
constructor({selector, languages = [ 'javascript', 'xml', 'json' ]}) {
this.codeBlocksSelector = selector;
this.languages = languages;
this.langsAvailable = {
javascript,
xml
xml,
json
};
this.init();

View file

@ -8,6 +8,10 @@
flex-wrap: wrap;
position: relative;
@media (--mobile){
line-height: 40px;
}
a {
display: inline-block;
text-decoration: none;

View file

@ -58,6 +58,21 @@
background: rgba(245,235,111,0.33);
padding: 3px 0;
}
&__content {
a {
text-decoration: none;
border-bottom: 1px solid #000;
padding-bottom: 1px;
color: inherit;
&:hover {
color: var(--color-link-active);
border-bottom-color: var(--color-link-active);
}
}
}
}
/**

View file

@ -7,11 +7,12 @@
background: #fff;
box-shadow: 0 3px 10px #fff;
z-index: 2;
font-size: 14px;
&__save {
@apply --button;
@apply --button-primary;
margin-left: auto;
margin: auto;
}
&__left {
@ -22,6 +23,10 @@
margin-right: 10px;
}
}
select {
max-width: 100px
}
}
.writing-buttons {
@ -40,3 +45,13 @@
box-shadow: inset 0 1px 2px 0 rgba(35, 44, 72, 0.06);
outline: none;
}
.writing-editor {
@media (--desktop) {
margin: 0 -100px;
}
}
.codex-editor__redactor .ce-block:first-of-type .ce-header {
font-size: 32px;
}

View file

@ -3,6 +3,7 @@
<head>
<title>{{ config.title }}</title>
<link rel="stylesheet" href="/dist/main.css" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
</head>
<body>
{% include "components/header.twig" %}

View file

@ -46,7 +46,9 @@
</span>
<span class="writing-header__save" name="js-submit-save">Save</span>
</header>
<div id="codex-editor"></div>
<div class="writing-editor">
<div id="codex-editor"></div>
</div>
<div class="writing-buttons">
{% if page._id is not empty %}
<span class="writing-buttons__remove" name="js-submit-remove">Remove</span>

View file

@ -4,6 +4,7 @@
<title>{{ config.title }}</title>
<link rel="stylesheet" href="/dist/main.css" />
<link rel="preload" href="{{ config.landingFrameSrc }}" as="document">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
</head>
<body class="landing-body">
{% include "components/header.twig" %}

View file

@ -13,7 +13,7 @@
{% else %}
href="/page/{{ pageParent._id }}"
{% endif %}>
Parent {{ pageParent.title }}
{{ pageParent.title }}
</a>
{% endif %}
<time class="page__header-time">