diff --git a/src/entries/weekly/200808.php b/src/entries/200808.html similarity index 65% rename from src/entries/weekly/200808.php rename to src/entries/200808.html index 7321053..4ef254b 100644 --- a/src/entries/weekly/200808.php +++ b/src/entries/200808.html @@ -47,41 +47,41 @@
-

weekly roundup

-august 4-8, 2020 -css, html, php, server, website
-
-

tuesday, august 4

- -

wednesday, august 5

- -
-

thursday, august 6

- -
-

friday, august 7

- -
-

saturday, august 8

- -
+

weekly roundup

+ august 4-8, 2020 + css, html, php, server, website
+
+

tuesday, august 4

+ +

wednesday, august 5

+ +
+

thursday, august 6

+ +
+

friday, august 7

+ +
+

saturday, august 8

+ +
diff --git a/src/entries/feature/200810.php b/src/entries/200810.html similarity index 100% rename from src/entries/feature/200810.php rename to src/entries/200810.html diff --git a/src/entries/feature/200813.php b/src/entries/200813.html similarity index 100% rename from src/entries/feature/200813.php rename to src/entries/200813.html diff --git a/src/entries/weekly/200815.php b/src/entries/200815.html similarity index 97% rename from src/entries/weekly/200815.php rename to src/entries/200815.html index 6a3336a..9efdc23 100644 --- a/src/entries/weekly/200815.php +++ b/src/entries/200815.html @@ -61,7 +61,7 @@ apache, automation, css, html, jenkins, nginx, php, server, website

  • design the website
  • prototype of website running on the server
  • -
  • set up automation with Jenkins + Ansible
  • +
  • J set up automation with Jenkins + Ansible

  • thursday, august 6

    @@ -83,6 +83,7 @@ apache, automation, css, html, jenkins, nginx, php, server, website
  • added images to live site despite conflicts with Linux's security

  • + diff --git a/src/entries/feature/200918.php b/src/entries/200918.html similarity index 100% rename from src/entries/feature/200918.php rename to src/entries/200918.html diff --git a/src/entries/raw/tools/article-to-html.py b/src/entries/raw/article-to-html.py similarity index 57% rename from src/entries/raw/tools/article-to-html.py rename to src/entries/raw/article-to-html.py index c0306ef..33dcdaa 100644 --- a/src/entries/raw/tools/article-to-html.py +++ b/src/entries/raw/article-to-html.py @@ -9,12 +9,11 @@ def file_to_string(f): return text def fill_text(f): - return file_to_string('../res/head.txt') + file_to_string(f) + file_to_string('../res/tail.txt') + return file_to_string('res/head.txt') + file_to_string(f) + file_to_string('res/tail.txt') def create_files(files, directory): for f in files: print(f) -# t = open(f, "r") n = open(directory + '/' + os.path.basename(f), "w") n.write(fill_text(f)) n.close() @@ -23,18 +22,13 @@ def collect_raw(d): return glob.glob(d) def clear_articles(): - files = glob.glob('../../feature/*') + files = glob.glob('../*.html') for f in files: os.remove(f) - - files = glob.glob('../../weekly/*') - for w in files: - os.remove(w) def main(): clear_articles() - create_files(collect_raw('../feature/*'), '../../feature') - create_files(collect_raw('../weekly/*'), '../../weekly') + create_files(collect_raw('entries/*.html'), '..') ## Start Program ## diff --git a/src/entries/raw/entries/200808.html b/src/entries/raw/entries/200808.html new file mode 100644 index 0000000..5cf7a4c --- /dev/null +++ b/src/entries/raw/entries/200808.html @@ -0,0 +1,35 @@ +

    weekly roundup

    + august 4-8, 2020 + css, html, php, server, website
    +
    +

    tuesday, august 4

    + +

    wednesday, august 5

    + +
    +

    thursday, august 6

    + +
    +

    friday, august 7

    + +
    +

    saturday, august 8

    + +
    diff --git a/src/entries/raw/feature/200810.php b/src/entries/raw/entries/200810.html similarity index 100% rename from src/entries/raw/feature/200810.php rename to src/entries/raw/entries/200810.html diff --git a/src/entries/raw/feature/200813.php b/src/entries/raw/entries/200813.html similarity index 100% rename from src/entries/raw/feature/200813.php rename to src/entries/raw/entries/200813.html diff --git a/src/entries/raw/weekly/200815.php b/src/entries/raw/entries/200815.html similarity index 94% rename from src/entries/raw/weekly/200815.php rename to src/entries/raw/entries/200815.html index 4bdc2bc..226bc76 100644 --- a/src/entries/raw/weekly/200815.php +++ b/src/entries/raw/entries/200815.html @@ -12,7 +12,7 @@ apache, automation, css, html, jenkins, nginx, php, server, website

  • design the website
  • prototype of website running on the server
  • -
  • set up automation with Jenkins + Ansible
  • +
  • J set up automation with Jenkins + Ansible

  • thursday, august 6

    @@ -34,3 +34,4 @@ apache, automation, css, html, jenkins, nginx, php, server, website
  • added images to live site despite conflicts with Linux's security

  • + diff --git a/src/entries/raw/feature/200918.php b/src/entries/raw/entries/200918.html similarity index 100% rename from src/entries/raw/feature/200918.php rename to src/entries/raw/entries/200918.html diff --git a/src/entries/raw/weekly/200808.php b/src/entries/raw/weekly/200808.php deleted file mode 100644 index 59aedd4..0000000 --- a/src/entries/raw/weekly/200808.php +++ /dev/null @@ -1,35 +0,0 @@ -

    weekly roundup

    -august 4-8, 2020 -css, html, php, server, website
    -
    -

    tuesday, august 4

    - -

    wednesday, august 5

    - -
    -

    thursday, august 6

    - -
    -

    friday, august 7

    - -
    -

    saturday, august 8

    - -
    diff --git a/src/index.py b/src/index.py index 19b339f..d252d4f 100644 --- a/src/index.py +++ b/src/index.py @@ -1,6 +1,9 @@ -import datetime, os +import datetime, os, re from bottle import error, route, run, static_file, template +# make article-to-html work with entries +# make index work with entries - later, they can be differentiated into features and weeklies with tags or title or whatever + # write diary def build_nav(): @@ -22,17 +25,22 @@ def list_snippets(articles): result = [] for article in articles: + path = 'entries/' + article text = [] a = [] length = 0 - with open('entries/feature/' + article) as f: + with open('entries/' + article) as f: text = f.readlines() length = len(text) a.append(text[head]) - a.append(snip_article(find_content(article, length, head, tail))) - a.append(text[head + 1]) + content = snip_article(find_content(article, length, head, tail), path) + + if content.count(''): + content += '' + a.append(content) + a.append(text[head + 1].replace('
    ','')) a.append("social") - a.append('entries/feature/' + article) + a.append(path) result.append(a) return result @@ -44,31 +52,34 @@ def count_lines(fname): def find_content(article, length, head, tail): content = "" - with open('entries/feature/' + article) as f: + with open('entries/' + article) as f: for pos, line in enumerate(f): if pos > head + 1 and pos < length - tail: content += line return content -def snip_article(article): +def clean(result, path): + result = result.replace('
    ','') + result = re.sub(r'', '', result) + result = result.replace('','') + result = re.sub(r'','',result) + result = re.sub(r'','',result) + return result + +def snip_article(article, path): + article = clean(article, path) limit = 300 result = article[0:min(len(article),limit)] - result = result.replace('
    ','') result = result.rsplit(' ',1)[0] + # cut off after 5 lines, too? return result + " ... " def sort_files(files): - sort = files - return sort + return list(reversed(files)) def gather_files(): - files = [] - feature = os.listdir('entries/feature/') - for f in feature: - files.append('entries/feature/' + f) - weekly = os.listdir('entries/weekly/') - for f in weekly: - files.append('entries/weekly/' + f) + files = os.listdir('entries/') + files.remove('raw') return files # Static diff --git a/src/static/css/diary.css b/src/static/css/diary.css index 172f62f..8dd0aa3 100755 --- a/src/static/css/diary.css +++ b/src/static/css/diary.css @@ -22,6 +22,7 @@ mark { background-color: #900C3F; color: hotpink; } +ul { list-style-position: inside; } .grid { display: grid; @@ -68,7 +69,6 @@ mark { display: flex; flex-direction:column; justify-content:flex-end; - align-items: bottom; background-image: url(../img/ele/navbar.png); height: 86px; width: 800px; @@ -78,7 +78,6 @@ mark { display: flex; flex-direction:column; justify-content:flex-end; - align-items: bottom; padding-bottom: 3px; } .nav-game { @@ -86,7 +85,6 @@ mark { display: flex; flex-direction:column; justify-content:flex-end; - align-items: bottom; padding-bottom: 3px; } .nav-diary { @@ -94,7 +92,6 @@ mark { display: flex; flex-direction:column; justify-content:flex-end; - align-items: bottom; padding-bottom: 3px; } .nav-presskit { @@ -102,7 +99,6 @@ mark { display: flex; flex-direction:column; justify-content:flex-end; - align-items: bottom; padding-bottom: 3px; } @@ -194,11 +190,10 @@ mark { .footer-row { grid-area: 8 / 1 / 9 / 5; background-color: #A8577E; - text-align: center; } -.footer { - background-color: #5c374c; +.footer-content { + background-color: pink; padding-top: 5px; padding-right: 25px; box-shadow: 0 100vh 0 100vh #581845; diff --git a/src/static/css/game.css b/src/static/css/game.css index d50bec3..20cbe99 100644 --- a/src/static/css/game.css +++ b/src/static/css/game.css @@ -29,8 +29,6 @@ ul { list-style-position: inside; } } .grid { - height: 100vh; - width: 100vw; display: grid; grid-template-columns: auto 800px auto; grid-template-rows: 25px 90px 1fr 100px; @@ -75,7 +73,6 @@ ul { list-style-position: inside; } display: flex; flex-direction:column; justify-content:flex-end; - align-items: bottom; background-image: url(../img/ele/navbar.png); height: 86px; width: 800px; @@ -85,7 +82,6 @@ ul { list-style-position: inside; } display: flex; flex-direction:column; justify-content:flex-end; - align-items: bottom; padding-bottom: 3px; } .nav-game { @@ -93,7 +89,6 @@ ul { list-style-position: inside; } display: flex; flex-direction:column; justify-content:flex-end; - align-items: bottom; padding-bottom: 3px; } .nav-diary { @@ -101,7 +96,6 @@ ul { list-style-position: inside; } display: flex; flex-direction:column; justify-content:flex-end; - align-items: bottom; padding-bottom: 3px; } .nav-presskit { @@ -109,7 +103,6 @@ ul { list-style-position: inside; } display: flex; flex-direction:column; justify-content:flex-end; - align-items: bottom; padding-bottom: 3px; } @@ -178,12 +171,13 @@ ul { list-style-position: inside; } .footer-row { grid-area: 4 / 1 / 5 / 4; - background-color: #EC424A; - text-align: right; - padding-top: 5px; - padding-right: 25px; + background-color: green; } -.footer { - background-color: #060d1a; +.footer-content { + background-color: pink; + padding-top: 5px; + text-align: right; + overflow: hidden; + box-shadow: 0 100vh 0 100vh #581845; } diff --git a/src/static/css/index.css b/src/static/css/index.css index 9f50ed5..7e6e467 100755 --- a/src/static/css/index.css +++ b/src/static/css/index.css @@ -67,7 +67,6 @@ mark { display: flex; flex-direction:column; justify-content:flex-end; - align-items: bottom; background-image: url(../img/ele/navbar.png); height: 86px; width: 800px; @@ -77,7 +76,6 @@ mark { display: flex; flex-direction:column; justify-content:flex-end; - align-items: bottom; padding-bottom: 3px; } .nav-game { @@ -85,23 +83,20 @@ mark { display: flex; flex-direction:column; justify-content:flex-end; - align-items: bottom; padding-bottom: 3px; } .nav-diary { grid-area: 1 / 4 / 2 / 5; display: flex; - flex-direction:column; - justify-content:flex-end; - align-items: bottom; + flex-direction: column; + justify-content: flex-end; padding-bottom: 3px; } .nav-presskit { grid-area: 1 / 5 / 2 / 6; display: flex; - flex-direction:column; - justify-content:flex-end; - align-items: bottom; + flex-direction: column; + justify-content: flex-end; padding-bottom: 3px; } @@ -150,7 +145,7 @@ mark { .bg { grid-area: 3 / 3 / 4 / 6; background-color: #C70039; - background-image: url(http://images.verpets.com/pets/peesh/peesh_viral_2.png); + background-image: url(../img/bg/homeBG.png); width: 650px; height: 457px; } @@ -196,11 +191,10 @@ mark { padding-left: 1px; } -.footer { +.footer-content { background-color: #581845; padding-top: 5px; - padding-right: 25px; - box-shadow: 0 100vh 0 100vh #581845; text-align: right; overflow: hidden; + box-shadow: 0 100vh 0 100vh #581845; } diff --git a/src/static/css/presskit.css b/src/static/css/presskit.css index 4268086..f968877 100644 --- a/src/static/css/presskit.css +++ b/src/static/css/presskit.css @@ -29,8 +29,6 @@ ul { list-style-position: inside; } } .grid { - height: 100vh; - width: 100vw; display: grid; grid-template-columns: auto 800px auto; grid-template-rows: 25px 90px 1fr 100px; @@ -75,7 +73,6 @@ ul { list-style-position: inside; } display: flex; flex-direction:column; justify-content:flex-end; - align-items: bottom; background-image: url(../img/ele/navbar.png); height: 86px; width: 800px; @@ -85,7 +82,6 @@ ul { list-style-position: inside; } display: flex; flex-direction:column; justify-content:flex-end; - align-items: bottom; padding-bottom: 3px; } .nav-game { @@ -93,7 +89,6 @@ ul { list-style-position: inside; } display: flex; flex-direction:column; justify-content:flex-end; - align-items: bottom; padding-bottom: 3px; } .nav-diary { @@ -101,7 +96,6 @@ ul { list-style-position: inside; } display: flex; flex-direction:column; justify-content:flex-end; - align-items: bottom; padding-bottom: 3px; } .nav-presskit { @@ -109,7 +103,6 @@ ul { list-style-position: inside; } display: flex; flex-direction:column; justify-content:flex-end; - align-items: bottom; padding-bottom: 3px; } @@ -145,7 +138,7 @@ ul { list-style-position: inside; } .body-row { grid-area: 3 / 1 / 4 / 4; - background-color: #d08d11; + background-color: orange; } .pages { @@ -200,12 +193,13 @@ ul { list-style-position: inside; } .footer-row { grid-area: 4 / 1 / 5 / 4; - background-color: #EC424A; - text-align: right; - padding-top: 5px; - padding-right: 25px; + background-color: green; } -.footer { - background-color: #060d1a; +.footer-content { + background-color: pink; + padding-top: 5px; + text-align: right; + overflow: hidden; + box-shadow: 0 100vh 0 100vh #581845; } diff --git a/src/views/diary.tpl b/src/views/diary.tpl index 32319bb..2296a1f 100644 --- a/src/views/diary.tpl +++ b/src/views/diary.tpl @@ -1,4 +1,3 @@ - % rebase('frame.tpl')
    diff --git a/src/views/footer.tpl b/src/views/footer.tpl index 8e7dd01..0522f4b 100644 --- a/src/views/footer.tpl +++ b/src/views/footer.tpl @@ -1,8 +1,6 @@ - + diff --git a/src/views/frame.tpl b/src/views/frame.tpl index 59b64f0..ea51896 100644 --- a/src/views/frame.tpl +++ b/src/views/frame.tpl @@ -1,5 +1,5 @@ - + % include('header.tpl') @@ -8,12 +8,8 @@ % include('logo-bar.tpl') % include('nav.tpl')
    - {{!base}} - - % include('footer.tpl') - diff --git a/src/views/game.tpl b/src/views/game.tpl index 96f7c74..89e5828 100644 --- a/src/views/game.tpl +++ b/src/views/game.tpl @@ -1,4 +1,3 @@ - % rebase('frame.tpl')
    @@ -8,7 +7,7 @@

    Story



    - You play as a transfer student to a southern American town.
    + You play as a transfer student to a Deep South town.

    There's a popular rumor that the local shopping center closes early because it's haunted, evidenced by strange noises and lights.

    @@ -65,4 +64,4 @@ Skills are individual powers gained through gameplay which give specific effects
    - + diff --git a/src/views/header.tpl b/src/views/header.tpl index dc49185..44b25fc 100644 --- a/src/views/header.tpl +++ b/src/views/header.tpl @@ -1,3 +1,3 @@ - {{title or 'blessfrey.me'}} - - + {{title or 'blessfrey.me'}} + + diff --git a/src/views/index.tpl b/src/views/index.tpl index 6fb085e..7e5ca37 100644 --- a/src/views/index.tpl +++ b/src/views/index.tpl @@ -1,12 +1,9 @@ - % rebase('frame.tpl')
    - + link to developer's Twitter
    -
    - -
    +
    diff --git a/src/views/logo-bar.tpl b/src/views/logo-bar.tpl index d704897..f41d2d8 100644 --- a/src/views/logo-bar.tpl +++ b/src/views/logo-bar.tpl @@ -1,4 +1,3 @@ -
    blessfrey.me
    diff --git a/src/views/presskit.tpl b/src/views/presskit.tpl index fcc1ec3..10653f3 100644 --- a/src/views/presskit.tpl +++ b/src/views/presskit.tpl @@ -1,11 +1,10 @@ - % rebase('frame.tpl')

    Fact Sheet

    -