GithubHelp home page GithubHelp logo

scottkirvan / githubdhc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from krios2146/obsidian-theme-github

13.0 13.0 0.0 15.29 MB

Theme for Obsidian inspired by the GitHub Dark High Contrast theme

License: MIT License

CSS 100.00%
css dark-high-contrast markdown obsidian obsidian-md obsidian-theme theme

githubdhc's People

Contributors

krios2146 avatar scottkirvan avatar skvfx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

githubdhc's Issues

Implement support for GitHub's Warning and Note callouts

Example:

In GitHub,

> **Note**
> This is a note

> **Warning**
> This is a warning

becomes:

Note
This is a note

Warning
This is a warning

I'm not sure how best to approach this - would it require a plugin or something to accompany this theme?

Update README.md

This is just a hack page right now - I kept the original readme and just added some "notes to self" at the top. Make this it's own repo/theme, and credit/copyright it correctly.

Update main appearance settings on install

I've seen some themes that appear to override some of Obsidian's default appearance settings the first time you install -- I want to do this for this theme for things like the default font and the highlight color

additional leading space above banner with banner.css

I use the attached css snippet on some pages, when I turn on "show inline title" in settings -> appearance settings, I end up with a ton of leading space above the page title.

/* ----- banner image variants ----- */
/* ---- majority done by efemkay ---- */

body {
    --banner-height: 250px;
   }
   
   /* ---- the code below is a slightly modified version of efemkay's banner image in this forum post: https://forum.obsidian.md/t/css-how-to-style-the-first-image-in-a-note/52839/ ---- */
   
   /* banner using css only -- https://forum.obsidian.md/t/css-how-to-style-the-first-image-in-a-note/52839/ */
   
       /* make the div (in LP) containing the image doesn't control the css box-sizing */
       .internal-embed.image-embed[alt*="banner"] { 
           display: contents; 
       }
       /* original forum post snippet with minor tweak */
       .obsidian-banner img[alt*="banner"] {
           /* position: absolute; */
           position: relative; 
           top: 0;
           left: 0;
           right: 0;
           height: var(--banner-height);
           width: 100%;
           margin-right: auto;
           margin-left: auto;
           object-fit: cover;
           object-position: 50% 50%;
           overflow: hidden;
           user-select: none;
           border-radius: 0px; 
        }
        /* add option to adjust vertical position by adding the alt metadata "higher" or "lower" */
        .obsidian-banner img[alt*="banner"][alt*="higher"] { object-position: 50% 30%; }
        .obsidian-banner img[alt*="banner"][alt*="lower"] { object-position: 50% 70%; }
       
        
   
        /* ---- note title placements --- */
        .banner-title .obsidian-banner .inline-title {
            position: relative;
            margin-top: calc(var(--banner-height) - 100px);
            margin-bottom: 50px !important;
            line-height: 1.2em ;
            text-align: center;
            color: white;
            padding: 7px 0px 7px 20px !important;
            /*background: radial-gradient(circle, rgba(0, 0, 0, 0.416) 0%, rgba(0, 0, 0, 0.233) 53%, rgba(0,0,0,0) 100%);    */
        }
        
        .obsidian-banner .inline-title, .banner-fade .obsidian-banner .inline-title{
           position: relative;
           padding-top: calc(var(--banner-height) - 60px);
           z-index: 1;
        }
        .obsidian-banner img[alt*="banner-fade"], .banner-fade .obsidian-banner img[alt*="banner"]{
           -webkit-mask-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,1)), to(rgba(0,0,0,0)));
           mask-image: linear-gradient(to bottom, rgba(0,0,0,1), rgba(0,0,0,0));
       }
        .banner-title .obsidian-banner img[alt*="banner"]{
           -webkit-mask-image: none;
           mask-image: none;
        }
   
   
        .banner-notion .obsidian-banner img[alt*="banner"] {
           -webkit-mask-image: none;
           mask-image: none;
        }
        .banner-notion .obsidian-banner .inline-title{
           position: relative;
           padding-top: calc(var(--banner-height) + 5px) !important;
           line-height: 1em !important;
           font-size: 2em !important;
           padding-bottom: 0.3em;
           z-index: 1;
        }
   
       
   
   /* --- profile image --- */
   img[alt*="circle"], 
   img[alt*="profile"],
   img[alt*="round"] {
       display: block;
       border-radius: 100%;
       aspect-ratio: 1/1;
       object-fit: cover;
       width: 60%;
       position: 50% 50%;
       margin-right: auto;
       margin-left: auto;
   }
   
   /* --- float images --- */
   .markdown-rendered img[alt*="right"] {
       display: flexbox;
       float: right;
       clear:right;
       max-width: 40%;
       margin-left: 15px;
   }
   .markdown-rendered img[alt*="left"] {
       display: flexbox;
       float: left;
       clear:left;
       max-width: 40%;
       margin-right: 15px;
   }
   
   
   /* --- EXPERIMENTAL: icon image feature --- */
   /* Uncomment the section below if you want to try it out */
   /* To use, type `obsidian-icon` in the frontmatter and use the alt `icon` on an image. 
    WARNING: icons may not respond to custom page widths in certain themes.*/
   
   
   
   /*
   .obsidian-icon .inline-title {
       position: relative;
       margin-top: 175px;
       z-index: 1;
   }
   
   .obsidian-icon img[alt*="icon"] {
       position: absolute;
       top: 2em;
       left: 1.8em;
       right: unset;
       width: 9% !important;
       object-fit: cover;
       border-radius: 100%;
       aspect-ratio: 1/1;
       z-index: 1;
   }
   .obsidian-icon.is-readable-line-width img[alt*="icon"] {
       top: 2em;
       left: 26em;
       width: 9%;
   }
   
   
   
   .obsidian-banner.obsidian-icon .inline-title,
   .banner-fade .obsidian-banner.obsidian-icon .inline-title {
       margin-top: 0px;
   }
   .obsidian-banner.obsidian-icon img[alt*="icon"], .banner-fade .obsidian-banner.obsidian-icon img[alt*="icon"]{
       position: absolute;
       top: 1.2em;
       left: 1.8em;
   }
   .obsidian-banner.obsidian-icon.obsidian-icon.is-readable-line-width img[alt*="icon"], 
   .banner-fade .obsidian-banner.obsidian-icon.is-readable-line-width img[alt*="icon"] {
       position: absolute;
       top: 2.5em;
       left: 26em;
       width: 7% !important;
   }
    
   
   
   .banner-title .obsidian-banner.obsidian-icon .inline-title {
       margin-top: 3.94em;
   }
   .banner-title .obsidian-banner.obsidian-icon img[alt*="icon"] {
       top: 1.1em;
       width: 10% !important;
       left: 1.5em;
   }
   .banner-title .obsidian-banner.obsidian-icon.obsidian-icon.is-readable-line-width img[alt*="icon"] {
       top: 5.5em;
       left: 25em;
   }
   
   
   .banner-notion .obsidian-banner.obsidian-icon img[alt*="icon"] {
       top: 6.65em;
       width: 6% !important;
       left: 1.5em;
   }
   .banner-notion .obsidian-banner.obsidian-icon.obsidian-icon.is-readable-line-width img[alt*="icon"] {
       top: 6.7em;
       left: 25em;
       width: 6% !important;
   }
   */
   
/* @settings

name: Image Features
id: image-features
description: Change the banner style.
settings:
    - 
        id: banner-type
        title: Banner Style
        type: class-select
        allowEmpty: false
        default: banner-fade
        options:
            - 
                label: Fancy Title
                value: banner-title
            -
                label: Fade
                value: banner-fade
            - 
                label: Notion
                value: banner-notion
    -
        id: banner-height
        title: Banner Height
        type: variable-number-slider
        default: 250
        min: 100
        max: 350
        step: 5
        format: px
*/


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.