Coder Social home page Coder Social logo

[建议] 希望能添加对插件<highlight.js>的支持,以增强在白色/黑色模式切换的良好体验 about halo-theme-chirpy HOT 2 CLOSED

Rlxzmdd avatar Rlxzmdd commented on August 26, 2024
[建议] 希望能添加对插件的支持,以增强在白色/黑色模式切换的良好体验

from halo-theme-chirpy.

Comments (2)

Rlxzmdd avatar Rlxzmdd commented on August 26, 2024 1

https://have.somuch.work/archives/622b0b88-c21f-4777-b491-ef1e97d42613
简单实现了点mac窗口的效果,不过感觉还是挺别扭的。
打算先这样用了,默认为黑色底色。

<style>
  html[data-mode="light"] { 
    --main-bg: #f4f4f4;
    --topbar-bg: #f4f4f4;
  }
  img{
    border-radius: 6px; 
  }
  .hljs {
    border-radius: 6px; /* 调整圆角的大小 */
	background: #282828 !important;
    padding: 1.5em !important;
   }

  html:not([data-mode]) .messageText {
    fill: white !important;
  }
  html:not([data-mode]) .loopText tspan{
    fill: white !important;
  }
  html:not([data-mode]) .messageLine0{
    stroke: white !important;
  }
  
/* 基础样式 */
pre {
    position: relative; /* 为窗口控制按钮定位 */
    border-radius: 10px; /* 圆角 */
    box-shadow: 0 0 20px rgb(0 0 0 / 53%);
    padding-top: 20px; /* 内边距 */
	background: #282828 !important;
}


/* 窗口控制按钮 */
pre::before {
    content: ''; /* 伪元素内容 */
    position: absolute; /* 绝对定位 */
    top: 1em; /* 距顶部位置 */
    left: 1em; /* 距左侧位置 */
    width: 1em; /* 宽度 */
    height: 1em; /* 高度 */
    border-radius: 50%; /* 圆形 */
    background: #434547; /* 红色按钮 */
    box-shadow: 21px 0 0 #434547, 42px 0 0 #434547; /* 使用阴影来模拟其他两个按钮 */
}


  
}
</style>

image

from halo-theme-chirpy.

AirboZH avatar AirboZH commented on August 26, 2024

抱歉代码块作为基础功能还拖了一些时间,我会尽快处理代码块相关功能。
#28

from halo-theme-chirpy.

Related Issues (20)

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.