1
0
mirror of https://github.com/writeas/writefreely synced 2024-12-12 08:36:14 +01:00
Commit Graph

17 Commits

Author SHA1 Message Date
Marcel van der Boom
f40ce14fb2 Resolve an edge case where last language has error
If there are multiple language blocks on a page, we set the
onload on the last one to load all highlighting at once.

If the last language block has an error, the onload would
never fire and thus all blocks would not be highlighted.

The simplest resolution is to fire the callback regardless. We've
already loaded everything so running the callback is not causing any
performance hit which is relevant I think.
2019-03-05 14:36:40 +01:00
Matt Baer
25a68d0c0e Add Reader section
This adds a "Reader" section of the site for admins who want to enable
it for their instance. That means visitors can go to /read and see who
has publicly shared their writing. They can also follow all public posts
via RSS by going to /read/feed/. Writers on an instance with this
`local_timeline` setting enabled can publish to the timeline by going
into their blog settings and choosing the "Public" visibility setting.

The `local_timeline` feature is disabled by default, as is the Public
setting on writer blogs. Enabling it adds a "Reader" navigation item and
enables the reader endpoints. This feature will also consume more
memory, as public posts are cached in memory for 10 minutes.

These changes include code ported over from Read.Write.as, and thus
include some experimental features like filtering public posts by tags
and authors. These features aren't well-tested or complete.

Closes T554
2018-12-10 16:08:07 -05:00
Matt Baer
9e466a6d23 Locally host MathJax
This closes T551
2018-12-07 16:50:29 -05:00
Matt Baer
860e8c0120 Locally host highlightjs
Part of T551
2018-12-07 16:37:14 -05:00
Matt Baer
5fc41687be Fix whitespace 2018-12-03 12:18:04 -05:00
Marcel van der Boom
3b4d14f194 Only push language uri once on load stack 2018-11-29 17:36:50 +01:00
Marcel van der Boom
c6e4967728 Add support for all languages
- dynamically construct a list of languages to load
- fire hightlighting once last file has loaded
2018-11-29 16:25:53 +01:00
Matt Baer
2b5e869916 Rename render.tmpl to post-render.tmpl 2018-11-23 12:37:59 -05:00
Matt Baer
246a6dc554 Fix whitespace in highlight JS 2018-11-23 12:37:59 -05:00
Marcel van der Boom
a54f5fc9d8 Fix typos 2018-11-22 16:03:44 +01:00
Marcel van der Boom
e400fe1649 Only load highlght css when needed 2018-11-22 15:01:11 +01:00
Marcel van der Boom
add06ee56c Only load js when there are blocks to highlight
Crux was the load event for the script tag inserted.
2018-11-22 14:31:25 +01:00
Marcel van der Boom
a659acdc14 Bring all MathJax logic into one common template
Might as well do this right away, we're here anyway.
2018-11-20 22:01:25 +01:00
Marcel van der Boom
a82882fddc Put the highlight logic into one common template
It now loads unconditionally and highlights all code blocks.

TODO: optimize to not load when there are no blocks
2018-11-20 21:51:39 +01:00
Matt Baer
001fc8bb2d Fully support single-user mode
- New editor nav
- New backend nav
- Support for drafts
- Different footers on backend
2018-11-09 22:10:46 -05:00
Matt Baer
44e0657ef9 Update footer links with guide link, version num 2018-11-09 14:38:03 -05:00
Matt Baer
af872127c6 Add user-facing templates and pages 2018-11-08 01:13:00 -05:00