Coder Social home page Coder Social logo

maxlee / heti Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sivan/heti

0.0 0.0 0.0 1.27 MB

赫蹏(hètí)是专为中文内容展示设计的排版样式增强。它基于通行的中文排版规范而来,可以为网站的读者带来更好的文章阅读体验。

Home Page: https://sivan.github.io/heti/

License: MIT License

JavaScript 19.22% CSS 27.40% HTML 23.07% SCSS 30.31%

heti's Introduction

赫蹏

赫蹏(hètí)是专为中文内容展示设计的排版样式增强。它基于通行的中文排版规范而来,可以为网站的读者带来更好的文章阅读体验。

预览:https://sivan.github.io/heti/

Preview

主要特性:

  • 贴合网格的排版;
  • 全标签样式美化;
  • 预置古文、诗词样式;
  • 预置多种排版样式(行间注、多栏、竖排等);
  • 多种预设字体族(仅限桌面端);
  • 简/繁体中文支持;
  • 自适应黑暗模式;
  • 中西文混排美化,不再手敲空格👏(基于 JavaScript 脚本);
  • 全角标点挤压(基于 JavaScript 脚本);
  • 兼容 normalize.cssCSS Reset 等常见样式重置;
  • 移动端支持;
  • ……

总之,用上就会变好看。

使用方法

  1. 在页面的 <head> 标签中引入 heti.css 文件:
    <link rel="stylesheet" href="//unpkg.com/heti/umd/heti.min.css">
    
  2. 在要作用的容器元素上增加 class="heti" 的类名即可:
    <article class="entry heti">
      <h1>我的世界观</h1>
      <p>有钱人的生活就是这么朴实无华,且枯燥</p>
      ……
    </article>
    
  3. 使用增强脚本(可选):
    <script src="//unpkg.com/heti/umd/heti-addon.min.js"></script>
    <script>
      const heti = new Heti('.heti');
      heti.autoSpacing(); // 自动进行中西文混排美化和标点挤压
    </script>
    

WIP

暂时没什么想做的了。

  • 自适应黑暗模式
  • 标点挤压
  • 中、西文混排
  • 繁体中文支持
  • 诗词版式
  • 行间注版式

-- EOF --

heti's People

Contributors

sivan avatar dependabot[bot] avatar liyishuai avatar xiejiss avatar kirklin avatar xiaolai avatar ayaka14732 avatar odysa avatar leoleoasd avatar piggynl avatar hyrious avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.