From e51b74a017600e0bcac957a9d3d7ffc156dfa494 Mon Sep 17 00:00:00 2001 From: Dominik Picheta Date: Tue, 8 May 2018 16:02:43 +0100 Subject: [PATCH] Initial thread design. --- redesign/nimforum.scss | 102 ++++++++++++++++++++++++++++++-- redesign/thread.html | 129 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 226 insertions(+), 5 deletions(-) create mode 100644 redesign/thread.html diff --git a/redesign/nimforum.scss b/redesign/nimforum.scss index d69ca98..72f9ba0 100644 --- a/redesign/nimforum.scss +++ b/redesign/nimforum.scss @@ -2,9 +2,9 @@ // https://picturepan2.github.io/spectre/getting-started.html#installation // Define variables to override default ones $primary-color: #f99c19; -// $dark-color: #3e396b; +// $dark-color: #17181f; $label-color: #7cd2ff; -$filter-color: #f1f1f1; +$secondary-btn-color: #f1f1f1; // Define nav bar colours. $navbar-color: #17181f; @@ -69,9 +69,9 @@ $logo-height: $navbar-height - 20px; margin-bottom: $control-padding-y*2; .dropdown > .btn { - background: $filter-color; - border-color: darken($filter-color, 5%); - color: invert($filter-color); + background: $secondary-btn-color; + border-color: darken($secondary-btn-color, 5%); + color: invert($secondary-btn-color); margin-right: $control-padding-x*2; } @@ -133,4 +133,96 @@ $views-color: #545d70; border-right: 0.3rem solid transparent; border-bottom: 0.6rem solid #98c766; display: inline-block; +} + +// - Thread view +.title { + margin-top: $control-padding-y*2; + margin-bottom: $control-padding-y*2; + + p { + font-size: 1.4rem; + font-weight: bold; + + color: darken($dark-color, 20%); + + margin: 0; + } +} + +.posts { + @extend .grid-sm; + @extend .container; + margin: 0; +} + +.post { + @extend .tile; +} + +.post-icon { + @extend .tile-icon; +} + +.post-avatar { + @extend .avatar; + @extend .avatar-xl; +} + +.post-main { + @extend .tile-content; + + margin-bottom: $control-padding-y-lg*2; +} + +.post-title { + margin-bottom: $control-padding-y*2; + + .post-username { + font-weight: bold; + display: inline-block; + } + + .post-time { + float: right; + } +} + +.post-content { + +} + +.post-buttons { + float: right; + + > div { + display: inline-block; + } + + .btn { + background: transparent; + border-color: transparent; + color: darken($secondary-btn-color, 40%); + + margin: 0; + margin-left: $control-padding-y-sm; + } + + .btn:hover { + background: $secondary-btn-color; + border-color: darken($secondary-btn-color, 5%); + color: invert($secondary-btn-color); + } + + .btn:focus { + @include control-shadow(darken($secondary-btn-color, 50%)); + } + + .btn:active { + box-shadow: inset 0 0 .4rem .01rem darken($secondary-btn-color, 80%); + } + + .like-button i { + color: #f783ac; + } } \ No newline at end of file diff --git a/redesign/thread.html b/redesign/thread.html new file mode 100644 index 0000000..513f1df --- /dev/null +++ b/redesign/thread.html @@ -0,0 +1,129 @@ + + + + + + + + + The Nim programming language forum + + + + + + + + + +
+
+

Lexers and parsers in nim

+
community +
+
+
+
+
+ Avatar +
+
+
+
+
+ ErikCampobadal +
+
44m
+
+
+

Hey! I'm willing to create a programming language using nim.

+ +

It's an educational project. Been reading about compilers for weeks now and I started using tools like flex and bison for lexer and parser. I know nim have a parsing library but nowhere near that level.

+ +

There is an old post (2014) with a similar question so I'm bringing that back a few years later. Is there anything anyone know that could speed up the process of developing a programing language using nim? (I can have c code if needed ofc)

+
+
+ +
+ +
+
+ +
+
+
+
+ +
+
+
+ Avatar +
+
+
+
+
+ twetzel59 +
+
44m
+
+
+

Wow, I was just reading about the compilation pipeline today!

+ +

I suppose you could use at least the lexing part from a generator like flex, not so sure about using AST generators easily (it's possible).

+ +

Is your language complicated enough to warrant a parser generator or could you just use a custom parser?

+
+
+ +
+ +
+
+ +
+
+
+
+ +
+
+ + + + \ No newline at end of file