ironic gitea deployment repo for git repo server, working scripts and service

master
David Kebler 2020-08-09 14:53:51 -07:00
parent 004ac31e4f
commit 501e942ab9
55 changed files with 16464 additions and 0 deletions

5
.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
/data/
/gitea.log
/gitea.pid
/bin/amd64/custom/
/frontend/current/

BIN
bin/gitea.amd64 Executable file

Binary file not shown.

43
bin/gitea@.service Normal file
View File

@ -0,0 +1,43 @@
# if this file and binary resides on other than filesystem root then COPY the service to NOT link it
# Change directories below to fit your install
[Unit]
Description=Gitea (Git with a cup of tea)
After=syslog.target
After=network.target
# Binary, System Files and Repos on other than filesystem root then include this require/after
# With below command you can find the unit of the mounted drive of those files
#systemctl list-units | grep <dir>
# gitea files in opt/gitea
Requires=opt.mount
After=opt.mount
# repo/db/data for gitea in mnt/git-server
Requires=mnt-data.mount
After=mnt-data.mount
# using local sqlite
#After=mysqld.service
#After=postgresql.service
#After=memcached.service
#After=redis.service
[Service]
# Modify these two values and uncomment them if you have
# repos with lots of files and get an HTTP error 500 because
# of that
###
#LimitMEMLOCK=infinity
#LimitNOFILE=65535
RestartSec=2s
Type=simple
User=sysadmin
Group=sysadmin
Environment=GITEA_DIR=/opt/gitea
ExecStart=/bin/bash -c '${GITEA_DIR}/run %i'
Restart=always
# If you want to bind Gitea to a port below 1024 uncomment
# the two values below
###
#CapabilityBoundingSet=CAP_NET_BIND_SERVICE
#AmbientCapabilities=CAP_NET_BIND_SERVICE
[Install]
WantedBy=multi-user.target

3
bin/install Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
sudo cp -f /opt/gitea/bin/gitea@.service /etc/systemd/system
cat /etc/systemd/system/gitea@.service

2
bin/update Normal file
View File

@ -0,0 +1,2 @@
# TODO needs to go out and get latest binary from gitea and place in appropirate directory
# see my hugo script

6
config/default.ini Normal file
View File

@ -0,0 +1,6 @@
[oauth2]
JWT_SECRET = FAk2tJZtNDTa9ZHDNXF5_hBo7ZsuTiwnlskvaC7hVCQ
[security]
INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE1OTY5ODYwMjN9.C2FIUBzmradKDTVEGxWD49lZOZJcL1bH7ECTGxWMx1I

1010
config/example.ini Normal file

File diff suppressed because it is too large Load Diff

393
config/example.yaml Normal file
View File

@ -0,0 +1,393 @@
---
APP_NAME: "Gitea: Git with a cup of tea"
RUN_USER: "git"
RUN_MODE: "dev"
repository:
SCRIPT_TYPE: "bash"
DETECTED_CHARSETS_ORDER: "UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE, ISO-8859, windows-1252, ISO-8859, windows-1250, ISO-8859, ISO-8859, ISO-8859, windows-1253, ISO-8859, windows-1255, ISO-8859, windows-1251, windows-1256, KOI8-R, ISO-8859, windows-1254, Shift_JIS, GB18030, EUC-JP, EUC-KR, Big5, ISO-2022, ISO-2022, ISO-2022, IBM424_rtl, IBM424_ltr, IBM420_rtl, IBM420_ltr"
FORCE_PRIVATE: "false"
DEFAULT_PRIVATE: "last"
MAX_CREATION_LIMIT: "-1"
MIRROR_QUEUE_LENGTH: "1000"
PULL_REQUEST_QUEUE_LENGTH: "1000"
PREFERRED_LICENSES: "Apache License 2.0,MIT License"
DISABLE_HTTP_GIT: "false"
USE_COMPAT_SSH_URI: "false"
DEFAULT_CLOSE_ISSUES_VIA_COMMITS_IN_ANY_BRANCH: "false"
ENABLE_PUSH_CREATE_USER: "false"
ENABLE_PUSH_CREATE_ORG: "false"
DEFAULT_REPO_UNITS: "repo.code,repo.releases,repo.issues,repo.pulls,repo.wiki"
PREFIX_ARCHIVE_FILES: "true"
DISABLE_MIRRORS: "false"
DEFAULT_BRANCH: "master"
repository.editor:
LINE_WRAP_EXTENSIONS: ".txt,.md,.markdown,.mdown,.mkd,"
PREVIEWABLE_FILE_MODES: "markdown"
repository.local:
LOCAL_COPY_PATH: "tmp/local-repo"
LOCAL_WIKI_PATH: "tmp/local-wiki"
repository.upload:
ENABLED: "true"
TEMP_PATH: "data/tmp/uploads"
FILE_MAX_SIZE: "3"
MAX_FILES: "5"
repository.pull-request:
WORK_IN_PROGRESS_PREFIXES: "WIP:,[WIP]"
CLOSE_KEYWORDS: "close,closes,closed,fix,fixes,fixed,resolve,resolves,resolved"
REOPEN_KEYWORDS: "reopen,reopens,reopened"
DEFAULT_MERGE_MESSAGE_COMMITS_LIMIT: "50"
DEFAULT_MERGE_MESSAGE_SIZE: "5120"
DEFAULT_MERGE_MESSAGE_ALL_AUTHORS: "false"
DEFAULT_MERGE_MESSAGE_MAX_APPROVERS: "10"
DEFAULT_MERGE_MESSAGE_OFFICIAL_APPROVERS_ONLY: "true"
repository.issue:
LOCK_REASONS: "Too heated,Off-topic,Resolved,Spam"
repository.signing:
SIGNING_KEY: "default"
INITIAL_COMMIT: "always"
CRUD_ACTIONS: "pubkey, twofa, parentsigned"
WIKI: "never"
MERGES: "pubkey, twofa, basesigned, commitssigned"
cors:
ENABLED: "false"
SCHEME: "http"
ALLOW_DOMAIN: "*"
ALLOW_SUBDOMAIN: "false"
METHODS: "GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS"
MAX_AGE: "10m"
ALLOW_CREDENTIALS: "false"
ui:
EXPLORE_PAGING_NUM: "20"
ISSUE_PAGING_NUM: "10"
FEED_MAX_COMMIT_NUM: "5"
GRAPH_MAX_COMMIT_NUM: "100"
CODE_COMMENT_LINES: "4"
THEME_COLOR_META_TAG: "`#6cc644`"
MAX_DISPLAY_FILE_SIZE: "8388608"
SHOW_USER_EMAIL: "true"
DEFAULT_THEME: "gitea"
THEMES: "gitea,arc-green"
REACTIONS: "+1, -1, laugh, hooray, confused, heart, rocket, eyes"
DEFAULT_SHOW_FULL_NAME: "false"
SEARCH_REPO_DESCRIPTION: "true"
USE_SERVICE_WORKER: "true"
ui.admin:
USER_PAGING_NUM: "50"
REPO_PAGING_NUM: "50"
NOTICE_PAGING_NUM: "25"
ORG_PAGING_NUM: "50"
ui.user:
REPO_PAGING_NUM: "15"
ui.meta:
AUTHOR: "Gitea - Git with a cup of tea"
DESCRIPTION: "Gitea (Git with a cup of tea) is a painless self-hosted Git service written in Go"
KEYWORDS: "go,git,self-hosted,gitea"
ui.notification:
MIN_TIMEOUT: "10s"
MAX_TIMEOUT: "60s"
TIMEOUT_STEP: "10s"
EVENT_SOURCE_UPDATE_TIME: "10s"
markdown:
ENABLE_HARD_LINE_BREAK_IN_COMMENTS: "true"
ENABLE_HARD_LINE_BREAK_IN_DOCUMENTS: "false"
FILE_EXTENSIONS: ".md,.markdown,.mdown,.mkd"
server:
PROTOCOL: "http"
DOMAIN: "localhost"
ROOT_URL: "%(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/"
HTTP_ADDR: "0.0.0.0"
HTTP_PORT: "3000"
REDIRECT_OTHER_PORT: "false"
PORT_TO_REDIRECT: "80"
UNIX_SOCKET_PERMISSION: "666"
LOCAL_ROOT_URL: "%(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/"
DISABLE_SSH: "false"
START_SSH_SERVER: "false"
SSH_DOMAIN: "%(DOMAIN)s"
SSH_PORT: "22"
SSH_LISTEN_PORT: "%(SSH_PORT)s"
SSH_CREATE_AUTHORIZED_KEYS_FILE: "true"
SSH_SERVER_CIPHERS: "aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, arcfour256, arcfour128"
SSH_SERVER_KEY_EXCHANGES: "diffie-hellman-group1-sha1, diffie-hellman-group14-sha1, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, curve25519-sha256@libssh.org"
SSH_SERVER_MACS: "hmac-sha2-256-etm@openssh.com, hmac-sha2-256, hmac-sha1, hmac-sha1-96"
SSH_KEYGEN_PATH: "ssh-keygen"
SSH_BACKUP_AUTHORIZED_KEYS: "true"
SSH_EXPOSE_ANONYMOUS: "false"
MINIMUM_KEY_SIZE_CHECK: "false"
OFFLINE_MODE: "false"
DISABLE_ROUTER_LOG: "false"
CERT_FILE: "https/cert.pem"
KEY_FILE: "https/key.pem"
APP_DATA_PATH: "data"
ENABLE_GZIP: "false"
ENABLE_PPROF: "false"
PPROF_DATA_PATH: "data/tmp/pprof"
LANDING_PAGE: "home"
LFS_START_SERVER: "false"
LFS_CONTENT_PATH: "data/lfs"
LFS_HTTP_AUTH_EXPIRY: "20m"
LFS_MAX_FILE_SIZE: "0"
LFS_LOCKS_PAGING_NUM: "50"
ALLOW_GRACEFUL_RESTARTS: "true"
GRACEFUL_HAMMER_TIME: "60s"
STARTUP_TIMEOUT: "0"
STATIC_CACHE_TIME: "6h"
ssh.minimum_key_sizes:
ED25519: "256"
ECDSA: "256"
RSA: "2048"
DSA: "1024"
database:
DB_TYPE: "mysql"
HOST: "127.0.0.1:3306"
NAME: "gitea"
USER: "root"
SSL_MODE: "disable"
CHARSET: "utf8mb4"
PATH: "data/gitea.db"
SQLITE_TIMEOUT: "500"
ITERATE_BUFFER_SIZE: "50"
LOG_SQL: "true"
DB_RETRIES: "10"
DB_RETRY_BACKOFF: "3s"
MAX_IDLE_CONNS: "2"
CONN_MAX_LIFETIME: "3s"
MAX_OPEN_CONNS: "0"
indexer:
ISSUE_INDEXER_TYPE: "bleve"
ISSUE_INDEXER_CONN_STR: "http://elastic:changeme@localhost:9200"
ISSUE_INDEXER_NAME: "gitea_issues"
ISSUE_INDEXER_PATH: "indexers/issues.bleve"
ISSUE_INDEXER_QUEUE_TYPE: "levelqueue"
ISSUE_INDEXER_QUEUE_DIR: "indexers/issues.queue"
ISSUE_INDEXER_QUEUE_CONN_STR: ""addrs"
ISSUE_INDEXER_QUEUE_BATCH_NUMBER: "20"
STARTUP_TIMEOUT: "30s"
REPO_INDEXER_ENABLED: "false"
REPO_INDEXER_PATH: "indexers/repos.bleve"
UPDATE_BUFFER_LEN: "20"
MAX_FILE_SIZE: "1048576"
queue:
TYPE: "persistable-channel"
DATADIR: "queues/"
LENGTH: "20"
BATCH_LENGTH: "20"
CONN_STR: ""addrs"
QUEUE_NAME: "_queue"
WRAP_IF_NECESSARY: "true"
MAX_ATTEMPTS: "10"
TIMEOUT: "15m30s"
WORKERS: "1"
MAX_WORKERS: "10"
BLOCK_TIMEOUT: "1s"
BOOST_TIMEOUT: "5m"
BOOST_WORKERS: "5"
admin:
DISABLE_REGULAR_ORG_CREATION: "false"
DEFAULT_EMAIL_NOTIFICATIONS: "enabled"
security:
INSTALL_LOCK: "false"
SECRET_KEY: "!#@FDEWREWR&*("
LOGIN_REMEMBER_DAYS: "7"
COOKIE_USERNAME: "gitea_awesome"
COOKIE_REMEMBER_NAME: "gitea_incredible"
REVERSE_PROXY_AUTHENTICATION_USER: "X-WEBAUTH-USER"
REVERSE_PROXY_AUTHENTICATION_EMAIL: "X-WEBAUTH-EMAIL"
MIN_PASSWORD_LENGTH: "6"
IMPORT_LOCAL_PATHS: "false"
DISABLE_GIT_HOOKS: "false"
ONLY_ALLOW_PUSH_IF_GITEA_ENVIRONMENT_SET: "true"
PASSWORD_COMPLEXITY: "lower,upper,digit,spec"
PASSWORD_HASH_ALGO: "pbkdf2"
CSRF_COOKIE_HTTP_ONLY: "true"
openid:
ENABLE_OPENID_SIGNIN: "true"
service:
ACTIVE_CODE_LIVE_MINUTES: "180"
RESET_PASSWD_CODE_LIVE_MINUTES: "180"
REGISTER_EMAIL_CONFIRM: "false"
DISABLE_REGISTRATION: "false"
ALLOW_ONLY_EXTERNAL_REGISTRATION: "false"
REQUIRE_SIGNIN_VIEW: "false"
ENABLE_NOTIFY_MAIL: "false"
ENABLE_BASIC_AUTHENTICATION: "true"
ENABLE_REVERSE_PROXY_AUTHENTICATION: "false"
ENABLE_REVERSE_PROXY_AUTO_REGISTRATION: "false"
ENABLE_REVERSE_PROXY_EMAIL: "false"
ENABLE_CAPTCHA: "false"
CAPTCHA_TYPE: "image"
RECAPTCHA_URL: "https://www.google.com/recaptcha/"
DEFAULT_KEEP_EMAIL_PRIVATE: "false"
DEFAULT_ALLOW_CREATE_ORGANIZATION: "true"
DEFAULT_ORG_VISIBILITY: "public"
DEFAULT_ORG_MEMBER_VISIBLE: "false"
DEFAULT_ENABLE_DEPENDENCIES: "true"
ALLOW_CROSS_REPOSITORY_DEPENDENCIES: "true"
ENABLE_USER_HEATMAP: "true"
ENABLE_TIMETRACKING: "true"
DEFAULT_ENABLE_TIMETRACKING: "true"
DEFAULT_ALLOW_ONLY_CONTRIBUTORS_TO_TRACK_TIME: "true"
NO_REPLY_ADDRESS: "noreply.%(DOMAIN)s"
SHOW_REGISTRATION_BUTTON: "true"
SHOW_MILESTONES_DASHBOARD_PAGE: "true"
AUTO_WATCH_NEW_REPOS: "true"
AUTO_WATCH_ON_CHANGES: "false"
webhook:
QUEUE_LENGTH: "1000"
DELIVER_TIMEOUT: "5"
SKIP_TLS_VERIFY: "false"
PAGING_NUM: "10"
mailer:
ENABLED: "false"
SEND_BUFFER_LEN: "100"
SKIP_VERIFY: "false"
USE_CERTIFICATE: "false"
CERT_FILE: "custom/mailer/cert.pem"
KEY_FILE: "custom/mailer/key.pem"
IS_TLS_ENABLED: "false"
SEND_AS_PLAIN_TEXT: "false"
MAILER_TYPE: "smtp"
SENDMAIL_PATH: "sendmail"
SENDMAIL_TIMEOUT: "5m"
cache:
ENABLED: "true"
ADAPTER: "memory"
INTERVAL: "60"
ITEM_TTL: "16h"
cache.last_commit:
ENABLED: "true"
ITEM_TTL: "8760h"
COMMITS_COUNT: "1000"
session:
PROVIDER: "memory"
PROVIDER_CONFIG: "data/sessions"
COOKIE_NAME: "i_like_gitea"
COOKIE_SECURE: "false"
ENABLE_SET_COOKIE: "true"
GC_INTERVAL_TIME: "86400"
SESSION_LIFE_TIME: "86400"
picture:
AVATAR_UPLOAD_PATH: "data/avatars"
REPOSITORY_AVATAR_UPLOAD_PATH: "data/repo-avatars"
REPOSITORY_AVATAR_FALLBACK: "none"
REPOSITORY_AVATAR_FALLBACK_IMAGE: "/img/repo_default.png"
AVATAR_MAX_WIDTH: "4096"
AVATAR_MAX_HEIGHT: "3072"
AVATAR_MAX_FILE_SIZE: "1048576"
GRAVATAR_SOURCE: "gravatar"
DISABLE_GRAVATAR: "false"
ENABLE_FEDERATED_AVATAR: "false"
attachment:
ENABLED: "true"
PATH: "data/attachments"
ALLOWED_TYPES: "image/jpeg|image/png|application/zip|application/gzip"
MAX_SIZE: "4"
MAX_FILES: "5"
time:
log:
MODE: "console"
BUFFER_LEN: "10000"
REDIRECT_MACARON_LOG: "false"
MACARON: "file"
ROUTER_LOG_LEVEL: "Info"
ROUTER: "console"
ENABLE_ACCESS_LOG: "false"
ACCESS_LOG_TEMPLATE: "{{.Ctx.RemoteAddr}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}\" \"{{.Ctx.Req.UserAgent}}""
ACCESS: "file"
LEVEL: "Info"
STACKTRACE_LEVEL: "None"
log.x:
FLAGS: "stdflags"
COLORIZE: "false"
log.console:
STDERR: "false"
log.file:
LOG_ROTATE: "true"
MAX_LINES: "1000000"
MAX_SIZE_SHIFT: "28"
DAILY_ROTATE: "true"
MAX_DAYS: "7"
COMPRESS: "true"
COMPRESSION_LEVEL: "-1"
log.conn:
RECONNECT_ON_MSG: "false"
RECONNECT: "false"
PROTOCOL: "tcp"
log.smtp:
SUBJECT: "Diagnostic message from server"
cron:
ENABLED: "true"
RUN_AT_START: "false"
cron.update_mirrors:
SCHEDULE: "@every 10m"
cron.repo_health_check:
SCHEDULE: "@every 24h"
TIMEOUT: "60s"
cron.check_repo_stats:
RUN_AT_START: "true"
SCHEDULE: "@every 24h"
cron.archive_cleanup:
ENABLED: "true"
RUN_AT_START: "true"
SCHEDULE: "@every 24h"
OLDER_THAN: "24h"
cron.sync_external_users:
RUN_AT_START: "false"
SCHEDULE: "@every 24h"
UPDATE_EXISTING: "true"
cron.update_migration_poster_id:
SCHEDULE: "@every 24h"
git:
DISABLE_DIFF_HIGHLIGHT: "false"
MAX_GIT_DIFF_LINES: "1000"
MAX_GIT_DIFF_LINE_CHARACTERS: "5000"
MAX_GIT_DIFF_FILES: "100"
ENABLE_AUTO_GIT_WIRE_PROTOCOL: "true"
PULL_REQUEST_PUSH_MESSAGE: "true"
git.timeout:
DEFAULT: "360"
MIGRATE: "600"
MIRROR: "300"
CLONE: "300"
PULL: "300"
GC: "60"
mirror:
DEFAULT_INTERVAL: "8h"
MIN_INTERVAL: "10m"
api:
ENABLE_SWAGGER: "true"
MAX_RESPONSE_ITEMS: "50"
DEFAULT_PAGING_NUM: "30"
DEFAULT_GIT_TREES_PER_PAGE: "1000"
DEFAULT_MAX_BLOB_SIZE: "10485760"
oauth2:
ENABLE: "true"
ACCESS_TOKEN_EXPIRATION_TIME: "3600"
REFRESH_TOKEN_EXPIRATION_TIME: "730"
INVALIDATE_REFRESH_TOKENS: "false"
JWT_SECRET: "Bk0yK7Y9g_p56v86KaHqjSbxvNvu3SbKoOdOt2ZcXvU"
MAX_TOKEN_LENGTH: "32767"
i18n:
LANGS: "en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR"
NAMES: "English,简体中文,繁體中文(香港),繁體中文(台灣),Deutsch,français,Nederlands,latviešu,русский,Українська,日本語,español,português do Brasil,Português de Portugal,polski,български,italiano,suomi,Türkçe,čeština,српски,svenska,한국어"
U2F:
highlight.mapping:
other:
SHOW_FOOTER_BRANDING: "false"
SHOW_FOOTER_VERSION: "true"
SHOW_FOOTER_TEMPLATE_LOAD_TIME: "true"
markup.sanitizer.1:
markup.asciidoc:
ENABLED: "false"
FILE_EXTENSIONS: ".adoc,.asciidoc"
RENDER_COMMAND = "asciidoc --out-file: "- -""
IS_INPUT_FILE: "false"
metrics:
ENABLED: "false"
task:
QUEUE_TYPE: "channel"
QUEUE_LENGTH: "1000"
QUEUE_CONN_STR: ""addrs"
migrations:
MAX_ATTEMPTS: "3"
RETRY_BACKOFF: "3"

1023
config/trantor.ini Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,116 @@
@import "/css/theme-arc-green.css";
* {
scrollbar-width: auto;
scrollbar-color: #575d6c rgb(64, 69, 82);
}
::-webkit-scrollbar {
width: 12px!important;
height: 10px!important;
}
::-webkit-scrollbar-thumb {
border-radius: 0px !important;
background: #575d6c !important;
}
::-webkit-scrollbar-track {
background: rgb(64, 69, 82) !important;
}
.ui.bar {
background-image: linear-gradient(-90deg,#9f2e45,#5d3067) !important;
}
#navbar > .item,
#navbar > .right.menu > .item {
color: white;
}
#navbar > .item.active,
#navbar > .right.menu > .item.active {
background: rgba(34, 34, 34, 0.28);
}
#navbar-expand-toggle {
color: white !important;
background: #383c4a !important;
}
#navbar-expand-toggle {
color: white !important;
background: #383c4a !important;
}
#navbar-expand-toggle:hover {
background: inherit !important;
}
.home .hero .octicon {
color: inherit !important;
}
.ui.breadcrumb a,
a:not(.ui),
.ui.card > .extra a:not(.ui),
a {
color: white;
}
.ui.breadcrumb a:hover,
a:not(.ui):hover,
.ui.card > .extra a:not(.ui):hover,
a:hover {
color: lightgray;
}
/* Star and watch number */
.ui.labeled.button:not([class*="left labeled"]) > .label,
.ui[class*="left labeled"].button > .button {
color: #9b9b9b;
}
.ui.blue.button,
.ui.blue.buttons .button,
.ui.green.button,
.ui.green.buttons .button {
background-color: #4e5260;
}
.ui.blue.button:hover,
.ui.blue.buttons .button:hover,
.ui.green.button:hover,
.ui.green.buttons .button:hover,
.ui.blue.button:focus,
.ui.blue.buttons .button:focus,
.ui.green.button:focus,
.ui.green.buttons .button:focus {
background-color: #60636f;
}
#repo-desc a,
.file-view a {
color: #4bf;
}
#repo-desc a,
.file-view a:hover {
color: #00a3e2;
}
.captcha-img {
background-color: white;
}
.ui.pagination.menu .active.item {
background-color: #4e5260;
}
/* not enough contrast on wiki pages */
.ui.list > .item > .content, .ui.segment {
color: #e3e3e3 !important;
}
.breadcrumb .divider, .ui.header {
color: #e3e3e3 !important;
}

View File

@ -0,0 +1,17 @@
.ui.bar {
background-image: linear-gradient(-90deg,#9f2e45,#5d3067) !important;
}
#navbar > .item,
#navbar > .right.menu > .item {
color: white;
}
#navbar > .item.active,
#navbar > .right.menu > .item.active {
background: rgba(34, 34, 34, 0.28);
}
#navbar-expand-toggle {
color: white !important;
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,177 @@
body {
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol" !important;
font-size: 14px;
line-height: 1.5;
color: #24292e;
}
a {
color: #0366d6;
}
.following.bar.light {
background-color: #24292e;
color: rgba(255,255,255,0.75);
border-bottom: none;
}
.ui.main.menu {
font-size: 14px;
}
.ui.menu, .markdown:not(code), .ui.button, .ui.header {
font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
}
.ui.main.menu .item {
color: rgba(255,255,255,1);
font-weight: 600;
}
.ui.secondary.main.menu .active.item {
color: rgba(255,255,255,1);
font-weight: 600;
}
.ui.secondary.main.menu .active.item:hover {
color: rgba(255,255,255,0.75);
}
.ui.secondary.main.menu a.item:hover {
color: rgba(255,255,255,0.75);
}
.ui.secondary.main.menu .dropdown.item:hover {
color: rgba(255,255,255,0.75);
}
.repository.view.issue .title h1 {
font-size: 32px;
font-weight: 400;
word-wrap: break-word;
}
.ui.green.button {
background-color: #28a745;
background-image: linear-gradient(-180deg, #34d058 0%, #28a745 90%);
}
.ui.green.button:hover {
background-color: #269f42;
background-image: linear-gradient(-180deg, #2fcb53 0%, #269f42 90%);
}
.ui.button {
border: 1px solid rgba(27,31,35,0.2);
border-radius: 0.25em;
background-color: #eff3f6;
background-image: linear-gradient(-180deg, #fafbfc 0%, #eff3f6 90%);
font-size: 12px;
font-weight: 600;
}
.ui.button:hover {
border-color: rgba(27,31,35,0.5);
background-color: #e6ebf1;
background-image: linear-gradient(-180deg, #f0f3f6 0%, #e6ebf1 90%);
}
.ui.buttons .button:first-child {
border-left: 1px solid rgba(27,31,35,0.2);
}
.ui.buttons .button:first-child:hover {
border-left-color: rgba(27, 31, 35, 0.5);
}
.ui.blue.button, .ui.tiny.blue.buttons.button, .ui.tiny.blue.buttons a.ui.button {
background-color: #2185d0;
background-image: linear-gradient(-180deg, #3e98db 0%, #2185d0 90%);
}
.ui.blue.button:hover, .ui.tiny.blue.buttons.button:hover, .ui.tiny.blue.buttons a.ui.button:hover {
background-color: #1c6fac;
background-image: linear-gradient(-180deg, #2185d0 0%, #1c6fac 90%);
}
.ui.red.button {
background-color: #ca1010;
background-image: linear-gradient(-180deg, #e72525 0%, #ca1010 90%);
}
.ui.red.button:hover {
background-color: #af0e0e;
background-image: linear-gradient(-180deg, #ca1010 0%, #af0e0e 90%);
}
.ui.breadcrumb a {
color: #0366d6;
}
.repository .header-grid .ui.huge.breadcrumb {
font-size: 18px;
font-weight: 600;
}
.ui.compact.labeled.button, .ui.compact.button a {
color: #24292e;
font-size: 12px;
font-weight: 600;
}
.ui.table td.message a {
color: #6a737d;
}
.ui.table td.name a:hover, .ui.table td.message a:hover {
text-decoration: underline;
color: #0366d6;
}
#repo-files-table.ui.fixed.single.line.table thead tr.commit-list {
background-color: #f1f8ff;
border: 1px solid #c8e1ff;
}
#repo-files-table.ui.fixed.single.line.table thead tr.commit-list th {
background-color: #f1f8ff;
border-bottom: 1px solid #c8e1ff;
font-size: 12px;
}
.ui.top.attached.header {
background-color: #f6f8fa;
font-size: 14px;
}
.ui.top.attached.header strong {
font-weight: 600;
}
.ui.tabular.stackable.menu.navbar a.item {
color: #586069;
}
.ui.tabular.stackable.menu.navbar a.item:hover {
color: #24292e;
}
.ui.tabular.stackable.menu.navbar a.active.item {
font-weight: 400;
color: #24292e;
}
.repository.file.list #repo-files-table tr:hover {
background-color: #f6f8fa;
}
.repository .header-grid .mega-octicon {
font-size: 18px;
width: 20px;
}
.ui.label {
font-size: 12px;
font-weight: 600;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,134 @@
<!DOCTYPE html>
<html lang="{{.Language}}" class="theme-{{.SignedUser.Theme}}">
<head data-suburl="{{AppSubUrl}}">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>{{if .Title}}{{.Title | RenderEmojiPlain}} - {{end}} {{if .Repository.Name}}{{.Repository.Name}} - {{end}}{{AppName}} </title>
<link rel="manifest" href="{{AppSubUrl}}/manifest.json" crossorigin="use-credentials">
<meta name="theme-color" content="{{ThemeColorMetaTag}}">
<meta name="author" content="{{if .Repository}}{{.Owner.Name}}{{else}}{{MetaAuthor}}{{end}}" />
<meta name="description" content="{{if .Repository}}{{.Repository.Name}}{{if .Repository.Description}} - {{.Repository.Description}}{{end}}{{else}}{{MetaDescription}}{{end}}" />
<meta name="keywords" content="{{MetaKeywords}}">
<meta name="referrer" content="no-referrer" />
<meta name="_csrf" content="{{.CsrfToken}}" />
{{if .IsSigned}}
<meta name="_uid" content="{{.SignedUser.ID}}" />
{{end}}
{{if .ContextUser}}
<meta name="_context_uid" content="{{.ContextUser.ID}}" />
{{end}}
{{if .SearchLimit}}
<meta name="_search_limit" content="{{.SearchLimit}}" />
{{end}}
{{if .GoGetImport}}
<meta name="go-import" content="{{.GoGetImport}} git {{.CloneLink.HTTPS}}">
<meta name="go-source" content="{{.GoGetImport}} _ {{.GoDocDirectory}} {{.GoDocFile}}">
{{end}}
<script>
window.config = {
AppVer: '{{AppVer}}',
AppSubUrl: '{{AppSubUrl}}',
StaticUrlPrefix: '{{StaticUrlPrefix}}',
UseServiceWorker: {{UseServiceWorker}},
csrf: '{{.CsrfToken}}',
HighlightJS: {{if .RequireHighlightJS}}true{{else}}false{{end}},
SimpleMDE: {{if .RequireSimpleMDE}}true{{else}}false{{end}},
Tribute: {{if .RequireTribute}}true{{else}}false{{end}},
U2F: {{if .RequireU2F}}true{{else}}false{{end}},
Heatmap: {{if .EnableHeatmap}}true{{else}}false{{end}},
heatmapUser: {{if .HeatmapUser}}'{{.HeatmapUser}}'{{else}}null{{end}},
NotificationSettings: {
MinTimeout: {{NotificationSettings.MinTimeout}},
TimeoutStep: {{NotificationSettings.TimeoutStep}},
MaxTimeout: {{NotificationSettings.MaxTimeout}},
EventSourceUpdateTime: {{NotificationSettings.EventSourceUpdateTime}},
},
{{if .RequireTribute}}
tributeValues: Array.from(new Map([
{{ range .Participants }}
['{{.Name}}', {key: '{{.Name}} {{.FullName}}', value: '{{.Name}}',
name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.RelAvatarLink}}'}],
{{ end }}
{{ range .Assignees }}
['{{.Name}}', {key: '{{.Name}} {{.FullName}}', value: '{{.Name}}',
name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.RelAvatarLink}}'}],
{{ end }}
]).values()),
{{end}}
};
</script>
<link rel="icon" href="{{StaticUrlPrefix}}/img/favicon.svg" type="image/svg+xml">
<link rel="alternate icon" href="{{StaticUrlPrefix}}/img/favicon.png" type="image/png">
<link rel="mask-icon" href="{{StaticUrlPrefix}}/img/gitea-safari.svg" color="#609926">
<link rel="fluid-icon" href="{{StaticUrlPrefix}}/img/gitea-lg.png" title="{{AppName}}">
{{if .RequireSimpleMDE}}
<link rel="stylesheet" href="{{StaticUrlPrefix}}/vendor/plugins/simplemde/simplemde.min.css">
{{end}}
<link rel="stylesheet" href="{{StaticUrlPrefix}}/css/index.css?v={{MD5 AppVer}}">
<noscript>
<style>
.dropdown:hover > .menu { display: block; }
.ui.secondary.menu .dropdown.item > .menu { margin-top: 0; }
</style>
</noscript>
<style class="list-search-style"></style>
{{if .PageIsUserProfile}}
<meta property="og:title" content="{{.Owner.Name}}" />
<meta property="og:type" content="profile" />
<meta property="og:image" content="{{.Owner.AvatarLink}}" />
<meta property="og:url" content="{{.Owner.HTMLURL}}" />
{{if .Owner.Description}}
<meta property="og:description" content="{{.Owner.Description}}">
{{end}}
{{else if .Repository}}
{{if .Issue}}
<meta property="og:title" content="{{.Issue.Title}}" />
<meta property="og:url" content="{{.Issue.HTMLURL}}" />
{{if .Issue.Content}}
<meta property="og:description" content="{{.Issue.Content}}" />
{{end}}
{{else}}
<meta property="og:title" content="{{.Repository.Name}}" />
<meta property="og:url" content="{{.Repository.HTMLURL}}" />
{{if .Repository.Description}}
<meta property="og:description" content="{{.Repository.Description}}" />
{{end}}
{{end}}
<meta property="og:type" content="object" />
<meta property="og:image" content="{{.Repository.Owner.AvatarLink}}" />
{{else}}
<meta property="og:title" content="{{AppName}}">
<meta property="og:type" content="website" />
<meta property="og:image" content="{{StaticUrlPrefix}}/img/gitea-lg.png" />
<meta property="og:url" content="{{AppUrl}}" />
<meta property="og:description" content="{{MetaDescription}}">
{{end}}
<meta property="og:site_name" content="{{AppName}}" />
{{if .IsSigned }}
{{ if ne .SignedUser.Theme "gitea" }}
<link rel="stylesheet" href="{{StaticUrlPrefix}}/css/theme-{{.SignedUser.Theme}}.css?v={{MD5 AppVer}}">
{{end}}
{{else if ne DefaultTheme "gitea"}}
<link rel="stylesheet" href="{{StaticUrlPrefix}}/css/theme-{{DefaultTheme}}.css?v={{MD5 AppVer}}">
{{end}}
{{template "custom/header" .}}
</head>
<body>
{{template "custom/body_outer_pre" .}}
<div class="full height">
<noscript>{{.i18n.Tr "enable_javascript"}}</noscript>
{{template "custom/body_inner_pre" .}}
{{if not .PageIsInstall}}
<div class="ui top secondary stackable main menu following bar light">
{{template "base/head_navbar" .}}
</div><!-- end bar -->
{{end}}
{{/*
</div>
</body>
</html>
*/}}

View File

@ -0,0 +1,163 @@
<div class="ui container" id="navbar">
<div class="item brand" style="justify-content: space-between;">
<div>KEBLER.NET - Trantor</div>
<!-- <a href="{{AppSubUrl}}/">
<img class="ui mini image" src="{{StaticUrlPrefix}}/img/gitea-sm.png">
</a> -->
<div class="ui basic icon button mobile-only" id="navbar-expand-toggle">
<i class="sidebar icon"></i>
</div>
</div>
{{if and .IsSigned .MustChangePassword}}
{{/* No links */}}
{{else if .IsSigned}}
<a class="item {{if .PageIsDashboard}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "dashboard"}}</a>
{{if not .UnitIssuesGlobalDisabled}}
<a class="item {{if .PageIsIssues}}active{{end}}" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a>
{{end}}
{{if not .UnitPullsGlobalDisabled}}
<a class="item {{if .PageIsPulls}}active{{end}}" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a>
{{end}}
{{if not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled)}}
{{if .ShowMilestonesDashboardPage}}<a class="item {{if .PageIsMilestonesDashboard}}active{{end}}" href="{{AppSubUrl}}/milestones">{{.i18n.Tr "milestones"}}</a>{{end}}
{{end}}
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
{{else if .IsLandingPageHome}}
<a class="item {{if .PageIsHome}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "home"}}</a>
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
{{else if .IsLandingPageExplore}}
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "home"}}</a>
{{else if .IsLandingPageOrganizations}}
<a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{.i18n.Tr "home"}}</a>
{{end}}
{{template "custom/extra_links" .}}
{{/*
<div class="item">
<div class="ui icon input">
<input class="searchbox" type="text" placeholder="{{.i18n.Tr "search_project"}}">
<i class="search icon"></i>
</div>
</div>
*/}}
{{if and .IsSigned .MustChangePassword}}
<div class="right stackable menu">
<div class="ui dropdown jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted">
<span class="text">
<img class="ui tiny avatar image" width="24" height="24" src="{{.SignedUser.RelAvatarLink}}">
<span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span>
<span class="mobile-only">{{.SignedUser.Name}}</span>
<span class="fitted not-mobile" tabindex="-1">{{svg "octicon-triangle-down" 16}}</span>
</span>
<div class="menu user-menu" tabindex="-1">
<div class="ui header">
{{.i18n.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
</div>
<div class="divider"></div>
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/">
{{svg "octicon-sign-out" 16}}
{{.i18n.Tr "sign_out"}}<!-- Sign Out -->
</a>
</div><!-- end content avatar menu -->
</div><!-- end dropdown avatar menu -->
</div>
{{else if .IsSigned}}
<div class="right stackable menu">
<a href="{{AppSubUrl}}/notifications" class="item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted">
<span class="text">
<span class="fitted">{{svg "octicon-bell" 16}}</span>
<span class="sr-mobile-only">{{.i18n.Tr "notifications"}}</span>
{{$notificationUnreadCount := 0}}
{{if .NotificationUnreadCount}}{{$notificationUnreadCount = call .NotificationUnreadCount}}{{end}}
<span class="ui red label {{if not $notificationUnreadCount}}hidden{{end}} notification_count">
{{$notificationUnreadCount}}
</span>
</span>
</a>
<div class="ui dropdown jump item poping up" data-content="{{.i18n.Tr "create_new"}}" data-variation="tiny inverted">
<span class="text">
<span class="fitted">{{svg "octicon-plus" 16}}</span>
<span class="sr-mobile-only">{{.i18n.Tr "create_new"}}</span>
<span class="fitted not-mobile">{{svg "octicon-triangle-down" 16}}</span>
</span>
<div class="menu">
<a class="item" href="{{AppSubUrl}}/repo/create">
<span class="fitted">{{svg "octicon-plus" 16}}</span> {{.i18n.Tr "new_repo"}}
</a>
<a class="item" href="{{AppSubUrl}}/repo/migrate">
<span class="fitted">{{svg "octicon-repo-push" 16}}</span> {{.i18n.Tr "new_migrate"}}
</a>
{{if .SignedUser.CanCreateOrganization}}
<a class="item" href="{{AppSubUrl}}/org/create">
<span class="fitted">{{svg "octicon-organization" 16}}</span> {{.i18n.Tr "new_org"}}
</a>
{{end}}
</div><!-- end content create new menu -->
</div><!-- end dropdown menu create new -->
<div class="ui dropdown jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted">
<span class="text">
<img class="ui tiny avatar image" width="24" height="24" src="{{.SignedUser.RelAvatarLink}}">
<span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span>
<span class="mobile-only">{{.SignedUser.Name}}</span>
<span class="fitted not-mobile" tabindex="-1">{{svg "octicon-triangle-down" 16}}</span>
</span>
<div class="menu user-menu" tabindex="-1">
<div class="ui header">
{{.i18n.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
</div>
<div class="divider"></div>
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}">
{{svg "octicon-person" 16}}
{{.i18n.Tr "your_profile"}}<!-- Your profile -->
</a>
<a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}?tab=stars">
{{svg "octicon-star" 16}}
{{.i18n.Tr "your_starred"}}
</a>
<a class="{{if .PageIsUserSettings}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
{{svg "octicon-tools" 16}}
{{.i18n.Tr "your_settings"}}<!-- Your settings -->
</a>
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">
{{svg "octicon-question" 16}}
{{.i18n.Tr "help"}}<!-- Help -->
</a>
{{if .IsAdmin}}
<div class="divider"></div>
<a class="{{if .PageIsAdmin}}active{{end}} item" href="{{AppSubUrl}}/admin">
<i class="icon settings"></i>
{{.i18n.Tr "admin_panel"}}<!-- Admin Panel -->
</a>
{{end}}
<div class="divider"></div>
<a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/">
{{svg "octicon-sign-out" 16}}
{{.i18n.Tr "sign_out"}}<!-- Sign Out -->
</a>
</div><!-- end content avatar menu -->
</div><!-- end dropdown avatar menu -->
</div><!-- end signed user right menu -->
{{else}}
<a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">{{.i18n.Tr "help"}}</a>
<div class="right stackable menu">
{{if .ShowRegistrationButton}}
<a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
{{svg "octicon-person" 16}} {{.i18n.Tr "register"}}
</a>
{{end}}
<a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login?redirect_to={{.CurrentURL}}">
{{svg "octicon-sign-in" 16}} {{.i18n.Tr "sign_in"}}
</a>
</div><!-- end anonymous right menu -->
{{end}}
</div>

View File

@ -0,0 +1 @@
<div>Default Body Inner Post </div>

View File

@ -0,0 +1 @@
<div>Default Body Inner Pre </div>

View File

@ -0,0 +1,2 @@
<link rel="icon" type="image/png" sizes="32x32" href="/img/icon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/img/icon/favicon-16x16.png">

View File

@ -0,0 +1,16 @@
{{template "base/head" .}}
<div class="home">
<div class="ui stackable middle very relaxed page grid">
<div class="sixteen wide center aligned centered column">
<div>
<!-- <img class="logo" src="{{StaticUrlPrefix}}/img/gitea-lg.png" /> -->
</div>
<div class="hero">
<h1 class="ui icon header title">
{{AppName}}
</h1>
</div>
</div>
</div>
</div>
{{template "base/footer" .}}

93
frontend/less/_admin.less Normal file
View File

@ -0,0 +1,93 @@
.admin {
padding-top: 15px;
.table.segment {
padding: 0;
font-size: 13px;
&:not(.striped) {
thead {
th:last-child {
padding-right: 5px !important;
}
}
}
th {
padding-top: 5px;
padding-bottom: 5px;
}
&:not(.select) {
th,
td {
&:first-of-type {
padding-left: 15px !important;
}
}
}
form tbody button[type='submit'] {
padding: 5px 8px;
}
}
.ui.header,
.ui.segment {
box-shadow: 0 1px 2px 0 rgba(34, 36, 38, .15);
}
&.user {
.email {
max-width: 200px;
}
}
dl.admin-dl-horizontal {
padding: 20px;
margin: 0;
dd {
margin-left: 275px;
}
dt {
font-weight: bolder;
float: left;
width: 285px;
clear: left;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
&.config {
#test-mail-btn {
margin-left: 5px;
}
}
code,
pre {
white-space: pre-wrap;
word-wrap: break-word;
}
#notice-table {
.notice-description {
@media only screen and (max-width: 767px) {
max-width: 80vw;
}
@media only screen and (max-width: 991px) and (min-width: 768px) {
max-width: 360px;
}
@media only screen and (min-width: 992px) and (max-width: 1199.98px) {
max-width: 510px;
}
@media only screen and (min-width: 1200px) {
max-width: 640px;
}
}
}
}

1270
frontend/less/_base.less Normal file

File diff suppressed because it is too large Load Diff

377
frontend/less/_chroma.less Normal file
View File

@ -0,0 +1,377 @@
/* Background */
.chroma {
background-color: #ffffff;
}
/* LineTableTD */
.chroma .lntd {
vertical-align: top;
padding: 0;
margin: 0;
border: 0;
}
/* LineTable */
.chroma .lntable {
border-spacing: 0;
padding: 0;
margin: 0;
border: 0;
width: auto;
overflow: auto;
display: block;
}
/* LineHighlight */
.chroma .hl {
display: block;
width: 100%;
background-color: #e5e5e5;
}
/* LineNumbersTable */
.chroma .lnt {
margin-right: .4em;
padding: 0 .4em;
color: #7f7f7f;
}
/* LineNumbers */
.chroma .ln {
margin-right: .4em;
padding: 0 .4em;
color: #7f7f7f;
}
/* Keyword */
.chroma .k {
color: #d73a49;
}
/* KeywordConstant */
.chroma .kc {
color: #d73a49;
}
/* KeywordDeclaration */
.chroma .kd {
color: #d73a49;
}
/* KeywordNamespace */
.chroma .kn {
color: #d73a49;
}
/* KeywordPseudo */
.chroma .kp {
color: #d73a49;
}
/* KeywordReserved */
.chroma .kr {
color: #d73a49;
}
/* KeywordType */
.chroma .kt {
color: #445588;
}
/* NameAttribute */
.chroma .na {
color: #d73a49;
}
/* NameBuiltin */
.chroma .nb {
color: #005cc5;
}
/* NameBuiltinPseudo */
.chroma .bp {
color: #999999;
}
/* NameClass */
.chroma .nc {
color: #445588;
}
/* NameConstant */
.chroma .no {
color: #008080;
}
/* NameDecorator */
.chroma .nd {
color: #3c5d5d;
}
/* NameEntity */
.chroma .ni {
color: #6f42c1;
}
/* NameException */
.chroma .ne {
color: #990000;
}
/* NameFunction */
.chroma .nf {
color: #005cc5;
}
/* NameLabel */
.chroma .nl {
color: #990000;
}
/* NameNamespace */
.chroma .nn {
color: #555555;
}
/* NameOther */
.chroma .nx {
color: #24292e;
}
/* NameTag */
.chroma .nt {
color: #22863a;
}
/* NameVariable */
.chroma .nv {
color: #008080;
}
/* NameVariableClass */
.chroma .vc {
color: #008080;
}
/* NameVariableGlobal */
.chroma .vg {
color: #008080;
}
/* NameVariableInstance */
.chroma .vi {
color: #008080;
}
/* LiteralString */
.chroma .s {
color: #032f62;
}
/* LiteralStringAffix */
.chroma .sa {
color: #032f62;
}
/* LiteralStringBacktick */
.chroma .sb {
color: #032f62;
}
/* LiteralStringChar */
.chroma .sc {
color: #032f62;
}
/* LiteralStringDelimiter */
.chroma .dl {
color: #032f62;
}
/* LiteralStringDoc */
.chroma .sd {
color: #032f62;
}
/* LiteralStringDouble */
.chroma .s2 {
color: #032f62;
}
/* LiteralStringEscape */
.chroma .se {
color: #032f62;
}
/* LiteralStringHeredoc */
.chroma .sh {
color: #032f62;
}
/* LiteralStringInterpol */
.chroma .si {
color: #032f62;
}
/* LiteralStringOther */
.chroma .sx {
color: #032f62;
}
/* LiteralStringRegex */
.chroma .sr {
color: #22863a;
}
/* LiteralStringSingle */
.chroma .s1 {
color: #24292e;
}
/* LiteralStringSymbol */
.chroma .ss {
color: #032f62;
}
/* LiteralNumber */
.chroma .m {
color: #009999;
}
/* LiteralNumberBin */
.chroma .mb {
color: #009999;
}
/* LiteralNumberFloat */
.chroma .mf {
color: #009999;
}
/* LiteralNumberHex */
.chroma .mh {
color: #009999;
}
/* LiteralNumberInteger */
.chroma .mi {
color: #009999;
}
/* LiteralNumberIntegerLong */
.chroma .il {
color: #009999;
}
/* LiteralNumberOct */
.chroma .mo {
color: #009999;
}
/* Operator */
.chroma .o {
color: #d73a49;
}
/* OperatorWord */
.chroma .ow {
color: #d73a49;
}
/* Comment */
.chroma .c {
color: #6a737d;
}
/* CommentHashbang */
.chroma .ch {
color: #6a737d;
}
/* CommentMultiline */
.chroma .cm {
color: #999988;
}
/* CommentSingle */
.chroma .c1 {
color: #6a737d;
}
/* CommentSpecial */
.chroma .cs {
color: #999999;
}
/* CommentPreproc */
.chroma .cp {
color: #999999;
}
/* CommentPreprocFile */
.chroma .cpf {
color: #999999;
}
/* GenericDeleted */
.chroma .gd {
color: #000000;
background-color: #ffdddd;
}
/* GenericEmph */
.chroma .ge {
color: #000000;
}
/* GenericError */
.chroma .gr {
color: #aa0000;
}
/* GenericHeading */
.chroma .gh {
color: #999999;
}
/* GenericInserted */
.chroma .gi {
color: #000000;
background-color: #ddffdd;
}
/* GenericOutput */
.chroma .go {
color: #888888;
}
/* GenericPrompt */
.chroma .gp {
color: #555555;
}
/* GenericStrong */
.chroma .gs {
font-weight: bold;
}
/* GenericSubheading */
.chroma .gu {
color: #aaaaaa;
}
/* GenericTraceback */
.chroma .gt {
color: #aa0000;
}
/* GenericUnderline */
.chroma .gl {
text-decoration: underline;
}
/* TextWhitespace */
.chroma .w {
color: #bbbbbb;
}

View File

@ -0,0 +1,210 @@
.dashboard {
padding-top: 15px;
&.feeds,
&.issues {
.context.user.menu {
z-index: 101;
min-width: 200px;
.ui.header {
font-size: 1rem;
text-transform: none;
}
}
.filter.menu {
width: initial;
.item {
text-align: left;
.text {
height: 16px;
vertical-align: middle;
&.truncate {
width: 75%;
}
}
.floating.label {
top: 7px;
left: 90%;
width: 15%;
@media only screen and (max-width: 768px) {
top: 10px;
left: auto;
width: auto;
right: 13px;
}
}
}
// Sort
.jump.item {
margin: 1px;
padding-right: 0;
}
.menu {
max-height: 300px;
overflow-x: auto;
right: 0 !important;
left: auto !important;
}
@media only screen and (max-width: 768px) {
width: 100%;
}
}
.right.stackable.menu > .item.active {
color: #d9453d;
}
}
/* Accomodate for Semantic's 1px hacks on .attached elements */
.dashboard-repos {
margin: 0 1px;
}
.dashboard-navbar {
width: 100vw;
padding: 0 .5rem;
}
}
&.feeds {
.news {
li {
display: flex;
align-items: baseline;
margin-top: .5rem;
margin-bottom: .5rem;
img {
align-self: flex-start;
}
}
li > * + * {
margin-left: .35rem;
}
line-height: 1.2;
> .ui.grid {
margin-left: auto;
margin-right: auto;
}
.ui.avatar {
margin-top: 13px;
}
.time-since {
font-size: 13px;
}
.issue.title {
width: 80%;
}
.push.news .content ul {
line-height: 18px;
font-size: 13px;
list-style: none;
padding-left: 10px;
.text.truncate {
width: 80%;
}
}
.commit-id {
font-family: @monospaced-fonts, monospace;
}
code {
padding: 1px;
font-size: 85%;
background-color: rgba(0, 0, 0, .04);
border-radius: 3px;
word-break: break-all;
}
}
.list {
.header {
.ui.label {
margin-top: -4px;
padding: 4px 5px;
font-weight: normal;
}
.plus.icon {
margin-top: 5px;
}
}
ul {
list-style: none;
margin: 0;
padding-left: 0;
li {
&:not(:last-child) {
border-bottom: 1px solid #ebebeb;
}
&.private {
background-color: #fcf8e9;
}
a {
padding: 6px 1.2em;
display: block;
.svg {
color: #888888;
&.rear {
font-size: 15px;
}
}
.star-num {
font-size: 12px;
}
}
}
}
#privateFilterCheckbox .svg {
color: #888888;
margin-right: .25rem;
}
.repo-owner-name-list {
.item-name {
max-width: 70%;
margin-bottom: -4px;
}
}
#collaborative-repo-list {
.owner-and-repo {
max-width: 80%;
margin-bottom: -5px;
}
.owner-name {
max-width: 120px;
margin-bottom: -5px;
}
}
}
}

View File

@ -0,0 +1,75 @@
.CodeMirror {
font: 14px @monospaced-fonts, monospace;
&.cm-s-default {
border-radius: 3px;
padding: 0 !important;
}
.cm-comment {
background: inherit !important;
}
}
.repository.file.editor .tab[data-tab="write"] {
padding: 0 !important;
}
.repository.file.editor .tab[data-tab="write"] .editor-toolbar {
border: 0 !important;
}
.repository.file.editor .tab[data-tab="write"] .CodeMirror {
border-left: 0;
border-right: 0;
border-bottom: 0;
}
.editor-toolbar {
opacity: 1 !important;
}
.editor-toolbar a:not(:hover) {
background-color: transparent !important;
}
.editor-toolbar i.separator {
border-left: none;
}
.editor-loading {
padding: 1rem;
text-align: center;
}
.edit-diff {
padding: 0 !important;
}
.edit-diff > div > .ui.table {
border-top: none !important;
border-bottom: none !important;
border-left: 1px solid #d4d4d5 !important;
border-right: 1px solid #d4d4d5 !important;
}
#edit_area {
display: none;
}
.monaco-editor-container {
width: 100%;
min-height: 200px;
height: 90vh;
}
/* overwrite conflicting styles from fomantic */
.monaco-editor-container .inputarea {
min-height: 0 !important;
margin: 0 !important;
padding: 0 !important;
resize: none !important;
border: none !important;
color: transparent !important;
background-color: transparent !important;
}

111
frontend/less/_explore.less Normal file
View File

@ -0,0 +1,111 @@
.explore {
padding-top: 15px;
.navbar {
justify-content: center;
padding-top: 15px !important;
margin-top: -15px !important;
margin-bottom: 15px !important;
background-color: #fafafa !important;
border-width: 1px !important;
.svg {
width: 16px;
text-align: center;
margin-right: 5px;
}
}
}
.ui.repository.list {
.item {
padding-bottom: 25px;
&:not(:first-child) {
border-top: 1px solid #eeeeee;
padding-top: 25px;
}
.ui.header {
font-size: 1.5rem;
padding-bottom: 10px;
.name {
word-break: break-all;
}
.metas {
color: #888888;
font-size: 14px;
font-weight: normal;
span:not(:last-child) {
margin-right: 5px;
}
}
}
.time {
font-size: 12px;
color: #808080;
}
.ui.tags {
margin-bottom: 1em;
}
.ui.avatar.image {
width: 24px;
height: 24px;
}
}
}
.ui.repository.branches {
.info {
font-size: 12px;
color: #808080;
display: flex;
white-space: pre;
.commit-message {
max-width: 72em;
overflow: hidden;
text-overflow: ellipsis;
}
}
.overflow-visible {
overflow: visible;
}
}
.ui.user.list {
.item {
padding-bottom: 25px;
&:not(:first-child) {
border-top: 1px solid #eeeeee;
padding-top: 25px;
}
.ui.avatar.image {
width: 40px;
height: 40px;
}
.description {
margin-top: 5px;
.svg:not(:first-child) {
margin-left: 5px;
}
a {
color: #333333;
&:hover {
text-decoration: underline;
}
}
}
}
}

250
frontend/less/_form.less Normal file
View File

@ -0,0 +1,250 @@
.form {
.help {
color: #999999;
padding-top: .6em;
padding-bottom: .6em;
display: inline-block;
}
}
.ui.attached.header {
background: #f0f0f0;
.right {
margin-top: -5px;
.button {
padding: 8px 10px;
font-weight: normal;
}
}
}
@create-page-form-input-padding: 250px !important;
#create-page-form {
form {
margin: auto;
.ui.message {
text-align: center;
}
@media only screen and (min-width: 768px) {
width: 800px !important;
.header {
padding-left: @create-page-form-input-padding+30px;
}
.inline.field > label {
text-align: right;
width: @create-page-form-input-padding;
word-wrap: break-word;
}
.help {
margin-left: @create-page-form-input-padding+15px;
}
.optional .title {
margin-left: @create-page-form-input-padding;
}
input,
textarea {
width: 50% !important;
}
}
@media only screen and (max-width: 767px) {
.optional .title {
margin-left: 15px;
}
.inline.field > label {
display: block;
}
}
}
}
.signin {
.oauth2 {
div {
display: inline-block;
p {
margin: 10px 5px 0 0;
float: left;
}
}
a {
margin-right: 3px;
&:last-child {
margin-right: 0;
}
}
img {
width: 32px;
height: 32px;
&.openidConnect {
width: auto;
}
}
}
}
@media only screen and (min-width: 768px) {
.g-recaptcha {
margin: 0 auto !important;
width: 304px;
padding-left: 30px;
}
}
@media screen and (max-height: 575px) {
#rc-imageselect,
.g-recaptcha {
transform: scale(.77);
transform-origin: 0 0;
}
}
.user.activate,
.user.forgot.password,
.user.reset.password,
.user.signin,
.user.signup {
@input-padding: 200px;
#create-page-form;
form {
width: 700px !important;
.header {
padding-left: 0 !important;
text-align: center;
}
.inline.field > label {
width: @input-padding;
}
.inline.field > label,
input {
@media only screen and (max-width: 768px) {
width: 100% !important;
}
}
input[type=number] {
-moz-appearance: textfield;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
}
}
.repository {
&.new.repo,
&.new.migrate,
&.new.fork {
#create-page-form;
form {
.dropdown {
.dropdown.icon {
margin-top: -7px !important;
padding-bottom: 5px;
}
.text {
margin-right: 0 !important;
i {
margin-right: 0 !important;
}
}
}
.header {
padding-left: 0 !important;
text-align: center;
}
@media only screen and (max-width: 768px) {
label,
input,
.selection.dropdown {
width: 100% !important;
}
.field button,
.field a {
margin-bottom: 1em;
width: 100%;
}
}
}
}
&.new.repo {
.ui.form {
@media only screen and (min-width: 768px) {
#auto-init {
margin-left: @create-page-form-input-padding+15px;
}
}
.selection.dropdown:not(.owner) {
width: 50% !important;
@media only screen and (max-width: 768px) {
width: 100% !important;
}
}
}
}
}
.new.webhook {
form {
.help {
margin-left: 25px;
}
}
.events.fields {
.column {
padding-left: 40px;
}
}
}
.githook {
textarea {
font-family: @monospaced-fonts, monospace;
}
}
.new.org .ui.form {
@media only screen and (max-width: 768px) {
.field button,
.field a {
margin-bottom: 1em;
width: 100%;
}
.field input {
width: 100% !important;
}
}
}

65
frontend/less/_home.less Normal file
View File

@ -0,0 +1,65 @@
.home {
.logo {
max-width: 220px;
}
.hero {
@media only screen and (max-width: 767px) {
h1 {
font-size: 3.5em;
}
h2 {
font-size: 2em;
}
}
@media only screen and (min-width: 768px) {
h1 {
font-size: 5.5em;
}
h2 {
font-size: 3em;
}
}
.svg {
color: #5aa509;
height: 40px;
width: 50px;
vertical-align: bottom;
}
&.header {
font-size: 20px;
}
}
p.large {
font-size: 16px;
}
.stackable {
padding-top: 30px;
}
a {
color: #5aa509;
}
}
.signup {
padding-top: 15px;
}
footer {
.ui.container .left,
.ui.container .right {
@media only screen and (max-width: 880px) {
display: block;
text-align: center;
float: none;
}
}
}

View File

@ -0,0 +1,38 @@
.install {
padding-top: 45px;
form {
@input-padding: 320px !important;
label {
text-align: right;
width: @input-padding;
}
input {
width: 35% !important;
}
.field {
text-align: left;
.help {
margin-left: @input-padding+15px;
}
&.optional .title {
margin-left: 38%;
}
}
}
.ui {
.checkbox {
margin-left: 40% !important;
label {
width: auto !important;
}
}
}
}

View File

@ -0,0 +1,514 @@
.markdown:not(code) {
overflow: hidden;
font-size: 16px;
line-height: 1.6 !important;
word-wrap: break-word;
&.ui.segment {
padding: 3em;
}
&.file-view {
padding: 2em !important;
}
> *:first-child {
margin-top: 0 !important;
}
> *:last-child {
margin-bottom: 0 !important;
}
a:not([href]) {
color: inherit;
text-decoration: none;
}
.absent {
color: #cc0000;
}
.anchor {
padding-right: 4px;
margin-left: -20px;
line-height: 1;
color: inherit;
}
.anchor .svg {
vertical-align: middle;
}
.anchor:focus {
outline: none;
}
h1 .anchor .svg,
h2 .anchor .svg,
h3 .anchor .svg,
h4 .anchor .svg,
h5 .anchor .svg,
h6 .anchor .svg {
visibility: hidden;
}
h1:hover .anchor .svg,
h2:hover .anchor .svg,
h3:hover .anchor .svg,
h4:hover .anchor .svg,
h5:hover .anchor .svg,
h6:hover .anchor .svg {
visibility: visible;
}
h2 .anchor .svg,
h3 .anchor .svg,
h4 .anchor .svg {
position: relative;
top: -2px;
}
h1,
h2,
h3,
h4,
h5,
h6 {
margin-top: 1em;
margin-bottom: 16px;
font-weight: bold;
line-height: 1.4;
&:first-of-type {
margin-top: 0 !important;
}
}
h1 tt,
h1 code,
h2 tt,
h2 code,
h3 tt,
h3 code,
h4 tt,
h4 code,
h5 tt,
h5 code,
h6 tt,
h6 code {
font-size: inherit;
}
h1 {
padding-bottom: .3em;
font-size: 2.25em;
line-height: 1.2;
border-bottom: 1px solid #eeeeee;
}
h2 {
padding-bottom: .3em;
font-size: 1.75em;
line-height: 1.225;
border-bottom: 1px solid #eeeeee;
}
h3 {
font-size: 1.5em;
line-height: 1.43;
}
h4 {
font-size: 1.25em;
}
h5 {
font-size: 1em;
}
h6 {
font-size: 1em;
color: #777777;
}
p,
blockquote,
ul,
ol,
dl,
table,
pre {
margin-top: 0;
margin-bottom: 16px;
}
hr {
height: 4px;
padding: 0;
margin: 16px 0;
background-color: #e7e7e7;
border: 0;
}
ul,
ol {
padding-left: 2em;
}
ul.no-list,
ol.no-list {
padding: 0;
list-style-type: none;
}
li.task-list-item {
list-style-type: none;
margin-left: calc(-2em + 2px);
}
ul ul,
ul ol,
ol ol,
ol ul {
margin-top: 0;
margin-bottom: 0;
}
ol ol,
ul ol {
list-style-type: lower-roman;
}
li > p {
margin-top: 0;
}
dl {
padding: 0;
}
dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: bold;
}
dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
blockquote {
margin-left: 0;
padding: 0 15px;
color: #777777;
border-left: 4px solid #dddddd;
}
blockquote > :first-child {
margin-top: 0;
}
blockquote > :last-child {
margin-bottom: 0;
}
table {
width: auto;
overflow: auto;
word-break: keep-all;
display: block;
}
table th {
font-weight: bold;
}
table th,
table td {
padding: 6px 13px !important;
border: 1px solid #dddddd !important;
}
table tr {
background-color: #ffffff;
border-top: 1px solid #cccccc;
}
table tr:nth-child(2n) {
background-color: #f8f8f8;
}
img {
max-width: 100%;
box-sizing: border-box;
}
.emoji {
max-width: none;
}
span.frame {
display: block;
overflow: hidden;
}
span.frame > span {
display: block;
float: left;
width: auto;
padding: 7px;
margin: 13px 0 0;
overflow: hidden;
border: 1px solid #dddddd;
}
span.frame span img {
display: block;
float: left;
}
span.frame span span {
display: block;
padding: 5px 0 0;
clear: both;
color: #333333;
}
span.align-center {
display: block;
overflow: hidden;
clear: both;
}
span.align-center > span {
display: block;
margin: 13px auto 0;
overflow: hidden;
text-align: center;
}
span.align-center span img {
margin: 0 auto;
text-align: center;
}
span.align-right {
display: block;
overflow: hidden;
clear: both;
}
span.align-right > span {
display: block;
margin: 13px 0 0;
overflow: hidden;
text-align: right;
}
span.align-right span img {
margin: 0;
text-align: right;
}
span.float-left {
display: block;
float: left;
margin-right: 13px;
overflow: hidden;
}
span.float-left span {
margin: 13px 0 0;
}
span.float-right {
display: block;
float: right;
margin-left: 13px;
overflow: hidden;
}
span.float-right > span {
display: block;
margin: 13px auto 0;
overflow: hidden;
text-align: right;
}
code,
tt {
padding: .2em .3em;
margin: 0;
font-size: 85%;
background-color: rgba(0, 0, 0, .04);
border-radius: 3px;
}
code br,
tt br {
display: none;
}
del code {
text-decoration: inherit;
}
pre > code {
padding: 0;
margin: 0;
font-size: 100%;
word-break: normal;
white-space: pre;
background: transparent;
border: 0;
}
.highlight {
margin-bottom: 16px;
}
.highlight pre,
pre {
padding: 16px;
overflow: auto;
font-size: 85%;
line-height: 1.45;
background-color: #f7f7f7;
border-radius: 3px;
}
.highlight pre {
margin-bottom: 0;
word-break: normal;
}
pre {
word-wrap: normal;
}
pre code,
pre tt {
display: inline;
max-width: initial;
padding: 0;
margin: 0;
overflow: initial;
line-height: inherit;
word-wrap: normal;
background-color: transparent;
border: 0;
}
pre code:before,
pre code:after,
pre tt:before,
pre tt:after {
content: normal;
}
kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #555555;
vertical-align: middle;
background-color: #fcfcfc;
border: solid 1px #cccccc;
border-bottom-color: #bbbbbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbbbbb;
}
input[type="checkbox"] {
vertical-align: middle !important;
}
.csv-data td,
.csv-data th {
padding: 5px;
overflow: hidden;
font-size: 12px;
line-height: 1;
text-align: left;
white-space: nowrap;
}
.csv-data .blob-num {
padding: 10px 8px 9px;
text-align: right;
background: #ffffff;
border: 0;
}
.csv-data tr {
border-top: 0;
}
.csv-data th {
font-weight: bold;
background: #f8f8f8;
border-top: 0;
}
.ui.list .list,
ol.ui.list ol,
ul.ui.list ul {
padding-left: 2em;
}
}
.repository.wiki.revisions {
.ui.container > .ui.stackable.grid {
-ms-flex-direction: row-reverse;
flex-direction: row-reverse;
> .header {
margin-top: 0;
.sub.header {
padding-left: 52px;
word-break: break-word;
}
}
}
}
.file-revisions-btn {
display: block;
float: left;
margin-bottom: 2px !important;
padding: 11px !important;
margin-right: 10px !important;
i {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
}
.markdown-block-error {
margin-bottom: 0 !important;
border-bottom-left-radius: 0 !important;
border-bottom-right-radius: 0 !important;
box-shadow: none !important;
font-size: 85% !important;
white-space: pre !important;
padding: .5rem 1rem !important;
text-align: left !important;
}
.markdown-block-error + pre {
border-top: none !important;
margin-top: 0 !important;
border-top-left-radius: 0 !important;
border-top-right-radius: 0 !important;
}

View File

@ -0,0 +1,212 @@
.organization {
padding-top: 15px;
.head {
.ui.header {
.text {
vertical-align: middle;
font-size: 1.6rem;
margin-left: 15px;
}
.ui.right {
margin-top: 5px;
}
}
}
&.new.org {
#create-page-form;
form {
.header {
padding-left: 0 !important;
text-align: center;
}
}
}
&.options {
input {
min-width: 300px;
}
}
&.profile {
#org-avatar {
width: 100px;
height: 100px;
margin-right: 15px;
}
#org-info {
.ui.header {
font-size: 36px;
margin-bottom: 0;
}
.desc {
font-size: 16px;
margin-bottom: 10px;
}
.meta {
.item {
display: inline-block;
margin-right: 10px;
.icon {
margin-right: 5px;
}
}
}
}
.ui.top.header {
.ui.right {
margin-top: 0;
}
}
.teams {
.item {
padding: 10px 15px;
}
}
}
&.teams,
&.profile {
.members {
.ui.avatar {
width: 48px;
height: 48px;
margin-right: 5px;
}
}
}
&.invite {
#invite-box {
margin: 50px auto auto;
width: 500px !important;
#search-user-box {
input {
margin-left: 0;
width: 300px;
}
}
.ui.button {
margin-left: 5px;
margin-top: -3px;
}
}
}
&.members {
.list {
.item {
margin-left: 0;
margin-right: 0;
border-bottom: 1px solid #eeeeee;
.ui.avatar {
width: 48px;
height: 48px;
}
.meta {
line-height: 24px;
}
}
}
}
&.teams {
.detail {
.item {
padding: 10px 15px;
&:not(:last-child) {
border-bottom: 1px solid #eeeeee;
}
}
}
.repositories,
.members {
.item {
padding: 10px 20px;
line-height: 32px;
&:not(:last-child) {
border-bottom: 1px solid #dddddd;
}
.button {
padding: 9px 10px;
}
}
}
#add-repo-form,
#repo-multiple-form,
#add-member-form {
input {
margin-left: 0;
}
.ui.button {
margin-left: 5px;
margin-top: -3px;
}
}
#repo-top-segment {
height: 60px;
}
}
&.settings {
.labelspage {
list-style: none;
padding-top: 0;
.item {
margin-top: 0;
margin-right: -14px;
margin-left: -14px !important;
padding: 10px;
border-bottom: 1px solid #e1e4e8;
border-top: none;
a {
font-size: 15px;
padding-top: 5px;
padding-right: 10px;
color: #666666;
&:hover {
color: #000000;
}
&.open-issues {
margin-right: 30px;
}
}
.ui.label {
font-size: 1em;
}
}
.item:last-child {
border-bottom: none;
padding-bottom: 0;
}
}
}
}

File diff suppressed because it is too large Load Diff

193
frontend/less/_review.less Normal file
View File

@ -0,0 +1,193 @@
.ui.button.add-code-comment {
font-size: 14px;
height: 16px;
line-height: 16px !important;
padding: 0;
position: relative;
width: 16px;
z-index: 5;
float: left;
margin: 2px -10px 2px -20px;
opacity: 0;
transition: transform .1s ease-in-out;
transform: scale(1, 1);
&:hover {
transform: scale(1.2, 1.2);
}
}
.add-comment-left.add-comment-right .ui.attached.header {
border: 1px solid #d4d4d5;
margin-top: .5em;
&:not(.top) {
margin-bottom: .5em;
}
.show-outdated,
.hide-outdated {
display: block;
margin-left: auto;
}
}
.focus-lines-new .ui.button.add-code-comment.add-code-comment-right,
.focus-lines-old .ui.button.add-code-comment.add-code-comment-left {
opacity: 1;
}
.comment-code-cloud {
padding: 4px;
position: relative;
border: 1px solid #f1f1f1;
margin: 13px 10px 5px auto;
&:before {
content: " ";
width: 0;
height: 0;
border-left: 13px solid transparent;
border-right: 13px solid transparent;
border-bottom: 13px solid #f1f1f1;
left: 20px;
position: absolute;
top: -13px;
}
.attached {
&.tab {
border: 0;
padding: 0;
margin: 0;
}
&.header {
padding: .1rem 1rem;
.text {
margin: 0;
}
}
}
.right.menu.options .item {
padding: .85714286em .442857em;
cursor: pointer;
}
.ui.form textarea {
border: 0;
}
.ui.active.tab {
padding: .5em;
&.markdown {
padding: 1em;
min-height: 168px;
}
}
.ui.tabular.menu {
margin: .5em;
}
.comment-list {
padding-bottom: 10px;
}
.footer {
border-top: 1px solid #f1f1f1;
padding: 10px 0;
.markdown-info {
display: inline-block;
margin: 5px 0;
font-size: 12px;
color: rgba(0, 0, 0, .6);
}
.ui.right.floated {
padding-top: 6px;
}
&:after {
clear: both;
content: "";
display: block;
}
}
button.comment-form-reply {
margin: .5em .5em .5em 4.5em;
}
form.comment-form-reply {
margin: 0 0 0 1em;
}
}
.file-comment {
font: 12px @monospaced-fonts, monospace;
color: rgba(0, 0, 0, .87);
}
a.fold-file {
margin-right: 10px;
color: inherit;
}
a.blob-excerpt {
color: #575a68;
height: 28px;
display: flex;
justify-content: center;
align-items: center;
width: 100%;
background: #daecfe;
}
a.blob-excerpt:hover {
background: #428bca;
color: #fff;
}
.btn-review > .dropdown.icon {
width: auto;
font-size: .85714286em;
margin: 0 0 0 1em;
}
@media only screen and (max-width: 768px) {
#review-box > .menu {
> .ui.segment {
width: 94vw;
}
.editor-toolbar {
overflow-x: auto;
}
}
#review-box .CodeMirror-scroll {
max-width: calc(100vw - 70px);
}
}
@media only screen and (min-width: 768px) and (max-width: 992px) {
#review-box .CodeMirror-scroll {
max-width: 700px;
}
}
@media only screen and (min-width: 992px) and (max-width: 1200px) {
#review-box .CodeMirror-scroll {
max-width: 800px;
}
}
@media only screen and (min-width: 1200px) {
#review-box .CodeMirror-scroll {
max-width: 900px;
}
}

9
frontend/less/_svg.less Normal file
View File

@ -0,0 +1,9 @@
.svg {
display: inline-block;
vertical-align: text-top;
fill: currentColor;
.middle & {
vertical-align: middle;
}
}

View File

@ -0,0 +1,42 @@
@import "~tributejs/dist/tribute.css";
.tribute-container {
box-shadow: 0 .25rem .5rem rgba(0, 0, 0, .25);
border-radius: .25rem;
}
.tribute-container ul {
margin-top: 0 !important;
background: #ffffff !important;
}
.tribute-container li {
padding: 3px .5rem !important;
}
.tribute-container li span.fullname {
font-weight: normal;
font-size: .8rem;
margin-left: 3px;
}
.tribute-container li.highlight,
.tribute-container li:hover {
background: #2185d0 !important;
color: #ffffff !important;
}
.tribute-item {
display: flex;
align-items: center;
}
.tribute-item .emoji,
.tribute-item img[src*="/avatar/"] {
margin-right: .5rem;
}
.tribute-container img {
width: 1.5rem !important;
height: 1.5rem !important;
}

163
frontend/less/_user.less Normal file
View File

@ -0,0 +1,163 @@
.user {
&:not(.icon) {
padding-top: 15px;
}
&.profile {
.ui.card {
.header,
.username {
display: block;
}
.header {
font-weight: 700;
font-size: 1.3rem;
margin-top: -.2rem;
line-height: 1.3rem;
}
.extra.content {
padding: 0;
ul {
margin: 0;
padding: 0;
li {
padding: 10px;
list-style: none;
&:not(:last-child) {
border-bottom: 1px solid #eaeaea;
}
.svg,
.fa {
margin-left: 1px;
margin-right: 5px;
}
&.follow {
.ui.button {
width: 100%;
}
}
}
}
}
#profile-avatar {
img {
width: 100%;
}
@media only screen and (max-width: 768px) {
height: 250px;
overflow: hidden;
img {
max-height: 768px;
max-width: 768px;
}
}
}
@media only screen and (max-width: 768px) {
width: 100%;
}
}
.ui.repository.list {
margin-top: 25px;
}
#loading-heatmap {
margin-bottom: 1em;
}
.ui.secondary.stackable.pointing.menu {
flex-wrap: wrap;
}
}
&.followers {
.header.name {
font-size: 20px;
line-height: 24px;
vertical-align: middle;
}
.follow {
.ui.button {
padding: 8px 15px;
}
}
}
&.notification {
.svg {
float: left;
font-size: 2em;
&.green {
color: #21ba45;
}
&.red {
color: #d01919;
}
&.purple {
color: #a333c8;
}
&.blue {
color: #2185d0;
}
}
.content {
float: left;
margin-left: 7px;
}
table {
form {
display: inline-block;
}
button {
padding: 3px 3px 3px 5px;
}
tr {
cursor: pointer;
}
}
}
&.link-account:not(.icon) {
padding-top: 15px;
padding-bottom: 5px;
}
&.settings {
.iconFloat {
float: left;
}
}
}
.user-orgs {
display: flex;
flex-flow: row wrap;
padding: 0;
margin: -3px !important;
li {
display: flex;
border-bottom: 0 !important;
padding: 3px !important;
width: 20%;
max-width: 60px;
}
}

View File

@ -0,0 +1,34 @@
@keyframes isloadingspin {
0% { transform: translate(-50%, -50%) rotate(0deg); }
100% { transform: translate(-50%, -50%) rotate(360deg); }
}
.is-loading {
background: transparent !important;
color: transparent !important;
border: transparent !important;
pointer-events: none !important;
position: relative !important;
overflow: hidden !important;
}
.is-loading:after {
content: "";
position: absolute;
display: block;
width: 4rem;
height: 4rem;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
animation: isloadingspin 500ms infinite linear;
border-width: 4px;
border-style: solid;
border-color: #ececec #ececec #666 #666;
border-radius: 100%;
}
.markdown pre.is-loading,
.editor-loading.is-loading {
height: 12rem;
}

View File

@ -0,0 +1,256 @@
#git-graph-container {
float: left;
display: block;
overflow-x: auto;
width: 100%;
.color-buttons {
margin-right: 0;
}
.ui.header.dividing {
padding-bottom: 10px;
}
li {
list-style-type: none;
height: 20px;
line-height: 20px;
white-space: nowrap;
.node-relation {
font-family: "Bitstream Vera Sans Mono", "Courier", monospace;
}
.author {
color: #666666;
}
.time {
color: #999999;
font-size: 80%;
}
a {
color: #000000;
}
a:hover {
text-decoration: underline;
}
a em {
color: #bb0000;
border-bottom: 1px dotted #bbbbbb;
text-decoration: none;
font-style: normal;
}
}
#rel-container {
max-width: 30%;
overflow-x: auto;
float: left;
}
#rev-container {
width: 100%;
}
#rev-list {
margin: 0;
padding: 0 5px;
min-width: 95%;
li.highlight,
li.hover {
background-color: rgba(0, 0, 0, .05);
}
li.highlight.hover {
background-color: rgba(0, 0, 0, .1);
}
}
#graph-raw-list {
margin: 0;
}
&.monochrome #rel-container {
.flow-group {
stroke: grey;
fill: grey;
}
.flow-group.highlight {
stroke: black;
fill: black;
}
}
&:not(.monochrome) #rel-container {
.flow-group {
&.flow-color-16-1 {
stroke: #499a37;
fill: #499a37;
}
&.flow-color-16-2 {
stroke: hsl(356, 58%, 54%);
fill: #ce4751;
}
&.flow-color-16-3 {
stroke: #8f9121;
fill: #8f9121;
}
&.flow-color-16-4 {
stroke: #ac32a6;
fill: #ac32a6;
}
&.flow-color-16-5 {
stroke: #3d27aa;
fill: #3d27aa;
}
&.flow-color-16-6 {
stroke: #c67d28;
fill: #c67d28;
}
&.flow-color-16-7 {
stroke: #4db392;
fill: #4db392;
}
&.flow-color-16-8 {
stroke: #aa4d30;
fill: #aa4d30;
}
&.flow-color-16-9 {
stroke: #2a6f84;
fill: #2a6f84;
}
&.flow-color-16-10 {
stroke: #c45327;
fill: #c45327;
}
&.flow-color-16-11 {
stroke: #3d965c;
fill: #3d965c;
}
&.flow-color-16-12 {
stroke: #792a93;
fill: #792a93;
}
&.flow-color-16-13 {
stroke: #439d73;
fill: #439d73;
}
&.flow-color-16-14 {
stroke: #103aad;
fill: #103aad;
}
&.flow-color-16-15 {
stroke: #982e85;
fill: #982e85;
}
&.flow-color-16-0 {
stroke: #7db233;
fill: #7db233;
}
}
.flow-group.highlight {
&.flow-color-16-1 {
stroke: #5ac144;
fill: #5ac144;
}
&.flow-color-16-2 {
stroke: #ed5a8b;
fill: #ed5a8b;
}
&.flow-color-16-3 {
stroke: #ced049;
fill: #ced048;
}
&.flow-color-16-4 {
stroke: #db61d7;
fill: #db62d6;
}
&.flow-color-16-5 {
stroke: #4e33d1;
fill: #4f35d1;
}
&.flow-color-16-6 {
stroke: #e6a151;
fill: #e6a151;
}
&.flow-color-16-7 {
stroke: #44daaa;
fill: #44daaa;
}
&.flow-color-16-8 {
stroke: #dd7a5c;
fill: #dd7a5c;
}
&.flow-color-16-9 {
stroke: #38859c;
fill: #38859c;
}
&.flow-color-16-10 {
stroke: #d95520;
fill: #d95520;
}
&.flow-color-16-11 {
stroke: #42ae68;
fill: #42ae68;
}
&.flow-color-16-12 {
stroke: #9126b5;
fill: #9126b5;
}
&.flow-color-16-13 {
stroke: #4ab080;
fill: #4ab080;
}
&.flow-color-16-14 {
stroke: #284fb8;
fill: #284fb8;
}
&.flow-color-16-15 {
stroke: #971c80;
fill: #971c80;
}
&.flow-color-16-0 {
stroke: #87ca28;
fill: #87ca28;
}
}
}
}

22
frontend/less/index.less Normal file
View File

@ -0,0 +1,22 @@
@import "~font-awesome/css/font-awesome.css";
@import "./features/gitgraph.less";
@import "./features/animations.less";
@import "./markdown/mermaid.less";
@import "_svg";
@import "_tribute";
@import "_base";
@import "_markdown";
@import "_home";
@import "_install";
@import "_form";
@import "_repository";
@import "_editor";
@import "_organization";
@import "_user";
@import "_dashboard";
@import "_admin";
@import "_explore";
@import "_review";
@import "_chroma";

View File

@ -0,0 +1,12 @@
.mermaid-chart {
display: flex;
justify-content: center;
align-items: center;
padding: 1rem;
margin: 1rem 0;
}
/* mermaid's errorRenderer seems to unavoidably spew stuff into <body>, hide it */
body > div[id*="mermaid-"] {
display: none !important;
}

File diff suppressed because it is too large Load Diff

View File

View File

View File

@ -0,0 +1 @@
<div>In trantor template</div>

50
readme.md Normal file
View File

@ -0,0 +1,50 @@
Gitea version 1.11.3 built with GNU Make 4.1, go1.13.8 : bindata, sqlite, sqlite_unlock_notify
# Gitea Launch Repo
[docs](https://docs.gitea.io/en-us/)
releases here
* https://dl.gitea.io/gitea
* https://github.com/go-gitea/gitea/releases
## Update
run update script when it's finally ready.
in the meantime
download latest binary to `<dir>/gitea/bin/<arch>`
stop gitea `sdstp gitea@<instance>`
rename gitea to `gitea.old`
rename latest to `gitea`
chmod +x gitea
make sure there is a backup of <data dir>
run arch script with appropriate architecture `./arch <arch>` amd64 is default
restart gitea `sds gitea@<instance>`
# Running
Use run script
run in foreground
`./run <ini> <arch>`
for running in background
`./start <ini> <arch>`
`./stop`
for working with custom files
`./watch <ini> <arch>`
will restart gitea on changes
# Install
moves service file to /etc/systemd/system
`./bin/install`
`sds gitea@<ini>`

6
restart Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash
# $1 ini file, $2 arch
echo 'restarting gitea after change'
DIR=$(dirname "$(readlink -f "$0")") || exit
$DIR/stop
$DIR/start $1 $2

30
run Executable file
View File

@ -0,0 +1,30 @@
#!/bin/bash
DEPLOY=${1:-default}
declare -A ARCHES
ARCHES=(["x86_64"]="amd64" ["arm32"]="arm32" ["armhf"]="arm32" ["arm64"]="arm64" ["aarch64"]="arm64" )
ARCH=$(arch)
if [ -z "${ARCHES[$ARCH]}" ]; then
echo Your machine kernel architecture $ARCH is not supported by this script, aborting
exit 1
fi
DIR=$(dirname "$(readlink -f "$0")") || exit
ARCH=$(arch)
# echo $ARCH ${ARCHES[$ARCH]}
BIN="$DIR/bin/gitea.${ARCHES[$ARCH]}"
# echo $ARCH ${ARCHES[$ARCH]} $BIN
if [ ! -f $BIN ]; then
echo $ARCH/${ARCHES[$ARCH]} gitea binary is not available in $BIN, run ./bin/update script
exit 1
fi
INI="$DIR/config/$DEPLOY.ini"
mkdir -p $DIR/frontend/current
rsync -a --delete $DIR/frontend/default/ $DIR/frontend/current
rsync -a $DIR/frontend/$DEPLOY/ $DIR/frontend/current
export GITEA_WORK_DIR=/mnt/data/git-server
export GITEA_CUSTOM=$DIR/frontend/current
export USER=sysadmin
export HOME=/home/sysadmin
# where data and repo are located
# export -p | grep GITEA
echo Running: $BIN web -c $INI
$BIN web -c $INI

23
start Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
DIR=$(dirname "$(readlink -f "$0")") || exit
COMMAND="$DIR/run $1"
echo $DIR $COMMAND
PIDFILE="$DIR/gitea.pid"
# echo $PIDFILE
# read -r PID < $PIDFILE
# echo PID $PID
# echo "$(ps -ea | grep $PID)"
if [ -e ${PIDFILE} ]; then
read -r PID < $PIDFILE
if (ps -ea | grep $PID); then
echo "start aborted gitea is already running."
exit 1;
fi
fi
echo starting gitea sending log to gitea.log
$COMMAND > $DIR/gitea.log &
echo PID of gitea process is $!
echo $! > $PIDFILE

24
stop Executable file
View File

@ -0,0 +1,24 @@
#!/bin/bash
DIR=$(dirname "$(readlink -f "$0")") || exit
PIDFILE="$DIR/gitea.pid"
if [ ! -e ${PIDFILE} ]; then
# echo "gitea is not running."
exit 1;
fi
read -r PID < $PIDFILE
if ( ! ps -ea | grep $PID ); then
echo "gitea is not running. ignoring stop request"
exit 1;
fi
CHILD_PIDS=$(pgrep -P $PID);
echo stopping gitea - kill processes $PID $CHILD_PIDS
kill $PID 2> /dev/null || echo Killing process failed, not running?
# Wait half a second and Kill child PIDs to be sure they are gone.
sleep 0.5
kill $CHILD_PIDS 2> /dev/null
rm $PIDFILE
# sleep 2
# echo "$(ps -faux | grep gitea)"

20
watch Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
DEBOUNCE=1.0
DIR=$(dirname "$(readlink -f "$0")") || exit
export WATCH_DIR="$DIR/frontend/"
export WATCH_VERBOSE=1
COMMAND="$DIR/restart $1 $2"
# LOGFILE="$DIR/watch.log"
echo "watching $WATCH_DIR with $COMMAND"
inotifywait -mqr -e MODIFY $WATCH_DIR |
while read ; do
# debounce extra events
currentTime=$(date +'%H%M%S.%N')
delta=$(bc <<< "$lastRunTime - $currentTime")
# echo "$currentTime, $lastRunTime, $delta"
if (( $(echo "$delta < -$DEBOUNCE" | bc -l) )); then
echo $COMMAND
$COMMAND
lastRunTime=$(date +'%H%M%S.%N')
fi
done