{{ . }}
-- The hypha you are trying to access does not exist yet. Why not create it? -
-diff --git a/.gitignore b/.gitignore index f1d40a8..db5b71e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ hypha +mycorrhiza diff --git a/cfg/config.go b/cfg/config.go index c4dc879..89cdd6c 100644 --- a/cfg/config.go +++ b/cfg/config.go @@ -18,16 +18,7 @@ var ( TitleEditTemplate = `Edit %s` TitleTemplate = `%s` GenericErrorMsg = `Sorry, something went wrong` - - DefaultTitle = "MycorrhizaWiki" - DefaultHeaderText = `MycorrhizaWiki 🍄` - DefaultFooterText = `This website runs MycorrhizaWiki.` - DefaultSidebar = "" - DefaultBodyBottom = "" - DefaultContent = "It is empty here" - DefaultStyles = ` - -` + SiteTitle = `MycorrhizaWiki` ) func InitConfig(wd string) bool { @@ -55,6 +46,7 @@ func readConfig() bool { cfg := struct { Address string `json:"address"` + SiteTitle string `json:"site-title"` TitleTemplates struct { EditHypha string `json:"edit-hypha"` ViewHypha string `json:"view-hypha"` @@ -68,6 +60,7 @@ func readConfig() bool { } Address = cfg.Address + SiteTitle = cfg.SiteTitle TitleEditTemplate = cfg.TitleTemplates.EditHypha TitleTemplate = cfg.TitleTemplates.ViewHypha diff --git a/mycorrhiza b/mycorrhiza deleted file mode 100755 index 9de3ea0..0000000 Binary files a/mycorrhiza and /dev/null differ diff --git a/render.go b/render.go index d9e261f..dc9d13a 100644 --- a/render.go +++ b/render.go @@ -12,8 +12,9 @@ import ( // EditHyphaPage returns HTML page of hypha editor. func EditHyphaPage(name, textMime, content, tags string) string { keys := map[string]string{ - "Title": fmt.Sprintf(cfg.TitleEditTemplate, name), - "Header": renderFromString(name, "Hypha/edit/header.html"), + "Title": fmt.Sprintf(cfg.TitleEditTemplate, name), + "Header": renderFromString(name, "Hypha/edit/header.html"), + "Sidebar": renderFromString("", "Hypha/edit/sidebar.html"), } page := map[string]string{ "Text": content, @@ -36,11 +37,11 @@ func HyphaPage(rev Revision, content string) string { // HyphaGeneric is used when building renderers for all types of hypha pages func HyphaGeneric(name string, content, templatePath string) string { - sidebar := cfg.DefaultSidebar - if bside := renderFromMap(map[string]string{ + var sidebar string + if aside := renderFromMap(map[string]string{ "Tree": GetTree(name, true).AsHtml(), - }, "Hypha/view/sidebar.html"); bside != "" { - sidebar = bside + }, "Hypha/view/sidebar.html"); aside != "" { + sidebar = aside } keys := map[string]string{ "Title": fmt.Sprintf(cfg.TitleTemplate, name), @@ -55,13 +56,9 @@ func HyphaGeneric(name string, content, templatePath string) string { // keys: map with replaced standart fields func renderBase(content string, keys map[string]string) string { page := map[string]string{ - "Title": cfg.DefaultTitle, - "Head": cfg.DefaultStyles, - "Sidebar": cfg.DefaultSidebar, - "Main": cfg.DefaultContent, - "BodyBottom": cfg.DefaultBodyBottom, - "Header": renderFromString(cfg.DefaultHeaderText, "header.html"), - "Footer": renderFromString(cfg.DefaultFooterText, "footer.html"), + "Title": cfg.SiteTitle, + "Main": "", + "SiteTitle": cfg.SiteTitle, } for key, val := range keys { page[key] = val diff --git a/w/config.json b/w/config.json index 29ddfc1..09fcba9 100644 --- a/w/config.json +++ b/w/config.json @@ -1,5 +1,6 @@ { "address": "127.0.0.1:1737", + "site-title": "🍄 MycorrhizaWiki", "title-templates": { "edit-hypha": "Edit %s at MycorrhizaWiki", "view-hypha": "%s at MycorrhizaWiki" diff --git a/w/m/sys/main.css/1.css b/w/m/sys/main.css/1.css index e08d902..618b4f3 100644 --- a/w/m/sys/main.css/1.css +++ b/w/m/sys/main.css/1.css @@ -1,236 +1,223 @@ -*, *::before, *::after { - box-sizing: border-box; -} - -html { - height: 100%; -} - -body { - font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Helvetica', 'Roboto', 'Arial', sans-serif; - max-width: 500px; - min-height: 100%; - margin: 0 auto; - padding: 12px 24px; -} - -@media (min-width: 700px) { - body { - - /* - display: grid; - grid-template-columns: 1fr 250px; - grid-template-rows: auto 1fr auto; - grid-column-gap: 24px; - grid-template-areas: - "main header" - "main sidebar" - "main footer"; - */ - } -} - -.shroom { - /*margin: 8px 0 24px;*/ - /*margin: -12px;*/ - margin: 0; -} - -.shroom__button { - /* - padding: 2px 12px; - border: 1px solid #ddd; - */border-radius: 8px;/* - background: none; - */ - padding: 8px 16px 8px 0; - border: none; - background: #f0f2f4; - color: #444; - font: inherit; - font-size: 15px; - font-weight: 500; - text-align: left; -} - -.shroom span { - margin-left: 16px; - margin-right: 8px; - font-size: 20px; - vertical-align: -0.04em; -} - -.mushroom .shroom__button { - background: #44484a; - color: #dddfe4; -} - -/* -header { - grid-area: header; -} - -main { - grid-area: main; -} - -aside { - grid-area: sidebar; -} - -footer { - grid-area: footer; -} -*/ - - -.header { - padding: 8px 0; -} - -.header h1 { - margin: 0; - font-size: 18px; - font-weight: 600; - letter-spacing: 0.02em; - color: #222428; -} - - -a { - color: #44e; -} - -a:visited { - color: #44a; -} - -h1, h2, h3, h4, h5, h6 { - margin: 1em 0 0.25em; -} - -.page { - font-family: 'Georgia', serif; - font-size: 16px; - line-height: 1.666; - max-width: 40em; - hyphens: auto; -} - -.page__title { - font-size: 36px; - font-weight: normal; -} - -.edit-box { display: grid; grid-template-columns: 7fr 5fr; } -.edit-box .naviwrapper__buttons { grid-column: 1; grid-row: 2 } -.edit-box__left { grid-column: 1; grid-row: 2 } -.edit-box__right { grid-column: 2; grid-row: 1 / span 2 } - -footer { - /*margin-top: 40px; - border-top: 1px solid #ddd;*/ - padding: 1em 0; - font-size: 12px; - color: #888; -} - -footer a, footer a:visited { - color: #666; -} - -.left-panel { - display: none; -} - -.left-panel.active { - display: block; - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: #fafafa; -} - -.left-panel.active .sidebar { - background: #fff; -} - -.left-panel__in { - width: 100%; - height: 100%; - max-width: 500px; - margin: 0 auto; - padding: 12px 24px; - -} - -.left-panel__contents { - width: 100%; - display: grid; - grid-template-rows: auto 1fr auto; -} - -.left-panel .shroom { - margin-bottom: 16px; -} - -@media (min-width: 700px) { - body { - max-width: 1200px; - padding: 8px 16px; - padding-right: 274px; /* 250px + 16px + 16px */ - } - - .shroom { - display: none; - } - - .page { - font-size: 18px; - } - - .left-panel { - display: block; - position: fixed; - top: 0; - bottom: 0; - width: 274px; /* 250px + 24px * 2 */ - /*right: calc(50% + 900px / 2 + 24px);*/ - right: 0; - } - - .left-panel__contents { - height: 100%; - } -} - -.sidebar { - padding: 16px 0; - border-radius: 8px; - background: #f4f4f4; -} - -.hypha-actions ul { - margin: 0; - padding: 0; -} - -.hypha-actions li { - list-style: none; -} - -.hypha-actions a { - display: block; - padding: 6px 16px; - font: inherit; - text-decoration: none; - color: #666; - transition: 0.1s background; -} - -aside .hypha-actions a:hover { - background: #eaeaea; -} - +*, *::before, *::after { + box-sizing: border-box; +} + +html { + height: 100%; +} + +body { + font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Helvetica', 'PT Sans', 'Roboto', 'Arial', sans-serif; + max-width: 500px; + min-height: 100%; + margin: 0 auto; + padding: 12px 24px; +} + +.msg { + background-color: #f4f4f4; + padding: 1rem; +} +.msg_hypha-does-not-exist { + border-radius: 1rem; +} + +.shroom { + margin: 0; +} + +.shroom__button { + border-radius: 1rem; + padding: 8px 16px 8px 0; + border: none; + background: #f0f2f4; + color: #444; + font: inherit; + font-size: 15px; + font-weight: 500; + text-align: left; +} + +.shroom span { + margin-left: 16px; + margin-right: 8px; + font-size: 20px; + vertical-align: -0.04em; +} + +.mushroom .shroom__button { + background: #44484a; + color: #dddfe4; +} + + +.header { + padding: 8px 0; +} + +.header h1 { + margin: 0; + font-size: 18px; + font-weight: 600; + letter-spacing: 0.02em; + color: #222428; +} + + +a { + color: #44e; +} + +a:visited { + color: #44a; +} + +h1, h2, h3, h4, h5, h6 { + margin: 0.5em 0 0.25em; +} + +.page { + font-size: 16px; + line-height: 1.666; + max-width: 40em; + hyphens: auto; +} + +.page pre { + white-space: break-spaces; +} + +.page__amnt { + max-width: 100%; +} + +.page__title { + font-family: 'PT Serif', 'Georgia', serif; + font-size: 36px; + font-weight: normal; +} + +.edit-box { + display: grid; + grid-template-columns: 7fr 5fr; +} +.edit-box .naviwrapper__buttons { + grid-column: 1; + grid-row: 2; +} +.edit-box__left { grid-column: 1; grid-row: 2 } +.edit-box__right { grid-column: 2; grid-row: 1 / span 2; padding-right: 16px } + +footer { + padding: 1em 0; + font-size: 12px; + color: #888; +} + +footer a, footer a:visited { + color: #666; +} + +.left-panel { + display: none; +} + +.left-panel.active { + display: block; + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: #fafafa; +} + +.left-panel.active .sidebar { + background: #fff; +} + +.left-panel__in { + width: 100%; + height: 100%; + max-width: 500px; + margin: 0 auto; + padding: 12px 24px; + +} + +.left-panel__contents { + width: 100%; + display: grid; + grid-template-rows: auto 1fr auto; +} + +.left-panel .shroom { + margin-bottom: 16px; +} + +@media (min-width: 700px) { + body { + max-width: 1200px; + padding: 8px 16px; + padding-right: 274px; + } + + .shroom { + display: none; + } + + .page { + font-size: 18px; + } + + .left-panel { + display: block; + position: fixed; + top: 0; + bottom: 0; + width: 274px; + right: 0; + } + + .left-panel__contents { + height: 100%; + } +} + +.sidebar { + padding: 16px 0; + border-radius: 1rem; + background: #f4f4f4; +} + +.hypha-actions ul { + margin: 0; + padding: 0; +} + +.hypha-actions li { + list-style: none; +} + +.hypha-actions a { + display: block; + padding: 6px 16px; + font: inherit; + text-decoration: none; + color: #666; + transition: 0.1s background; +} + +aside .hypha-actions a:hover { + background: #eaeaea; +} + + + + + + + + + + \ No newline at end of file diff --git a/w/m/sys/main.css/2.css b/w/m/sys/main.css/2.css deleted file mode 100644 index ecebf55..0000000 --- a/w/m/sys/main.css/2.css +++ /dev/null @@ -1,199 +0,0 @@ -*, *::before, *::after { - box-sizing: border-box; -} - -html { - height: 100%; -} - -body { - font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Helvetica', 'PT Sans', 'Roboto', 'Arial', sans-serif; - max-width: 500px; - min-height: 100%; - margin: 0 auto; - padding: 12px 24px; -} - -@media (min-width: 700px) { - body { - } -} - -.shroom { - margin: 0; -} - -.shroom__button { - border-radius: 8px; - padding: 8px 16px 8px 0; - border: none; - background: #f0f2f4; - color: #444; - font: inherit; - font-size: 15px; - font-weight: 500; - text-align: left; -} - -.shroom span { - margin-left: 16px; - margin-right: 8px; - font-size: 20px; - vertical-align: -0.04em; -} - -.mushroom .shroom__button { - background: #44484a; - color: #dddfe4; -} - - -.header { - padding: 8px 0; -} - -.header h1 { - margin: 0; - font-size: 18px; - font-weight: 600; - letter-spacing: 0.02em; - color: #222428; -} - - -a { - color: #44e; -} - -a:visited { - color: #44a; -} - -h1, h2, h3, h4, h5, h6 { - margin: 1em 0 0.25em; -} - -.page { - font-size: 16px; - line-height: 1.666; - max-width: 40em; - hyphens: auto; -} - -.page__title { - font-family: 'PT Serif', 'Georgia', serif; - font-size: 36px; - font-weight: normal; -} - -.edit-box { display: grid; grid-template-columns: 7fr 5fr; } -.edit-box .naviwrapper__buttons { grid-column: 1; grid-row: 2 } -.edit-box__left { grid-column: 1; grid-row: 2 } -.edit-box__right { grid-column: 2; grid-row: 1 / span 2 } - -footer { - padding: 1em 0; - font-size: 12px; - color: #888; -} - -footer a, footer a:visited { - color: #666; -} - -.left-panel { - display: none; -} - -.left-panel.active { - display: block; - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: #fafafa; -} - -.left-panel.active .sidebar { - background: #fff; -} - -.left-panel__in { - width: 100%; - height: 100%; - max-width: 500px; - margin: 0 auto; - padding: 12px 24px; - -} - -.left-panel__contents { - width: 100%; - display: grid; - grid-template-rows: auto 1fr auto; -} - -.left-panel .shroom { - margin-bottom: 16px; -} - -@media (min-width: 700px) { - body { - max-width: 1200px; - padding: 8px 16px; - padding-right: 274px; /* 250px + 16px + 16px */ - } - - .shroom { - display: none; - } - - .page { - font-size: 18px; - } - - .left-panel { - display: block; - position: fixed; - top: 0; - bottom: 0; - width: 274px; /* 250px + 24px * 2 */ - right: 0; - } - - .left-panel__contents { - height: 100%; - } -} - -.sidebar { - padding: 16px 0; - border-radius: 8px; - background: #f4f4f4; -} - -.hypha-actions ul { - margin: 0; - padding: 0; -} - -.hypha-actions li { - list-style: none; -} - -.hypha-actions a { - display: block; - padding: 6px 16px; - font: inherit; - text-decoration: none; - color: #666; - transition: 0.1s background; -} - -aside .hypha-actions a:hover { - background: #eaeaea; -} - - - \ No newline at end of file diff --git a/w/m/sys/main.css/3.css b/w/m/sys/main.css/3.css deleted file mode 100644 index ae778ab..0000000 --- a/w/m/sys/main.css/3.css +++ /dev/null @@ -1,205 +0,0 @@ -*, *::before, *::after { - box-sizing: border-box; -} - -html { - height: 100%; -} - -body { - font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Helvetica', 'PT Sans', 'Roboto', 'Arial', sans-serif; - max-width: 500px; - min-height: 100%; - margin: 0 auto; - padding: 12px 24px; -} - -@media (min-width: 700px) { - body { - } -} - -.shroom { - margin: 0; -} - -.shroom__button { - border-radius: 8px; - padding: 8px 16px 8px 0; - border: none; - background: #f0f2f4; - color: #444; - font: inherit; - font-size: 15px; - font-weight: 500; - text-align: left; -} - -.shroom span { - margin-left: 16px; - margin-right: 8px; - font-size: 20px; - vertical-align: -0.04em; -} - -.mushroom .shroom__button { - background: #44484a; - color: #dddfe4; -} - - -.header { - padding: 8px 0; -} - -.header h1 { - margin: 0; - font-size: 18px; - font-weight: 600; - letter-spacing: 0.02em; - color: #222428; -} - - -a { - color: #44e; -} - -a:visited { - color: #44a; -} - -h1, h2, h3, h4, h5, h6 { - margin: 1em 0 0.25em; -} - -.page { - font-size: 16px; - line-height: 1.666; - max-width: 40em; - hyphens: auto; - white-space: break-spaces; -} - -.page__amnt { - max-width: 100%; -} - -.page__title { - font-family: 'PT Serif', 'Georgia', serif; - font-size: 36px; - font-weight: normal; -} - -.edit-box { display: grid; grid-template-columns: 7fr 5fr; } -.edit-box .naviwrapper__buttons { grid-column: 1; grid-row: 2 } -.edit-box__left { grid-column: 1; grid-row: 2 } -.edit-box__right { grid-column: 2; grid-row: 1 / span 2 } - -footer { - padding: 1em 0; - font-size: 12px; - color: #888; -} - -footer a, footer a:visited { - color: #666; -} - -.left-panel { - display: none; -} - -.left-panel.active { - display: block; - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: #fafafa; -} - -.left-panel.active .sidebar { - background: #fff; -} - -.left-panel__in { - width: 100%; - height: 100%; - max-width: 500px; - margin: 0 auto; - padding: 12px 24px; - -} - -.left-panel__contents { - width: 100%; - display: grid; - grid-template-rows: auto 1fr auto; -} - -.left-panel .shroom { - margin-bottom: 16px; -} - -@media (min-width: 700px) { - body { - max-width: 1200px; - padding: 8px 16px; - padding-right: 274px; /* 250px + 16px + 16px */ - } - - .shroom { - display: none; - } - - .page { - font-size: 18px; - } - - .left-panel { - display: block; - position: fixed; - top: 0; - bottom: 0; - width: 274px; /* 250px + 24px * 2 */ - right: 0; - } - - .left-panel__contents { - height: 100%; - } -} - -.sidebar { - padding: 16px 0; - border-radius: 8px; - background: #f4f4f4; -} - -.hypha-actions ul { - margin: 0; - padding: 0; -} - -.hypha-actions li { - list-style: none; -} - -.hypha-actions a { - display: block; - padding: 6px 16px; - font: inherit; - text-decoration: none; - color: #666; - transition: 0.1s background; -} - -aside .hypha-actions a:hover { - background: #eaeaea; -} - - - - \ No newline at end of file diff --git a/w/m/sys/main.css/4.txt b/w/m/sys/main.css/4.txt deleted file mode 100644 index c3b179b..0000000 --- a/w/m/sys/main.css/4.txt +++ /dev/null @@ -1,206 +0,0 @@ -*, *::before, *::after { - box-sizing: border-box; -} - -html { - height: 100%; -} - -body { - font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Helvetica', 'PT Sans', 'Roboto', 'Arial', sans-serif; - max-width: 500px; - min-height: 100%; - margin: 0 auto; - padding: 12px 24px; -} - -@media (min-width: 700px) { - body { - } -} - -.shroom { - margin: 0; -} - -.shroom__button { - border-radius: 8px; - padding: 8px 16px 8px 0; - border: none; - background: #f0f2f4; - color: #444; - font: inherit; - font-size: 15px; - font-weight: 500; - text-align: left; -} - -.shroom span { - margin-left: 16px; - margin-right: 8px; - font-size: 20px; - vertical-align: -0.04em; -} - -.mushroom .shroom__button { - background: #44484a; - color: #dddfe4; -} - - -.header { - padding: 8px 0; -} - -.header h1 { - margin: 0; - font-size: 18px; - font-weight: 600; - letter-spacing: 0.02em; - color: #222428; -} - - -a { - color: #44e; -} - -a:visited { - color: #44a; -} - -h1, h2, h3, h4, h5, h6 { - margin: 1em 0 0.25em; -} - -.page { - font-size: 16px; - line-height: 1.666; - max-width: 40em; - hyphens: auto; - white-space: break-spaces; -} - -.page__amnt { - max-width: 100%; -} - -.page__title { - font-family: 'PT Serif', 'Georgia', serif; - font-size: 36px; - font-weight: normal; -} - -.edit-box { display: grid; grid-template-columns: 7fr 5fr; } -.edit-box .naviwrapper__buttons { grid-column: 1; grid-row: 2 } -.edit-box__left { grid-column: 1; grid-row: 2 } -.edit-box__right { grid-column: 2; grid-row: 1 / span 2; padding-right: 16px } - -footer { - padding: 1em 0; - font-size: 12px; - color: #888; -} - -footer a, footer a:visited { - color: #666; -} - -.left-panel { - display: none; -} - -.left-panel.active { - display: block; - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: #fafafa; -} - -.left-panel.active .sidebar { - background: #fff; -} - -.left-panel__in { - width: 100%; - height: 100%; - max-width: 500px; - margin: 0 auto; - padding: 12px 24px; - -} - -.left-panel__contents { - width: 100%; - display: grid; - grid-template-rows: auto 1fr auto; -} - -.left-panel .shroom { - margin-bottom: 16px; -} - -@media (min-width: 700px) { - body { - max-width: 1200px; - padding: 8px 16px; - padding-right: 274px; /* 250px + 16px + 16px */ - } - - .shroom { - display: none; - } - - .page { - font-size: 18px; - } - - .left-panel { - display: block; - position: fixed; - top: 0; - bottom: 0; - width: 274px; /* 250px + 24px * 2 */ - right: 0; - } - - .left-panel__contents { - height: 100%; - } -} - -.sidebar { - padding: 16px 0; - border-radius: 8px; - background: #f4f4f4; -} - -.hypha-actions ul { - margin: 0; - padding: 0; -} - -.hypha-actions li { - list-style: none; -} - -.hypha-actions a { - display: block; - padding: 6px 16px; - font: inherit; - text-decoration: none; - color: #666; - transition: 0.1s background; -} - -aside .hypha-actions a:hover { - background: #eaeaea; -} - - - - - \ No newline at end of file diff --git a/w/m/sys/main.css/5.css b/w/m/sys/main.css/5.css deleted file mode 100644 index 6625476..0000000 --- a/w/m/sys/main.css/5.css +++ /dev/null @@ -1,210 +0,0 @@ -*, *::before, *::after { - box-sizing: border-box; -} - -html { - height: 100%; -} - -body { - font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Helvetica', 'PT Sans', 'Roboto', 'Arial', sans-serif; - max-width: 500px; - min-height: 100%; - margin: 0 auto; - padding: 12px 24px; -} - -@media (min-width: 700px) { - body { - } -} - -.shroom { - margin: 0; -} - -.shroom__button { - border-radius: 8px; - padding: 8px 16px 8px 0; - border: none; - background: #f0f2f4; - color: #444; - font: inherit; - font-size: 15px; - font-weight: 500; - text-align: left; -} - -.shroom span { - margin-left: 16px; - margin-right: 8px; - font-size: 20px; - vertical-align: -0.04em; -} - -.mushroom .shroom__button { - background: #44484a; - color: #dddfe4; -} - - -.header { - padding: 8px 0; -} - -.header h1 { - margin: 0; - font-size: 18px; - font-weight: 600; - letter-spacing: 0.02em; - color: #222428; -} - - -a { - color: #44e; -} - -a:visited { - color: #44a; -} - -h1, h2, h3, h4, h5, h6 { - margin: 1em 0 0.25em; -} - -.page { - font-size: 16px; - line-height: 1.666; - max-width: 40em; - hyphens: auto; -} - -.page pre { - white-space: break-spaces; -} - -.page__amnt { - max-width: 100%; -} - -.page__title { - font-family: 'PT Serif', 'Georgia', serif; - font-size: 36px; - font-weight: normal; -} - -.edit-box { display: grid; grid-template-columns: 7fr 5fr; } -.edit-box .naviwrapper__buttons { grid-column: 1; grid-row: 2 } -.edit-box__left { grid-column: 1; grid-row: 2 } -.edit-box__right { grid-column: 2; grid-row: 1 / span 2; padding-right: 16px } - -footer { - padding: 1em 0; - font-size: 12px; - color: #888; -} - -footer a, footer a:visited { - color: #666; -} - -.left-panel { - display: none; -} - -.left-panel.active { - display: block; - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: #fafafa; -} - -.left-panel.active .sidebar { - background: #fff; -} - -.left-panel__in { - width: 100%; - height: 100%; - max-width: 500px; - margin: 0 auto; - padding: 12px 24px; - -} - -.left-panel__contents { - width: 100%; - display: grid; - grid-template-rows: auto 1fr auto; -} - -.left-panel .shroom { - margin-bottom: 16px; -} - -@media (min-width: 700px) { - body { - max-width: 1200px; - padding: 8px 16px; - padding-right: 274px; /* 250px + 16px + 16px */ - } - - .shroom { - display: none; - } - - .page { - font-size: 18px; - } - - .left-panel { - display: block; - position: fixed; - top: 0; - bottom: 0; - width: 274px; /* 250px + 24px * 2 */ - right: 0; - } - - .left-panel__contents { - height: 100%; - } -} - -.sidebar { - padding: 16px 0; - border-radius: 8px; - background: #f4f4f4; -} - -.hypha-actions ul { - margin: 0; - padding: 0; -} - -.hypha-actions li { - list-style: none; -} - -.hypha-actions a { - display: block; - padding: 6px 16px; - font: inherit; - text-decoration: none; - color: #666; - transition: 0.1s background; -} - -aside .hypha-actions a:hover { - background: #eaeaea; -} - - - - - - \ No newline at end of file diff --git a/w/m/sys/main.css/6.css b/w/m/sys/main.css/6.css deleted file mode 100644 index d8a740d..0000000 --- a/w/m/sys/main.css/6.css +++ /dev/null @@ -1,211 +0,0 @@ -*, *::before, *::after { - box-sizing: border-box; -} - -html { - height: 100%; -} - -body { - font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Helvetica', 'PT Sans', 'Roboto', 'Arial', sans-serif; - max-width: 500px; - min-height: 100%; - margin: 0 auto; - padding: 12px 24px; -} - -@media (min-width: 700px) { - body { - } -} - -.shroom { - margin: 0; -} - -.shroom__button { - border-radius: 8px; - padding: 8px 16px 8px 0; - border: none; - background: #f0f2f4; - color: #444; - font: inherit; - font-size: 15px; - font-weight: 500; - text-align: left; -} - -.shroom span { - margin-left: 16px; - margin-right: 8px; - font-size: 20px; - vertical-align: -0.04em; -} - -.mushroom .shroom__button { - background: #44484a; - color: #dddfe4; -} - - -.header { - padding: 8px 0; -} - -.header h1 { - margin: 0; - font-size: 18px; - font-weight: 600; - letter-spacing: 0.02em; - color: #222428; -} - - -a { - color: #44e; -} - -a:visited { - color: #44a; -} - -h1, h2, h3, h4, h5, h6 { - margin: 1em 0 0.25em; -} - -.page { - font-size: 16px; - line-height: 1.666; - max-width: 40em; - hyphens: auto; -} - -.page pre { - white-space: break-spaces; -} - -.page__amnt { - max-width: 100%; -} - -.page__title { - font-family: 'PT Serif', 'Georgia', serif; - font-size: 36px; - font-weight: normal; -} - -.edit-box { display: grid; grid-template-columns: 7fr 5fr; } -.edit-box .naviwrapper__buttons { grid-column: 1; grid-row: 2 } -.edit-box__left { grid-column: 1; grid-row: 2 } -.edit-box__right { grid-column: 2; grid-row: 1 / span 2; padding-right: 16px } - -footer { - padding: 1em 0; - font-size: 12px; - color: #888; -} - -footer a, footer a:visited { - color: #666; -} - -.left-panel { - display: none; -} - -.left-panel.active { - display: block; - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: #fafafa; -} - -.left-panel.active .sidebar { - background: #fff; -} - -.left-panel__in { - width: 100%; - height: 100%; - max-width: 500px; - margin: 0 auto; - padding: 12px 24px; - -} - -.left-panel__contents { - width: 100%; - display: grid; - grid-template-rows: auto 1fr auto; -} - -.left-panel .shroom { - margin-bottom: 16px; -} - -@media (min-width: 700px) { - body { - max-width: 1200px; - padding: 8px 16px; - padding-right: 274px; - } - - .shroom { - display: none; - } - - .page { - font-size: 18px; - } - - .left-panel { - display: block; - position: fixed; - top: 0; - bottom: 0; - width: 274px; - right: 0; - } - - .left-panel__contents { - height: 100%; - } -} - -.sidebar { - padding: 16px 0; - border-radius: 8px; - background: #f4f4f4; -} - -.hypha-actions ul { - margin: 0; - padding: 0; -} - -.hypha-actions li { - list-style: none; -} - -.hypha-actions a { - display: block; - padding: 6px 16px; - font: inherit; - text-decoration: none; - color: #666; - transition: 0.1s background; -} - -aside .hypha-actions a:hover { - background: #eaeaea; -} - - - - - - - \ No newline at end of file diff --git a/w/m/sys/main.css/7.css b/w/m/sys/main.css/7.css deleted file mode 100644 index 5606495..0000000 --- a/w/m/sys/main.css/7.css +++ /dev/null @@ -1,207 +0,0 @@ -*, *::before, *::after { - box-sizing: border-box; -} - -html { - height: 100%; -} - -body { - font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Helvetica', 'PT Sans', 'Roboto', 'Arial', sans-serif; - max-width: 500px; - min-height: 100%; - margin: 0 auto; - padding: 12px 24px; -} - -.shroom { - margin: 0; -} - -.shroom__button { - border-radius: 8px; - padding: 8px 16px 8px 0; - border: none; - background: #f0f2f4; - color: #444; - font: inherit; - font-size: 15px; - font-weight: 500; - text-align: left; -} - -.shroom span { - margin-left: 16px; - margin-right: 8px; - font-size: 20px; - vertical-align: -0.04em; -} - -.mushroom .shroom__button { - background: #44484a; - color: #dddfe4; -} - - -.header { - padding: 8px 0; -} - -.header h1 { - margin: 0; - font-size: 18px; - font-weight: 600; - letter-spacing: 0.02em; - color: #222428; -} - - -a { - color: #44e; -} - -a:visited { - color: #44a; -} - -h1, h2, h3, h4, h5, h6 { - margin: 1em 0 0.25em; -} - -.page { - font-size: 16px; - line-height: 1.666; - max-width: 40em; - hyphens: auto; -} - -.page pre { - white-space: break-spaces; -} - -.page__amnt { - max-width: 100%; -} - -.page__title { - font-family: 'PT Serif', 'Georgia', serif; - font-size: 36px; - font-weight: normal; -} - -.edit-box { display: grid; grid-template-columns: 7fr 5fr; } -.edit-box .naviwrapper__buttons { grid-column: 1; grid-row: 2 } -.edit-box__left { grid-column: 1; grid-row: 2 } -.edit-box__right { grid-column: 2; grid-row: 1 / span 2; padding-right: 16px } - -footer { - padding: 1em 0; - font-size: 12px; - color: #888; -} - -footer a, footer a:visited { - color: #666; -} - -.left-panel { - display: none; -} - -.left-panel.active { - display: block; - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: #fafafa; -} - -.left-panel.active .sidebar { - background: #fff; -} - -.left-panel__in { - width: 100%; - height: 100%; - max-width: 500px; - margin: 0 auto; - padding: 12px 24px; - -} - -.left-panel__contents { - width: 100%; - display: grid; - grid-template-rows: auto 1fr auto; -} - -.left-panel .shroom { - margin-bottom: 16px; -} - -@media (min-width: 700px) { - body { - max-width: 1200px; - padding: 8px 16px; - padding-right: 274px; - } - - .shroom { - display: none; - } - - .page { - font-size: 18px; - } - - .left-panel { - display: block; - position: fixed; - top: 0; - bottom: 0; - width: 274px; - right: 0; - } - - .left-panel__contents { - height: 100%; - } -} - -.sidebar { - padding: 16px 0; - border-radius: 8px; - background: #f4f4f4; -} - -.hypha-actions ul { - margin: 0; - padding: 0; -} - -.hypha-actions li { - list-style: none; -} - -.hypha-actions a { - display: block; - padding: 6px 16px; - font: inherit; - text-decoration: none; - color: #666; - transition: 0.1s background; -} - -aside .hypha-actions a:hover { - background: #eaeaea; -} - - - - - - - - \ No newline at end of file diff --git a/w/m/sys/main.css/8.css b/w/m/sys/main.css/8.css deleted file mode 100644 index 551ae81..0000000 --- a/w/m/sys/main.css/8.css +++ /dev/null @@ -1,211 +0,0 @@ -*, *::before, *::after { - box-sizing: border-box; -} - -html { - height: 100%; -} - -body { - font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Helvetica', 'PT Sans', 'Roboto', 'Arial', sans-serif; - max-width: 500px; - min-height: 100%; - margin: 0 auto; - padding: 12px 24px; -} - -.shroom { - margin: 0; -} - -.shroom__button { - border-radius: 8px; - padding: 8px 16px 8px 0; - border: none; - background: #f0f2f4; - color: #444; - font: inherit; - font-size: 15px; - font-weight: 500; - text-align: left; -} - -.shroom span { - margin-left: 16px; - margin-right: 8px; - font-size: 20px; - vertical-align: -0.04em; -} - -.mushroom .shroom__button { - background: #44484a; - color: #dddfe4; -} - - -.header { - padding: 8px 0; -} - -.header h1 { - margin: 0; - font-size: 18px; - font-weight: 600; - letter-spacing: 0.02em; - color: #222428; -} - - -a { - color: #44e; -} - -a:visited { - color: #44a; -} - -h1, h2, h3, h4, h5, h6 { - margin: 1em 0 0.25em; -} - -.page { - font-size: 16px; - line-height: 1.666; - max-width: 40em; - hyphens: auto; -} - -.page pre { - white-space: break-spaces; -} - -.page__amnt { - max-width: 100%; -} - -.page__title { - font-family: 'PT Serif', 'Georgia', serif; - font-size: 36px; - font-weight: normal; -} - -.edit-box { - display: grid; - grid-template-columns: 7fr 5fr; -} -.edit-box .naviwrapper__buttons { grid-column: 1; grid-row: 2 } -.edit-box__left { grid-column: 1; grid-row: 2 } -.edit-box__right { grid-column: 2; grid-row: 1 / span 2; padding-right: 16px } - -footer { - padding: 1em 0; - font-size: 12px; - color: #888; -} - -footer a, footer a:visited { - color: #666; -} - -.left-panel { - display: none; -} - -.left-panel.active { - display: block; - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: #fafafa; -} - -.left-panel.active .sidebar { - background: #fff; -} - -.left-panel__in { - width: 100%; - height: 100%; - max-width: 500px; - margin: 0 auto; - padding: 12px 24px; - -} - -.left-panel__contents { - width: 100%; - display: grid; - grid-template-rows: auto 1fr auto; -} - -.left-panel .shroom { - margin-bottom: 16px; -} - -@media (min-width: 700px) { - body { - max-width: 1200px; - padding: 8px 16px; - padding-right: 274px; - } - - .shroom { - display: none; - } - - .page { - font-size: 18px; - } - - .left-panel { - display: block; - position: fixed; - top: 0; - bottom: 0; - width: 274px; - right: 0; - } - - .left-panel__contents { - height: 100%; - } -} - -.sidebar { - padding: 16px 0; - border-radius: 8px; - background: #f4f4f4; -} - -.hypha-actions ul { - margin: 0; - padding: 0; -} - -.hypha-actions li { - list-style: none; -} - -.hypha-actions a { - display: block; - padding: 6px 16px; - font: inherit; - text-decoration: none; - color: #666; - transition: 0.1s background; -} - -aside .hypha-actions a:hover { - background: #eaeaea; -} - - - - - - - - - \ No newline at end of file diff --git a/w/m/sys/main.css/9.css b/w/m/sys/main.css/9.css deleted file mode 100644 index 618b4f3..0000000 --- a/w/m/sys/main.css/9.css +++ /dev/null @@ -1,223 +0,0 @@ -*, *::before, *::after { - box-sizing: border-box; -} - -html { - height: 100%; -} - -body { - font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Helvetica', 'PT Sans', 'Roboto', 'Arial', sans-serif; - max-width: 500px; - min-height: 100%; - margin: 0 auto; - padding: 12px 24px; -} - -.msg { - background-color: #f4f4f4; - padding: 1rem; -} -.msg_hypha-does-not-exist { - border-radius: 1rem; -} - -.shroom { - margin: 0; -} - -.shroom__button { - border-radius: 1rem; - padding: 8px 16px 8px 0; - border: none; - background: #f0f2f4; - color: #444; - font: inherit; - font-size: 15px; - font-weight: 500; - text-align: left; -} - -.shroom span { - margin-left: 16px; - margin-right: 8px; - font-size: 20px; - vertical-align: -0.04em; -} - -.mushroom .shroom__button { - background: #44484a; - color: #dddfe4; -} - - -.header { - padding: 8px 0; -} - -.header h1 { - margin: 0; - font-size: 18px; - font-weight: 600; - letter-spacing: 0.02em; - color: #222428; -} - - -a { - color: #44e; -} - -a:visited { - color: #44a; -} - -h1, h2, h3, h4, h5, h6 { - margin: 0.5em 0 0.25em; -} - -.page { - font-size: 16px; - line-height: 1.666; - max-width: 40em; - hyphens: auto; -} - -.page pre { - white-space: break-spaces; -} - -.page__amnt { - max-width: 100%; -} - -.page__title { - font-family: 'PT Serif', 'Georgia', serif; - font-size: 36px; - font-weight: normal; -} - -.edit-box { - display: grid; - grid-template-columns: 7fr 5fr; -} -.edit-box .naviwrapper__buttons { - grid-column: 1; - grid-row: 2; -} -.edit-box__left { grid-column: 1; grid-row: 2 } -.edit-box__right { grid-column: 2; grid-row: 1 / span 2; padding-right: 16px } - -footer { - padding: 1em 0; - font-size: 12px; - color: #888; -} - -footer a, footer a:visited { - color: #666; -} - -.left-panel { - display: none; -} - -.left-panel.active { - display: block; - position: fixed; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: #fafafa; -} - -.left-panel.active .sidebar { - background: #fff; -} - -.left-panel__in { - width: 100%; - height: 100%; - max-width: 500px; - margin: 0 auto; - padding: 12px 24px; - -} - -.left-panel__contents { - width: 100%; - display: grid; - grid-template-rows: auto 1fr auto; -} - -.left-panel .shroom { - margin-bottom: 16px; -} - -@media (min-width: 700px) { - body { - max-width: 1200px; - padding: 8px 16px; - padding-right: 274px; - } - - .shroom { - display: none; - } - - .page { - font-size: 18px; - } - - .left-panel { - display: block; - position: fixed; - top: 0; - bottom: 0; - width: 274px; - right: 0; - } - - .left-panel__contents { - height: 100%; - } -} - -.sidebar { - padding: 16px 0; - border-radius: 1rem; - background: #f4f4f4; -} - -.hypha-actions ul { - margin: 0; - padding: 0; -} - -.hypha-actions li { - list-style: none; -} - -.hypha-actions a { - display: block; - padding: 6px 16px; - font: inherit; - text-decoration: none; - color: #666; - transition: 0.1s background; -} - -aside .hypha-actions a:hover { - background: #eaeaea; -} - - - - - - - - - - \ No newline at end of file diff --git a/w/m/sys/main.css/meta.json b/w/m/sys/main.css/meta.json index 9035c0a..d205a27 100644 --- a/w/m/sys/main.css/meta.json +++ b/w/m/sys/main.css/meta.json @@ -3,110 +3,6 @@ "deleted": false, "revisions": { "1": { - "tags": [ - "" - ], - "name": "main.css", - "comment": "make a placeholder style", - "author": "wikimind", - "time": 1592244023, - "text_mime": "text/css", - "binary_mime": "", - "text_name": "1.css", - "binary_name": "" - }, - "2": { - "tags": [ - "" - ], - "name": "main.css", - "comment": "Update sys/main.css", - "author": "who could it be?", - "time": 1592589679, - "text_mime": "text/css", - "binary_mime": "", - "text_name": "2.css", - "binary_name": "" - }, - "3": { - "tags": [ - "" - ], - "name": "main.css", - "comment": "Update sys/main.css", - "author": "", - "time": 1592663412, - "text_mime": "text/css", - "binary_mime": "", - "text_name": "3.css", - "binary_name": "" - }, - "4": { - "tags": [ - "" - ], - "name": "main.css", - "comment": "Update sys/main.css", - "author": "", - "time": 1592664073, - "text_mime": "text/css", - "binary_mime": "", - "text_name": "4.txt", - "binary_name": "" - }, - "5": { - "tags": [ - "" - ], - "name": "main.css", - "comment": "Update sys/main.css", - "author": "", - "time": 1592664242, - "text_mime": "text/css", - "binary_mime": "", - "text_name": "5.css", - "binary_name": "" - }, - "6": { - "tags": [ - "" - ], - "name": "main.css", - "comment": "Update sys/main.css", - "author": "", - "time": 1592665138, - "text_mime": "text/css", - "binary_mime": "", - "text_name": "6.css", - "binary_name": "" - }, - "7": { - "tags": [ - "" - ], - "name": "main.css", - "comment": "Update sys/main.css", - "author": "", - "time": 1592665647, - "text_mime": "text/css", - "binary_mime": "", - "text_name": "7.css", - "binary_name": "" - }, - "8": { - "tags": [ - "" - ], - "name": "main.css", - "comment": "Update sys/main.css", - "author": "", - "time": 1592666004, - "text_mime": "text/css", - "binary_mime": "", - "text_name": "8.css", - "binary_name": "" - }, - "9": { "tags": [ "" ], @@ -120,4 +16,4 @@ "binary_name": "" } } -} \ No newline at end of file +} diff --git a/w/m/sys/main.js/1.mjs b/w/m/sys/main.js/1.mjs new file mode 100644 index 0000000..7a221e6 --- /dev/null +++ b/w/m/sys/main.js/1.mjs @@ -0,0 +1,7 @@ +var menu = document.getElementById('shroomburgerMenu'); +document.getElementById('shroomBtn').addEventListener('click', function() { + menu.classList.add('active'); +}); +document.getElementById('mushroomBtn').addEventListener('click', function() { + menu.classList.remove('active'); +}); diff --git a/w/m/sys/main.js/meta.json b/w/m/sys/main.js/meta.json new file mode 100644 index 0000000..98d4ad5 --- /dev/null +++ b/w/m/sys/main.js/meta.json @@ -0,0 +1,17 @@ +{ + "views": 0, + "deleted": false, + "revisions": { + "1": { + "tags": null, + "name": "main.js", + "comment": "Update sys/main.js", + "author": "", + "time": 1592937088, + "text_mime": "text/javascript", + "binary_mime": "", + "text_name": "1.mjs", + "binary_name": "" + } + } +} \ No newline at end of file diff --git a/w/templates/Hypha/view/404.html b/w/templates/Hypha/view/404.html index 3ff59e4..e7a14c5 100644 --- a/w/templates/Hypha/view/404.html +++ b/w/templates/Hypha/view/404.html @@ -1,8 +1,4 @@ -
++The hypha you are trying to access does not exist yet. Why not create it? +
diff --git a/w/templates/Hypha/view/bodybottom.html b/w/templates/Hypha/view/bodybottom.html deleted file mode 100644 index 0759741..0000000 --- a/w/templates/Hypha/view/bodybottom.html +++ /dev/null @@ -1,9 +0,0 @@ - diff --git a/w/templates/Hypha/view/index.html b/w/templates/Hypha/view/index.html index 059f524..55a25b3 100644 --- a/w/templates/Hypha/view/index.html +++ b/w/templates/Hypha/view/index.html @@ -1,3 +1 @@ - +{{ . }} diff --git a/w/templates/Hypha/view/sidebar.html b/w/templates/Hypha/view/sidebar.html index 9a79ac8..7e361d4 100644 --- a/w/templates/Hypha/view/sidebar.html +++ b/w/templates/Hypha/view/sidebar.html @@ -1,7 +1,9 @@ - + {{ .Tree }} diff --git a/w/templates/base.html b/w/templates/base.html index 36dd170..3ce1fdc 100644 --- a/w/templates/base.html +++ b/w/templates/base.html @@ -1,25 +1,30 @@