Skip to content

夢駝林 告別舊時代 v2 by xiaopanpankevinpan

Details

Authorxiaopanpankevinpan

LicenseNo License

Category夢駝林

Created

Updated

Size9.9 kB

Statistics

Learn how we calculate statistics in the FAQ.

Failed to fetch stats.

Description

夢駝林 告別舊時代,but v2

Notes

Userstyle doesn't have notes.

Source code

/* ==UserStyle==
@name           夢駝林 告別舊時代 v2
@namespace      github.com/openstyles/stylus
@version        1.0.0
@description    A new userstyle
@author         Me
==/UserStyle== */

@-moz-document domain("study.ck.tp.edu.tw"){
/*色彩*/
    
    /*@media (prefers-color-scheme: light){*/
        html{
            --bg-color: #FFF;
            --text-color: black;
            --link-color: hsl(230, 100%, 60%);
            --link-visited-color: hsl(260, 100%, 60%);
            --border-color: hsl(0, 0%, 40%);
            --account-icon: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0iYmxhY2siIHdpZHRoPSIxOHB4IiBoZWlnaHQ9IjE4cHgiPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMyA1djE0YzAgMS4xLjg5IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0yVjVjMC0xLjEtLjktMi0yLTJINWMtMS4xMSAwLTIgLjktMiAyem0xMiA0YzAgMS42Ni0xLjM0IDMtMyAzcy0zLTEuMzQtMy0zIDEuMzQtMyAzLTMgMyAxLjM0IDMgM3ptLTkgOGMwLTIgNC0zLjEgNi0zLjFzNiAxLjEgNiAzLjF2MUg2di0xeiIvPjwvc3ZnPg==");
        }
    /*}*/
    @media (prefers-color-scheme: dark){
        html{
            --bg-color: #111;
            --text-color: white;
            --link-color: hsl(230, 100%, 80%);
            --link-visited-color: hsl(260, 100%, 80%);
            --border-color: hsl(0, 0%, 70%);
            --account-icon: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0id2hpdGUiIHdpZHRoPSIxOHB4IiBoZWlnaHQ9IjE4cHgiPjxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz48cGF0aCBkPSJNMyA1djE0YzAgMS4xLjg5IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0yVjVjMC0xLjEtLjktMi0yLTJINWMtMS4xMSAwLTIgLjktMiAyem0xMiA0YzAgMS42Ni0xLjM0IDMtMyAzcy0zLTEuMzQtMy0zIDEuMzQtMyAzLTMgMyAxLjM0IDMgM3ptLTkgOGMwLTIgNC0zLjEgNi0zLjFzNiAxLjEgNiAzLjF2MUg2di0xeiIvPjwvc3ZnPgo=")
        }
        [color="#0000FF"]{
            color: hsl(240, 100%, 70%)
        }
    }
}

@-moz-document regexp(".*//study.ck.tp.edu.tw/(?!index[.]asp).+") {
/*主要*/
    /*廣泛*/
        body{
            background-color: var(--bg-color);
            color: var(--text-color);
            margin: 0;
            
            width: 100vw;
            height: 100vh;
            display: block;
            overflow: auto;
        }

        a:link{
            color: var(--link-color);
            text-decoration: none;
        }
        a:visited{
            color: var(--link-visited-color);
        }
        a:hover{
            text-decoration: underline;
        }

        table td{
            padding: 0.25em 0.5em;
        }
        
        *{
            box-sizing: border-box;
        }
    
    /*子目錄*/
        body>p:first-of-type a{
            display: inline-block;
        }
    
    /*左上方位址欄*/
        body>table:first-of-type{
            width: 100vw;
            height: 44px;
            
            padding: 0.25em 0; 
            margin: 0;
            border-spacing: 0;

            border: none!important;
            border-bottom: solid 1px var(--border-color) !important;
            
            font-size: 16px;
            
            position: fixed;
            top:0;
            left: 0;
            
            background-color: var(--bg-color);
        }
        
        body::before{
            content: "";
            display: block;
            height: 44px;
        }
    
        body>table:first-of-type tbody, body>table:first-of-type tr{
            border: none!important;
            border-spacing: 0;
            
            display: inline-block;
            overflow-x: scroll;
            
            height: calc(44px - 2 * 0.25em);
        }

        body>table:first-of-type td{
            /*清除虛線邊框*/
            border: none!important;
            border-spacing: 0;
            
            padding: 0.25em 0;
            height: 100%;
            
            display: inline-block;
            white-space: nowrap;
            
            text-align: left; 
        }
        /*處理連結*/
            body>table:first-of-type a{
                display: inline-block;
            }
        /*新增 icon*/
            body>table:first-of-type::before{
                content: "";
                background-color: white;
                background-image: url("https://upload.wikimedia.org/wikipedia/zh/3/30/CKHS_Taipei_Logo.svg");
                background-position: center; /* Center the image */
                background-repeat: no-repeat; /* Do not repeat the image */
                background-size: auto 2em;
                
                mask-image: url("https://upload.wikimedia.org/wikipedia/zh/3/30/CKHS_Taipei_Logo.svg");
                mask-position: 50% calc(50% + 1.25px); /* Center the image */
                mask-repeat: no-repeat; /* Do not repeat the image */
                mask-size: auto calc(2em + 5px);
                
                display: inline-block;
                vertical-align: middle;
                
                height: 100%;
                width: 3em;
            }
        body>table:first-of-type>tbody{
            display: inline-block;
            vertical-align: middle;
            position: relative;
            width: calc(100% - 3em - 3em - 0.5em); 
                /*icon 3em, 右上方登入 2em, 奇怪的空格 0.5em*/
            top: 0;
        }
    
    /*右上方登入*/
        body>div:first-of-type{
            display: block;
            
            font-size: 16px;

            width: 3em!important;
            height: 44px !important;

            position: fixed!important;
            left: unset!important;
            right:0!important;
            top: 0!important;
            
            z-index: 2;
        }
        /*icon*/
            body>div:first-of-type::before{
                content:"";
                
                background-image: var(--account-icon);
                background-size: 2em;
                background-position: center;
                background-repeat: no-repeat;
                
                display: inline-block;

                width: 100%;
                height: 100%;
                
                vertical-align: middle;
            }
        body>div:first-of-type>form{
            overflow-x: auto;
            padding: 0.5em;
            background-color: var(--bg-color);
            
            top: 44px;
            height: calc(100vh - 44px);
            
            position: fixed;
            transition: opacity .1s, width .1s;
            right: 0;
            
            border-left: solid 1px var(--border-color);
        }
        body>div:first-of-type:not(:hover):not(:focus-within)>form{
            width: 0;
            pointer-events: none;
            opacity: 0;
        }
        body>div:first-of-type:not(:not(:hover):not(:focus-within))>form{ /*:not(:not(a):not(b)) == :either(a, b)*/
            display: block;
            box-shadow: -30vw 100vw 0 100vw hsla(0, 0%, 0%, .5);
            width: clamp(30vw, 300px, 90vw);
            opacity: 1;
            z-index: 0;
        }
}

@-moz-document regexp(".*//study.ck.tp.edu.tw/?(index[.]asp.*)?"){
/*登入頁專用*/
    /*廣泛*/
        *{
            box-sizing: border-box;
        }

        body{
            background: var(--bg-color);/*背景顏色*/
            color: var(--text-color);
            margin: 0;
            padding: 0;
        }


    /*上方標題欄*/
        body>table:first-of-type tr:first-of-type>td:first-of-type>font:first-of-type{
            width: 100vw;
            height: 44px;
            
            padding: 0.25em 0; 
            margin: 0;
            border-spacing: 0;

            border: none!important;
            border-bottom: solid 1px var(--border-color) !important;
            
            font-size: 16px;
            
            position: fixed;
            top:0;
            left:0;
            
            background-color: var(--bg-color);
            color: var(--text-color);
        } 
        body::before{
            content: "";
            display: block;
            height: 44px;
        }
        /*新增 icon*/
            body>table:first-of-type tr:first-of-type>td:first-of-type>font:first-of-type::before{
                content: "";
                background-color: white;
                background-image: url("https://upload.wikimedia.org/wikipedia/zh/3/30/CKHS_Taipei_Logo.svg");
                background-position: center; /* Center the image */
                background-repeat: no-repeat; /* Do not repeat the image */
                background-size: auto 2em;
                
                mask-image: url("https://upload.wikimedia.org/wikipedia/zh/3/30/CKHS_Taipei_Logo.svg");
                mask-position: 50% calc(50% + 1.25px); /* Center the image */
                mask-repeat: no-repeat; /* Do not repeat the image */
                mask-size: auto calc(2em + 5px);
                
                display: inline-block;
                vertical-align: middle;
                
                height: 100%;
                width: 3em;
            }

    /*一般登入*/
    form[name="fm_login"]{
        position: absolute;
        overflow-y: auto;
        width: 40vw;
        height: 40vh;
        left: 5vw;
        top: 12vh;
    }

    /*訪客登入*/
    body>table:first-of-type tr:last-of-type{
        position: absolute;
        overflow-y:auto;
        width: 40vw;
        height: 40vh;color: 
        right: 5vw;
        top: 12vh;
    }

    /*登入提示*/
    center>table{
        width: 100%;
        height: 100%
    }
    center{
        width: 90vw;
        height: 30vh;
        position:absolute;
        top: 60vh;
        left: 5vh;
        overflow-y: auto;    
    }
    
    font[color="blue"]{
        color: hsl(240, 100%, 70%)
    }
    
}

Reviews

No reviews yet.