Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some design updates #70

Merged
merged 4 commits into from
Mar 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/dist/editor.bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion public/dist/main.bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/dist/main.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/frontend/js/classes/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default class Editor {
tools: {
header: {
class: Header,
inlineToolbar: ['link', 'marker', 'inlineCode'],
inlineToolbar: ['marker', 'inlineCode'],
config: {
placeholder: options.headerPlaceholder || ''
}
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/js/modules/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default class Writing {
const { default: CodeStyler } = await import(/* webpackChunkName: "code-styling" */ './../classes/codeStyler');

return new CodeStyler({
selector: '.block-code'
selector: '.block-code__content'
});
};
}
24 changes: 20 additions & 4 deletions src/frontend/styles/components/aside.pcss
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
.docs-aside {
font-size: 15px;
color: var(--color-text-second);
position: sticky;
top: var(--layout-padding-vertical);
font-size: 14px;
letter-spacing: 0.01em;
overflow-y: scroll;
max-height: 100vh;
//padding-right: 50px;

@media (--mobile) {
position: static;
overflow: visible;
max-height: none;
font-size: 13px;
display: none;
margin-top: 20px;
Expand All @@ -13,7 +21,12 @@
}

a {
color: inherit;
text-decoration: none;

&:hover {
color: var(--color-link-active);
}
}

&__section {
Expand All @@ -28,8 +41,10 @@
}

&-title {
margin-bottom: 15px;
color: var(--color-link-active);
display: inline-block;
margin-bottom: 10px;
font-size: 1.18em;
font-weight: 600;

@media (--mobile) {
margin-bottom: 10px;
Expand All @@ -38,6 +53,7 @@

&-list {
padding-left: 0;
margin: 0;
list-style: none;

a {
Expand Down
33 changes: 33 additions & 0 deletions src/frontend/styles/components/auth.pcss
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.auth-form {
font-size: 15px;
text-align: center;
margin-top: 30vh;

h1 {
@media (--mobile){
font-size: 20px;
}
}

p {
margin: 40px 0 20px;
}

input[type="password"] {
padding: 9px;
font-size: 15px;
outline: none;
border-radius: 3px;
-webkit-appearance: none;
border: 1px solid var(--color-line-gray);
}

input[type="submit"]{
@apply --button;
@apply --button-primary;
font-size: 15px;
padding: 10px 20px;
line-height: inherit;
vertical-align: top;
}
}
131 changes: 118 additions & 13 deletions src/frontend/styles/components/page.pcss
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.page {
font-size: 16px;
font-size: 15px;
line-height: 1.6;
letter-spacing: 0.005em;

&__header {
display: flex;
Expand Down Expand Up @@ -48,17 +49,30 @@
}

&__title {
font-size: 26px;
font-weight: 700;
letter-spacing: -0.04px;
margin-bottom: -0.2em;
@apply --font-serif;
font-size: 35px;
font-weight: 900;
letter-spacing: -0.04em;
margin-bottom: -0.1em;
}

.cdx-marker {
background: rgba(245,235,111,0.33);
padding: 3px 0;
}

.inline-code {
display: inline-block;
background: rgba(251,241,241,0.78);
color: #C44545;
padding: 0.1em 0.5em;
border-radius: 2px;
margin: 0 2px;
font-family: Menlo, Monaco, Consolas, Courier New, monospace;
font-size: 0.84em;
line-height: 1.4em;
}

&__content {
a {
text-decoration: none;
Expand All @@ -75,21 +89,74 @@

}

/**
* Paragraph
* ==================
*/
.block-paragraph {
.inline-code {
-webkit-font-smoothing: initial;
-moz-osx-font-smoothing: initial;
}
}

/**
* Header
* ==================
*/
.block-header {
margin: 1.5em 0 0.5em;
@apply --font-serif;
margin: 2.1em 0 0.5em;

&--2 {
font-size: 22px;
font-weight: 500;
font-weight: 600;
}

&--3 {
font-size: 18px;
font-weight: 500;
font-weight: 600;
}

& + p {
margin-top: 0.5em;
}

a {
text-decoration: none !important;
border: 0;
color: inherit !important;
}

&--anchor {
cursor: pointer;

&::before {
position: absolute;
content: '';
margin-left: -30px;
width: 14px;
height: 19px;
margin-top: 0.35em;
background-image: url("data:image/svg+xml,%3Csvg width='14' height='19' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%237B7E89' fill-rule='nonzero'%3E%3Cpath d='M8.58 11.997L2.283 5.701a1.762 1.762 0 0 1 0-2.49l.933-.935a1.762 1.762 0 0 1 2.49 0l6.298 6.297a3.508 3.508 0 0 0-.901-3.39L6.952 1.031a3.522 3.522 0 0 0-4.982 0l-.933.933a3.522 3.522 0 0 0 0 4.982l4.151 4.151c.92.92 2.218 1.208 3.392.9z'/%3E%3Cpath d='M12.958 11.628l-4.151-4.15a3.507 3.507 0 0 0-3.391-.899l6.296 6.296a1.76 1.76 0 0 1 0 2.49l-.933.936a1.764 1.764 0 0 1-2.49 0l-6.296-6.298a3.507 3.507 0 0 0 .899 3.39l4.151 4.15a3.522 3.522 0 0 0 4.982 0l.933-.935a3.52 3.52 0 0 0 0-4.98z'/%3E%3C/g%3E%3C/svg%3E");
opacity: 0;
transform: translateX(5px);
will-change: opacity, transform;
transition: all 100ms ease;

@media (--mobile){
display: none !important;
}
}

&:hover {
color: #4c4c58;
}

&:hover::before{
opacity: 1;
transform: none;
}
}
}

Expand All @@ -98,19 +165,57 @@
* ==================
*/
.block-code {
padding: 20px !important;
background: var(--color-bg-light);
border: 1px solid #f1f1f4;
border-radius: 5px;
font-size: 13px;
//border: 1px solid var(--color-line-gray);
font-family: Menlo,Monaco,Consolas,Courier New,monospace;
font-family: var(--font-mono);
line-height: 1.7em;
font-size: 13px;

&__content {
white-space: pre;
word-wrap: normal;
overflow-x: auto;
background: transparent !important;
padding: 15px !important;
color: #41314e !important;
}

.hljs-name,
.hljs-section{
color: #359f3f;
}

.hljs-tag {
color: #718c77;
}

.hljs-attr,
.hljs-selector-attr,
.hljs-selector-class,
.hljs-selector-id,
.hljs-selector-pseudo,
.hljs-title {
color: #904eb3;
}

.hljs-emphasis,
.hljs-quote,
.hljs-string,
.hljs-strong,
.hljs-template-variable,
.hljs-variable {
color: #c21f04;
}
}

/**
* List
* ==================
*/
.block-list {
margin: 20px 0;

li {
margin: 10px 0;
}
Expand Down Expand Up @@ -149,7 +254,7 @@

&--with-background {
padding: 15px;
background: var(--color-line-gray);
background: var(--color-bg-light);

img, video {
max-width: 60%;
Expand Down
24 changes: 23 additions & 1 deletion src/frontend/styles/components/writing.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
}

select {
max-width: 100px
max-width: 100px;
vertical-align: bottom;
}
}

Expand All @@ -47,9 +48,30 @@
}

.writing-editor {
font-size: 15px;
line-height: 1.6;
letter-spacing: 0.005em;

@media (--desktop) {
margin: 0 -100px;
}

.ce-code__textarea {
color: #41314e;
line-height: 1.6em;
font-size: 12px;
background: var(--color-bg-light);
border: 1px solid #f1f1f4;
box-shadow: none;
}

.ce-paragraph a {
color: inherit;
}

.ce-header {
@apply --font-serif;
}
}

.codex-editor__redactor .ce-block:first-of-type .ce-header {
Expand Down
1 change: 1 addition & 0 deletions src/frontend/styles/main.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@import './components/writing.pcss';
@import './components/page.pcss';
@import './components/landing.pcss';
@import './components/auth.pcss';

body {
font-family: system-ui, Helvetica, Arial, Verdana;
Expand Down
Loading