Skip to content

Instantly share code, notes, and snippets.

@wildermuthn
Created July 8, 2017 19:08
Show Gist options
  • Save wildermuthn/94afb034eee7187041ba72169a543217 to your computer and use it in GitHub Desktop.
Save wildermuthn/94afb034eee7187041ba72169a543217 to your computer and use it in GitHub Desktop.
sample elements file using ganymede
(ns client.tool-defs.log.elements
(:require [client.widgets.button :as btn])
(:require-macros [ganymede.macros :refer [div]]))
(div container
:display :flex
:flex-direction :column
:align-items :stretch
:min-width 0
:flex "1 0 0"
:padding* [30 30 30 30])
(div header-container
:display :flex
:justify-content :space-between
:padding* [0 0 5 0])
(div clear-button
(merge btn/default-button-style
btn/style-secondary
btn/size-medium
{:margin* [0 0 0 0]}))
(div log-display
:flex "1 0 0"
:display :flex
:min-width 0
:flex-direction :column
:border "1px solid #AAA"
:overflow :scroll
:background-color :white) ;; Force repaint on Yosemite
(div log-item-div
:display :flex
:flex-direction :column
:flex-shrink 0
:min-width 0
;;:text-overflow "ellipsis"
;;:overflow "hidden"
;;:white-space "nowrap"
;;:border "1px solid gold")
)
(div message
:padding-right "20px"
:min-width 0
:flex-shrink 1
:text-overflow "ellipsis"
:overflow "hidden"
:white-space "nowrap"
:font-family "monospace")
(div rhs
:margin-left "auto"
:flex-shrink 0
:font-family "monospace")
(div top-row
:display :flex
:cursor :pointer
:flex-direction :row
:align-items :center
:justify-content :flex-start)
(div bottom-line
:display :flex
:margin-bottom "10px"
:font-family "monospace")
(div bottom-section
:padding* [10 20 0 30]
:display :flex
:flex-direction :column
:flex "1 0 auto")
(div right-content
:display :flex
:flex-direction :row
:align-items :center
:justify-content :flex-end
:flex 1)
(div left-content
:display :flex
:flex-direction :row
:align-items :center
:justify-content :flex-start
:flex 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment