kb/web/css/style.css
2025-12-17 09:00:24 -05:00

177 lines
2.7 KiB
CSS

/* static/style.css */
:root {
--primary: #0066cc;
--primary-hover: #0052a3;
--bg: #ffffff;
--text: #333333;
--border: #dddddd;
--code-bg: #f5f5f5;
}
* {
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
line-height: 1.6;
color: var(--text);
background-color: var(--bg);
margin: 0;
padding: 0;
}
.container {
max-width: 900px;
margin: 0 auto;
padding: 20px;
}
header {
border-bottom: 2px solid var(--border);
margin-bottom: 30px;
padding-bottom: 20px;
}
header h1 {
margin: 0;
font-size: 2em;
}
nav {
display: flex;
justify-content: space-between;
align-items: center;
}
nav a {
color: var(--primary);
text-decoration: none;
}
nav a:hover {
text-decoration: underline;
}
.content {
font-size: 16px;
}
.content h1, .content h2, .content h3 {
margin-top: 1.5em;
margin-bottom: 0.5em;
}
.content code {
background-color: var(--code-bg);
padding: 2px 6px;
border-radius: 3px;
font-family: 'Courier New', monospace;
}
.content pre {
background-color: var(--code-bg);
padding: 15px;
border-radius: 5px;
overflow-x: auto;
}
.content pre code {
background: none;
padding: 0;
}
.page-list {
list-style: none;
padding: 0;
}
.page-list li {
padding: 10px;
border-bottom: 1px solid var(--border);
display: flex;
justify-content: space-between;
}
.page-list a {
color: var(--primary);
text-decoration: none;
}
.page-list a:hover {
text-decoration: underline;
}
.edit-link {
font-size: 0.9em;
color: #666;
}
.btn {
display: inline-block;
padding: 8px 16px;
background-color: var(--primary);
color: white;
text-decoration: none;
border-radius: 4px;
border: none;
cursor: pointer;
font-size: 14px;
}
.btn:hover {
background-color: var(--primary-hover);
}
.btn-primary {
background-color: #28a745;
}
.btn-primary:hover {
background-color: #218838;
}
.button-group {
margin-top: 20px;
display: flex;
gap: 10px;
}
#editor {
width: 100%;
min-height: 500px;
font-family: 'Courier New', monospace;
font-size: 14px;
}
.CodeMirror {
height: 600px;
border: 1px solid var(--border);
border-radius: 4px;
}
```
## Dependencies
Create a `go.mod` file:
```
module knowledgebase
go 1.21
require github.com/yuin/goldmark v1.6.0
```
## Project Structure
```
knowledgebase/
main.go
go.mod
content/ (created automatically)
static/
style.css
templates/
index.html
page.html
edit.html