Browse Source

Initial commit, got web_go from lalrt and initialized Rust project.

master
Weird Constructor 4 years ago
commit
f0b236c10f
  1. 3
      .gitignore
  2. 7
      Cargo.toml
  3. 1
      _TEST.bat
  4. 6
      _UPDATE_WEB_LIBS.bat
  5. 11
      _WEBPACK.bat
  6. BIN
      archives/eidogo-master.zip
  7. 109
      backend.lua
  8. 374
      gtp_backend.lua
  9. 27
      package.json
  10. 3
      src/main.rs
  11. BIN
      tools/7zip/7-zip.dll
  12. BIN
      tools/7zip/7z.dll
  13. BIN
      tools/7zip/7z.exe
  14. BIN
      tools/7zip/7z.sfx
  15. BIN
      tools/7zip/7zCon.sfx
  16. BIN
      tools/7zip/7zFM.exe
  17. BIN
      tools/7zip/7zG.exe
  18. 13
      tools/7zip/descript.ion
  19. BIN
      tools/node-v6.9.5-win-x86.zip
  20. 1135
      webdata/css/bulma-0.7.2/CHANGELOG.md
  21. 21
      webdata/css/bulma-0.7.2/LICENSE
  22. 112
      webdata/css/bulma-0.7.2/README.md
  23. 8
      webdata/css/bulma-0.7.2/bulma.sass
  24. 10289
      webdata/css/bulma-0.7.2/css/bulma.css
  25. 1
      webdata/css/bulma-0.7.2/css/bulma.css.map
  26. 1
      webdata/css/bulma-0.7.2/css/bulma.min.css
  27. 52
      webdata/css/bulma-0.7.2/package.json
  28. BIN
      webdata/css/bulma-0.7.2/sass/.DS_Store
  29. 5
      webdata/css/bulma-0.7.2/sass/base/_all.sass
  30. 127
      webdata/css/bulma-0.7.2/sass/base/generic.sass
  31. 261
      webdata/css/bulma-0.7.2/sass/base/helpers.sass
  32. 79
      webdata/css/bulma-0.7.2/sass/base/minireset.sass
  33. 15
      webdata/css/bulma-0.7.2/sass/components/_all.sass
  34. 75
      webdata/css/bulma-0.7.2/sass/components/breadcrumb.sass
  35. 74
      webdata/css/bulma-0.7.2/sass/components/card.sass
  36. 77
      webdata/css/bulma-0.7.2/sass/components/dropdown.sass
  37. 75
      webdata/css/bulma-0.7.2/sass/components/level.sass
  38. 39
      webdata/css/bulma-0.7.2/sass/components/list.sass
  39. 48
      webdata/css/bulma-0.7.2/sass/components/media.sass
  40. 50
      webdata/css/bulma-0.7.2/sass/components/menu.sass
  41. 86
      webdata/css/bulma-0.7.2/sass/components/message.sass
  42. 113
      webdata/css/bulma-0.7.2/sass/components/modal.sass
  43. 422
      webdata/css/bulma-0.7.2/sass/components/navbar.sass
  44. 144
      webdata/css/bulma-0.7.2/sass/components/pagination.sass
  45. 101
      webdata/css/bulma-0.7.2/sass/components/panel.sass
  46. 151
      webdata/css/bulma-0.7.2/sass/components/tabs.sass
  47. 16
      webdata/css/bulma-0.7.2/sass/elements/_all.sass
  48. 24
      webdata/css/bulma-0.7.2/sass/elements/box.sass
  49. 255
      webdata/css/bulma-0.7.2/sass/elements/button.sass
  50. 25
      webdata/css/bulma-0.7.2/sass/elements/container.sass
  51. 151
      webdata/css/bulma-0.7.2/sass/elements/content.sass
  52. 630
      webdata/css/bulma-0.7.2/sass/elements/form.sass
  53. 21
      webdata/css/bulma-0.7.2/sass/elements/icon.sass
  54. 68
      webdata/css/bulma-0.7.2/sass/elements/image.sass
  55. 35
      webdata/css/bulma-0.7.2/sass/elements/notification.sass
  56. 39
      webdata/css/bulma-0.7.2/sass/elements/other.sass
  57. 40
      webdata/css/bulma-0.7.2/sass/elements/progress.sass
  58. 119
      webdata/css/bulma-0.7.2/sass/elements/table.sass
  59. 111
      webdata/css/bulma-0.7.2/sass/elements/tag.sass
  60. 64
      webdata/css/bulma-0.7.2/sass/elements/title.sass
  61. 4
      webdata/css/bulma-0.7.2/sass/grid/_all.sass
  62. 504
      webdata/css/bulma-0.7.2/sass/grid/columns.sass
  63. 32
      webdata/css/bulma-0.7.2/sass/grid/tiles.sass
  64. 5
      webdata/css/bulma-0.7.2/sass/layout/_all.sass
  65. 5
      webdata/css/bulma-0.7.2/sass/layout/footer.sass
  66. 158
      webdata/css/bulma-0.7.2/sass/layout/hero.sass
  67. 13
      webdata/css/bulma-0.7.2/sass/layout/section.sass
  68. 8
      webdata/css/bulma-0.7.2/sass/utilities/_all.sass
  69. 5
      webdata/css/bulma-0.7.2/sass/utilities/animations.sass
  70. 49
      webdata/css/bulma-0.7.2/sass/utilities/controls.sass
  71. 84
      webdata/css/bulma-0.7.2/sass/utilities/derived-variables.sass
  72. 62
      webdata/css/bulma-0.7.2/sass/utilities/functions.sass
  73. 72
      webdata/css/bulma-0.7.2/sass/utilities/initial-variables.sass
  74. 261
      webdata/css/bulma-0.7.2/sass/utilities/mixins.sass
  75. 1
      webdata/css/bulma.min.css
  76. 12
      webdata/index.html
  77. 2
      webdata/js/jquery-3.3.1.min.js
  78. 100
      webdata/main.html
  79. 149
      webdata/main.js
  80. 72
      webpack.config.js

3
.gitignore vendored

@ -0,0 +1,3 @@
/target
/webdata/dist/
**/*.rs.bk

7
Cargo.toml

@ -0,0 +1,7 @@
[package]
name = "WeirdGoba"
version = "0.1.0"
authors = ["wctr <wctr@x-paste.de>"]
edition = "2018"
[dependencies]

1
_TEST.bat

@ -0,0 +1 @@
@..\lalrt backend.lua

6
_UPDATE_WEB_LIBS.bat

@ -0,0 +1,6 @@
@IF NOT EXIST node (
tools\7zip\7z.exe x tools\node-v6.9.5-win-x86.zip
rename node-v6.9.5-win-x86 node
)
node\npm install --save-dev
pause

11
_WEBPACK.bat

@ -0,0 +1,11 @@
@setlocal
@call node\nodevars.bat
@REM Aufrรคumen der distributions-Verzeichnisse:
@del /Q /F webdata\dist\app*.js webdata\dist\style*.js webdata\dist\main.html
@REM Ausfรผhren von webpack zum Bรผndeln:
@call .\node_modules\.bin\webpack
@REM Kopieren der index.html ins webdata-Verzeichnis, damit die Hauptanwendung
@REM die index.html findet:
@copy webdata\dist\index.html webdata\

BIN
archives/eidogo-master.zip

Binary file not shown.

109
backend.lua

@ -0,0 +1,109 @@
--" (let ((f (http-bind 18099)))\n"
--" (do ((req (mp-wait f) (mp-wait f)))\n"
--" (#t #t)\n"
--" (let ((handle (@1 f)))\n"
--" (http-response\n"
--" handle ; srv-handle\n"
--" (@1 req) ; req-token\n"
--" { :action :json :data { :x 1 :y 2 } }))))\n"
function read_cfg()
local f = io.open("config.json.tmp", "rb")
local d = {}
if f then
local cont = f:read("*a")
d = util.from_json(cont)
f:close()
end
return d
end
function write_cfg(cfg)
local f = io.open("config.json.tmp", "wb")
local x = util.to_json(cfg)
f:write(x)
f:close()
end
local chld_pid = proc.spawn([[
function main()
local mod = require 'gtp_backend'
mod.main()
end
]])
--mp.wait_infinite('foobar')\n"
local cfg = read_cfg()
if not cfg.port then cfg.port = 18099 end
local http_srv = http.bind(cfg.port)
print("TOKEN:" .. rt.dump(http_srv))
while true do
local req = mp.wait({ http_srv[1], "gtp_startup" }, 1000)
if (req) then
print("REQQ:" .. rt.dump(req))
if (req[3] == "gtp_startup") then
print("GTP!")
else
print("REQ: " .. req[4].url)
local fp = string.match(req[4].url, "^/files/(.*)")
local data = {}
if (string.match(req[4].content_type, "application/json")) then
data = util.from_json(req[4].body)
end
local default_ok_response = false
if (string.match(req[4].url, "^/$")) then
http.response(http_srv[2], req[2], {
action = 'file',
path = "webdata/index.html",
})
elseif (fp) then
http.response(http_srv[2], req[2], {
action = 'file',
path = "webdata/" .. fp,
})
elseif (string.match(req[4].url, "^/data/cfg")) then
elseif (string.match(req[4].url, "^/action/connect_engine")) then
print("DTA:" .. rt.dump(data))
mp.send(chld_pid, { "gtp_connect", data })
default_ok_response = true
elseif (string.match(req[4].url, "^/action/gtp/genmove_from_board")) then
print("DTA:" .. rt.dump(data))
mp.send(chld_pid, { "genmove_from_board", data })
local m = mp.wait_infinite("genmove_from_board")
print("RESPO" .. rt.dump(m))
http.response(http_srv[2], req[2], {
action = 'json',
data = { move = m[4], color = m[5] },
})
elseif (string.match(req[4].url, "^/action/engine/")) then
local gt = string.match(req[4].url, "^/action/engine/(%d+)/([^/]+)/(.*)")
print("GOGO" .. rt.dump(gt))
http.response(http_srv[2], req[2], {
action = 'json',
data = {
state_id = 1,
},
})
else
http.response(http_srv[2], req[2], {
action = 'json',
data = { x = 1, y = 2 }
})
end
if default_ok_response then
http.response(http_srv[2], req[2], { action = 'json', data = { ok = true } })
end
end
end
end

374
gtp_backend.lua

@ -0,0 +1,374 @@
require 'lalrtlib.util.strict'
local class = require 'lalrtlib.util.class'
local List = require 'lalrtlib.util.list'
local GtpEngine = class()
function GtpEngine:init()
self.cur_board_state_str = ""
self.cur_board = {}
self.token = tostring(mp.token()) .. "_"
end
DECLARE 'trim_cr'
function trim_cr(str)
if (string.sub(str, string.len(str)) == "\r") then
return string.sub(str, 1, string.len(str) - 1)
else
return str
end
end
function GtpEngine:read_line(instream)
local r = mp.wait_infinite(self.token .. instream)
r[4] = trim_cr(r[4])
--d-- print("LINE[" .. r[4] .. "]")
return r[4]
end
function GtpEngine:read_stdout_line()
return self:read_line("stdout")
end
function GtpEngine:consume_output()
local m = mp.check_available({ self.token .. "stderr" , self.token .. "stdout" })
while (m) do
if m[4] ~= "" then
if m[3] == (self.token .. "stdout") then
print(">>>OUT: " .. m[4])
else
print(">>>ERR: " .. m[4])
end
end
m = mp.check_available({ self.token .. "stderr" , self.token .. "stdout" })
end
end
function GtpEngine:check_stopped()
self:consume_output()
if (bgproc.is_readloop_stopped(self.bg)) then
print("ERROR: process stopped!")
return true
end
return false
end
function GtpEngine:send_gtp(cmd)
if (self:check_stopped()) then return end
print("<<< " .. cmd)
local lines = List()
local reply = nil
bgproc.send(self.bg, cmd .. "\n")
local r = self:read_stdout_line()
while (string.sub(r, 1, 2) ~= "= ") do
lines:push(r)
r = self:read_stdout_line()
end
reply = string.sub(r, 3)
r = self:read_stdout_line()
while (r ~= "") do
lines:push(r)
r = self:read_stdout_line()
end
print(">>> " .. reply)
return reply, lines
end
function GtpEngine:connect(binary, args)
if (self.bg) then
if (not bgproc.is_readloop_stopped(self.bg)) then
self:send_gtp("quit")
end
bgproc.wait(self.bg)
end
-- mp.set_debug_logging(true)
self.bg =
sys.exec("background", self.token .. "stdout", self.token .. "stdout")
bgproc.start(self.bg, binary, args)
bgproc.start_readloop(self.bg, "\n")
print("starting " .. binary .. " (" .. rt.dump(args) .. ")")
mp.thread_sleep(1000)
if (self:check_stopped()) then
return
end
self.gtp_engine_name = self:send_gtp("name")
self.gtp_engine_version = self:send_gtp("version")
self.gtp_engine_proto_version = self:send_gtp("protocol_version")
print("started " .. self.gtp_engine_name .. " - " .. self.gtp_engine_version)
-- "C:/Arbeit/p/go/gnugo-3.8/gnugo.exe", { "--mode=gtp" })
end
local nr2gtp = {
"A",
"B",
"C",
"D",
"E",
"F",
"G",
"H",
"J",
"K",
"L",
"M",
"N",
"O",
"P",
"Q",
"R",
"S",
"T"
}
DECLARE 'pt2gtp_coord'
function pt2gtp_coord(pt)
return nr2gtp[pt[1]] .. tostring(pt[2])
end
local gtp2nr = {
A = 1,
B = 2,
C = 3,
D = 4,
E = 5,
F = 6,
G = 7,
H = 8,
J = 9,
K = 10,
L = 11,
M = 12,
N = 13,
O = 14,
P = 15,
Q = 16,
R = 17,
S = 18,
T = 19
}
DECLARE 'gtp2pt_coord'
function gtp2pt_coord(coord)
local x = gtp2nr[string.sub(coord, 1, 1)]
local y = tonumber(string.sub(coord, 2))
return { x, y }
end
function GtpEngine:set_board(boardsize, komi, moves)
self.komi = komi
self.boardsize = boardsize
self:send_gtp("komi " .. komi)
self:send_gtp("boardsize " .. tostring(boardsize))
self:send_gtp("clear_board")
if (moves) then
self:play_moves(moves)
end
end
function GtpEngine:play_moves(moves)
moves:foreach(function (move)
local color = "B"
if (move[1] == 1) then color = "W" end
self:send_gtp("play " .. color .. " " .. pt2gtp_coord({ move[2], move[3] }))
end)
local a, b = self:send_gtp("showboard")
end
function GtpEngine:genmove_from_board(moves, color, time_s)
if time_s then
self:send_gtp("time_settings 0 " .. tostring(time_s) .. " 1")
end
self:send_gtp("clear_board")
self:play_moves(moves)
return self:genmove(color)
end
function GtpEngine:genmove(color_n)
local color = "B"
if (color_n == 1) then color = "W" end
local move, restlines = self:send_gtp("genmove " .. color)
return gtp2pt_coord(move), restlines
end
DECLARE 'split_ws'
function split_ws(str)
local variation = util.re(str, { [[\s+]], "s" })
return variation
end
function GtpEngine:analyze_lz(lines)
-- R4 -> 9 (V: 52.49%) (N: 21.75%) PV: R4 Q16 C17 C16 D17
-- ^- this is winrate!
lines:foreach(function (l) print("#> " .. l) end)
-- local r = util.re(lines:table(), {
-- [[\s*(\S+)\s+->\s*\d+\s*\(W:\s*(\d+\.\d+)%\).*PV: (.*)]]
-- });
-- r = List(r):map(function(l)
-- return {
-- move = gtp2pt_coord(l[1]),
-- winrate = tonumber(l[2]),
-- variation = List(split_ws(l[3])):map(gtp2pt_coord):table()
-- }
-- end)
-- return r
end
function GtpEngine:analyze_l11(lines)
lines:foreach(function (l) print("#11> " .. l) end)
local r = util.re(lines:table(), {
[[\s*(\S+)\s+->\s*(\d+)\s*\(W:\s*(\d+\.\d+)%\).*PV: (.*)]]
});
r = List(r):map(function(l)
return {
move = gtp2pt_coord(l[1]),
visits = tonumber(l[2]),
winrate = tonumber(l[3]),
variation = List(split_ws(l[4])):map(gtp2pt_coord):table()
}
end)
if (#r <= 0) then return nil end
return r
end
function GtpEngine:get_heatmap()
local x, hm_lines
hm_lines = {}
if (self.gtp_engine_name == "Leela") then
--- XXX: Somtimes Leela just sends 17 lines in time until the version
--- reply...
local max = 0
while (max < 10 and #hm_lines < 18) do
max = max + 1
self:send_gtp("heatmap average")
-- XXX: Due to a bug in Leela, the heatmap can only be read as
-- response to the next command.
x, hm_lines = self:send_gtp("version")
end
elseif (self.gtp_engine_name == "Leela Zero") then
x, hm_lines = self:send_gtp("heatmap average")
end
if (#hm_lines > 1) then
local values = List()
local max_value = 0
for i = 1, 19 do
local dbg_s = ""
if (not values) then values = List() end
local vals = split_ws(hm_lines[i])
table.remove(vals, 1)
for i = 1, 19 do
vals[i] = tonumber(vals[i])
dbg_s = dbg_s .. " " .. string.format("%3d", vals[i])
end
print("rw> " .. dbg_s)
values:push(vals)
end
values:foreach(function (vals)
for i = 1, 19 do
if (vals[i] > max_value) then max_value = vals[i] end
end
end)
values:foreach(function (vals)
for i = 1, 19 do
vals[i] = (vals[i] * 100) / max_value
vals[i] = math.floor((vals[i] * 10) + 0.5) / 10
end
end)
return values
else
return nil
end
end
function GtpEngine:analyze_position(in_color, time)
local color = "B"
if (in_color == 1) then color = "W" end
if (time) then
self:send_gtp("time_settings 0 " .. tostring(time) .. " 1")
end
local move, restlines = self:send_gtp("genmove " .. color)
self:send_gtp("undo")
local ana_res = self:analyze_l11(restlines)
if (ana_res) then
ana_res:foreach(function(m) m.color = in_color end)
return ana_res
else
ana_res = self:analyze_lz(restlines)
end
end
--function GtpEngine:handle_msg(msg)
-- if (msg[3] == (self.token .. "stdout")) then
-- print("GOT MSG:" .. self.token)
-- end
--end
local m = { }
function m.main()
mp.send({"gtp_startup"})
local ge = GtpEngine()
---- ge:connect("C:/Arbeit/p/go/gnugo-3.8/gnugo.exe", { "--mode=gtp" })
---- ge:connect("C:/Arbeit/p/go/Leela0110GTP/Leela0110GTP.exe", { "-g", "--noponder", "--nobook" })
-- ge:connect("C:/Entwicklung/git/go/Leela0110GTP/Leela0110GTP.exe",
-- { "-g", "--noponder", "--nobook" })
---- ge:connect("C:/Arbeit/p/go/leela-zero-0.15-cpuonly-win32/leelaz.exe",
---- {"-w",
---- "C:/Arbeit/p/go/leela-zero-0.15-cpuonly-win32/68d7c8fcabe792dfe2b8e8360629d08171ec8e02530b14f0451e59fa181733ce.gz",
---- "-g", "--noponder" })
-- ge:set_board(19, 7.5, List({
-- { 0, 4, 4 },
-- { 1, 16, 4 },
-- }))
---- print(rt.dump({ge:genmove(0)}))
-- local r = ge:analyze_position(0, 10)
---- local r, l = ge:send_gtp("list_commands")
-- print(rt.dump(r))
-- ge:play_moves(List({
-- { 0, 4, 16 }
-- }))
-- r = ge:analyze_position(1, 10)
-- print(rt.dump(r))
-- local hm = ge:get_heatmap()
-- hm:foreach(function (row)
-- local s = ""
-- List(row):foreach(function (v)
-- s = s .. " " .. string.format("%3.0f", v)
-- end)
-- print("hm> " .. s)
-- end)
-- print(rt.dump(hm))
-- mp.set_debug_logging(true)
while true do
local r = mp.wait(nil, 1000)
if (r ~= nil) then
print("R:" .. rt.dump(r))
if r[3] == "gtp_connect" then
ge:connect(r[4].path, r[4].args)
elseif r[3] == "genmove_from_board" then
local pt =
ge:genmove_from_board(
List(r[4].moves),
r[4].color,
r[4].think_time_s)
mp.send({ 'genmove_from_board', pt, r[4].color })
end
end
end
end
--m.main()
return m
--return 1

27
package.json

@ -0,0 +1,27 @@
{
"name": "Web_Base_Libs",
"version": "1.0.0",
"description": "",
"main": "index.js",
"directories": {
"test": "tests"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"grunt-cli": "*",
"html-loader": "*",
"html-webpack-plugin": "*",
"less": "*",
"vue": "*",
"webpack": "*",
"webpack-cli": "^3.1.2"
},
"dependencies": {
"axios": "^0.18.0"
}
}

3
src/main.rs

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}

BIN
tools/7zip/7-zip.dll

Binary file not shown.

BIN
tools/7zip/7z.dll

Binary file not shown.

BIN
tools/7zip/7z.exe

Binary file not shown.

BIN
tools/7zip/7z.sfx

Binary file not shown.

BIN
tools/7zip/7zCon.sfx

Binary file not shown.

BIN
tools/7zip/7zFM.exe

Binary file not shown.

BIN
tools/7zip/7zG.exe

Binary file not shown.

13
tools/7zip/descript.ion

@ -0,0 +1,13 @@
7-zip.chm 7-Zip Help
7-Zip.dll 7-Zip Plugin
7z.dll 7-Zip Engine
7z.exe 7-Zip Console
7z.sfx 7-Zip GUI SFX
7zCon.sfx 7-Zip Console SFX
7zFM.exe 7-Zip File Manager
7zg.exe 7-Zip GUI
descript.ion 7-Zip File Descriptions
history.txt 7-Zip History
Lang 7-Zip Translations
license.txt 7-Zip License
readme.txt 7-Zip Overview

BIN
tools/node-v6.9.5-win-x86.zip

Binary file not shown.

1135
webdata/css/bulma-0.7.2/CHANGELOG.md

File diff suppressed because it is too large Load Diff

21
webdata/css/bulma-0.7.2/LICENSE

@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2018 Jeremy Thomas
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

112
webdata/css/bulma-0.7.2/README.md

@ -0,0 +1,112 @@
# [Bulma](https://bulma.io)
Bulma is a **modern CSS framework** based on [Flexbox](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flexible_Box_Layout/Using_CSS_flexible_boxes).
[![npm](https://img.shields.io/npm/v/bulma.svg)][npm-link]
[![npm](https://img.shields.io/npm/dm/bulma.svg)][npm-link]
[![Awesome][awesome-badge]][awesome-link]
[![Join the chat at https://gitter.im/jgthms/bulma](https://badges.gitter.im/jgthms/bulma.svg)](https://gitter.im/jgthms/bulma)
[![Build Status](https://travis-ci.org/jgthms/bulma.svg?branch=master)](https://travis-ci.org/jgthms/bulma)
<a href="https://bulma.io"><img src="https://raw.githubusercontent.com/jgthms/bulma/master/docs/images/bulma-banner.png" alt="Bulma: a Flexbox CSS framework" style="max-width:100%;" width="600" height="315"></a>
## Quick install
Bulma is constantly in development! Try it out now:
### NPM
```sh
npm install bulma
```
**or**
### Yarn
```sh
yarn add bulma
```
### Bower
```sh
bower install bulma
```
### Import
After installation, you can import the CSS file into your project using this snippet:
```sh
import 'bulma/css/bulma.css'
```
### CDN
[https://cdnjs.com/libraries/bulma](https://cdnjs.com/libraries/bulma)
Feel free to raise an issue or submit a pull request.
## CSS only
Bulma is a **CSS** framework. As such, the sole output is a single CSS file: [bulma.css](https://github.com/jgthms/bulma/blob/master/css/bulma.css)
You can either use that file, "out of the box", or download the Sass source files to customize the [variables](https://bulma.io/documentation/overview/variables/).
There is **no** JavaScript included. People generally want to use their own JS implementation (and usually already have one). Bulma can be considered "environment agnostic": it's just the style layer on top of the logic.
## Browser Support
Bulma uses [autoprefixer](https://github.com/postcss/autoprefixer) to make (most) Flexbox features compatible with earlier browser versions. According to [Can I use](https://caniuse.com/#feat=flexbox), Bulma is compatible with **recent** versions of:
* Chrome
* Edge
* Firefox
* Opera
* Safari
Internet Explorer (10+) is only partially supported.
## Documentation
The documentation resides in the [docs](docs) directory, and is built with the Ruby-based [Jekyll](https://jekyllrb.com/) tool.
Browse the [online documentation here.](https://bulma.io/documentation/overview/start/)
## Related projects
| Project | Description |
|------------------------------------------------------------------------------------|--------------------------------------------------------------------|
| [Bulma with Attribute Modules](https://github.com/j5bot/bulma-attribute-selectors) | Adds support for attribute-based selectors. |
| [Bulma with Rails](https://github.com/joshuajansen/bulma-rails) | Integrates Bulma with the rails asset pipeline |
| [Vue Admin](https://github.com/vue-bulma/vue-admin) | Vue Admin framework powered by Bulma |
| [Bulmaswatch](https://github.com/jenil/bulmaswatch) | Free themes for Bulma |
| [Goldfish](https://github.com/Caiyeon/goldfish) | Vault UI with Bulma, Golang, and Vue Admin |
| [ember-bulma](https://github.com/open-tux/ember-bulma) | Ember addon providing a collection of UI components for Bulma |
| [Bloomer](https://bloomer.js.org) | A set of React components for Bulma |
| [React-bulma](https://github.com/kulakowka/react-bulma) | React.js components for Bulma |
| [Buefy](https://buefy.github.io) | Lightweight UI components for Vue.js based on Bulma |
| [vue-bulma-components](https://github.com/vouill/vue-bulma-components) | Bulma components for Vue.js with straightforward syntax |
| [BulmaJS](https://github.com/VizuaaLOG/BulmaJS) | Javascript integration for Bulma. Written in ES6 with a data-* API |
| [Bulma-modal-fx](https://github.com/postare/bulma-modal-fx) | A set of modal window effects with CSS transitions and animations for Bulma |
| [Bulma.styl](https://github.com/log1x/bulma.styl) | 1:1 Stylus translation of Bulma |
| [elm-bulma](https://github.com/surprisetalk/elm-bulma) | Bulma + Elm |
| [elm-bulma-classes](https://github.com/ahstro/elm-bulma-classes) | Bulma classes prepared for usage with Elm |
| [Bulma Customizer](https://bulma-customizer.bstash.io/) | Bulma Customizer &#8211; Create your own **bespoke** Bulma build |
| [Fulma](https://mangelmaxime.github.io/Fulma/) | Wrapper around Bulma for [fable-react](https://github.com/fable-compiler/fable-react) |
| [Laravel Enso](https://github.com/laravel-enso/enso) | SPA Admin Panel built with Bulma, VueJS and Laravel |
| [Django Bulma](https://github.com/timonweb/django-bulma) | Integrates Bulma with Django |
| [Bulma Templates](https://github.com/dansup/bulma-templates) | Free Templates for Bulma |
| [React Bulma Components](https://github.com/couds/react-bulma-components) | Another React wrap on React for Bulma.io |
| [purescript-bulma](https://github.com/sectore/purescript-bulma) | PureScript bindings for Bulma |
| [Vue Datatable](https://github.com/laravel-enso/vuedatatable) | Bulma themed datatable based on Vue, Laravel & JSON templates |
| [bulma-fluent](https://mubaidr.github.io/bulma-fluent/) | Fluent Design Theme for Bulma inspired by Microsoftโ€™s Fluent Design System |
| [csskrt-csskrt](https://github.com/4d11/csskrt-csskrt) | Automatically add Bulma classes to HTML files |
## Copyright and license
Code copyright 2018 Jeremy Thomas. Code released under [the MIT license](https://github.com/jgthms/bulma/blob/master/LICENSE).
[npm-link]: https://www.npmjs.com/package/bulma
[awesome-link]: https://github.com/awesome-css-group/awesome-css
[awesome-badge]: https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg

8
webdata/css/bulma-0.7.2/bulma.sass vendored

@ -0,0 +1,8 @@
@charset "utf-8"
/*! bulma.io v0.7.2 | MIT License | github.com/jgthms/bulma */
@import "sass/utilities/_all"
@import "sass/base/_all"
@import "sass/elements/_all"
@import "sass/components/_all"
@import "sass/grid/_all"
@import "sass/layout/_all"

10289
webdata/css/bulma-0.7.2/css/bulma.css vendored

File diff suppressed because it is too large Load Diff

1
webdata/css/bulma-0.7.2/css/bulma.css.map

File diff suppressed because one or more lines are too long

1
webdata/css/bulma-0.7.2/css/bulma.min.css vendored

File diff suppressed because one or more lines are too long

52
webdata/css/bulma-0.7.2/package.json

@ -0,0 +1,52 @@
{
"name": "bulma",
"version": "0.7.2",
"homepage": "https://bulma.io",
"author": {
"name": "Jeremy Thomas",
"email": "bbxdesign@gmail.com",
"url": "https://jgthms.com"
},
"description": "Modern CSS framework based on Flexbox",
"main": "bulma.sass",
"unpkg": "css/bulma.css",
"style": "bulma/css/bulma.min.css",
"repository": {
"type": "git",
"url": "git+https://github.com/jgthms/bulma.git"
},
"license": "MIT",
"keywords": [
"css",
"sass",
"flexbox",
"responsive",
"framework"
],
"bugs": {
"url": "https://github.com/jgthms/bulma/issues"
},
"devDependencies": {
"autoprefixer": "^8.2.0",
"clean-css-cli": "^4.1.11",
"node-sass": "^4.8.3",
"postcss-cli": "^5.0.0",
"rimraf": "^2.6.2"
},
"scripts": {
"build": "npm run build-clean && npm run build-sass && npm run build-autoprefix && npm run build-cleancss",
"build-autoprefix": "postcss --use autoprefixer --map false --output css/bulma.css css/bulma.css",
"build-cleancss": "cleancss -o css/bulma.min.css css/bulma.css",
"build-clean": "rimraf css",
"build-sass": "node-sass --output-style expanded --source-map true bulma.sass css/bulma.css",
"deploy": "npm run build",
"start": "npm run build-sass -- --watch"
},
"files": [
"css",
"sass",
"bulma.sass",
"LICENSE",
"README.md"
]
}

BIN
webdata/css/bulma-0.7.2/sass/.DS_Store vendored

Binary file not shown.

5
webdata/css/bulma-0.7.2/sass/base/_all.sass

@ -0,0 +1,5 @@
@charset "utf-8"
@import "minireset.sass"
@import "generic.sass"
@import "helpers.sass"

127
webdata/css/bulma-0.7.2/sass/base/generic.sass

@ -0,0 +1,127 @@
$body-background-color: $white !default
$body-size: 16px !default
$body-rendering: optimizeLegibility !default
$body-family: $family-primary !default
$body-color: $text !default
$body-weight: $weight-normal !default
$body-line-height: 1.5 !default
$code-family: $family-code !default
$code-padding: 0.25em 0.5em 0.25em !default
$code-weight: normal !default
$code-size: 0.875em !default
$hr-background-color: $background !default
$hr-height: 2px !default
$hr-margin: 1.5rem 0 !default
$strong-color: $text-strong !default
$strong-weight: $weight-bold !default
html
background-color: $body-background-color
font-size: $body-size
-moz-osx-font-smoothing: grayscale
-webkit-font-smoothing: antialiased
min-width: 300px
overflow-x: hidden
overflow-y: scroll
text-rendering: $body-rendering
text-size-adjust: 100%
article,
aside,
figure,
footer,
header,
hgroup,
section
display: block
body,
button,
input,
select,
textarea
font-family: $body-family
code,
pre
-moz-osx-font-smoothing: auto
-webkit-font-smoothing: auto
font-family: $code-family
body
color: $body-color
font-size: 1rem
font-weight: $body-weight
line-height: $body-line-height
// Inline
a
color: $link
cursor: pointer
text-decoration: none
strong
color: currentColor
&:hover
color: $link-hover
code
background-color: $code-background
color: $code
font-size: $code-size
font-weight: $code-weight
padding: $code-padding
hr
background-color: $hr-background-color
border: none
display: block
height: $hr-height
margin: $hr-margin
img
height: auto
max-width: 100%
input[type="checkbox"],
input[type="radio"]
vertical-align: baseline
small
font-size: 0.875em
span
font-style: inherit
font-weight: inherit
strong
color: $strong-color
font-weight: $strong-weight
// Block
pre
+overflow-touch
background-color: $pre-background
color: $pre
font-size: 0.875em
overflow-x: auto
padding: 1.25rem 1.5rem
white-space: pre
word-wrap: normal
code
background-color: transparent
color: currentColor
font-size: 1em
padding: 0
table
td,
th
text-align: left
vertical-align: top
th
color: $text-strong

261
webdata/css/bulma-0.7.2/sass/base/helpers.sass

@ -0,0 +1,261 @@
// Float
.is-clearfix
+clearfix
.is-pulled-left
float: left !important
.is-pulled-right
float: right !important
// Overflow
.is-clipped
overflow: hidden !important
// Overlay
.is-overlay
@extend %overlay
// Typography
=typography-size($target:'')
@each $size in $sizes
$i: index($sizes, $size)
.is-size-#{$i}#{if($target == '', '', '-' + $target)}
font-size: $size !important
+typography-size()
+mobile
+typography-size('mobile')
+tablet
+typography-size('tablet')
+touch
+typography-size('touch')
+desktop
+typography-size('desktop')
+widescreen
+typography-size('widescreen')
+fullhd
+typography-size('fullhd')
$alignments: ('centered': 'center', 'justified': 'justify', 'left': 'left', 'right': 'right')
@each $alignment, $text-align in $alignments
.has-text-#{$alignment}
text-align: #{$text-align} !important
@each $alignment, $text-align in $alignments
+mobile
.has-text-#{$alignment}-mobile
text-align: #{$text-align} !important
+tablet
.has-text-#{$alignment}-tablet
text-align: #{$text-align} !important
+tablet-only
.has-text-#{$alignment}-tablet-only
text-align: #{$text-align} !important
+touch
.has-text-#{$alignment}-touch
text-align: #{$text-align} !important
+desktop
.has-text-#{$alignment}-desktop
text-align: #{$text-align} !important
+desktop-only
.has-text-#{$alignment}-desktop-only
text-align: #{$text-align} !important
+widescreen
.has-text-#{$alignment}-widescreen
text-align: #{$text-align} !important
+widescreen-only
.has-text-#{$alignment}-widescreen-only
text-align: #{$text-align} !important
+fullhd
.has-text-#{$alignment}-fullhd
text-align: #{$text-align} !important
.is-capitalized
text-transform: capitalize !important
.is-lowercase
text-transform: lowercase !important
.is-uppercase
text-transform: uppercase !important
.is-italic
font-style: italic !important
@each $name, $pair in $colors
$color: nth($pair, 1)
.has-text-#{$name}
color: $color !important
a.has-text-#{$name}
&:hover,
&:focus
color: darken($color, 10%) !important
.has-background-#{$name}
background-color: $color !important
@each $name, $shade in $shades
.has-text-#{$name}
color: $shade !important
.has-background-#{$name}
background-color: $shade !important
.has-text-weight-light
font-weight: $weight-light !important
.has-text-weight-normal
font-weight: $weight-normal !important
.has-text-weight-semibold
font-weight: $weight-semibold !important
.has-text-weight-bold
font-weight: $weight-bold !important
// Visibility
$displays: 'block' 'flex' 'inline' 'inline-block' 'inline-flex'
@each $display in $displays
.is-#{$display}
display: #{$display} !important
+mobile
.is-#{$display}-mobile
display: #{$display} !important
+tablet
.is-#{$display}-tablet
display: #{$display} !important
+tablet-only
.is-#{$display}-tablet-only
display: #{$display} !important
+touch
.is-#{$display}-touch
display: #{$display} !important
+desktop
.is-#{$display}-desktop
display: #{$display} !important
+desktop-only
.is-#{$display}-desktop-only
display: #{$display} !important
+widescreen
.is-#{$display}-widescreen
display: #{$display} !important
+widescreen-only
.is-#{$display}-widescreen-only
display: #{$display} !important
+fullhd
.is-#{$display}-fullhd
display: #{$display} !important
.is-hidden
display: none !important
.is-sr-only
border: none !important
clip: rect(0, 0, 0, 0) !important
height: 0.01em !important
overflow: hidden !important
padding: 0 !important
position: absolute !important
white-space: nowrap !important
width: 0.01em !important
+mobile
.is-hidden-mobile
display: none !important
+tablet
.is-hidden-tablet
display: none !important
+tablet-only
.is-hidden-tablet-only
display: none !important
+touch
.is-hidden-touch
display: none !important
+desktop
.is-hidden-desktop
display: none !important
+desktop-only
.is-hidden-desktop-only
display: none !important
+widescreen
.is-hidden-widescreen
display: none !important
+widescreen-only
.is-hidden-widescreen-only
display: none !important
+fullhd
.is-hidden-fullhd
display: none !important
.is-invisible
visibility: hidden !important
+mobile
.is-invisible-mobile
visibility: hidden !important
+tablet
.is-invisible-tablet
visibility: hidden !important
+tablet-only
.is-invisible-tablet-only
visibility: hidden !important
+touch
.is-invisible-touch
visibility: hidden !important
+desktop
.is-invisible-desktop
visibility: hidden !important
+desktop-only
.is-invisible-desktop-only
visibility: hidden !important
+widescreen
.is-invisible-widescreen
visibility: hidden !important
+widescreen-only
.is-invisible-widescreen-only
visibility: hidden !important
+fullhd
.is-invisible-fullhd
visibility: hidden !important
// Other
.is-marginless
margin: 0 !important
.is-paddingless
padding: 0 !important
.is-radiusless
border-radius: 0 !important
.is-shadowless
box-shadow: none !important
.is-unselectable
@extend %unselectable

79
webdata/css/bulma-0.7.2/sass/base/minireset.sass

@ -0,0 +1,79 @@
/*! minireset.css v0.0.3 | MIT License | github.com/jgthms/minireset.css */
// Blocks
html,
body,
p,
ol,
ul,
li,
dl,
dt,
dd,
blockquote,
figure,
fieldset,
legend,
textarea,
pre,
iframe,
hr,
h1,
h2,
h3,
h4,
h5,
h6
margin: 0
padding: 0
// Headings
h1,
h2,
h3,
h4,
h5,
h6
font-size: 100%
font-weight: normal
// List
ul
list-style: none
// Form
button,
input,
select,
textarea
margin: 0
// Box sizing
html
box-sizing: border-box
*
&,
&::before,
&::after
box-sizing: inherit
// Media
img,
audio,
video
height: auto
max-width: 100%
// Iframe
iframe
border: 0
// Table
table
border-collapse: collapse
border-spacing: 0
td,
th
padding: 0
text-align: left

15
webdata/css/bulma-0.7.2/sass/components/_all.sass

@ -0,0 +1,15 @@
@charset "utf-8"
@import "breadcrumb.sass"
@import "card.sass"
@import "dropdown.sass"
@import "level.sass"
@import "list.sass"
@import "media.sass"
@import "menu.sass"
@import "message.sass"
@import "modal.sass"
@import "navbar.sass"
@import "pagination.sass"
@import "panel.sass"
@import "tabs.sass"

75
webdata/css/bulma-0.7.2/sass/components/breadcrumb.sass

@ -0,0 +1,75 @@
$breadcrumb-item-color: $link !default
$breadcrumb-item-hover-color: $link-hover !default
$breadcrumb-item-active-color: $text-strong !default
$breadcrumb-item-padding-vertical: 0 !default
$breadcrumb-item-padding-horizontal: 0.75em !default
$breadcrumb-item-separator-color: $grey-light !default
.breadcrumb
@extend %block
@extend %unselectable
font-size: $size-normal
white-space: nowrap
a
align-items: center
color: $breadcrumb-item-color
display: flex
justify-content: center
padding: $breadcrumb-item-padding-vertical $breadcrumb-item-padding-horizontal
&:hover
color: $breadcrumb-item-hover-color
li
align-items: center
display: flex
&:first-child a
padding-left: 0
&.is-active
a
color: $breadcrumb-item-active-color
cursor: default
pointer-events: none
& + li::before
color: $breadcrumb-item-separator-color
content: "\0002f"
ul,
ol
align-items: flex-start
display: flex
flex-wrap: wrap
justify-content: flex-start
.icon
&:first-child
margin-right: 0.5em
&:last-child
margin-left: 0.5em
// Alignment
&.is-centered
ol,
ul
justify-content: center
&.is-right
ol,
ul
justify-content: flex-end
// Sizes
&.is-small
font-size: $size-small
&.is-medium
font-size: $size-medium
&.is-large
font-size: $size-large
// Styles
&.has-arrow-separator
li + li::before
content: "\02192"
&.has-bullet-separator
li + li::before
content: "\02022"
&.has-dot-separator
li + li::before
content: "\000b7"
&.has-succeeds-separator
li + li::before
content: "\0227B"

74
webdata/css/bulma-0.7.2/sass/components/card.sass

@ -0,0 +1,74 @@
$card-color: $text !default
$card-background-color: $white !default
$card-shadow: 0 2px 3px rgba($black, 0.1), 0 0 0 1px rgba($black, 0.1) !default
$card-header-background-color: transparent !default
$card-header-color: $text-strong !default
$card-header-shadow: 0 1px 2px rgba($black, 0.1) !default
$card-header-weight: $weight-bold !default
$card-content-background-color: transparent !default
$card-footer-background-color: transparent !default
$card-footer-border-top: 1px solid $border !default
.card
background-color: $card-background-color
box-shadow: $card-shadow
color: $card-color
max-width: 100%
position: relative
.card-header
background-color: $card-header-background-color
align-items: stretch
box-shadow: $card-header-shadow
display: flex
.card-header-title