1
0
Fork 0

- fixed configuration parser to allow empty strings;

- [GUI] drafted a theme.
This commit is contained in:
cage 2023-05-15 20:43:03 +02:00
parent ec609e1838
commit 1ce69366de
3 changed files with 42 additions and 41 deletions

View File

@ -6,9 +6,9 @@
gemini.favicon = "🌍"
gemini.main-window.foreground = white
gemini.main-window.foreground = #5b4636
gemini.main-window.background = black
gemini.main-window.background = #f4ecd8
# the font name
@ -16,7 +16,7 @@ gemini.main-window.text.font = Sans
# positive number units in point, negatine units in pixel
gemini.main-window.text.size = 12
gemini.main-window.text.size = 11
# normal or bold
@ -37,13 +37,13 @@ gemini.main-window.text.padding = 1
# links
gemini.link.background = blue
gemini.link.foreground = #5b4636
gemini.link.foreground = magenta
gemini.link.background = #f4ecd8
gemini.link.font = Sans
gemini.link.size = 12
gemini.link.size = 11
gemini.link.weight = bold
@ -61,21 +61,21 @@ gemini.link.scheme.http.prefix = "→🕸 "
gemini.quote.prefix = "🞂 "
gemini.quote.foreground = #ffffff
gemini.quote.foreground = #5b4636
gemini.quote.background = #ff00ff
gemini.quote.background = #f4ecd8
gemini.quote.font = Serif
gemini.quote.size = 12
gemini.quote.size = 11
gemini.quote.weight = bold
gemini.quote.weight = normal
gemini.quote.slant = italic
gemini.quote.underline = yes
gemini.quote.underline = no
gemini.quote.justification = right
gemini.quote.justification = left
# unordered list
@ -83,11 +83,11 @@ gemini.bullet.prefix = "• "
# header level 1
gemini.h1.prefix = "🞓 "
gemini.h1.prefix = ""
gemini.h1.foreground = #ff0000
gemini.h1.foreground = #5b4636
gemini.h1.background = #ffff00
gemini.h1.background = #f4ecd8
gemini.h1.font = Sans
@ -97,17 +97,17 @@ gemini.h1.weight = bold
gemini.h1.slant = roman
gemini.h1.underline = yes
gemini.h1.underline = no
gemini.h1.justification = center
# header level 2
gemini.h2.prefix = "🞐 "
gemini.h2.prefix = ""
gemini.h2.foreground = #00ffff
gemini.h2.foreground = #5b4636
gemini.h2.background = #ffffff
gemini.h2.background = #f4ecd8
gemini.h2.font = Sans
@ -117,35 +117,35 @@ gemini.h2.weight = bold
gemini.h2.slant = roman
gemini.h2.underline = yes
gemini.h2.underline = no
gemini.h2.justification = right
gemini.h2.justification = left
# header level 3
gemini.h3.prefix = "🞎 "
gemini.h3.prefix = ""
gemini.h3.foreground = #0000ff
gemini.h3.foreground = #5b4636
gemini.h3.background = #ffffff
gemini.h3.background = #f4ecd8
gemini.h3.font = Sans
gemini.h3.size = 12
gemini.h3.weight = bold
gemini.h3.weight = normal
gemini.h3.slant = roman
gemini.h3.underline = yes
gemini.h3.underline = no
gemini.h3.justification = center
gemini.h3.justification = left
#preformatted text
# preformatted text
gemini.preformatted-text.foreground = #fed700
gemini.preformatted-text.foreground = #5b4636
gemini.preformatted-text.background = white
gemini.preformatted-text.background = #f4ecd8
gemini.preformatted-text.font = Monospace
@ -155,15 +155,15 @@ gemini.preformatted-text.weight = bold
gemini.preformatted-text.slant = roman
gemini.preformatted-text.underline = yes
gemini.preformatted-text.underline = no
gemini.preformatted.justification = center
gemini.preformatted.justification = left
# Table of contents (TOC)
# width in chars
toc.maximum.width = 80
toc.maximum.width = 40
toc.minimum.width = 20
@ -171,11 +171,11 @@ toc.font = Monospace
toc.size = 12
toc.weight = bold
toc.weight = normal
toc.slant = roman
toc.underline = yes
toc.underline = no
# Keybinding

View File

@ -1182,10 +1182,11 @@
(padding (client-configuration:config-gemtext-padding))
(padding-pixel (* padding (gui:font-measure gemtext-font "0"))))
(setf gemtext-widget (make-instance 'gui:scrolled-text
:padx padding-pixel
:master object
:read-only t
:font gemtext-font)))
:background (gui-conf:gemini-window-colors)
:padx padding-pixel
:master object
:read-only t
:font gemtext-font)))
(gui:configure gemtext-widget :wrap :word)
(setf info-frame (make-instance 'gui:frame :master object :relief :sunken :borderwidth 1))
(setf info-text (make-instance 'gui:text :height 2 :wrap :none :master info-frame))

View File

@ -65,7 +65,7 @@
;; WITH-KEY := "with"
;; BUFFER-LABEL := "buffer"
;; REGEXP := QUOTED-STRING
;; QUOTED-STRING := #\" (not #\") #\"
;; QUOTED-STRING := #\" (not #\")* #\"
;; FIELD := ( (or ESCAPED-CHARACTER
;; (not #\# ASSIGN BLANK FIELD-SEPARATOR) )*
;; COMMENT := BLANKS #\# (not #\Newline)* BLANKS
@ -192,7 +192,7 @@
blanks)
(:function remove-if-null))
(defrule quoted-string (and #\" (+ (not #\")) #\")
(defrule quoted-string (and #\" (* (not #\")) #\")
(:function (lambda (a) (second a)))
(:text t))