Twilight Blog

Be careful of what you hate, because you are likely to be shaped by it

Apollo - Typecho Minimalist Theme

PHP 70 comments

Apollo is a portable Hexo-theme-apollo The Typecho minimalist theme, originally written by pinggod The overall theme style imitates Vue.js official website, which is more suitable for making code notes and sharing technical articles.

I have migrated it to the Typecho platform and made some corresponding extensions and enrichment. Use it if you like.

Download: typecho-theme-apollo.zip   GitHub: FaithPatrick/typecho-theme-apollo

 screenshot.png

characteristic

  • Responsive design
  • Simple and lightweight, independent of redundant third-party js libraries
  • Support Typecho native comments
  • InstantClick preload
  • Prism.js code highlighting, Pangu.js Chinese and English word segmentation

Using Help

1、 Theme installation

Download and unzip. Please rename the unzipped directory to apollo , and upload it to usr/themes Directory.
Just enable it in the Typecho background Console Appearance.

2、 Theme appearance settings

In the Typecho background "Appearance - Set Appearance", you can set the Favicon and Logo of this theme, or you can set whether to enable Instant Click preload.

If you want to enable InstantClick preload, please go to the Typecho background "Settings - Comments" and turn off "Anti spam protection", otherwise you will be unable to comment normally.

3、 Make good use of summary separator

The topic article list page will display by default the summary separator <!-- more--> If the article does not have this abstract separator, the first 255 characters of the article will be taken as the article summary (unformatted).

Recommended <!-- more--> The summary separator sets the summary for the article. In the Markdown editor of Typecho, you can use CTRL + M Insert a summary separator, or directly click the small icon for summary segmentation above the editor.

4、 Use of code highlighting

Themes integrate Prism.js , you need to specify the code highlighted language (Python is used as an example here). Markdown usage is:

```python
filename=open('sampleFile.txt')
filelines=filename.readlines()
filename.close()
```

The highlight effect is as follows

 filename=open('sampleFile.txt') filelines=filename.readlines() filename.close()

5、 Modify navigation bar links

stay header.php Filed thirty-nine Line to fifty-three OK, I believe you know how to change it. The only thing you should pay attention to is that you should not forget the judgment statement about the active class.

6、 Add archive page and friendship link page

Create a new independent page in the background of Typecho, and select from the custom template archives , leave the body blank, and then save to add an archive page.
Similarly, user-defined template selection links , you can add a friendship link page. It is recommended to use the "unordered list" for the text to display friendship links.

7、 Using APlayer in themes

First, download APlayer Typecho Plugin with HTTPS Plug in and install it.
If you do not enable InstantClick preload, all work is over. You can use APlayer normally.
If you enable InstantClick preload, you also need to footer.php Make some modifications:
find footer.php Of eighteen Line, set

 <script data-no-instant> InstantClick.on('change', function (isInitialLoad) { if (isInitialLoad === false) { if (typeof Prism !== ' undefined') Prism.highlightAll(true, null); } }); InstantClick.init(); </script>

Change to

 <script data-no-instant> if (! window.audios) { audios = []; for (var i = 0;  i < APlayers.length; i++) { audios[i] = APlayers[i].audio; } } InstantClick.on('change', function (isInitialLoad) { for (var i = 0;  i < APlayers.length; i++) { audios.push(APlayers[i].audio); } for(var i = 0;  i < audios.length; i++) {if(audios[i]){audios[i].pause()}}; if (isInitialLoad === false) { if (typeof Prism !== ' undefined') Prism.highlightAll(true, null); } }); InstantClick.init(); </script> <script> var APlayerOptions = []; </script>

After modification, APlayer can be perfectly compatible with InstantClick.

Update History

1.0.2 (2017-08-18)

  • Mobile terminal h3 style correction
  • Archive page bug repair

1.0.1 (2017-08-02)

  • Code highlighting, h3 title style modification
Recent situation in September
Comment area
 Select emoticon Select emoticon
  1. I just learned how to build a website. This topic is really comfortable! icon_redface.gif

    reply
  2. mick

    Please tell me the folder where the md written by typecho is located. Or directly exist in the database

    reply
    1. @mick

      The articles written by typecho are stored directly in the database

      reply
      1. mick
        @Kangaroo

        How to import external articles to the database

        reply
        1. @mick

          What is an external article? Md file? You may need to write your own script for migration.

          reply
  3. Thanks for sharing! The theme is used. It's very beautiful. I know it well by the way icon_mrgreen.gif

    reply
    1. @Hu Family Kid

      Thanks for your support. It's very beautiful~

      reply
  4. How to add a friendship link

    reply
    1. @Ubz

      The unordered list is used in the friendship link page, where you can put the friend chain.

      reply
  5. Thanks to the blogger's hard work, the theme of this single column is simple enough, but not boring. It looks very comfortable and has a first-class reading experience. icon_redface.gif
    I wrote an article to introduce this theme:
    https://www.npc.ink/13137.html

    reply
    1. @Muze

      Thanks for the recommendation icon_cool.gif

      reply
    2. @Muze

      https://www.npc.ink/13137.html

      reply
  6. The music is very good

    reply
  7. The theme is really simple

    reply
  8. In the past, typecho was often complained about, but now I feel that many people use typecho.

    reply
  9. Novice 1

    Why can't I comment after I install Theme? icon_confused.gif

    reply
    1. @Novice 1

      If you want to enable InstantClick preload, please go to the Typecho background "Settings - Comments" and turn off "Anti spam protection", otherwise you will be unable to comment normally.

      reply
  10. This music plug-in is my favorite, but just now I switched the comment from page 1 to page 2, and the music stopped playing.

    reply
    1. @Linhai Grassland

      Because comment paging is not Ajax, it will stop.

      reply
  11. Why is the article page blank after changing the theme? icon_biggrin.gif

    reply
    1. @Laohuang

      This is not clear. Maybe it's the PHP version?

      reply
      1. @Kangaroo

        I also encountered this problem, you can click on my home page to try. icon_eek.gif

        reply
        1. @Uncle Han

          The problem with the blank page of the article may be that a function in the topic is incompatible with the PHP version. I'll check it later.
          If problems are found, they will be repaired and notified by email.

          reply
          1. @Kangaroo

            thank you

            reply
            1. @Uncle Han

              Can you provide your environment? What system is the server? What version of PHP? Typecho version?

              reply
  12. This theme is good, I like simple and clean!

    reply
  13. 7s7x

    Hello, I like your topic very much, but I have some questions about how to add "back to the top", and how to use "category" and "tag"? icon_cry.gif  icon_cry.gif

    reply
    1. @7s7x

      I didn't think about this problem at that time. Maybe it will be added in the future version icon_confused.gif

      reply
  14. Ha ha "stole" a little comment style

    reply
    1. ..0
      reply
    2. @Loekman

      Ah ha, yes.

      reply
  15. The minimalist theme writing is very impressive icon_redface.gif

    reply