mirror of
https://github.com/JonasunderscoreJones/selfhosted-overleaf-project-share.git
synced 2025-10-25 09:59:19 +02:00
adjusted overleaf resemblence
This commit is contained in:
parent
ef8a5ec1d6
commit
091ecba462
1 changed files with 13 additions and 7 deletions
|
|
@ -22,6 +22,7 @@
|
||||||
header {
|
header {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
background: #1b222c;
|
background: #1b222c;
|
||||||
|
color: #afb5c0;
|
||||||
padding: 0 1rem;
|
padding: 0 1rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
@ -40,7 +41,7 @@
|
||||||
|
|
||||||
.sidebar {
|
.sidebar {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
background: #252525;
|
background: #495365;
|
||||||
border-right: 1px solid #444;
|
border-right: 1px solid #444;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
|
@ -51,20 +52,19 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar li {
|
.sidebar li {
|
||||||
padding: 0.75rem 1rem;
|
padding: 0.25rem 1rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-bottom: 1px solid #333;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
transition: background-color 0.2s ease;
|
transition: background-color 0.2s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar li:hover {
|
.sidebar li:hover {
|
||||||
background: #3a3a3a;
|
background: #098842;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar li.active {
|
.sidebar li.active {
|
||||||
background: #4a90e2;
|
background: #098842;
|
||||||
color: white;
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -72,7 +72,6 @@
|
||||||
flex: 2;
|
flex: 2;
|
||||||
background: #1e1e1e;
|
background: #1e1e1e;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
padding: 1rem;
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
min-width: 200px;
|
min-width: 200px;
|
||||||
user-select: text;
|
user-select: text;
|
||||||
|
|
@ -155,10 +154,14 @@
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
#open-in-editor-button:hover {
|
||||||
|
background-color: #1e6941;
|
||||||
|
transition: background-color 0.2s ease;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<header>Project Viewer (Read-only)<a id="open-in-editor-button">Open in Editor</a></header>
|
<header><a id="header-content"><a>LaTeX Project Viewer (Read-only) -</a><a id="project-id" style="margin-left: 3px;"></a><a id="open-in-editor-button">Open in Editor</a></a></header>
|
||||||
<main>
|
<main>
|
||||||
<nav class="sidebar">
|
<nav class="sidebar">
|
||||||
<ul id="file-list"></ul>
|
<ul id="file-list"></ul>
|
||||||
|
|
@ -195,6 +198,9 @@
|
||||||
window.open(`https://tex.jonasjones.dev/project/${projectId}`, "_blank");
|
window.open(`https://tex.jonasjones.dev/project/${projectId}`, "_blank");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Set project ID in header
|
||||||
|
document.getElementById("project-id").textContent = projectId;
|
||||||
|
|
||||||
async function listFiles() {
|
async function listFiles() {
|
||||||
try {
|
try {
|
||||||
const res = await fetch(`${base}/`);
|
const res = await fetch(`${base}/`);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue