From 31014f4f14cf06bef92482a55ff7fbd060ef6d0e Mon Sep 17 00:00:00 2001 From: luxick Date: Sat, 16 May 2020 10:55:35 +0200 Subject: [PATCH] CSS as static resource. --- src/{style.nim => app.css} | 5 +---- src/randopix.nim | 3 ++- 2 files changed, 3 insertions(+), 5 deletions(-) rename src/{style.nim => app.css} (78%) diff --git a/src/style.nim b/src/app.css similarity index 78% rename from src/style.nim rename to src/app.css index d60d703..3e204cc 100644 --- a/src/style.nim +++ b/src/app.css @@ -1,5 +1,3 @@ -import strutils -const css* = """ window { background: black; font-size: 30px; @@ -10,5 +8,4 @@ label { border-radius: 5px; margin: 10px; padding: 10px; -} -""".unindent \ No newline at end of file +} \ No newline at end of file diff --git a/src/randopix.nim b/src/randopix.nim index bf562de..b3bce5f 100644 --- a/src/randopix.nim +++ b/src/randopix.nim @@ -2,9 +2,10 @@ import httpClient, json, os, options, strformat import gintro/[gtk, glib, gobject, gio, gdkpixbuf] import gintro/gdk except Window import argparse except run -import fileAccess, style +import fileAccess const + css = slurp("app.css") version = "0.1" floofUrl = "https://randomfox.ca/floof/"