commit df317d7a7c660e7ff32dccaee31a36bd8b760d90 Author: Christine Dodrill Date: Fri Feb 5 11:44:50 2016 -0800 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9c49590 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +twtxtlist +nimcache +*.db diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..2610aec --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2016 Christine Dodrill + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. \ No newline at end of file diff --git a/data/.gitkeep b/data/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/public/css/style.css b/public/css/style.css new file mode 100644 index 0000000..671e9df --- /dev/null +++ b/public/css/style.css @@ -0,0 +1,18 @@ +body { font-family: sans-serif; background: #eee; } +a, h1, h2 { color: #377ba8; } +h1, h2 { font-family: 'Georgia', serif; margin: 0; } +h1 { border-bottom: 2px solid #eee; } +h2 { font-size: 1.2em; } + +.page { margin: 2em auto; width: 35em; border: 5px solid #ccc; + padding: 0.8em; background: white; } +.entries { list-style: none; margin: 0; padding: 0; } +.entries li { margin: 0.8em 1.2em; } +.entries li h2 { margin-left: -1em; } +.add-entry { font-size: 0.9em; border-bottom: 1px solid #ccc; } +.add-entry dl { font-weight: bold; } +.metanav { text-align: right; font-size: 0.8em; padding: 0.3em; + margin-bottom: 1em; background: #fafafa; } +.flash { background: #cee5F5; padding: 0.5em; + border: 1px solid #aacbe2; } +.error { background: #f0d6d6; padding: 0.5em; } diff --git a/templates/layout.mustache b/templates/layout.mustache new file mode 100644 index 0000000..49ba073 --- /dev/null +++ b/templates/layout.mustache @@ -0,0 +1,11 @@ + +twtxt list{{# title }} - {{ title }}{{/title}} + +
+

{{ header }}

+ + {{{ body }}} +
diff --git a/twtxtlist.nimble b/twtxtlist.nimble new file mode 100644 index 0000000..6853779 --- /dev/null +++ b/twtxtlist.nimble @@ -0,0 +1,20 @@ +# Package + +version = "0.1.0" +author = "Christine Dodrill" +description = "a list of twtxt hacker feeds" +license = "MIT" +srcDir = "src" +bin = @["twtxtlist"] + +# Dependencies + +requires "nim >= 0.13.0" + +mode = ScriptMode.Verbose + +task db, "SQLite database prompt": + exec "sqlite3 data/twtxt.db" + +task migrate, "Run database migrations": + exec "sqlite3 data/twtxt.db"