Skip to content

Commit

Permalink
Make the rebuild message into an article
Browse files Browse the repository at this point in the history
  • Loading branch information
norm committed Jun 23, 2021
1 parent 0fc5ab7 commit feff86f
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 11 deletions.
1 change: 1 addition & 0 deletions fragments/source/all/all/body_class
@@ -0,0 +1 @@
source {{page_class}}
9 changes: 8 additions & 1 deletion fragments/source/all/all/body_source_body.html
@@ -1 +1,8 @@
{{body}}
{% if updated_explanation %}
<div id='updated'>
<p><strong>Updated: {{updated.strftime('%d %B, %Y')}}:</strong></p>
{{updated_explanation|markdown}}
</div>
{% endif %}

{{body}}
8 changes: 8 additions & 0 deletions sass/_main_header.scss
@@ -1,6 +1,14 @@
// The introductory area to an article.

main header {
margin-bottom: 1em;

@include larger_width {
margin-bottom: 2em;
}
}

body.source main header {
@include body_font;
color: $nevada;

Expand Down
32 changes: 32 additions & 0 deletions sass/pages/_source.scss
@@ -0,0 +1,32 @@
// generator:source page

body.source {
figure img,
p.image img {
max-width: 100%;
}

#updated {
@include body_font;
color: $limed_spruce;
border: solid $limed_spruce;
border-width: 0 5px 0;
padding: 0.25em 20px;
margin: 0 $side_outdent 2em;

strong {
@include headline_font;
}

p:first-child {
margin-top: 0;
}
p:last-child {
margin-bottom: 0;
}

@include larger_width {
margin: 0 1em 3em;
}
}
}
1 change: 1 addition & 0 deletions sass/site.scss
Expand Up @@ -16,5 +16,6 @@
@import "pages/tweet";
@import "pages/foursquare";
@import "pages/recipe";
@import "pages/source";
@import "pages/not_found";
@import "pages/homepage";
@@ -1,13 +1,25 @@
```
title = 'About the rebuild'
title = 'About the 2020 rebuild'
published = 2020-06-02T13:58:51Z
updated = 2021-06-23T05:15:00Z
origin = 'mnf'
noindex = true
page_class = 'about article'
type = 'timeless'
type = 'article'
page_class = 'about'
updated_explanation = """
This was originally an explanation linked from the header of every
page of this site as I started work redeveloping it in 2020. I've turned
it into an article and posted it under the date it was first written.
I won't be keeping the todo list updated, but it is correct as of
June 23, 2021.
"""
previous_slug = [
'/about-the-rebuild',
]
tag = [
'colophon',
]
```

# About the rebuild

[![Sketches of how to do CSS on a whiteboard](https://mnf.m17s.net/2012/07/31/dropping-a-css-knowledge-bomb-on-rujmah.jpg)][img] Hello world.

Again.
Expand Down Expand Up @@ -47,8 +59,8 @@ And I have more words to write.
* ❌ document the rebuild well for future-norm and other curious people

* Old posts:
* restore (some of) the old posts from the database backup
* restore even older posts not in that database, but in archives
* ✅ <del>restore (some of) the old posts from the database backup</del>
* ✅ <del>restore even older posts not in that database, but in archives</del>

* Instagram:
* ✅ <del>write a script to create pages for instagram posts
Expand All @@ -65,15 +77,15 @@ And I have more words to write.
* Other data:
* ✅ <del>write a script to import my YouTube videos</del>
* ✅ <del>write a script to import my GIFs</del>
* write a script to import public github activity
* ✅ <del>write a script to import public github activity</del>
* ❌ write a script to import tshirt wearings
* ❌ write a script to import/easily add movie watching
* ❌ write a script to import/easily add bookmarks

* ❌ Then do everything else...
* ✅ <del>Add SSL</del>
* ✅ <del>Add logging to the S3 bucket/cloudfront</del>
* Analyse said logs
* ✅ <del>Analyse said logs</del>
* ❌ New post on the minimum amount of terraform needed to get a static site
on S3 with SSL behind CloudFront

Expand Down
6 changes: 6 additions & 0 deletions source/generate.py
Expand Up @@ -11,6 +11,7 @@
striptags,
truncatewords_html,
)
import markdown2


class AllTagsIndex(base.IndexGenerator):
Expand Down Expand Up @@ -142,6 +143,10 @@ class NotFound(base.StaticGenerator):
template_name = 'base_template.html'


def markdown(text):
return markdown2.markdown(text)


def global_context(self):
return {
'publication_range': helpers.publication_range(self),
Expand All @@ -158,6 +163,7 @@ def global_context(self):
'linebreaks': linebreaks,
'urlise': urlize,
'pluralise': pluralize,
'markdown': markdown,
'truncate': truncatewords_html,
'strip': striptags,
'capfirst': capfirst,
Expand Down

0 comments on commit feff86f

Please sign in to comment.