Skip to content

Commit

Permalink
Merge pull request #10 from effektivnayarabota1/develop
Browse files Browse the repository at this point in the history
font some fixes
  • Loading branch information
kirill-ivanovvv authored Oct 29, 2023
2 parents 8fd041d + 5caa935 commit 08141f0
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 69 deletions.
10 changes: 5 additions & 5 deletions middleware/data.middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default class Data {

if (!data) throw new Error("username not found");

const dir = `./public/data_uploads/users/${data.user_id}`;
const dir = `./public/data_uploads/users/${data.user_id}/`;
data.src = File.sources(dir);

data.date_creation = DateMiddleware.format(data.date_creation);
Expand All @@ -67,7 +67,7 @@ export default class Data {
.all({ $user_id: data.user_id });

pages.map((page) => {
const dir = `./public/data_uploads/pages/${page.page_id}`;
const dir = `./public/data_uploads/pages/${page.page_id}/`;
page.src = File.sources(dir);
});

Expand All @@ -90,7 +90,7 @@ export default class Data {

if (data.desc) data.html = DOMPurify.sanitize(marked.parse(data.desc));

const dir = `./public/data_uploads/pages/${page_id}`;
const dir = `./public/data_uploads/pages/${page_id}/`;
data.src = File.sources(dir);

data.date_creation = DateMiddleware.format(data.date_creation);
Expand Down Expand Up @@ -119,7 +119,7 @@ export default class Data {
.all({ $page_id: page_id });

elements.map((element) => {
const dir = `./public/data_uploads/elements/${element.element_id}`;
const dir = `./public/data_uploads/elements/${element.element_id}/`;
element.src = File.sources(dir);
if (element.text) {
if (element.text)
Expand Down Expand Up @@ -162,7 +162,7 @@ export default class Data {

data.author.type = "owner";

const dir = `./public/data_uploads/elements/${data.element_id}`;
const dir = `./public/data_uploads/elements/${data.element_id}/`;
data.src = File.sources(dir);
return data;
}
Expand Down
2 changes: 1 addition & 1 deletion middleware/file.middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default class File {
let result = {};
if (fs.existsSync(dir)) {
fs.readdirSync(dir).forEach((file) => {
const filePath = dir.substring(1) + "/" + file;
const filePath = dir.substring(1) + file;
const name_full = file.split(".").at(0);
const variant = name_full?.split("@").at(1) || "original";
const name = name_full?.split("@").at(0);
Expand Down
73 changes: 15 additions & 58 deletions public/style/font.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,113 +7,73 @@

* {
font-family: "Roboto Condensed", "Helvetica Neue Condensed", sans-serif;
color: var(--grey-dark);
}
p {
color: var(--grey-dark);

font-family: "Roboto Condensed", "Helvetica Neue Condensed", sans-serif;
font-size: 1.6em;
font-style: normal;
font-weight: 400;
line-height: 2.4rem;
}
h1 {
/* margin-bottom: 48px; */
margin-bottom: 4.8rem;
color: var(--black);
font-family: "Roboto Condensed", "Helvetica Neue Condensed", sans-serif;
/* font-size: 64px; */
font-size: 6.4em;
font-style: italic;
font-weight: 700;
line-height: 75%; /* 48px */
/* letter-spacing: -2.56px; */
line-height: 75%;
letter-spacing: -0.256rem;
/* text-transform: uppercase; */
}
h2 {
/* margin-bottom: 24px; */
margin-bottom: 2.4rem;

color: var(--grey-dark);

font-family: "Roboto Condensed", "Helvetica Neue Condensed", sans-serif;
/* font-size: 28px; */
font-size: 2.8em;
font-style: italic;
font-weight: 700;
/* line-height: 24px; /* 85.714% */
line-height: 2.4rem; /* 85.714% */
/* letter-spacing: -0.56px; */
line-height: 84%;
letter-spacing: -0.056rem;
/* text-transform: uppercase; */
}
h3 {
color: var(--grey-dark);
margin-bottom: 1rem;

font-family: "Roboto Condensed", "Helvetica Neue Condensed", sans-serif;
font-size: 1.6em;
font-size: 1.8em;
font-style: normal;
font-weight: 700;
line-height: 2.4rem; /* 150% */
line-height: 84%;
}
h4 {
color: var(--black);

font-family: "Roboto Condensed", "Helvetica Neue Condensed", sans-serif;
/* font-size: 14px; */
font-size: 1.4em;
font-style: normal;
font-weight: 700;
line-height: 1.6rem; /* 114.286% */
/* text-transform: uppercase; */
line-height: 1.6rem;
}
h5 {
color: var(--grey-dark);

font-family: "Roboto Condensed", "Helvetica Neue Condensed", sans-serif;
/* font-size: 14px; */
font-size: 1.4em;
font-style: normal;
font-weight: 400;
line-height: 1.6rem; /* 114.286% */
line-height: 1.6rem;
}
h6 {
color: var(--grey-dark);
font-family: "Roboto Condensed", "Helvetica Neue Condensed", sans-serif;
/* font-size: 14px; */
font-size: 1.4em;
font-style: italic;
font-weight: 300;
/* line-height: 16px; /* 114.286% */
line-height: 1.6rem; /* 114.286% */
}

p {
color: var(--grey-dark);

/* font-family: "Roboto", "Helvetica Neue", sans-serif; */
font-family: "Roboto Condensed", "Helvetica Neue Condensed", sans-serif;
/* font-size: 16px; */
font-size: 1.6em;
font-style: normal;
font-weight: 400;
/* line-height: 24px; /* 150% */
line-height: 2.4rem; /* 150% */
}

a {
color: var(--blue);
}
a:hover {
text-decoration: underline;
}
/* a:visited { */
/* color: var(--blue-visited); */
/* } */

/* HTML */
.html > p:not(:last-child) {
margin-bottom: 2.4rem;
}
@media screen and (max-width: 444px) {
:root {
font-size: 80%;
/* font-size: 80%; */
font-size: 72%;
}
h1 {
font-size: 3.2em;
Expand All @@ -125,7 +85,4 @@ a:hover {
line-height: 2.4rem; /* 100% */
margin-bottom: 2.4rem;
}
h1 input[type="text"] {
height: 2.4em;
}
}
4 changes: 2 additions & 2 deletions templates/Page.eta
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@


<% if (data.desc || data.title) { %>
<div class="grid_break-start">
<div class="html grid_break-start">
<% if (data.title) { %>
<h1><%= data.title %></h1>
<% } %>

<% if (data.desc && data.html) { %>
<h5><%~ data.html %></h5>
<%~ data.html %>
<% } %>
</div>
<% } %>
Expand Down
2 changes: 1 addition & 1 deletion templates/Profile.eta
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
</div>

<% if (data.html) { %>
<div class="profile_desc grid_break-start">
<div class="html profile_desc grid_break-start">
<%~data.html%>
</div>
<% } %>
Expand Down
2 changes: 1 addition & 1 deletion templates/card/cardElement.eta
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<% if (element.html && element.text) { %>
<div class="card-element__text-container">
<div class="card-element__html"><%~ element.html %></div>
<div class="html card-element__html"><%~ element.html %></div>
<div class="card-element__text"><%~ element.text %></div>
</div>
<% } %>
Expand Down
2 changes: 1 addition & 1 deletion templates/textarea/textarea.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
@media screen and (max-width: 444px) {
.textarea {
border-radius: 4px;
overflow: hidden;
/* overflow: hidden; */
}
}

0 comments on commit 08141f0

Please sign in to comment.