ab14c793d585192ec794f9093d8be9416f6473e1
.gollum/config.rb
| ... | ... | @@ -0,0 +1,29 @@ |
| 1 | +# Gollum configuration for reverse proxy and custom CSS |
|
| 2 | + |
|
| 3 | +Gollum::Hook.register(:startup, :hook_id) do |gollum, config| |
|
| 4 | + # Allow Gollum to work behind a reverse proxy |
|
| 5 | + config[:per_page_uploads] = true |
|
| 6 | +end |
|
| 7 | + |
|
| 8 | +# Configure for reverse proxy |
|
| 9 | +module Precious |
|
| 10 | + class App < Sinatra::Base |
|
| 11 | + configure do |
|
| 12 | + set :protection, except: [:json_csrf, :frame_options] |
|
| 13 | + end |
|
| 14 | + |
|
| 15 | + # Inject custom CSS into every page |
|
| 16 | + helpers do |
|
| 17 | + def custom_css_tag |
|
| 18 | + '<link rel="stylesheet" type="text/css" href="http://10.123.0.201:8081/custom.css">' |
|
| 19 | + end |
|
| 20 | + end |
|
| 21 | + end |
|
| 22 | +end |
|
| 23 | + |
|
| 24 | +# Hook to inject CSS |
|
| 25 | +Gollum::Hook.register(:post_render, :inject_css) do |page, context| |
|
| 26 | + if context[:output] |
|
| 27 | + context[:output].sub!(/<\/head>/, "#{custom_css_tag}</head>") |
|
| 28 | + end |
|
| 29 | +end |
assets/custom.css
| ... | ... | @@ -0,0 +1,108 @@ |
| 1 | +/* Ciemny motyw dla Gollum Wiki */ |
|
| 2 | +body { |
|
| 3 | + background-color: #000000 !important; |
|
| 4 | + color: #ffffff !important; |
|
| 5 | +} |
|
| 6 | + |
|
| 7 | +#head, #header { |
|
| 8 | + background-color: #0a0a0a !important; |
|
| 9 | + border-bottom: 1px solid #222 !important; |
|
| 10 | +} |
|
| 11 | + |
|
| 12 | +#wiki-wrapper { |
|
| 13 | + background-color: #000000 !important; |
|
| 14 | +} |
|
| 15 | + |
|
| 16 | +#wiki-content { |
|
| 17 | + background-color: #0a0a0a !important; |
|
| 18 | + color: #ffffff !important; |
|
| 19 | +} |
|
| 20 | + |
|
| 21 | +#wiki-content-wrapper { |
|
| 22 | + background-color: #0a0a0a !important; |
|
| 23 | +} |
|
| 24 | + |
|
| 25 | +.markdown-body { |
|
| 26 | + background-color: #0a0a0a !important; |
|
| 27 | + color: #ffffff !important; |
|
| 28 | +} |
|
| 29 | + |
|
| 30 | +a { |
|
| 31 | + color: #3b82f6 !important; |
|
| 32 | +} |
|
| 33 | + |
|
| 34 | +a:hover { |
|
| 35 | + color: #60a5fa !important; |
|
| 36 | +} |
|
| 37 | + |
|
| 38 | +.minibutton { |
|
| 39 | + background-color: #1a1a1a !important; |
|
| 40 | + color: #ffffff !important; |
|
| 41 | + border: 1px solid #333 !important; |
|
| 42 | +} |
|
| 43 | + |
|
| 44 | +.minibutton:hover { |
|
| 45 | + background-color: #2a2a2a !important; |
|
| 46 | +} |
|
| 47 | + |
|
| 48 | +pre, code { |
|
| 49 | + background-color: #000000 !important; |
|
| 50 | + color: #f0f0f0 !important; |
|
| 51 | + border: 1px solid #333 !important; |
|
| 52 | +} |
|
| 53 | + |
|
| 54 | +table { |
|
| 55 | + background-color: #0a0a0a !important; |
|
| 56 | + border-color: #333 !important; |
|
| 57 | +} |
|
| 58 | + |
|
| 59 | +th { |
|
| 60 | + background-color: #1a1a1a !important; |
|
| 61 | + color: #ffffff !important; |
|
| 62 | +} |
|
| 63 | + |
|
| 64 | +td { |
|
| 65 | + border-color: #333 !important; |
|
| 66 | + background-color: #0a0a0a !important; |
|
| 67 | +} |
|
| 68 | + |
|
| 69 | +input, textarea, select { |
|
| 70 | + background-color: #1a1a1a !important; |
|
| 71 | + color: #ffffff !important; |
|
| 72 | + border: 1px solid #333 !important; |
|
| 73 | +} |
|
| 74 | + |
|
| 75 | +#footer { |
|
| 76 | + display: none !important; |
|
| 77 | +} |
|
| 78 | + |
|
| 79 | +.footer { |
|
| 80 | + display: none !important; |
|
| 81 | +} |
|
| 82 | + |
|
| 83 | +/* Dodatkowe elementy */ |
|
| 84 | +.has-rightbar { |
|
| 85 | + background-color: #000000 !important; |
|
| 86 | +} |
|
| 87 | + |
|
| 88 | +#searchbar { |
|
| 89 | + background-color: #1a1a1a !important; |
|
| 90 | + color: #ffffff !important; |
|
| 91 | +} |
|
| 92 | + |
|
| 93 | +.search { |
|
| 94 | + background-color: #1a1a1a !important; |
|
| 95 | +} |
|
| 96 | + |
|
| 97 | +h1, h2, h3, h4, h5, h6 { |
|
| 98 | + color: #ffffff !important; |
|
| 99 | +} |
|
| 100 | + |
|
| 101 | +.breadcrumb { |
|
| 102 | + background-color: #0a0a0a !important; |
|
| 103 | + color: #ffffff !important; |
|
| 104 | +} |
|
| 105 | + |
|
| 106 | +.editable { |
|
| 107 | + background-color: #0a0a0a !important; |
|
| 108 | +} |
custom.css
| ... | ... | @@ -6,7 +6,31 @@ body { |
| 6 | 6 | |
| 7 | 7 | #head, #header { |
| 8 | 8 | background-color: #0a0a0a !important; |
| 9 | - border-bottom: 1px solid #222 !important; |
|
| 9 | + border-bottom: 1px solid #444 !important; |
|
| 10 | +} |
|
| 11 | + |
|
| 12 | +#head a, #header a { |
|
| 13 | + color: #ffffff !important; |
|
| 14 | +} |
|
| 15 | + |
|
| 16 | +#head .minibutton, #header .minibutton { |
|
| 17 | + background-color: #2a2a2a !important; |
|
| 18 | + color: #ffffff !important; |
|
| 19 | + border: 1px solid #555 !important; |
|
| 20 | +} |
|
| 21 | + |
|
| 22 | +#head .minibutton:hover, #header .minibutton:hover { |
|
| 23 | + background-color: #3a3a3a !important; |
|
| 24 | +} |
|
| 25 | + |
|
| 26 | +.actions a, .actions button { |
|
| 27 | + color: #ffffff !important; |
|
| 28 | + background-color: #1a1a1a !important; |
|
| 29 | + border: 1px solid #444 !important; |
|
| 30 | +} |
|
| 31 | + |
|
| 32 | +.actions a:hover, .actions button:hover { |
|
| 33 | + background-color: #2a2a2a !important; |
|
| 10 | 34 | } |
| 11 | 35 | |
| 12 | 36 | #wiki-wrapper { |
grafiki/custom.css
| ... | ... | @@ -0,0 +1,108 @@ |
| 1 | +/* Ciemny motyw dla Gollum Wiki */ |
|
| 2 | +body { |
|
| 3 | + background-color: #000000 !important; |
|
| 4 | + color: #ffffff !important; |
|
| 5 | +} |
|
| 6 | + |
|
| 7 | +#head, #header { |
|
| 8 | + background-color: #0a0a0a !important; |
|
| 9 | + border-bottom: 1px solid #222 !important; |
|
| 10 | +} |
|
| 11 | + |
|
| 12 | +#wiki-wrapper { |
|
| 13 | + background-color: #000000 !important; |
|
| 14 | +} |
|
| 15 | + |
|
| 16 | +#wiki-content { |
|
| 17 | + background-color: #0a0a0a !important; |
|
| 18 | + color: #ffffff !important; |
|
| 19 | +} |
|
| 20 | + |
|
| 21 | +#wiki-content-wrapper { |
|
| 22 | + background-color: #0a0a0a !important; |
|
| 23 | +} |
|
| 24 | + |
|
| 25 | +.markdown-body { |
|
| 26 | + background-color: #0a0a0a !important; |
|
| 27 | + color: #ffffff !important; |
|
| 28 | +} |
|
| 29 | + |
|
| 30 | +a { |
|
| 31 | + color: #3b82f6 !important; |
|
| 32 | +} |
|
| 33 | + |
|
| 34 | +a:hover { |
|
| 35 | + color: #60a5fa !important; |
|
| 36 | +} |
|
| 37 | + |
|
| 38 | +.minibutton { |
|
| 39 | + background-color: #1a1a1a !important; |
|
| 40 | + color: #ffffff !important; |
|
| 41 | + border: 1px solid #333 !important; |
|
| 42 | +} |
|
| 43 | + |
|
| 44 | +.minibutton:hover { |
|
| 45 | + background-color: #2a2a2a !important; |
|
| 46 | +} |
|
| 47 | + |
|
| 48 | +pre, code { |
|
| 49 | + background-color: #000000 !important; |
|
| 50 | + color: #f0f0f0 !important; |
|
| 51 | + border: 1px solid #333 !important; |
|
| 52 | +} |
|
| 53 | + |
|
| 54 | +table { |
|
| 55 | + background-color: #0a0a0a !important; |
|
| 56 | + border-color: #333 !important; |
|
| 57 | +} |
|
| 58 | + |
|
| 59 | +th { |
|
| 60 | + background-color: #1a1a1a !important; |
|
| 61 | + color: #ffffff !important; |
|
| 62 | +} |
|
| 63 | + |
|
| 64 | +td { |
|
| 65 | + border-color: #333 !important; |
|
| 66 | + background-color: #0a0a0a !important; |
|
| 67 | +} |
|
| 68 | + |
|
| 69 | +input, textarea, select { |
|
| 70 | + background-color: #1a1a1a !important; |
|
| 71 | + color: #ffffff !important; |
|
| 72 | + border: 1px solid #333 !important; |
|
| 73 | +} |
|
| 74 | + |
|
| 75 | +#footer { |
|
| 76 | + display: none !important; |
|
| 77 | +} |
|
| 78 | + |
|
| 79 | +.footer { |
|
| 80 | + display: none !important; |
|
| 81 | +} |
|
| 82 | + |
|
| 83 | +/* Dodatkowe elementy */ |
|
| 84 | +.has-rightbar { |
|
| 85 | + background-color: #000000 !important; |
|
| 86 | +} |
|
| 87 | + |
|
| 88 | +#searchbar { |
|
| 89 | + background-color: #1a1a1a !important; |
|
| 90 | + color: #ffffff !important; |
|
| 91 | +} |
|
| 92 | + |
|
| 93 | +.search { |
|
| 94 | + background-color: #1a1a1a !important; |
|
| 95 | +} |
|
| 96 | + |
|
| 97 | +h1, h2, h3, h4, h5, h6 { |
|
| 98 | + color: #ffffff !important; |
|
| 99 | +} |
|
| 100 | + |
|
| 101 | +.breadcrumb { |
|
| 102 | + background-color: #0a0a0a !important; |
|
| 103 | + color: #ffffff !important; |
|
| 104 | +} |
|
| 105 | + |
|
| 106 | +.editable { |
|
| 107 | + background-color: #0a0a0a !important; |
|
| 108 | +} |