Commit b5e1ee2c authored by Яков's avatar Яков
Browse files

update

parent 8752466c
......@@ -7,7 +7,6 @@
<value>
<TabSessionState>
<option name="provider" value="claude" />
<option name="sessionId" value="280f06de-8bd6-4fec-afa0-84fcb8360cf4" />
<option name="cwd" value="$PROJECT_DIR$" />
<option name="model" value="claude-sonnet-4-6" />
<option name="permissionMode" value="bypassPermissions" />
......
......@@ -186,7 +186,9 @@ const QEditor = ({
style,
uploadOptions = {url: '', errorMessage: ''},
toolsOptions = {type: 'all'},
onInfo
onInfo,
// Режим оформления контента, задаётся хостом: 'atma-content--lesson' | 'atma-content--compact' | ''
contentClass = ''
}) => {
global.uploadUrl = uploadOptions.url
......@@ -2067,7 +2069,18 @@ const QEditor = ({
</div>
</BubbleMenu>
<EditorContent editor={editor} className='atma-editor-content'/>
{/*
atma-content — оформление контента из платформы (AtmaGuru/src/React/sass/_content.scss).
Благодаря ему автор в редакторе видит ровно то же, что учащийся в уроке:
один файл стилей на обе стороны. Пакет своей типографики больше не имеет.
contentClass — режим оформления от хоста: 'atma-content--lesson' для урока,
'atma-content--compact' для комментария. Пусто — базовый режим.
*/}
<EditorContent
editor={editor}
className={('atma-editor-content atma-content ' + contentClass).trim()}
/>
</div>
<EditorModal isOpen={modalIsOpen} title={modalTitle}>
{getInnerModal()}
......
......@@ -449,133 +449,57 @@ body{
}
// Поверхность редактирования: ТОЛЬКО рамка поля ввода и служебное для ProseMirror.
//
// Типографика контента отсюда УБРАНА и живёт в платформе —
// AtmaGuru/src/React/sass/_content.scss. Причина: пакет диктовал вид вывода,
// а платформа его отменяла (класс .fix-editor существовал только ради этого).
// Теперь автор в редакторе и учащийся в уроке берут оформление из одного файла,
// и WYSIWYG становится настоящим.
//
// Оформление контента сюда НЕ ВОЗВРАЩАТЬ. Граница описана в
// docs/Редактор уроков и рендер контента — ТЗ.md, §3.2.
&-content{
border: 1px solid #ccc;
border-top: 0;
padding: 12px 15px;
padding-bottom: 0;
p{
margin-top: 0;
&:after {
content:"";
display:inline-block;
width:0;
}
}
img, video, iframe{
max-width: 100%;
}
img {
image-orientation: from-image;
}
blockquote{
border-left: 2px solid #ccc;
margin-left: 0;
padding: 0 0 0 30px;
}
hr{
border: none;
height: 2px;
background-color: #ccc;
// Пустой абзац в ProseMirror схлопывается без этого — курсор некуда поставить.
// Правило редактирования, не оформления.
p:after {
content:"";
display:inline-block;
width:0;
}
table{
border-collapse: collapse;
table-layout: fixed;
margin: 0;
overflow: hidden;
td, th{
min-width: 3em;
border: 1px solid #ced4da;
padding: 3px 5px;
vertical-align: top;
position: relative;
p {
font-size: 14px;
}
}
th{
font-weight: bold;
text-align: left;
background-color: #f1f3f5;
p {
font-size: 14px;
}
}
.selectedCell:after{
z-index: 2;
position: absolute;
content: '';
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: rgba(200,200,255, 0.4);
pointer-events: none;
}
.column-resize-handle{
position: absolute;
right: -2px;
top: 0;
bottom: -2px;
width: 4px;
background-color: #adf;
pointer-events: none;
}
// ── Служебное для ProseMirror: существует только во время правки ──────
.selectedCell:after{
z-index: 2;
position: absolute;
content: '';
top: 0;
bottom: 0;
left: 0;
right: 0;
background-color: rgba(200,200,255, 0.4);
pointer-events: none;
}
.tableWrapper{
overflow-x: auto;
margin-bottom: 20px;
.column-resize-handle{
position: absolute;
right: -2px;
top: 0;
bottom: -2px;
width: 4px;
background-color: #adf;
pointer-events: none;
}
.resize-cursor{
cursor: col-resize;
}
a[download]{
display: inline-block;
color: #1790FF;
position: relative;
margin-left: 20px;
margin-right: 20px;
&:before{
content: '';
display: inline-block;
background-image: url('data:image/svg+xml;charset=utf8,%3Csvg%20width%3D%2213%22%20height%3D%2216%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M3.712%2012.6H8.86c.17%200%20.31-.057.422-.17a.588.588%200%200%200%20.167-.43.588.588%200%200%200-.167-.43.567.567%200%200%200-.422-.17H3.713a.567.567%200%200%200-.423.17.588.588%200%200%200-.167.43c0%20.173.056.317.167.43.111.113.252.17.422.17zm0-3.4H8.86c.17%200%20.31-.057.422-.17a.588.588%200%200%200%20.167-.43.588.588%200%200%200-.167-.43A.567.567%200%200%200%208.86%208H3.713a.567.567%200%200%200-.423.17.588.588%200%200%200-.167.43c0%20.173.056.317.167.43.111.113.252.17.422.17zM1.18%2016c-.315%200-.59-.12-.825-.36A1.161%201.161%200%200%201%200%2014.8V1.2C0%20.88.118.6.354.36.589.12.864%200%201.179%200h6.6a1.164%201.164%200%200%201%20.844.36l3.595%203.66a1.214%201.214%200%200%201%20.353.86v9.92c0%20.32-.117.6-.353.84s-.51.36-.825.36H1.179zM7.68%201.2H1.18v13.6h10.214V4.92H8.27a.567.567%200%200%201-.423-.17.588.588%200%200%201-.167-.43V1.2zm-6.501%200v3.72V1.2%2014.8%201.2z%22%20fill%3D%22%231790FF%22%20fill-rule%3D%22nonzero%22%2F%3E%3C%2Fsvg%3E');
width: 13px;
height: 16px;
position: absolute;
top: 1px;
left: -20px;
}
//&[href*='.pdf']{
// &:before{
// content: 'pdf'
// }
//}
&:after{
content: attr(data-size);
display: inline-block;
color: #AAB2BD;
font-size: 13px;
margin-left: 6px;
}
}
a[data-button-link="true"]{
cursor: pointer;
}
......@@ -584,9 +508,7 @@ body{
outline: 2px solid #1790FF;
outline-offset: 2px;
}
}
&-bubble{
display: flex;
flex-direction: row;
......@@ -1613,33 +1535,12 @@ body{
}
}
/* внутри редактора */
.atma-editor-content .tableWrapper:has(table[data-bordered='false']) td,
.atma-editor-content .tableWrapper:has(table[data-bordered='false']) th {
border: none !important;
}
.tableWrapper[data-no-border='true'] table,
.tableWrapper[data-no-border='true'] td,
.tableWrapper[data-no-border='true'] th {
border: none !important;
}
.toggle-body {
overflow: hidden;
transition: max-height 0.5s ease, opacity 0.5s ease;
&[data-collapsed="true"] {
max-height: 0 !important;
opacity: 0;
}
}
.toggle-block[data-open="false"] .toggle-body {
max-height: 0;
padding: 0;
border: none;
}
// Таблицы без границ оформляются в платформе (_content.scss).
// Вид сворачиваемого блока (.toggle-header, .toggle-button, .toggle-body,
// .toggle-body-wrapper) переехал в платформу — AtmaGuru/src/React/sass/_content.scss.
// Здесь остаётся только то, что существует во время правки: ручка перетаскивания,
// кнопка удаления и измеритель ширины заголовка.
.toggle-block {
margin-bottom: 12px;
&:hover .toggle-block-delete {
opacity: 1;
}
......@@ -1709,46 +1610,12 @@ body{
border: 0;
}
.toggle-header {
font: inherit;
padding: 2px 6px;
border: 1px solid #D9D9D9;
border-radius: 4px;
margin-left: 10px;
color: #000000D9;
font-weight: bold;
font-size: 14px;
line-height: 22px;
height: 32px;
}
.toggle-button {
height: 24px;
width: 24px;
vertical-align: middle;
padding: 0;
border-radius: 50%;
border: 1px solid #D9D9D9;
background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHZpZXdCb3g9IjAgMCAxNCAxNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzYxMDlfNDAzMjYpIj4KPHJlY3Qgd2lkdGg9IjE0IiBoZWlnaHQ9IjE0IiBmaWxsPSJ3aGl0ZSIvPgo8cGF0aCBkPSJNNi43NDc1NiA0LjIxMzMzQzYuODc3NDUgNC4wNjQzMSA3LjEyNDkxIDQuMDY0MzEgNy4yNTM0MiA0LjIxMzMzTDExLjc0MjcgOS40MTkzOEMxMS45MDk0IDkuNjEzNTIgMTEuNzU5MSA5Ljg5NzkgMTEuNDg5OCA5Ljg5NzlIMi41MTAyNkMyLjI0MDk5IDkuODk3OSAyLjA5MDcyIDkuNjEzNTIgMi4yNTczMyA5LjQxOTM4TDYuNzQ3NTYgNC4yMTMzM1oiIGZpbGw9ImJsYWNrIiBmaWxsLW9wYWNpdHk9IjAuODUiLz4KPC9nPgo8ZGVmcz4KPGNsaXBQYXRoIGlkPSJjbGlwMF82MTA5XzQwMzI2Ij4KPHJlY3Qgd2lkdGg9IjE0IiBoZWlnaHQ9IjE0IiBmaWxsPSJ3aGl0ZSIvPgo8L2NsaXBQYXRoPgo8L2RlZnM+Cjwvc3ZnPgo=);
background-repeat: no-repeat;
background-position: 4px 3px;
transform: rotate(180deg);
background-color: white;
cursor: pointer;
&.open {
transform: rotate(0deg) !important;
}
}
.toggle-block {
position: relative;
}
.toggle-body-wrapper {
padding: 12px;
background: #f7f7f7;
border: 1px solid #d9d9d9;
border-radius: 4px;
transition: background 0.3s ease, border 0.3s ease;
}
@media (max-width: 768px) {
.ProseMirror,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment