├── BACKERS.md ├── pages ├── nodemon.json ├── src │ ├── docs │ │ ├── form │ │ │ ├── index.pug │ │ │ ├── range.md │ │ │ ├── textarea.md │ │ │ ├── radio.md │ │ │ └── checkbox.md │ │ ├── components │ │ │ ├── index.pug │ │ │ ├── pagination.md │ │ │ ├── nav.md │ │ │ ├── breadcrumb.md │ │ │ ├── placeholder.md │ │ │ └── tabs.md │ │ ├── container │ │ │ ├── index.pug │ │ │ ├── element-group.md │ │ │ └── basic.md │ │ ├── elements │ │ │ ├── index.pug │ │ │ ├── note-block.md │ │ │ ├── divider.md │ │ │ ├── progress.md │ │ │ ├── spinner.md │ │ │ ├── avatar.md │ │ │ ├── tooltip.md │ │ │ └── chip.md │ │ ├── helpers │ │ │ └── index.pug │ │ ├── general │ │ │ ├── index.pug │ │ │ ├── breakpoints.md │ │ │ ├── build-variants.md │ │ │ ├── theme.md │ │ │ ├── build-a-theme.md │ │ │ └── getting-started.md │ │ ├── _includes │ │ │ ├── copy-toast.pug │ │ │ ├── sponsors.pug │ │ │ ├── tail.pug │ │ │ ├── footer.pug │ │ │ ├── bottombar.pug │ │ │ ├── head.pug │ │ │ └── sidenav.pug │ │ ├── swBase.js │ │ ├── base.pug │ │ └── navigationData.json │ ├── _includes │ │ └── tail.pug │ ├── stylesheets │ │ ├── imports │ │ │ ├── _theme.scss │ │ │ ├── docsearch │ │ │ │ ├── main.scss │ │ │ │ └── _variables.scss │ │ │ ├── _footer.scss │ │ │ ├── _values.scss │ │ │ ├── _dimmer.scss │ │ │ ├── _navbar.scss │ │ │ ├── _searchbar.scss │ │ │ ├── _worker-toast.scss │ │ │ ├── _search.scss │ │ │ ├── _bottombar.scss │ │ │ ├── editor │ │ │ │ └── theme.scss │ │ │ └── _highlight.scss │ │ ├── 404.scss │ │ ├── doc-front.scss │ │ ├── download.scss │ │ ├── homepage.scss │ │ └── support.scss │ ├── scripts │ │ └── worker.js │ ├── _mixins.pug │ ├── 404.pug │ └── support.pug ├── tocopy │ ├── docs │ │ ├── offliner.js │ │ └── manifest.json │ ├── mainOffliner.js │ ├── resources │ │ ├── lexend.ttf │ │ ├── favicon.png │ │ ├── icon-512.png │ │ ├── profile.png │ │ ├── brand_logo.png │ │ ├── varela-round.ttf │ │ ├── jetbrains-mono.ttf │ │ ├── material-icons.woff2 │ │ ├── patreon.svg │ │ ├── ko-fi.svg │ │ ├── fonts.css │ │ ├── codepen.svg │ │ ├── zusty.svg │ │ └── jsfiddle.svg │ └── scripts │ │ ├── theme-apply.js │ │ ├── homepage.js │ │ └── site.js ├── b │ ├── config.js │ ├── workbox-config.js │ ├── buildSassData.js │ ├── runAutoprefixer.js │ ├── copyFiles.js │ ├── browserSync.js │ ├── renderSass.js │ ├── renderPug.js │ ├── renderMd.js │ └── mdPlugins.js ├── webpack.config.js ├── Syntax.md ├── README.md └── package.json ├── .gitattributes ├── scss ├── variants │ ├── zusty-prefixless.scss │ ├── parted │ │ ├── theme.scss │ │ └── zusty.scss │ └── theme.scss ├── helpers │ ├── _.scss │ └── text.scss ├── core │ ├── _.scss │ ├── _var-only.scss │ ├── _parted.scss │ ├── extends.scss │ ├── reset.scss │ ├── colors.scss │ ├── mixins.scss │ ├── base-styles.scss │ └── functions.scss ├── form │ ├── _.scss │ ├── range.scss │ ├── radio.scss │ ├── container.scss │ ├── textarea.scss │ ├── switch.scss │ └── checkbox.scss ├── elements │ ├── _.scss │ ├── divider.scss │ ├── note-block.scss │ ├── chip.scss │ ├── avatar.scss │ ├── table.scss │ ├── progress.scss │ └── spinner.scss └── components │ ├── _.scss │ ├── nav.scss │ ├── breadcrumb.scss │ ├── placeholder.scss │ ├── card.scss │ ├── pagination.scss │ ├── badge.scss │ └── tabs.scss ├── .gitignore ├── postcss.config.js ├── .browserslistrc ├── updateVer.js ├── zusty.scss ├── .travis.yml ├── .github ├── workflows │ └── nodejs.yml └── ISSUE_TEMPLATE │ ├── feature_request.md │ └── bug_report.md ├── LICENSE.md ├── stylelint.config.js ├── README.md └── package.json /BACKERS.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pages/nodemon.json: -------------------------------------------------------------------------------- 1 | { 2 | "ignore": ["*.json"] 3 | } 4 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * linguist-vendored 2 | *.css linguist-vendored=false 3 | -------------------------------------------------------------------------------- /pages/src/docs/form/index.pug: -------------------------------------------------------------------------------- 1 | include ../../_mixins.pug 2 | +redirect('basics') 3 | -------------------------------------------------------------------------------- /pages/tocopy/docs/offliner.js: -------------------------------------------------------------------------------- 1 | self.registration.unregister({ immediate: true }) 2 | -------------------------------------------------------------------------------- /pages/tocopy/mainOffliner.js: -------------------------------------------------------------------------------- 1 | self.registration.unregister({ immediate: true }) 2 | -------------------------------------------------------------------------------- /pages/src/docs/components/index.pug: -------------------------------------------------------------------------------- 1 | include ../../_mixins.pug 2 | +redirect('badge') 3 | -------------------------------------------------------------------------------- /pages/src/docs/container/index.pug: -------------------------------------------------------------------------------- 1 | include ../../_mixins.pug 2 | +redirect('basic') 3 | -------------------------------------------------------------------------------- /pages/src/docs/elements/index.pug: -------------------------------------------------------------------------------- 1 | include ../../_mixins.pug 2 | +redirect('avatar') 3 | -------------------------------------------------------------------------------- /pages/src/docs/helpers/index.pug: -------------------------------------------------------------------------------- 1 | include ../../_mixins.pug 2 | +redirect('general') 3 | -------------------------------------------------------------------------------- /scss/variants/zusty-prefixless.scss: -------------------------------------------------------------------------------- 1 | $prefix: ''; 2 | 3 | @import '../../zusty'; 4 | -------------------------------------------------------------------------------- /pages/b/config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | debug: false, 3 | version: '1.2.0' 4 | } 5 | -------------------------------------------------------------------------------- /pages/src/docs/general/index.pug: -------------------------------------------------------------------------------- 1 | include ../../_mixins.pug 2 | +redirect('getting-started') 3 | -------------------------------------------------------------------------------- /scss/helpers/_.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | @import "color"; 4 | @import "general"; 5 | @import "text"; 6 | -------------------------------------------------------------------------------- /pages/tocopy/resources/lexend.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sarsamurmu/zusty/HEAD/pages/tocopy/resources/lexend.ttf -------------------------------------------------------------------------------- /pages/tocopy/resources/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sarsamurmu/zusty/HEAD/pages/tocopy/resources/favicon.png -------------------------------------------------------------------------------- /pages/tocopy/resources/icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sarsamurmu/zusty/HEAD/pages/tocopy/resources/icon-512.png -------------------------------------------------------------------------------- /pages/tocopy/resources/profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sarsamurmu/zusty/HEAD/pages/tocopy/resources/profile.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | package-lock.json 3 | 4 | demo/ 5 | pages/public/ 6 | 7 | *.dat 8 | *.map 9 | *.cmd 10 | -------------------------------------------------------------------------------- /pages/tocopy/resources/brand_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sarsamurmu/zusty/HEAD/pages/tocopy/resources/brand_logo.png -------------------------------------------------------------------------------- /pages/tocopy/resources/varela-round.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sarsamurmu/zusty/HEAD/pages/tocopy/resources/varela-round.ttf -------------------------------------------------------------------------------- /pages/src/_includes/tail.pug: -------------------------------------------------------------------------------- 1 | if (!debug) 2 | script(src='/scripts/worker.js') 3 | script. 4 | registerWorker('/offliner.js'); 5 | -------------------------------------------------------------------------------- /pages/tocopy/resources/jetbrains-mono.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sarsamurmu/zusty/HEAD/pages/tocopy/resources/jetbrains-mono.ttf -------------------------------------------------------------------------------- /pages/tocopy/resources/material-icons.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sarsamurmu/zusty/HEAD/pages/tocopy/resources/material-icons.woff2 -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require('cssnano')({ 4 | preset: 'default' 5 | }) 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /scss/core/_.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | @import "var-only"; 4 | @import "theme-colors-css"; 5 | @import "base-styles"; 6 | @import "reset"; 7 | -------------------------------------------------------------------------------- /pages/src/docs/_includes/copy-toast.pug: -------------------------------------------------------------------------------- 1 | .copy-toast#copyToast 2 | span.zust-icon.zust-large 3 | i.material-icons check 4 | span.text Successfully Copied 5 | -------------------------------------------------------------------------------- /scss/core/_var-only.scss: -------------------------------------------------------------------------------- 1 | @import "functions"; 2 | @import "colors"; 3 | @import "theme-colors-var"; 4 | @import "variables"; 5 | @import "mixins"; 6 | @import "extends"; 7 | -------------------------------------------------------------------------------- /scss/variants/parted/theme.scss: -------------------------------------------------------------------------------- 1 | @import '../../core/functions'; 2 | @import '../../core/variables'; 3 | @import '../../core/colors'; 4 | @import '../../core/theme-colors-var'; 5 | @import '../../core/theme-colors-css'; 6 | -------------------------------------------------------------------------------- /.browserslistrc: -------------------------------------------------------------------------------- 1 | last 5 Chrome versions 2 | last 5 Firefox versions 3 | last 5 Explorer versions 4 | last 5 iOS versions 5 | last 5 Opera versions 6 | last 5 Safari versions 7 | last 5 Android versions 8 | last 5 Edge versions 9 | -------------------------------------------------------------------------------- /scss/variants/theme.scss: -------------------------------------------------------------------------------- 1 | $just-base-theme: true; 2 | 3 | @import '../core/functions'; 4 | @import '../core/variables'; 5 | @import '../core/colors'; 6 | @import '../core/theme-colors-var'; 7 | @import '../core/theme-colors-css'; 8 | -------------------------------------------------------------------------------- /scss/form/_.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | @import "checkbox"; 4 | @import "container"; 5 | @import "input"; 6 | @import "radio"; 7 | @import "range"; 8 | @import "select"; 9 | @import "switch"; 10 | @import "textarea"; 11 | -------------------------------------------------------------------------------- /scss/core/_parted.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | @import "functions"; 4 | @import "colors"; 5 | @import "theme-colors-var"; 6 | @import "variables"; 7 | @import "mixins"; 8 | @import "extends"; 9 | @import "base-styles"; 10 | @import "reset"; 11 | -------------------------------------------------------------------------------- /scss/variants/parted/zusty.scss: -------------------------------------------------------------------------------- 1 | $css-variable-enabled: true; 2 | 3 | @import '../../core/_parted'; 4 | @import '../../elements/'; 5 | @import '../../form/'; 6 | @import '../../components/'; 7 | @import '../../helpers/'; 8 | @import '../../container'; 9 | -------------------------------------------------------------------------------- /updateVer.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const pkg = require('./package.json'); 3 | 4 | let scssFile = fs.readFileSync('./zusty.scss').toString(); 5 | 6 | scssFile = scssFile.replace(/v([\d\.]+)/g, `v${pkg.version}`); 7 | 8 | fs.writeFileSync('./zusty.scss', scssFile); 9 | -------------------------------------------------------------------------------- /pages/src/stylesheets/imports/_theme.scss: -------------------------------------------------------------------------------- 1 | :root, [zust-theme="light"] { 2 | --scrollbar-color: #BDBDBD; 3 | --sidenav-bg-color: hsl(0, 0%, 96%); 4 | } 5 | 6 | [zust-theme="dark"] { 7 | --scrollbar-color: #616161; 8 | --sidenav-bg-color: hsl(0, 0%, 18%); 9 | } 10 | -------------------------------------------------------------------------------- /scss/core/extends.scss: -------------------------------------------------------------------------------- 1 | %full-width { 2 | width: -webkit-fill-available; 3 | width: -moz-available; 4 | width: fill-available; 5 | } 6 | 7 | %full-height { 8 | height: -webkit-fill-available; 9 | height: -moz-available; 10 | height: fill-available; 11 | } 12 | -------------------------------------------------------------------------------- /scss/elements/_.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | @import "avatar"; 4 | @import "button"; 5 | @import "chip"; 6 | @import "divider"; 7 | @import "icon"; 8 | @import "note-block"; 9 | @import "progress"; 10 | @import "spinner"; 11 | @import "table"; 12 | @import "tooltip"; 13 | -------------------------------------------------------------------------------- /pages/src/stylesheets/imports/docsearch/main.scss: -------------------------------------------------------------------------------- 1 | @import 'variables'; 2 | @import 'dropdown'; 3 | @import 'searchbox'; 4 | 5 | $searchbox: true !default; 6 | 7 | @if ($searchbox == true) { 8 | @include searchbox($searchbox-config...); 9 | } 10 | 11 | @include dropdown($dropdown-config...); 12 | -------------------------------------------------------------------------------- /scss/components/_.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | @import "badge"; 4 | @import "breadcrumb"; 5 | @import "card"; 6 | @import "dropdown"; 7 | @import "modal"; 8 | @import "nav"; 9 | @import "navbar"; 10 | @import "pagination"; 11 | @import "placeholder"; 12 | @import "raw-progress"; 13 | @import "tabs"; 14 | -------------------------------------------------------------------------------- /pages/b/workbox-config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | globDirectory: 'public/', 3 | globPatterns: [ 4 | '**/*.{js,html,png,svg,css,json,ttf,woff2}' 5 | ], 6 | globIgnores: [ 7 | 'mainOffliner.js' 8 | ], 9 | swSrc: 'src/docs/swBase.js', 10 | swDest: 'public/offliner.js', 11 | maximumFileSizeToCacheInBytes: 5 * 1024 * 1024 12 | }; 13 | -------------------------------------------------------------------------------- /pages/src/stylesheets/imports/_footer.scss: -------------------------------------------------------------------------------- 1 | .site-footer { 2 | position: absolute; 3 | left: 0; 4 | right: 0; 5 | margin-top: 20px; 6 | background-color: var(--light-color); 7 | font-family: 'Lexend', sans-serif !important; 8 | padding: 10px 30px; 9 | font-size: 14px; 10 | 11 | * { 12 | font-family: 'Lexend', sans-serif !important; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /pages/b/buildSassData.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const glob = require('glob'); 3 | 4 | const dataJson = {}; 5 | 6 | glob.sync('./node_modules/zusty/**/*.scss').forEach((path) => { 7 | dataJson[path.replace('./node_modules/zusty/', '')] = fs.readFileSync(path).toString(); 8 | }); 9 | 10 | fs.writeFileSync('public/scripts/sassData.json', JSON.stringify(dataJson)); 11 | -------------------------------------------------------------------------------- /zusty.scss: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | /*! 4 | * Zusty v1.2.0 5 | * Copyright (c) Sarsa Murmu 2019-present 6 | * Repository https://github.com/sarsamurmu/zusty 7 | * Licensed under The MIT License 8 | */ 9 | 10 | @import "scss/core/"; 11 | @import "scss/elements/"; 12 | @import "scss/form/"; 13 | @import "scss/components/"; 14 | @import "scss/helpers/"; 15 | @import "scss/container"; 16 | -------------------------------------------------------------------------------- /pages/b/runAutoprefixer.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const glob = require('glob'); 3 | 4 | const autoprefixer = require('autoprefixer'); 5 | const postcss = require('postcss'); 6 | 7 | glob.sync('./public/stylesheets/*.css').forEach((filePath) => { 8 | postcss([ autoprefixer ]).process(fs.readFileSync(filePath).toString(), { from: undefined }).then((result) => { 9 | fs.writeFileSync(filePath, result.css); 10 | }) 11 | }); 12 | -------------------------------------------------------------------------------- /pages/src/docs/swBase.js: -------------------------------------------------------------------------------- 1 | importScripts('https://storage.googleapis.com/workbox-cdn/releases/5.1.1/workbox-sw.js'); 2 | 3 | workbox.core.setCacheNameDetails({ prefix: 'Zusty' }); 4 | workbox.core.skipWaiting(); 5 | workbox.core.clientsClaim(); 6 | 7 | workbox.precaching.precacheAndRoute(self.__WB_MANIFEST, { 8 | cleanUrls: true 9 | }); 10 | 11 | workbox.googleAnalytics.initialize(); 12 | workbox.precaching.cleanupOutdatedCaches(); 13 | -------------------------------------------------------------------------------- /pages/src/stylesheets/imports/_values.scss: -------------------------------------------------------------------------------- 1 | // Screen Sizes 2 | $tablet: 769px; 3 | $desktop: 1024px; 4 | 5 | // Text Sizes 6 | $xlarge-text: x-large; 7 | $large-text: larger; 8 | $medium-text: medium; 9 | $small-text: small; 10 | 11 | // Button 12 | $button-border-radius: 6px; 13 | 14 | // z-indexs 15 | $dropdown-z-index: 5; 16 | 17 | // Misc; Don't change them 18 | $border-radius-full: 999999px; 19 | $primary-transition: 0.2s; 20 | $secondary-transition: 0.5s; 21 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "12" 4 | script: npm run build 5 | # For Discord Webhook 6 | after_success: 7 | - wget https://raw.githubusercontent.com/sarsamurmu/travis-ci-discord-webhook/master/send.sh 8 | - chmod +x send.sh 9 | - ./send.sh success $WEBHOOK_URL 10 | after_failure: 11 | - wget https://raw.githubusercontent.com/sarsamurmu/travis-ci-discord-webhook/master/send.sh 12 | - chmod +x send.sh 13 | - ./send.sh failure $WEBHOOK_URL 14 | -------------------------------------------------------------------------------- /pages/src/stylesheets/imports/_dimmer.scss: -------------------------------------------------------------------------------- 1 | .dimmer { 2 | z-index: 9; 3 | background-color: var(--dimmer-bg-color); 4 | position: fixed; 5 | top: 0; 6 | left: 0; 7 | width: 100%; 8 | height: 100%; 9 | opacity: 0; 10 | visibility: hidden; 11 | transition: all 0.5s ease 0s, visibility 0s ease 0.5s; 12 | 13 | &.zust--visible { 14 | opacity: 1; 15 | visibility: visible; 16 | transition: all 0.5s ease 0.1s, visibility 0s ease 0s; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /scss/core/reset.scss: -------------------------------------------------------------------------------- 1 | // Resetting Outline 2 | *, *:focus, *:hover, *:active, *:focus-within { 3 | outline: none !important; 4 | outline-width: 0 !important; 5 | outline-color: $transparent !important; 6 | } 7 | 8 | .#{$prefix}btn, label { 9 | @include large { 10 | cursor: pointer; 11 | } 12 | 13 | @include until-large { 14 | cursor: default; 15 | } 16 | } 17 | 18 | *, *:after, *:before { 19 | box-sizing: border-box; 20 | -webkit-tap-highlight-color: $transparent; 21 | } 22 | -------------------------------------------------------------------------------- /pages/src/docs/base.pug: -------------------------------------------------------------------------------- 1 | doctype html 2 | html(lang='en' dir='ltr') 3 | include ../_mixins.pug 4 | head 5 | title #{title} - Zusty CSS 6 | meta(property="og:title" content=`${title} - Zusty CSS`) 7 | include _includes/head.pug 8 | block extraHead 9 | | !{extraHead} 10 | body 11 | include _includes/bottombar.pug 12 | include _includes/sidenav.pug 13 | 14 | +updateBanner 15 | 16 | block content 17 | | !{inner} 18 | 19 | include _includes/tail.pug 20 | -------------------------------------------------------------------------------- /pages/src/stylesheets/404.scss: -------------------------------------------------------------------------------- 1 | @import '../../../scss/core/var-only'; 2 | @import "imports/navbar"; 3 | @import "imports/footer"; 4 | 5 | @import "/resources/fonts.css"; 6 | 7 | body { 8 | font-family: 'Varela Round', sans-serif; 9 | padding-top: 80px; 10 | 11 | @include large { 12 | padding-top: 100px; 13 | } 14 | } 15 | 16 | h1, h2, h3 { 17 | font-family: 'Lexend', sans-serif; 18 | font-weight: normal; 19 | } 20 | 21 | .site-footer { 22 | position: absolute; 23 | bottom: 0; 24 | } 25 | -------------------------------------------------------------------------------- /.github/workflows/nodejs.yml: -------------------------------------------------------------------------------- 1 | name: Node CI 2 | 3 | on: [push] 4 | 5 | jobs: 6 | build: 7 | 8 | runs-on: ubuntu-latest 9 | 10 | strategy: 11 | matrix: 12 | node-version: [12.x] 13 | 14 | steps: 15 | - uses: actions/checkout@v1 16 | - name: Use Node.js ${{ matrix.node-version }} 17 | uses: actions/setup-node@v1 18 | with: 19 | node-version: ${{ matrix.node-version }} 20 | - name: npm install and build 21 | run: | 22 | npm install 23 | npm run build 24 | env: 25 | CI: true 26 | -------------------------------------------------------------------------------- /pages/src/stylesheets/doc-front.scss: -------------------------------------------------------------------------------- 1 | @import "./../../../scss/core/var-only"; 2 | @import "imports/navbar"; 3 | @import "imports/worker-toast"; 4 | @import "imports/footer"; 5 | 6 | @import "/resources/fonts.css"; 7 | 8 | body { 9 | font-family: 'Varela Round', sans-serif; 10 | padding: 18px; 11 | padding-top: 100px; 12 | 13 | @include large { 14 | padding-top: 100px; 15 | padding-left: 253px; 16 | padding-right: 228px; 17 | } 18 | } 19 | 20 | h1, h2, h3, h4, h5 { 21 | font-family: 'Lexend', sans-serif; 22 | font-weight: normal; 23 | } 24 | 25 | .site-footer { 26 | margin-top: 80px; 27 | } 28 | -------------------------------------------------------------------------------- /pages/src/stylesheets/imports/_navbar.scss: -------------------------------------------------------------------------------- 1 | @import '../../../../scss/core/var-only'; 2 | 3 | .zust-navbar { 4 | * { 5 | font-family: 'Lexend', sans-serif !important; 6 | } 7 | 8 | @include large { 9 | .zust-header { 10 | padding: 20px; 11 | } 12 | } 13 | 14 | img { 15 | transition: 0.4s; 16 | 17 | + span { 18 | transition: 0.4s; 19 | } 20 | } 21 | 22 | &.hideLogo { 23 | img { 24 | transform: translateY(-100px); 25 | 26 | + span { 27 | transform: translateX(-40px); 28 | } 29 | } 30 | } 31 | 32 | span > span { 33 | opacity: 0.6; 34 | font-size: 16px; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /pages/tocopy/resources/patreon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scss/elements/divider.scss: -------------------------------------------------------------------------------- 1 | @if $css-variable-enabled { 2 | $primary-transition: var(--primary-transition); 3 | } 4 | 5 | [divider]:not(hr), .#{$prefix}divider { 6 | display: flex; 7 | align-items: center; 8 | justify-content: center; 9 | white-space: nowrap; 10 | transition: $primary-transition; 11 | 12 | &:after, &:before { 13 | content: ''; 14 | background-color: var(--divider-color); 15 | height: 4px; 16 | width: 100%; 17 | opacity: 0.5; 18 | border-radius: 100px; 19 | transition: $primary-transition; 20 | } 21 | 22 | &:after { 23 | margin-left: 10px; 24 | } 25 | 26 | &:before { 27 | margin-right: 10px; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /pages/src/docs/_includes/sponsors.pug: -------------------------------------------------------------------------------- 1 | include ../../_mixins.pug 2 | div.docs-sponsor-main 3 | hr.h(divider) 4 | .docs-sponsor-container 5 | //-div Sponsor 6 | p.zust-text-center Get involved in improving Zusty CSS. 7 | a(href="https://github.com/sarsamurmu/zusty/issues/new?template=bug_report.md").zust-btn.zust-fullwidth Report a Bug 8 | a(href="https://github.com/sarsamurmu/zusty/issues/new?template=feature_request.md").zust-btn.zust-fullwidth Feature Request 9 | //- 10 | br 11 | br 12 | p If you liked Zusty CSS, Then please 13 | a(href=`../../support${htmlExt}`).zust-btn.zust-link.zust-fullwidth.zust-link 14 | | Support Us 15 | //-hr(divider) 16 | -------------------------------------------------------------------------------- /pages/tocopy/docs/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Zusty Docs", 3 | "name": "Docs - Zusty CSS", 4 | "description": "Full Documentation of Zusty CSS Framework.", 5 | "background_color": "#FFFFFF", 6 | "display": "standalone", 7 | "icons": [ 8 | { 9 | "src": "/resources/favicon.png", 10 | "type": "image/png", 11 | "sizes": "192x192" 12 | }, 13 | { 14 | "src": "/resources/icon-512.png", 15 | "type": "image/png", 16 | "sizes": "512x512" 17 | } 18 | ], 19 | "start_url": "/docs/", 20 | "scope": "/docs/", 21 | "serviceworker": { 22 | "src": "../offliner.js" 23 | }, 24 | "categories": ["education"], 25 | "lang": "en-US" 26 | } 27 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | --- 8 | 9 | **Is your feature request related to a problem? Please describe.** 10 | 11 | 12 | **Describe the solution you'd like** 13 | 14 | 15 | **Describe alternatives you've considered** 16 | 17 | 18 | **Additional context** 19 | 20 | -------------------------------------------------------------------------------- /pages/tocopy/scripts/theme-apply.js: -------------------------------------------------------------------------------- 1 | // Getting Theme Data from URL 2 | var aPageURL = window.location.href; 3 | var darkURL = aPageURL.includes("theme=dark"); 4 | var lightURL = aPageURL.includes("theme=light"); 5 | 6 | if (darkURL === true) { localStorage.setItem('theme', 'dark') } 7 | if (lightURL === true) { localStorage.setItem('theme', 'light') } 8 | 9 | const aCurrentTheme = localStorage.getItem('theme'); 10 | const aMetaTheme = document.querySelector('meta[name=theme-color]'); 11 | 12 | if (aCurrentTheme) { 13 | document.documentElement.setAttribute('zust-theme', aCurrentTheme); 14 | 15 | if (aCurrentTheme === "dark") { 16 | aMetaTheme.setAttribute('content', '#212121'); 17 | } 18 | } else { 19 | localStorage.setItem('theme', 'light'); 20 | } 21 | -------------------------------------------------------------------------------- /pages/src/docs/general/breakpoints.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Breakpoints 3 | --- 4 | 5 | # Breakpoints 6 | Zusty has four breakpoints by default. You can even extend it. [Learn more about extending breakpoints](../general/variables#extending-breakpoints). 7 | 8 | Breakpoints are 9 | - `small`{.tag} 10 | - `medium`{.tag} 11 | - `until-large`{.tag} 12 | - `large`{.tag} 13 | 14 | If a modifier says that it has support for breakpoints. Then the modifier can be applied in this way for any breakpoint only `{comment}(modifier-class)@{comment}(breakpoint-name)`{.string}. 15 | 16 | Here's an example 17 | You may know, you can use `zust-hidden`{.class} class to hide any element. 18 | What if you want to hide it only on `small`{.tag} screens? 19 | Simply use class `zust-hidden@small`{.class}. 20 | -------------------------------------------------------------------------------- /pages/tocopy/scripts/homepage.js: -------------------------------------------------------------------------------- 1 | window.addEventListener('DOMContentLoaded', () => { 2 | window.qs = document.querySelector.bind(document); 3 | 4 | const nav = qs('nav'); 5 | 6 | window.isElementInViewport = (el) => { 7 | var rect = el.getBoundingClientRect(); 8 | 9 | return ( 10 | rect.top >= 0 && 11 | rect.left >= 0 && 12 | rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) && 13 | rect.right <= (window.innerWidth || document.documentElement.clientWidth) 14 | ) 15 | } 16 | 17 | window.addEventListener('scroll', () => { 18 | if (isElementInViewport(qs('.hero > img'))) { 19 | nav.classList.add('hideLogo') 20 | } else { 21 | nav.classList.remove('hideLogo') 22 | } 23 | }) 24 | }) 25 | -------------------------------------------------------------------------------- /pages/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const TerserPlugin = require('terser-webpack-plugin'); 3 | 4 | module.exports = [{ 5 | name: 'default', 6 | entry: { 7 | docs: './src/scripts/docs.js', 8 | worker: './src/scripts/worker.js', 9 | download: './src/scripts/download.js' 10 | }, 11 | output: { 12 | filename: '[name].js', 13 | path: path.join(__dirname, 'public', 'scripts') 14 | }, 15 | resolve: { 16 | enforceExtension: false, 17 | enforceModuleExtension: false, 18 | extensions: ['.js'], 19 | modules: ['node_modules'] 20 | }, 21 | optimization: { 22 | minimizer: [ 23 | new TerserPlugin({ 24 | terserOptions: { 25 | output: { 26 | comments: false 27 | } 28 | } 29 | }) 30 | ] 31 | } 32 | }] 33 | -------------------------------------------------------------------------------- /pages/b/copyFiles.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const glob = require('glob'); 3 | const path = require('path'); 4 | const chokidar = require('chokidar'); 5 | 6 | const args = process.argv.splice(2, process.argv.length - 2); 7 | 8 | const dirToCopy = './tocopy/'; 9 | 10 | const copyFiles = () => { 11 | glob.sync(dirToCopy + '**/*.*').forEach((file) => { 12 | fs.mkdirSync(path.dirname(file.replace('tocopy', 'public')), { 13 | recursive: true 14 | }); 15 | fs.copyFileSync(file, file.replace('tocopy', 'public')) 16 | }); 17 | } 18 | 19 | if (args.includes('-w')) { 20 | chokidar.watch(dirToCopy).on('all', copyFiles); 21 | } else { 22 | copyFiles(); 23 | fs.copyFileSync('./node_modules/sass.js/dist/sass.js', './public/scripts/sass.js'); 24 | fs.copyFileSync('./node_modules/sass.js/dist/sass.worker.js', './public/scripts/sass.worker.js'); 25 | fs.copyFileSync('../dist/zusty.min.css', './public/resources/zusty.min.css'); 26 | } 27 | -------------------------------------------------------------------------------- /pages/src/docs/_includes/tail.pug: -------------------------------------------------------------------------------- 1 | include copy-toast.pug 2 | #nextPrevContainer 3 | a.next 4 | span.type Next 5 | span.title Sample 6 | a.prev 7 | span.type Previous 8 | span.title Sample 9 | include sponsors.pug 10 | include footer.pug 11 | //- Dimmer 12 | .dimmer(onclick='hideSidenav()') 13 | //- Search 14 | .search-container 15 | .input-box 16 | .zust-flex.zust-justify-between 17 | span Rapid Search Inside of Docs 18 | label.zust-switch 19 | span DocSearch 20 | input(type='checkbox' id='searchProvider') 21 | span 22 | br 23 | .zust-form-el 24 | input#searchInput.zust-input(type="text" placeholder="Search for words, pages etc. Ex. checkbox") 25 | div 26 | input#docSearch.zust-input(type="text" placeholder="Search for words, pages etc. Ex. checkbox") 27 | #searchResult 28 | script(src='/scripts/docs.js') 29 | if (!debug) 30 | script. 31 | registerWorker('/offliner.js'); 32 | -------------------------------------------------------------------------------- /pages/src/docs/elements/note-block.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Note Block 3 | --- 4 | 5 | # Note Block 6 | A note block for message. 7 | 8 | --- 9 | 10 | 11 | ## Structure 12 | ```html {snippet} 13 |
It is just a note block
16 |Hey it's primary
28 |This is warning, just ignore.
33 |Check for faulty parts.
38 |Faulty thing fixed!
43 |Finally Link?
48 |Simple divider
14 |With content
16 |This is my paragraph about Zusty CSS.
46 | ``` 47 | --- 48 | -------------------------------------------------------------------------------- /scss/elements/note-block.scss: -------------------------------------------------------------------------------- 1 | @if $css-variable-enabled { 2 | $note-block-border-radius: var(--note-block-border-radius); 3 | $note-block-line-width: var(--note-block-line-width); 4 | $note-block-margin: var(--note-block-margin); 5 | $note-block-padding: var(--note-block-padding); 6 | $primary-transition: var(--primary-transition); 7 | } 8 | 9 | .#{$prefix}note { 10 | background-color: var(--note-block-bg-color); 11 | overflow: hidden; 12 | position: relative; 13 | border-radius: $note-block-border-radius; 14 | margin: $note-block-margin; 15 | padding: $note-block-padding; 16 | transition: background-color $primary-transition; 17 | 18 | &:after { 19 | content: ''; 20 | position: absolute; 21 | top: 0; 22 | left: 0; 23 | height: 100%; 24 | background-color: var(--note-block-line-color); 25 | width: $note-block-line-width; 26 | } 27 | 28 | @each $name, $color in $item-colors { 29 | @if $name { 30 | &.#{$prefix}#{$name}:after { 31 | background-color: $color !important; 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /pages/src/stylesheets/imports/_searchbar.scss: -------------------------------------------------------------------------------- 1 | .search-container { 2 | background-color: var(--dimmer-bg-color); 3 | height: 100%; 4 | width: 100%; 5 | position: fixed; 6 | top: 0; 7 | left: 0; 8 | right: 0; 9 | bottom: 0; 10 | z-index: 21; 11 | opacity: 0; 12 | visibility: hidden; 13 | transition: 0.2s; 14 | 15 | display: flex; 16 | justify-content: center; 17 | 18 | .input-box { 19 | background-color: var(--body-bg-color); 20 | display: flex; 21 | width: 40%; 22 | flex-direction: column; 23 | padding: 20px 20px; 24 | border-radius: 10px; 25 | margin-top: 20px; 26 | height: min-content; 27 | 28 | @include small { 29 | width: 90%; 30 | } 31 | 32 | .zust-form-el { 33 | flex-direction: column; 34 | 35 | > .zust-input:not(.zust-hidden) { 36 | display: block !important; 37 | } 38 | } 39 | } 40 | 41 | &.visible { 42 | visibility: visible; 43 | opacity: 1; 44 | } 45 | } 46 | 47 | @import 'docsearch/main'; 48 | 49 | .algolia-autocomplete { 50 | display: block !important; 51 | width: 100%; 52 | } 53 | -------------------------------------------------------------------------------- /pages/tocopy/resources/ko-fi.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pages/b/browserSync.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const path = require('path'); 3 | const chokidar = require('chokidar'); 4 | const browserSync = require('browser-sync').create('default'); 5 | 6 | const zustycss = path.resolve(__dirname, '../../dist/zusty.css'); 7 | 8 | browserSync.init({ 9 | port: 2703, 10 | server: { 11 | baseDir: './public', 12 | serveStaticOptions: { 13 | extensions: ['html'] 14 | } 15 | }, 16 | callbacks: { 17 | ready: (err, bs) => { 18 | bs.addMiddleware('/dist/zusty.css', (req, res) => { 19 | res.writeHead(200, { 20 | 'Content-Type': 'text/css' 21 | }); 22 | fs.createReadStream(zustycss).pipe(res) 23 | }); 24 | 25 | bs.addMiddleware('*', (req, res) => { 26 | res.writeHead(404, { 27 | 'Content-Type': 'text/html' 28 | }); 29 | res.write(fs.readFileSync('./public/404.html')); 30 | res.end() 31 | }) 32 | } 33 | } 34 | }); 35 | 36 | chokidar.watch(zustycss).on('change', () => browserSync.reload('*.css')); 37 | 38 | browserSync.watch('./public/**/*').on('change', browserSync.reload); 39 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # The MIT License 2 | 3 | Copyright (c) 2020 Sarsa Murmu 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /pages/tocopy/resources/fonts.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Material Icons'; 3 | font-style: normal; 4 | font-weight: 400; 5 | font-display: block; 6 | src: url('material-icons.woff2') format('woff2'); 7 | } 8 | 9 | @font-face { 10 | font-family: 'Varela Round'; 11 | font-style: normal; 12 | font-weight: 400; 13 | font-display: swap; 14 | src: url('varela-round.ttf') format('truetype'); 15 | } 16 | 17 | @font-face { 18 | font-family: 'Lexend'; 19 | font-style: normal; 20 | font-weight: 400; 21 | font-display: swap; 22 | src: url('lexend.ttf') format('truetype'); 23 | } 24 | 25 | @font-face { 26 | font-family: "JetBrains Mono"; 27 | font-style: normal; 28 | font-weight: 400; 29 | font-display: swap; 30 | src: url('jetbrains-mono.ttf') format('truetype'); 31 | } 32 | 33 | .material-icons { 34 | font-family: 'Material Icons'; 35 | font-weight: normal; 36 | font-style: normal; 37 | font-size: 24px; 38 | line-height: 1; 39 | letter-spacing: normal; 40 | text-transform: none; 41 | display: inline-block; 42 | white-space: nowrap; 43 | word-wrap: normal; 44 | direction: ltr; 45 | -webkit-font-feature-settings: 'liga'; 46 | -webkit-font-smoothing: antialiased; 47 | } 48 | -------------------------------------------------------------------------------- /pages/src/docs/elements/progress.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Progress Bar 3 | --- 4 | 5 | # Progress Bar 6 | Compact progress bar. 7 | 8 | --- 9 | 10 | 11 | ## Structure 12 | ```html {snippet} 13 | 14 | ``` 15 | --- 16 | 17 | 18 | ## Colors 19 | It supports all theme colors. 20 | 21 | ```html {snippet} 22 | 23 | 24 | 25 | 26 | ``` 27 | --- 28 | 29 | 30 | ## Sizes 31 | There are five size that you can use with progress bars. 32 | 33 | ```html {snippet} 34 | 35 | 36 | 37 | 38 | 39 | 40 | ``` 41 | -------------------------------------------------------------------------------- /stylelint.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "rules": { 3 | "block-no-empty": true, 4 | "color-no-invalid-hex": true, 5 | "comment-no-empty": true, 6 | "declaration-block-no-duplicate-properties": [ 7 | true, 8 | { 9 | "ignore": ["consecutive-duplicates-with-different-values"] 10 | } 11 | ], 12 | "declaration-block-no-shorthand-property-overrides": true, 13 | "font-family-no-duplicate-names": true, 14 | "font-family-no-missing-generic-family-keyword": true, 15 | "function-calc-no-invalid": true, 16 | "function-calc-no-unspaced-operator": true, 17 | "function-linear-gradient-no-nonstandard-direction": true, 18 | "keyframe-declaration-no-important": true, 19 | "media-feature-name-no-unknown": true, 20 | "no-descending-specificity": true, 21 | "no-duplicate-at-import-rules": true, 22 | "no-duplicate-selectors": true, 23 | "no-empty-source": true, 24 | "no-extra-semicolons": true, 25 | "no-invalid-double-slash-comments": true, 26 | "property-no-unknown": true, 27 | "selector-pseudo-class-no-unknown": true, 28 | "selector-pseudo-element-no-unknown": true, 29 | "selector-type-no-unknown": true, 30 | "string-no-newline": true, 31 | "unit-no-unknown": true 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /pages/src/stylesheets/imports/docsearch/_variables.scss: -------------------------------------------------------------------------------- 1 | // SEARCHBOX 2 | $searchbox-config: ( 3 | input-width: 200px, 4 | input-height: 32px, 5 | border-width: 1px, 6 | border-radius: 16px, 7 | input-border-color: #cccccc, 8 | input-focus-border-color: #aaaaaa, 9 | input-background: #ffffff, 10 | input-focus-background: #ffffff, 11 | font-size: 12px, 12 | placeholder-color: #aaaaaa, 13 | icon-size: 14px, 14 | icon-position: left, 15 | icon-color: #6d7e96, 16 | icon-background: #458ee1, 17 | icon-background-opacity: 0, 18 | icon-clear-size: 8px 19 | ) !default; 20 | 21 | // DROPDOWN 22 | $dropdown-config: ( 23 | main-color: #458ee1, 24 | layout-type: normal, 25 | layout-width: normal, 26 | layout-alignment: align, 27 | background-color: #fff, 28 | border-radius: 4, 29 | border-width: 1, 30 | border-color: #d9d9d9, 31 | box-shadow: light, 32 | branding-position: bottom, 33 | spacing: normal, 34 | include-desc: yes, 35 | background-category-header: #ffffff, 36 | font-size: normal, 37 | header-color: #33363d, 38 | title-color: #02060c, 39 | subtitle-color: #a4a7ae, 40 | text-color: #63676d, 41 | highlight-color: #3881ff, 42 | highlight-opacity: 0.1, 43 | highlight-type: underline 44 | ) !default; 45 | 46 | $builder-height: 260px; 47 | -------------------------------------------------------------------------------- /scss/components/nav.scss: -------------------------------------------------------------------------------- 1 | @if $css-variable-enabled { 2 | $primary-transition: var(--primary-transition); 3 | } 4 | 5 | .#{$prefix}nav { 6 | padding: 0; 7 | 8 | li { 9 | list-style: none; 10 | padding: 6px 10px; 11 | position: relative; 12 | cursor: pointer; 13 | transition: padding $primary-transition; 14 | 15 | &:before, &:after { 16 | content: ''; 17 | position: absolute; 18 | top: 0; 19 | bottom: 0; 20 | left: 0; 21 | background-color: var(--primary-color); 22 | transition-duration: $primary-transition; 23 | transition-property: transform background-color; 24 | } 25 | 26 | &:before { 27 | width: 4px; 28 | transform: scaleX(0); 29 | transform-origin: left; 30 | } 31 | 32 | &:after { 33 | right: 0; 34 | opacity: 0; 35 | pointer-events: none; 36 | } 37 | 38 | &:hover, &.#{$prefix}hovered { 39 | &:before { 40 | transform: scaleX(0.3); 41 | } 42 | } 43 | 44 | &[selected], &.#{$prefix}selected { 45 | padding: 6px 14px; 46 | 47 | &:before { 48 | transform: scaleX(1); 49 | } 50 | 51 | &:after { 52 | opacity: 0.1; 53 | } 54 | } 55 | 56 | ul { 57 | padding-left: 10px; 58 | margin-top: 8px; 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /scss/elements/chip.scss: -------------------------------------------------------------------------------- 1 | @if $css-variable-enabled { 2 | $chip-border-radius: var(--chip-border-radius); 3 | $chip-margin: var(--chip-margin); 4 | $primary-transition: var(--primary-transition); 5 | } 6 | 7 | .#{$prefix}chip { 8 | display: inline-flex; 9 | height: 30px; 10 | background-color: var(--chip-bg-color); 11 | align-items: center; 12 | vertical-align: bottom; 13 | border-radius: $chip-border-radius; 14 | margin: $chip-margin; 15 | transition: $primary-transition; 16 | 17 | > span { 18 | margin-right: 12px; 19 | margin-left: 8px; 20 | } 21 | 22 | span:only-child { 23 | margin-left: 12px; 24 | margin-right: 12px; 25 | } 26 | 27 | span:first-child { 28 | margin-left: 12px; 29 | } 30 | 31 | > .#{$prefix}icon { 32 | margin-right: 8px; 33 | margin-left: -4px; 34 | --icon-size: 1rem; 35 | border-radius: 1000px; 36 | padding: 10px; 37 | 38 | &:hover, &.#{$prefix}hovered, &:focus { 39 | background-color: $stransparent; 40 | } 41 | } 42 | 43 | > img { 44 | height: 100%; 45 | border-radius: $chip-border-radius; 46 | } 47 | 48 | &.#{$prefix}large { 49 | height: 40px; 50 | } 51 | 52 | &.#{$prefix}small { 53 | height: 22px; 54 | font-size: 13px; 55 | 56 | > .#{$prefix}icon { 57 | --icon-size: 0.7rem; 58 | padding: 5px; 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /pages/src/docs/components/pagination.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Pagination 3 | --- 4 | 5 | # Pagination 6 | Basic, responsive styled pagination. 7 | 8 | --- 9 | 10 | 11 | ## Structure 12 | ```html {snippet} 13 | 46 | ``` 47 | And that's all about pagination. Nothing more left for now to discuss. 48 | -------------------------------------------------------------------------------- /scss/elements/avatar.scss: -------------------------------------------------------------------------------- 1 | @if $css-variable-enabled { 2 | $avatar-size: var(--avatar-size); 3 | $avatar-size-small: var(--avatar-size-small); 4 | $avatar-size-large: var(--avatar-size-large); 5 | $primary-transition: var(--primary-transition); 6 | } 7 | 8 | .#{$prefix}avatar { 9 | display: inline-flex; 10 | align-items: center; 11 | justify-content: center; 12 | background-color: var(--avatar-bg-color); 13 | border-radius: 100px; 14 | font-size: 1em; 15 | overflow: hidden; 16 | margin: 2px; 17 | vertical-align: middle; 18 | transition: $primary-transition; 19 | --avt-size: #{$avatar-size}; 20 | width: var(--avt-size); 21 | height: var(--avt-size); 22 | font-size: $medium-text; 23 | 24 | > img { 25 | height: calc(var(--avt-size) + 2px); 26 | width: calc(var(--avt-size) + 2px); 27 | } 28 | 29 | > .#{$prefix}icon { 30 | --icon-size: calc(var(--avt-size) - 14px); 31 | } 32 | 33 | &.#{$prefix}small { 34 | --avt-size: #{$avatar-size-small}; 35 | font-size: $small-text; 36 | } 37 | 38 | &.#{$prefix}large { 39 | --avt-size: #{$avatar-size-large}; 40 | font-size: calc(#{$large-text} - 4px); 41 | } 42 | 43 | @each $name, $color, $txt-color in $item-colors { 44 | @if $name { 45 | &.#{$prefix}#{$name} { 46 | background-color: $color; 47 | color: $txt-color; 48 | } 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /pages/src/docs/elements/spinner.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Spinner 3 | --- 4 | 5 | # Spinner 6 | Spinner as icon. 7 | 8 | --- 9 | 10 | 11 | ## Structure 12 | ```html {snippet} 13 | 16 | ``` 17 | --- 18 | 19 | 20 | ## Usage 21 | Spinners behave like font icons. You can change colors, sizes etc. easily. Just wrap it inside of icon container. 22 | 23 | --- 24 | 25 | 26 | ## Styles 27 | There are few spinners that you can use. Use any of them. 28 | 29 | ```html {snippet} 30 | 33 |
60 |
61 | ```
62 |
--------------------------------------------------------------------------------
/pages/src/docs/_includes/footer.pug:
--------------------------------------------------------------------------------
1 | include ../../_mixins
2 |
3 | div.socialize
4 | hr.h(divider)
5 | h3 Support us by
6 | a.zust-btn.zust-custom.zust-bg-github(class='zust-fullwidth@until-large' href='https://github.com/sarsamurmu/zusty' rel='noopener' target='_blank')
7 | span.zust-icon
8 | span.fa.fa-star
9 | span Starring it on GitHub
10 | a.zust-btn.zust-custom(class='zust-fullwidth@until-large' style='background-color: #7289DA' rel='noopener' target='_blank' href='https://discord.gg/cVDFTjt')
11 | span.zust-icon
12 | span.fab.fa-discord
13 | span Joining our Discord Server
14 | //-
15 | br
16 | h3 Help us by sharing
17 | a.zust-btn.zust-custom(class='zust-fullwidth@until-large' style='background-color: #FF4500' rel='noopener' target='_blank' href='https://www.reddit.com/submit?url=https%3A%2F%2Fzustycss.com&title=Zusty%20CSS%20-%20Power%20Packed%20CSS%20Framework%20for%20Building%20Beautiful%20Interfaces.%20Try%20it%20Now.')
18 | span.zust-icon
19 | span.fab.fa-reddit
20 | span Reddit Post
21 | a.zust-btn.zust-custom.zust-bg-twitter(class='zust-fullwidth@until-large' rel='noopener' target='_blank' href='https://twitter.com/intent/tweet?text=Zusty+CSS+-+Power+Packed+CSS+Framework+for+Building+Beautiful+Interfaces.+Try+it+Now.&url=https://zustycss.com&related=sarsamurmu')
22 | span.zust-icon
23 | span.fab.fa-twitter
24 | span Sharing on Twitter
25 | br
26 |
27 | +footer
28 |
--------------------------------------------------------------------------------
/pages/src/docs/form/range.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Range
3 | ---
4 |
5 | # Range
6 | A simple range.
7 |
8 | ---
9 |
10 |
11 | ## Structure
12 | ```html {snippet}
13 |
14 | ```
15 | ---
16 |
17 |
18 | ## Fullwidth
19 | Make it fullwidth by adding class `zust-fullwidth`{.class}.
20 |
21 | ```html {snippet}
22 |
23 | ```
24 | ---
25 |
26 |
27 | ## Colors
28 | This includes all theme colors. Use any of them.
29 |
30 | ```html {snippet}
31 |
32 |
33 |
34 |
35 |
36 | ```
37 | ---
38 |
39 |
40 | ## Rounded
41 | There is also rounded range. Use it by adding class `zust-rounded`{.class}.
42 |
43 | ```html {snippet}
44 |
45 | ```
46 | ---
47 |
48 |
49 | ## Disabled
50 | You can disable a slider by adding attribute `disabled`{.attr}.
51 |
52 | ```html {snippet}
53 |
54 | ```
55 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 | ---
8 |
9 |
10 |
11 |
12 | - [ ] I've already searched in issues and I'm not able to find this kind of issue.
13 | - [ ] I'm Using the Latest Version of Zusty CSS Framework.
14 |
15 | **General Info**
16 |
17 | Version:
18 |
19 | Implementation:
20 |
21 | Using Via:
22 |
23 | Testing Browser:
24 |
25 | Testing Device:
26 |
27 |
28 |
29 | **Describe the Bug/Issue**
30 |
31 | Answer Here
32 |
33 | **To Reproduce**
34 |
35 |
42 | Answer Here
43 |
44 | **Expected behavior**
45 |
46 | Answer Here
47 |
48 |
49 | **Additional context**
50 |
51 | Answer Here
52 |
--------------------------------------------------------------------------------
/pages/b/renderSass.js:
--------------------------------------------------------------------------------
1 | const fs = require('fs');
2 | const path = require('path');
3 | const glob = require('glob');
4 | const chokidar = require('chokidar');
5 | const chalk = require('chalk');
6 |
7 | const sass = require('node-sass');
8 | const args = process.argv.splice(2, process.argv.length - 2);
9 |
10 | const sassPath = `./src/stylesheets/*.scss`;
11 | const sassImportPath = './src/stylesheets/imports/';
12 |
13 | const renderFile = (filePath) => {
14 | const outputPath = filePath.replace('src', 'public').replace('.scss', '.css');
15 |
16 | try {
17 | const result = sass.renderSync({
18 | file: filePath,
19 | outputStyle: 'compressed'
20 | });
21 |
22 | fs.mkdirSync(path.dirname(outputPath), {
23 | recursive: true
24 | });
25 |
26 | fs.writeFileSync(outputPath, result.css.toString());
27 |
28 | console.log(chalk.green(`Rendered ${filePath} to ${outputPath}\n`));
29 | } catch (err) {
30 | console.log(chalk.red(err.formatted))
31 | }
32 | }
33 |
34 | if (args.includes('-w')) {
35 | chokidar.watch(sassPath).on('change', (filePath) => setTimeout(() => renderFile(filePath), 100)).on('ready', () => console.log(chalk.magenta(`Watching Sass files for change\n`)));
36 |
37 | chokidar.watch(sassImportPath).on('change', (filePath) => setTimeout(() => {
38 | console.log(chalk.blue(`Import changed ${filePath}\n`));
39 |
40 | glob.sync(sassPath).forEach(renderFile);
41 | }, 100));
42 | } else {
43 | console.log(chalk.magenta(`Rendering Sass files\n`))
44 |
45 | glob.sync(sassPath).forEach(renderFile);
46 | }
47 |
--------------------------------------------------------------------------------
/pages/src/stylesheets/imports/_worker-toast.scss:
--------------------------------------------------------------------------------
1 | @import "./../../../../scss/core/var-only.scss";
2 |
3 | .worker-toast {
4 | transition-duration: 0.5s;
5 | transition-timing-function: cubic-bezier(.76,.01,.13,.9);
6 | font-size: 14px;
7 | min-height: 14px;
8 | background-color: #323232;
9 | position: fixed;
10 | display: flex;
11 | justify-content: center;
12 | align-items: center;
13 | color: white;
14 | padding: 18px 24px;
15 | z-index: 20;
16 | bottom: 0;
17 | left: 0;
18 | transform: translateY(150%);
19 |
20 | > div {
21 | display: flex;
22 | align-items: center;
23 | justify-content: center;
24 |
25 | > .zust-icon {
26 | margin-right: 12px;
27 | }
28 |
29 | > .zust-btn {
30 | margin: 0 0 0 10px;
31 | color: $turquoise;
32 | }
33 | }
34 |
35 | &.visible {
36 | transform: none !important;
37 | }
38 |
39 | @include medium {
40 | min-width: 288px;
41 | max-width: 568px;
42 | display: inline-flex;
43 | border-radius: 12px;
44 | margin: 24px;
45 | }
46 |
47 | @include small {
48 | left: 0 !important;
49 | right: 0 !important;
50 | transform: translateY(200%);
51 | }
52 |
53 | .zust-icon {
54 | --icon-size: 30px;
55 | color: $turquoise;
56 | }
57 |
58 | &[update] .zust-icon {
59 | animation: spin 1s infinite;
60 | }
61 | }
62 |
63 | @keyframes spin {
64 | 0% {
65 | transform: rotate(0deg);
66 | }
67 | 99% {
68 | transform: rotate(359deg);
69 | }
70 | 100% {
71 | transform: rotate(360deg);
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/pages/src/stylesheets/download.scss:
--------------------------------------------------------------------------------
1 | @import "./../../../scss/core/var-only";
2 | @import "imports/navbar";
3 | @import "imports/footer";
4 | @import "imports/worker-toast";
5 |
6 | @import "imports/editor/base";
7 | @import "imports/editor/theme";
8 | @import "imports/editor/themed";
9 |
10 | @import "/resources/fonts.css";
11 |
12 | body {
13 | padding-top: 70px;
14 | font-family: 'Varela Round', sans-serif;
15 |
16 | @include large {
17 | padding-top: 90px;
18 | padding-left: 80px;
19 | padding-right: 80px;
20 | }
21 | }
22 |
23 | button, select {
24 | font-family: 'Varela Round', sans-serif;
25 | }
26 |
27 | h3 {
28 | font-family: 'Lexend', sans-serif;
29 | font-weight: normal;
30 | }
31 |
32 | .CodeMirror {
33 | border-radius: 10px;
34 | }
35 |
36 | pre {
37 | overflow-x: auto;
38 | overflow-y: hidden;
39 | padding-bottom: 5px;
40 | }
41 |
42 | code {
43 | font-family: 'JetBrains Mono', monospace;
44 | font-size: 14px;
45 | }
46 |
47 | .site-footer {
48 | margin-top: 60px;
49 | }
50 |
51 | .downloadBtn {
52 | margin-left: 20px;
53 |
54 | @include small {
55 | margin-left: 0px;
56 | margin-top: 10px;
57 | }
58 |
59 | > span:first-child {
60 | opacity: 0;
61 | transform: scale(0);
62 | transition: 0.3s;
63 | }
64 |
65 | > span:last-child {
66 | transform: translateX(-10px);
67 | transition: 0.3s;
68 | }
69 |
70 | &.loading {
71 | > span:first-child {
72 | opacity: 1;
73 | transform: scale(1);
74 | }
75 |
76 | > span:last-child {
77 | padding-left: 20px;
78 | }
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/pages/src/stylesheets/homepage.scss:
--------------------------------------------------------------------------------
1 | @import "/resources/fonts.css";
2 | @import "./../../../scss/core/var-only";
3 | @import "imports/navbar";
4 | @import "imports/footer";
5 | @import "imports/worker-toast";
6 |
7 | body {
8 | font-family: 'Varela Round', sans-serif;
9 | padding-top: 70px;
10 | }
11 |
12 | .primary {
13 | font-family: 'Lexend', sans-serif;
14 | }
15 |
16 | .center {
17 | text-align: center;
18 | }
19 |
20 | .hero {
21 | text-align: center;
22 |
23 | p {
24 | font-size: 18px;
25 | display: inline-block;
26 | max-width: 800px;
27 | }
28 |
29 | @include small {
30 | > img {
31 | width: 200px;
32 | }
33 | }
34 |
35 | .links {
36 | margin-top: 10px;
37 |
38 | * {
39 | vertical-align: bottom;
40 | }
41 | }
42 | }
43 |
44 | a.discord {
45 | background-color: #7289DA !important;
46 | }
47 |
48 | .feature {
49 | margin-top: 70px;
50 |
51 | @include large {
52 | margin-top: 100px;
53 |
54 | &:nth-child(even) {
55 | margin-left: 200px;
56 |
57 | p {
58 | max-width: 900px;
59 | }
60 | }
61 |
62 | &:nth-child(odd) {
63 | margin-right: 200px;
64 | }
65 | }
66 |
67 | h2 {
68 | font-family: 'Lexend', sans-serif;
69 | }
70 |
71 | &:nth-child(odd) {
72 | text-align: right;
73 | }
74 | }
75 |
76 | .endText {
77 | font-family: 'Lexend', sans-serif;
78 | text-align: center;
79 | font-size: 1.8em;
80 | margin: 120px 0;
81 |
82 | @include large {
83 | margin: 200px 0;
84 | }
85 |
86 | a {
87 | border-bottom-width: 4px;
88 | }
89 | }
90 |
--------------------------------------------------------------------------------
/scss/elements/table.scss:
--------------------------------------------------------------------------------
1 | @if $css-variable-enabled {
2 | $primary-transition: var(--primary-transition);
3 | $table-cell-border-width: var(--table-cell-border-width);
4 | $table-cell-padding: var(--table-cell-padding);
5 | }
6 |
7 | .#{$prefix}table {
8 | border-collapse: collapse;
9 |
10 | thead {
11 | background-color: var(--table-header-bg-color);
12 | color: var(--table-header-text-color);
13 | }
14 |
15 | tfoot {
16 | background-color: var(--table-footer-bg-color);
17 | color: var(--table-footer-text-color);
18 | }
19 |
20 | td, th {
21 | padding: $table-cell-padding;
22 | }
23 |
24 | tr, td, th, thead, tfoot {
25 | transition: border-color $primary-transition, background-color $primary-transition;
26 | }
27 |
28 | &.#{$prefix}striped tbody {
29 | tr:nth-child(odd) {
30 | background-color: var(--table-bg-color);
31 | }
32 | }
33 |
34 | &.#{$prefix}hoverable tbody tr {
35 | &:hover, &.#{$prefix}hovered {
36 | background-color: var(--table-hovered-bg-color);
37 | }
38 | }
39 |
40 | &.#{$prefix}bottom-bordered tr {
41 | border-style: solid;
42 | border-width: 0;
43 | border-color: var(--table-border-color);
44 | border-bottom-width: $table-cell-border-width;
45 | }
46 |
47 | &.#{$prefix}bordered {
48 | td, th {
49 | border-style: solid;
50 | border-color: var(--table-border-color);
51 | border-width: $table-cell-border-width;
52 | }
53 | }
54 | }
55 |
56 | .#{$prefix}table-container {
57 | overflow-x: auto;
58 |
59 | .#{$prefix}table {
60 | display: block;
61 | }
62 | }
63 |
--------------------------------------------------------------------------------
/pages/src/stylesheets/support.scss:
--------------------------------------------------------------------------------
1 | @import '../../../scss/core/var-only';
2 | @import "imports/navbar";
3 | @import "imports/footer";
4 |
5 | @import "/resources/fonts.css";
6 |
7 | body {
8 | font-family: 'Varela Round', sans-serif;
9 | padding-top: 80px;
10 |
11 | @include large {
12 | padding-top: 100px;
13 | }
14 | }
15 |
16 | h1, h2, h3 {
17 | font-family: 'Lexend', sans-serif;
18 | font-weight: normal;
19 | }
20 |
21 | .thanks-text {
22 | font-family: 'Lexend', sans-serif;
23 | text-align: center;
24 | margin: 60px 0;
25 | font-size: 22px;
26 | color: var(--text-color-primary);
27 | }
28 |
29 | .support-option-container {
30 | display: flex;
31 | justify-content: space-around;
32 |
33 | @include small {
34 | display: block;
35 | }
36 |
37 | > .support-option {
38 | width: 100%;
39 | text-align: center;
40 | margin: 20px;
41 | border-style: solid;
42 | border-radius: 15px;
43 | border-color: rgba(144, 144, 144, 0.2);
44 | border-width: 2px;
45 | transition: $primary-transition;
46 | padding: 10px;
47 | display: block;
48 |
49 | &:hover {
50 | border-color: $transparent;
51 | box-shadow: 0 3px 11px #80808026;
52 | transform: translateY(-2px);
53 | }
54 |
55 | > img {
56 | width: 180px;
57 | border-radius: 1000px;
58 | box-shadow: 0 4px 6px 1px hsla(0, 0%, 80%, 0.2);
59 |
60 | @include small {
61 | width: 100px;
62 | }
63 | }
64 |
65 | p {
66 | font-size: 18px;
67 | }
68 |
69 | @include small {
70 | width: auto;
71 | cursor: default;
72 | }
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/pages/src/stylesheets/imports/_search.scss:
--------------------------------------------------------------------------------
1 | #searchResult {
2 | max-height: 70vh;
3 | overflow-y: scroll;
4 |
5 | @include small {
6 | max-height: 60vh;
7 | }
8 |
9 | u {
10 | border-bottom-style: solid;
11 | border-width: 2px;
12 | display: inline-block;
13 | border-color: var(--link-color);
14 | text-decoration: none;
15 | background-color: rgba(0, 128, 255, 0.1);
16 | }
17 |
18 | > .item-level-1 {
19 | margin-top: 10px;
20 | margin-bottom: 30px;
21 |
22 | > a {
23 | margin: 0;
24 | font-size: 20px;
25 | color: var(--text-color-primary);
26 | display: block;
27 | border-color: var(--light-color);
28 | border-style: solid;
29 | border-width: 0 0 2px 0;
30 | padding: 0 0 4px 8px;
31 | margin-bottom: 10px;
32 |
33 | > span:not(.matched-text) {
34 | display: block;
35 | color: var(--text-color-secondary);
36 | font-size: 16px;
37 | margin-top: 5px;
38 | opacity: var(--text-color-tertiary);
39 | }
40 | }
41 |
42 | > .item-level-2 {
43 | margin-bottom: 18px;
44 | display: block;
45 | border-color: var(--light-color);
46 | border-style: solid;
47 | border-width: 2px;
48 | border-radius: 7px;
49 | padding: 10px;
50 | font-size: 16px;
51 | transition: $primary-transition;
52 |
53 | &:hover {
54 | border-color: transparentize(#0080ff, 0.6);
55 | background-color: transparentize(#0080ff, 0.8);
56 | }
57 |
58 | > h4, p {
59 | margin: 0;
60 | }
61 |
62 | p {
63 | margin-top: 7px;
64 | font-size: 14px;
65 | }
66 | }
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/pages/src/stylesheets/imports/_bottombar.scss:
--------------------------------------------------------------------------------
1 | .bottombar {
2 | position: fixed;
3 | bottom: 0;
4 | left: 0;
5 | height: 60px;
6 | width: 100%;
7 | background-color: var(--body-bg-color);
8 | display: flex;
9 | align-items: center;
10 | justify-content: center;
11 | transition: all 0.2s, box-shadow 0.5s, transform 0.2s ease-in-out;
12 | border-style: solid;
13 | border-width: 0;
14 | border-top-width: 2px;
15 | border-color: $transparent;
16 | z-index: 11;
17 | box-shadow: 0px -3px 20px 0px hsla(0, 0%, 0%, 0.2);
18 |
19 | [zust-theme="light"] & {
20 | box-shadow: 0px -3px 20px 0px hsla(0, 0%, 60%, 0.2);
21 | }
22 |
23 | &.zust-flat {
24 | box-shadow: 0 0 0 0 $transparent;
25 | }
26 |
27 | @include large {
28 | display: none;
29 | }
30 |
31 | &.hidden:not(.visible) {
32 | transform: translateY(150%);
33 | }
34 |
35 | > a {
36 | $size: 40px;
37 | height: $size;
38 | width: $size;
39 | position: absolute;
40 | margin-left: 10px;
41 | left: 0;
42 |
43 | > img {
44 | height: $size;
45 | width: $size;
46 | }
47 | }
48 |
49 | .button-container {
50 | position: absolute;
51 | right: 0;
52 |
53 | button {
54 | float: right;
55 | margin: 0 8px;
56 | padding: 12px !important;
57 |
58 | > .zust-icon {
59 | --icon-size: 22px;
60 | margin: 0;
61 | }
62 | }
63 |
64 | .nav-opener {
65 | transform: none;
66 |
67 | &.zust--hidden {
68 | transform: rotate(45deg);
69 | }
70 | }
71 |
72 | .nav-backer {
73 | opacity: 0;
74 | cursor: default;
75 |
76 | &.zust--visible {
77 | opacity: 1;
78 | }
79 | }
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/pages/Syntax.md:
--------------------------------------------------------------------------------
1 | ### Markdown
2 | There are extra syntax that you can use with markdown.
3 |
4 | ---
5 |
6 | ### Attributes
7 |
8 | You can easily add attribute because it uses [markdown-it-attrs](https://github.com/arve0/markdown-it-attrs). See their [Readme](https://github.com/arve0/markdown-it-attrs/blob/master/README.md) for reference.
9 |
10 | ---
11 |
12 | If you write this in markdown -
13 | ```md
14 | `{someClass}(sample code)`
15 | ```
16 | this will get converted to html like this - `sample code`. Using this syntax you can create good looking example like `{string}(zust-hidden@){comment}(breakpoint-name)`.
17 |
18 | ---
19 |
20 | ### Raw HTML Block
21 | If you write a HTML block, whenever a line of HTML breaks markdown will render `
24 | ```html {raw}
25 | Your HTML
26 | ```
27 |
28 |
29 | Thus you can prevent `
50 | ```js {execute}
51 | // Do whatever here using JavaScript.
52 | // But finally return a String;
53 | // Like
54 | let htmlStr = ``;
55 |
56 | for (let i = 0; i < 10; i++) {
57 | htmlStr += `I am nth ${i}
`
58 | }
59 |
60 | return htmlStr;
61 | ```
62 |
63 |
64 | ---
65 |
66 | End! Nothing More.
67 |
--------------------------------------------------------------------------------
/scss/components/breadcrumb.scss:
--------------------------------------------------------------------------------
1 | @if $css-variable-enabled {
2 | $breadcrumb-font-size: var(--breadcrumb-font-size);
3 | }
4 |
5 | .#{$prefix}breadcrumb {
6 | display: block;
7 | cursor: default;
8 |
9 | > ul {
10 | display: block;
11 | padding: 0;
12 |
13 | > li {
14 | display: inline-block;
15 | margin-left: 8px;
16 | color: var(--breadcrumb-item-color);
17 | cursor: pointer;
18 | font-size: $breadcrumb-font-size;
19 |
20 | &:not(:last-child):after {
21 | content: '/';
22 | margin-left: 8px;
23 | color: var(--breadcrumb-separator-color);
24 | cursor: default;
25 | }
26 |
27 | > a {
28 | color: var(--breadcrumb-item-color);
29 | border-style: none;
30 | font-size: $breadcrumb-font-size;
31 | }
32 |
33 | &[active], &.#{$prefix}active {
34 | color: var(--breadcrumb-item-active-color);
35 | cursor: default;
36 |
37 | > a {
38 | color: var(--breadcrumb-item-active-color);
39 | cursor: default;
40 | }
41 | }
42 |
43 | &:hover:not(.#{$prefix}active):not([active]), &.#{$prefix}hovered:not(.#{$prefix}active):not([active]) {
44 | color: var(--breadcrumb-item-hovered-color);
45 |
46 | > a {
47 | color: var(--breadcrumb-item-hovered-color);
48 | }
49 | }
50 | }
51 | }
52 |
53 | &.#{$prefix}dot-separator > ul > li:not(:last-child):after {
54 | content: '•';
55 | }
56 |
57 | &.#{$prefix}pipe-separator > ul > li:not(:last-child):after {
58 | content: '|';
59 | }
60 |
61 | &.#{$prefix}angle-separator > ul > li:not(:last-child):after {
62 | content: '›';
63 | }
64 |
65 | &.#{$prefix}dash-separator > ul > li:not(:last-child):after {
66 | content: '—';
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/pages/tocopy/scripts/site.js:
--------------------------------------------------------------------------------
1 | window.addEventListener('load', () => {
2 | // Theme Control
3 | const toggleSwitch = document.querySelector('#themeSwitch');
4 | const currentTheme = localStorage.getItem('theme');
5 | const metaTheme = document.querySelector('meta[name=theme-color]');
6 |
7 | if (currentTheme) {
8 | if (currentTheme === 'dark') {
9 | toggleSwitch.checked = true;
10 | }
11 | }
12 |
13 | window.switchTheme = () => {
14 | if (toggleSwitch.checked === true) {
15 | metaTheme.setAttribute('content', '#212121');
16 | document.documentElement.setAttribute('zust-theme', 'dark');
17 | localStorage.setItem('theme', 'dark');
18 | } else {
19 | metaTheme.setAttribute('content', '#FFFFFF');
20 | document.documentElement.setAttribute('zust-theme', 'light');
21 | localStorage.setItem('theme', 'light');
22 | }
23 | }
24 |
25 | // Switch Theme Button
26 | window.toggleTheme = () => {
27 | switchTheme();
28 | }
29 |
30 | // Set SVG inside of Copy Button
31 | document.querySelectorAll('button[copybutton]').forEach((button) => {
32 | button.innerHTML = `
33 |
39 | `;
40 | });
41 |
42 | window.copyID = (source) => {
43 | var item = document.getElementById(source);
44 | var text = document.createElement('textarea');
45 | document.body.appendChild(text);
46 | text.value = item.textContent;
47 | console.log("Copied: \n \n" + item.textContent);
48 | text.select();
49 | document.execCommand('copy', false);
50 | text.remove();
51 | }
52 | })
53 |
--------------------------------------------------------------------------------
/pages/README.md:
--------------------------------------------------------------------------------
1 | # Zusty Pages
2 | [](https://app.netlify.com/sites/zustycss/deploys)
3 |
4 | Includes all page for https://zustycss.com.
5 |
6 | ## Usage
7 | Start Development
8 | ```bash
9 | npm start
10 | ```
11 | Build all pages
12 | ```bash
13 | npm run build
14 | ```
15 |
16 | ## Document type
17 | Pug is used as preprocessor for HTML pages. For Documentation Markdown is used, markdown is completely configurable that's why you can see some new syntax in markdown. You can find more about extra markdown syntax [here](https://github.com/sarsamurmu/zusty/blob/master/pages/Syntax.md).
18 |
19 | ## Files
20 | ### Docs
21 | All file for a documentation page are parted over `src/docs/_includes/` as pug files and `src/docs/base.pug` file implements all those parted files. All documentation pages are written in markdown files and processed using [markdown-it](https://github.com/markdown-it/markdown-it/).
22 |
23 | `src/docs/navigationData.json` includes the data for sidenav of documentation pages.
24 |
25 | `src/docs/swBase.js` is the base version of service worker, which is injected with website's files' data for creating usable service worker.
26 |
27 | ### Scripts
28 | `src/scripts/` include all script files. These are compiled with webpack for browser and saved to `public/scripts`.
29 |
30 | ### Stylesheets
31 | `src/stylesheets` includes all stylesheets. All files are written in SCSS, these are processed by Sass and saved to `public/stylesheets`. `src/stylesheets/imports` includes all SCSS file which are imported by other SCSS files.
32 |
33 | ### Copied Files
34 | All files inside of `tocopy` directory don't need processing, so they just get copied to the `public` directory.
35 |
36 | ### Build Files
37 | All build scripts can be found on `b` directory. The `config.js` file in this directory contains some necessary data like `debug` and `version` number.
38 |
--------------------------------------------------------------------------------
/pages/src/docs/general/build-variants.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Build Variants
3 | ---
4 |
5 | # Build Variants
6 | There are three build variants of Zusty CSS.
7 |
8 | Variants are -
9 | - Normal
10 | - Prefixless
11 | - CSS Variable - Parted
12 |
13 | ---
14 |
15 | ## Normal
16 | Normal variant is the base version of Zusty CSS. If you're following getting started guide then you're probably using normal version.
17 | ### Usage
18 | You can simply use it using jsDelivr CDN.
19 | ```html {nolaunch}
20 |
21 | ```
22 | or if you're using npm then
23 | ```html {nolaunch}
24 |
25 | ```
26 | ---
27 |
28 |
29 | ## Prefixless
30 | Prefixless is same as normal, different is that it has no prefix. So, you can use it without prefix like, `zust-hidden`{.class} can be used using `hidden`{.class}. Use it if you want to develop your page rapidly.
31 | ### Usage
32 | If you want to use CDN
33 | ```html {nolaunch}
34 |
35 | ```
36 | or if you're using npm
37 | ```html {nolaunch}
38 |
39 | ```
40 | ---
41 |
42 |
43 | ## Parted - CSS variables
44 | If you're feeling adventurous you can use this variant.
45 |
46 | All files are parted like below -
47 | - `theme.css`{.attr} - CSS File containing only theme.
48 | - `variables.css`{.attr} - CSS File containing only variables. All variables are CSS Variable in this file.
49 | - `zusty.css`{.attr} or `zusty.min.css`{.attr} - The main CSS file. All variables are transferred to CSS Variables.
50 | ### Usage
51 | You are going to change the file if you use it. For this reason, download it manually and link them all in HTML file. Files can be found [Here](https://github.com/sarsamurmu/zusty/tree/master/dist/parted).
52 |
--------------------------------------------------------------------------------
/pages/src/docs/general/theme.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Theme
3 | ---
4 |
5 | # Theme
6 | In Zusty there are two themes by default, `light`{.class} and `dark`{.class}.
7 | You can set theme by adding attribute `{class}(zust-theme)="{comment}(theme-name)"`.
8 | Replace `theme-name`{.comment} with any theme name, `light`{.class} and `dark`{.class}.
9 |
10 | You can change theme of any element by adding above attribute.
11 | You can also add this attribute to a parent element to change the theme of it's child elements.
12 |
13 | ```html {snippet}
14 | hidCode{{
15 | Try changing the theme
16 | }} 17 | 18 |I've my own theme, yay!
20 | 21 |22 | 23 |
24 | 25 | 26 | 27 |My page with new theme
65 | 66 | 67 | 68 | ``` 69 | -------------------------------------------------------------------------------- /scss/components/card.scss: -------------------------------------------------------------------------------- 1 | @if $css-variable-enabled { 2 | $card-border-radius: var(--card-border-radius); 3 | $card-border-width: var(--card-border-width); 4 | $card-box-shadow: var(--card-box-shadow); 5 | $card-hover-translate: var(--card-hover-translate); 6 | $card-hovered-box-shadow: var(--card-hovered-box-shadow); 7 | $card-landscape-max-width: car(--card-landscape-max-width); 8 | $card-landscape-min-width: car(--card-landscape-min-width); 9 | $card-margin: var(--card-margin); 10 | $card-max-width: var(--card-max-width); 11 | $card-min-width: var(--card-min-width); 12 | $card-padding: var(--card-padding); 13 | $primary-transition: var(--primary-transition); 14 | } 15 | 16 | .#{$prefix}card { 17 | background-color: var(--card-bg-color); 18 | border-color: var(--card-border-color); 19 | box-sizing: content-box; 20 | padding: $card-padding; 21 | margin: $card-margin; 22 | max-width: $card-max-width; 23 | min-width: $card-min-width; 24 | box-shadow: $card-box-shadow; 25 | border-radius: $card-border-radius; 26 | display: flex; 27 | flex-direction: column; 28 | transition: $primary-transition; 29 | 30 | &.#{$prefix}flat { 31 | border-style: solid; 32 | box-shadow: 0 0 $transparent; 33 | border-width: $card-border-width; 34 | } 35 | 36 | &.#{$prefix}landscape { 37 | max-width: $card-landscape-max-width; 38 | min-width: $card-landscape-min-width; 39 | } 40 | 41 | h1, h2, h3, h4, h5, h6 { 42 | margin: 10px 0; 43 | } 44 | 45 | footer { 46 | margin: 0 -10px 0 -10px; 47 | display: flex; 48 | justify-content: flex-start; 49 | align-items: flex-end; 50 | flex-direction: row-reverse; 51 | flex-wrap: wrap; 52 | flex-grow: 1; 53 | 54 | @include clearfix; 55 | } 56 | 57 | &.#{$prefix}hoverable { 58 | &:hover, &.#{$prefix}hovered, &:focus-within { 59 | border-color: $transparent; 60 | transform: translateY($card-hover-translate); 61 | box-shadow: $card-hovered-box-shadow; 62 | } 63 | } 64 | 65 | &.#{$prefix}rtl { 66 | text-align: right; 67 | 68 | footer { 69 | &:not(.#{$prefix}center):not(.#{$prefix}text-center) { 70 | * { 71 | float: left; 72 | } 73 | } 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /pages/src/docs/container/basic.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Container Basic 3 | --- 4 | 5 | # Container 6 | Container built on flexbox for flexible layouts. 7 | 8 | --- 9 | 10 | 11 | ## Structure 12 | ```html {snippet} 13 |
3 |
4 |
8 | A CSS Framework for testing out my web development skills in 2019.
9 |
10 | Read the Docs
11 |
Base Page
63 | 64 | 65 | ``` 66 | 67 | ## License 68 | Zusty CSS is Licensed under the [MIT License](https://github.com/sarsamurmu/zusty/blob/master/LICENSE.md), webpages under [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/). 69 | -------------------------------------------------------------------------------- /scss/elements/spinner.scss: -------------------------------------------------------------------------------- 1 | .#{$prefix}spinner { 2 | background-color: currentColor; 3 | border-radius: 20%; 4 | animation: spin-spinner 0.8s linear infinite; 5 | animation-timing-function: ease-in-out; 6 | } 7 | 8 | @keyframes spin-spinner { 9 | 0% { 10 | transform: scale(0.6); 11 | } 12 | 50% { 13 | transform: scale(1) rotate(180deg); 14 | } 15 | 100% { 16 | transform: scale(0.6) rotate(360deg); 17 | } 18 | } 19 | 20 | .#{$prefix}spinner-2 { 21 | border-style: solid; 22 | border-radius: 100%; 23 | border-width: 2px; 24 | border-color: currentColor; 25 | border-left-color: $transparent; 26 | border-bottom-color: $transparent; 27 | animation: spinner-2 0.7s linear infinite; 28 | } 29 | 30 | @keyframes spinner-2 { 31 | 0% { 32 | transform: rotate(0deg); 33 | } 34 | 100% { 35 | transform: rotate(360deg); 36 | } 37 | } 38 | 39 | .#{$prefix}spinner-3 { 40 | border-style: solid; 41 | border-width: 2px; 42 | border-radius: 100%; 43 | animation: spinner-3 0.8s linear infinite; 44 | } 45 | 46 | @keyframes spinner-3 { 47 | 0% { 48 | transform: scale(0); 49 | } 50 | 30% { 51 | opacity: 1; 52 | } 53 | 100% { 54 | transform: scale(1); 55 | opacity: 0; 56 | } 57 | } 58 | 59 | .#{$prefix}spinner-4 { 60 | background-color: currentColor; 61 | border-radius: 100%; 62 | animation: spinner-4 0.8s linear infinite; 63 | } 64 | 65 | @keyframes spinner-4 { 66 | 0% { 67 | transform: scale(0); 68 | } 69 | 30% { 70 | opacity: 1; 71 | } 72 | 100% { 73 | transform: scale(1); 74 | opacity: 0; 75 | } 76 | } 77 | 78 | .#{$prefix}spinner-5 { 79 | background-color: currentColor; 80 | animation: spinner-5 1s infinite ease-in-out; 81 | border-radius: 15%; 82 | } 83 | 84 | @keyframes spinner-5 { 85 | 0% { 86 | transform: perspective(calc(var(--icon-size) * 2)) rotateX(0deg) rotateY(0deg); 87 | } 88 | 50% { 89 | transform: perspective(calc(var(--icon-size) * 2)) rotateX(-180.1deg) rotateY(0deg); 90 | } 91 | 100% { 92 | transform: perspective(calc(var(--icon-size) * 2)) rotateX(-180deg) rotateY(-179.9deg); 93 | } 94 | } 95 | 96 | .#{$prefix}spinner-6 { 97 | background-color: currentColor; 98 | border-radius: 15%; 99 | animation: spinner-6 1.6s cubic-bezier(0.75, 0, 0.5, 1) infinite normal; 100 | } 101 | 102 | @keyframes spinner-6 { 103 | 50% { 104 | border-radius: 50%; 105 | transform: scale(0.5) rotate(360deg); 106 | } 107 | 100% { 108 | transform: scale(1) rotate(720deg); 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /scss/components/badge.scss: -------------------------------------------------------------------------------- 1 | $padding-first: 10px; 2 | $padding-second: 5px; 3 | 4 | @if $css-variable-enabled { 5 | $badge-border-radius: var(--badge-border-radius); 6 | $badge-font-size: var(--badge-font-size); 7 | $primary-transition: var(--primary-transition); 8 | } 9 | 10 | span.#{$prefix}badge { 11 | user-select: none; 12 | display: inline-block; 13 | $padding: 4px; 14 | $extra: 4px; 15 | padding: $padding ($padding + $extra) $padding ($padding + $extra); 16 | background-color: var(--badge-last-part-bg-color); 17 | color: var(--badge-only-part-text-color); 18 | margin: { 19 | right: 8px; 20 | bottom: 8px; 21 | } 22 | font-size: $badge-font-size; 23 | border-radius: $badge-border-radius; 24 | transition: $primary-transition; 25 | 26 | &.#{$prefix}outlined, .#{$prefix}badges-outlined & { 27 | background-color: $transparent; 28 | border-style: solid; 29 | border-width: 2px; 30 | border-color: rgba(144, 144, 144, 0.3); 31 | color: var(--text-color-secondary); 32 | } 33 | 34 | .#{$prefix}badges-rounded & { 35 | border-radius: 100000px; 36 | } 37 | } 38 | 39 | div.#{$prefix}badge { 40 | display: inline-flex; 41 | align-items: center; 42 | justify-content: flex-start; 43 | flex-wrap: wrap; 44 | margin: { 45 | right: 8px; 46 | bottom: 8px; 47 | } 48 | white-space: nowrap; 49 | 50 | span { 51 | user-select: none; 52 | padding: 4px; 53 | margin: 0px; 54 | font-size: $badge-font-size; 55 | transition: $primary-transition; 56 | } 57 | 58 | span:only-of-type { 59 | user-select: none; 60 | $padding: 4px; 61 | $extra: 4px; 62 | padding: $padding ($padding + $extra) $padding ($padding + $extra); 63 | background-color: var(--badge-only-part-bg-color); 64 | color: var(--badge-only-part-text-color); 65 | border-radius: $badge-border-radius; 66 | } 67 | 68 | span:first-child:not(:only-of-type) { 69 | padding-left: $padding-first; 70 | padding-right: $padding-second; 71 | background-color: var(--badge-first-part-bg-color); 72 | color: var(--badge-first-part-text-color); 73 | border-radius: $badge-border-radius 0 0 $badge-border-radius; 74 | } 75 | 76 | span:last-child:not(:only-of-type) { 77 | padding-right: $padding-first; 78 | padding-left: $padding-second; 79 | background-color: var(--badge-last-part-bg-color); 80 | color: var(--badge-last-part-text-color); 81 | border-radius: 0 $badge-border-radius $badge-border-radius 0; 82 | } 83 | 84 | &.#{$prefix}rounded, .#{$prefix}badges-rounded & { 85 | overflow: hidden; 86 | border-radius: 100000px; 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /pages/b/renderMd.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs'); 2 | const path = require('path'); 3 | const glob = require('glob'); 4 | const chokidar = require('chokidar'); 5 | const chalk = require('chalk'); 6 | const browserSync = require('browser-sync'); 7 | 8 | const config = require('./config'); 9 | 10 | const pug = require('pug'); 11 | const args = process.argv.splice(2, process.argv.length - 2); 12 | 13 | const md = require('markdown-it')({ 14 | html: true, 15 | langPrefix: 'lang-', 16 | breaks: true 17 | }).disable('code'); 18 | md.use(require('./mdPlugins')); 19 | const metadataParser = require('markdown-yaml-metadata-parser'); 20 | const minifyHtml = require('html-minifier').minify; 21 | 22 | const baseFile = './src/docs/base.pug' 23 | const mdFilePath = `./src/docs/**/*.md`; 24 | const pugImportsPath = ['./src/docs/_includes/*.pug', baseFile, './src/_mixins.pug']; 25 | 26 | let pugFunc = pug.compileFile(baseFile); 27 | 28 | const renderFile = (filePath) => { 29 | const outputPath = filePath.replace('src', 'public').replace('.md', '.html'); 30 | const canonical = outputPath.replace(/(\.\/)?public/g, 'https://zustycss.com').replace(/\\/g, '/').replace(/(\.html|\/index)/g, ''); 31 | const markdown = metadataParser(fs.readFileSync(filePath).toString()); 32 | const renderedHTML = md.render(markdown.content.replace(/#{(.*?)}/g, (m, offset, s) => config[offset.trim()])); 33 | 34 | fs.mkdirSync(path.dirname(outputPath), { 35 | recursive: true 36 | }); 37 | 38 | fs.writeFileSync(outputPath, minifyHtml(pugFunc({ 39 | inner: renderedHTML, 40 | navItems: JSON.parse(fs.readFileSync('./src/docs/navigationData.json').toString()), 41 | ...markdown.metadata, 42 | ...config, 43 | canonical 44 | }), { 45 | minifyJS: true, 46 | minifyCSS: true 47 | })); 48 | 49 | console.log(chalk.green(`Rendered ${filePath} to ${outputPath}\n`)); 50 | } 51 | 52 | if (args.includes('-w')) { 53 | chokidar.watch(mdFilePath).on('change', (filePath) => setTimeout(() => renderFile(filePath), 100)).on('ready', () => console.log(chalk.magenta(`Watching Markdown files for change\n`))); 54 | 55 | chokidar.watch(pugImportsPath).on('change', (filePath) => setTimeout(() => { 56 | console.log(chalk.blue(`Import changed ${filePath}\n`)); 57 | 58 | if (browserSync.has('default')) browserSync.get('default').pause(); 59 | 60 | pugFunc = pug.compileFile(baseFile); 61 | 62 | glob.sync(mdFilePath).forEach(renderFile); 63 | 64 | if (browserSync.has('default')) browserSync.get('default').resume(); 65 | }, 100)) 66 | } else { 67 | console.log(chalk.magenta(`Rendering Markdown files\n`)); 68 | 69 | glob.sync(mdFilePath).forEach(renderFile); 70 | } 71 | -------------------------------------------------------------------------------- /scss/core/mixins.scss: -------------------------------------------------------------------------------- 1 | // Screen Sizes 2 | 3 | @mixin small { 4 | @media screen and (max-width: $medium-breakpoint - 1px) { 5 | @content; 6 | } 7 | } 8 | 9 | @mixin medium { 10 | @media screen and (min-width: $medium-breakpoint) { 11 | @content; 12 | } 13 | } 14 | 15 | @mixin until-large { 16 | @media screen and (max-width: $large-breakpoint - 1px) { 17 | @content; 18 | } 19 | } 20 | 21 | @mixin only-medium { 22 | @media screen and (min-width: $medium-breakpoint) and (max-width: $large-breakpoint - 1px) { 23 | @content; 24 | } 25 | } 26 | 27 | @mixin large { 28 | @media screen and (min-width: $large-breakpoint) { 29 | @content; 30 | } 31 | } 32 | 33 | @mixin clearfix { 34 | &:after { 35 | content: '.'; 36 | display: block; 37 | height: 0; 38 | clear: both; 39 | visibility: hidden; 40 | } 41 | } 42 | 43 | @mixin each-breakpoint ($selector, $replace) { 44 | @each $name, $min-width, $max-width in $breakpoints { 45 | @if $name { 46 | $selector-name: str-replace($selector, $replace, $name); 47 | 48 | @if ($min-width not null) and ($max-width == null) { 49 | @media screen and (min-width: $min-width) { 50 | #{$selector-name} { 51 | @content; 52 | } 53 | } 54 | } @else if ($min-width == null) and ($max-width not null) { 55 | @media screen and (max-width: $max-width) { 56 | #{$selector-name} { 57 | @content; 58 | } 59 | } 60 | } @else if ($min-width not null) and ($max-width not null) { 61 | @media screen and (min-width: $min-width) and (max-width: $max-width) { 62 | #{$selector-name} { 63 | @content; 64 | } 65 | } 66 | } 67 | } 68 | } 69 | } 70 | 71 | @mixin c-each-breakpoint ($selector, $replace) { 72 | // Custom Breakpoint Only 73 | @each $name, $min-width, $max-width in $custom-breakpoints { 74 | @if $name { 75 | $selector-name: str-replace($selector, $replace, $name); 76 | 77 | @if ($min-width != null) and ($max-width == null) { 78 | @media screen and (min-width: $min-width) { 79 | #{$selector-name} { 80 | @content; 81 | } 82 | } 83 | } @else if ($min-width == null) and ($max-width != null) { 84 | @media screen and (max-width: $max-width) { 85 | #{$selector-name} { 86 | @content; 87 | } 88 | } 89 | } @else if ($min-width != null) and ($max-width != null) { 90 | @media screen and (min-width: $min-width) and (max-width: $max-width) { 91 | #{$selector-name} { 92 | @content; 93 | } 94 | } 95 | } 96 | } 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /pages/src/docs/_includes/bottombar.pug: -------------------------------------------------------------------------------- 1 | // Bottom Bar 2 | .bottombar 3 | a(href='../../../../../../../' aria-label='Go to Homepage of Zusty CSS') 4 | img(src='/resources/zusty.svg' alt="Zusty CSS Logo") 5 | .button-container 6 | button.zust-btn.nav-opener.zust-icon-btn.zust-transparent.zust-rounded(onclick='showSidenav()' name='sidenav-opener' aria-label='Open bottom navigation') 7 | span.zust-icon 8 | svg(xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewbox='0 0 24 24') 9 | path(fill='none' d='M0 0h24v24H0V0z') 10 | path(fill='currentColor' d='M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z') 11 | button.zust-btn.zust-icon-btn.zust-transparent.zust-rounded(onclick='toggleTheme()' name='theme-toggler' aria-label='Toggle theme to dark or light') 12 | span.zust-icon 13 | svg(xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewbox='0 0 24 24') 14 | path(fill='none' d='M0 0h24v24H0V0z') 15 | path(fill='currentColor' d='M16.56 8.94L8.32.7C7.93.31 7.3.31 6.91.7c-.39.39-.39 1.02 0 1.41l1.68 1.68-5.15 5.15c-.59.59-.59 1.54 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.58.59-1.53 0-2.12zM5.21 10L10 5.21 14.79 10H5.21zM19 11.5s-2 2.17-2 3.5c0 1.1.9 2 2 2s2-.9 2-2c0-1.33-2-3.5-2-3.5z') 16 | path(fill-opacity='.36' fill='currentColor' d='M2 20h20c1.1 0 2 .9 2 2s-.9 2-2 2H2c-1.1 0-2-.9-2-2s.9-2 2-2z') 17 | button#searchBtnBtm.zust-btn.zust-icon-btn.zust-transparent.zust-rounded(onclick='showSearch()' name='documentation-search' aria-label='Search inside of docs') 18 | span.zust-icon 19 | svg(xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewbox='0 0 24 24') 20 | path(fill='none' d='M0 0h24v24H0V0z') 21 | path(fill='currentColor' d='M15.5 14h-.79l-.28-.27c1.2-1.4 1.82-3.31 1.48-5.34-.47-2.78-2.79-5-5.59-5.34-4.23-.52-7.79 3.04-7.27 7.27.34 2.8 2.56 5.12 5.34 5.59 2.03.34 3.94-.28 5.34-1.48l.27.28v.79l4.25 4.25c.41.41 1.08.41 1.49 0 .41-.41.41-1.08 0-1.49L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z') 22 | button#navBkBtn.nav-backer.zust-btn.zust-icon-btn.zust-transparent.zust-rounded(onclick='navBack()' name='navigate-back' aria-label='Go back one step in side/bottom navigation') 23 | span.zust-icon 24 | svg(xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewbox='0 0 24 24') 25 | path(fill='none' d='M0 0h24v24H0V0z') 26 | path(fill='currentColor' d='M19 11H7.83l4.88-4.88c.39-.39.39-1.03 0-1.42-.39-.39-1.02-.39-1.41 0l-6.59 6.59c-.39.39-.39 1.02 0 1.41l6.59 6.59c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L7.83 13H19c.55 0 1-.45 1-1s-.45-1-1-1z') 27 | -------------------------------------------------------------------------------- /pages/src/docs/_includes/head.pug: -------------------------------------------------------------------------------- 1 | link(rel="manifest" href="../manifest.json") 2 | meta(http-equiv='Content-Type' content='text/html; charset=UTF-8') 3 | meta(name='mobile-web-app-capable' content='yes') 4 | meta(name='viewport' content='width=device-width, initial-scale=1, minimum-scale=1') 5 | meta(name='description' content='Power Packed CSS Framework for Building Beautiful Interfaces.') 6 | meta(name='author' content='Sarsa Murmu') 7 | meta(name='keywords' content='zusty, css, framework, web, open-source, customizable, dark') 8 | meta(property='og:site_name' content='Zusty CSS') 9 | if (!debug) 10 | // Global site tag (gtag.js) - Google Analytics 11 | script(async src="https://www.googletagmanager.com/gtag/js?id=UA-142857751-1") 12 | script. 13 | window.dataLayer = window.dataLayer || []; 14 | function gtag(){dataLayer.push(arguments);} 15 | gtag('js', new Date()); 16 | 17 | gtag('config', 'UA-142857751-1'); 18 | // Open Graph data 19 | meta(property='og:type' content='documentation') 20 | meta(property='og:url' content=canonical) 21 | meta(property='og:image' content='/resources/brand_logo.png') 22 | meta(property='og:description' content='Power Packed CSS Framework for Building Beautiful Interfaces.') 23 | meta(property='og:site_name' content='Zusty CSS') 24 | meta(property='og:locale' content='en_US') 25 | link(rel='canonical' href=canonical) 26 | // Twitter 27 | // Twitter Card data 28 | meta(name='twitter:card' content='summary') 29 | meta(name='twitter:creator' content='@sarsamurmu') 30 | meta(name='twitter:site' content='@sarsamurmu') 31 | meta(name='twitter:title' content='Zusty CSS') 32 | meta(name='twitter:description' content='Power Packed CSS Framework for Building Beautiful Interfaces.') 33 | // Twitter summary card with large image must be at least 280x150px 34 | meta(name='twitter:image:src' content='/resources/brand_logo.png') 35 | // Theme Colors 36 | meta(name='theme-color' content='#FFFFFF') 37 | meta(name='msapplication-TileColor' content='#00b881') 38 | meta(name='msapplication-navbutton-color' content='#00b881') 39 | meta(name='apple-mobile-web-app-status-bar-style' content='#00b881') 40 | // Favicons 41 | link(rel='shortcut icon' href='/resources/favicon.png') 42 | link(rel='apple-touch-icon' href='/resources/favicon.png') 43 | link(rel='apple-touch-icon' sizes='192x192' href='/resources/favicon.png') 44 | link(rel='apple-touch-icon-precomposed' href='/resources/favicon.png') 45 | meta(name='msapplication-TileImage' content='/resources/favicon.png') 46 | link(rel='icon' href='/resources/favicon.png' sizes='192x192' type='image/png') 47 | // Apply The Theme Before Anything Loads 48 | script(src='/scripts/theme-apply.js') 49 | // CSS 50 | if (!debug) 51 | link(rel='stylesheet' href='/resources/zusty.min.css') 52 | else 53 | link(rel='stylesheet' href='/dist/zusty.css') 54 | link(rel='stylesheet' href='/stylesheets/docs.css') 55 | script(defer src='/resources/font-awesome.js') 56 | -------------------------------------------------------------------------------- /pages/src/_mixins.pug: -------------------------------------------------------------------------------- 1 | //- For Defining Titles 2 | mixin title(name) 3 | title= name 4 | meta(property='og:title' content= name) 5 | 6 | mixin redirect(url) 7 | doctype html 8 | html: head: meta(http-equiv='refresh' content=`0;url=${url}`) 9 | 10 | //- - var htmlExt = '.html' 11 | //- if (!debug && forServer) 12 | - var htmlExt = '' 13 | //- Copy Button 14 | mixin copyButton(value) 15 | button(onclick!=value copybutton aria-label='Copy Snippet to Clipboard' zust-tooltip='Copy Snippet to Clipboard' zust-tooltip-position='left' zust-tooltip-type="primary") 16 | 17 | 18 | mixin nav(activeItem, classes) 19 | nav(role='navigation' class=`zust-navbar zust-flat zust-right-aligned ${classes}` style='z-index: 10') 20 | .zust-header 21 | img(src='/resources/zusty.svg' alt='brand_logo') 22 | span Zusty CSS #[span v#{version}] 23 | button.zust-btn.zust-transparent.zust-menu-btn(name='menu_opener') 24 | span.zust-icon: i.zust-menu 25 | .zust-content 26 | .zust-options 27 | if (activeItem !== 'home') 28 | a(href='/') Home 29 | if (activeItem !== 'docs') 30 | a(href='/docs') Docs 31 | if (activeItem !== 'download') 32 | a(href='/download') Download 33 | a(href='https://github.com/sarsamurmu/zusty' rel='noopener' target='_blank') GitHub 34 | 35 | 36 | script. 37 | window.addEventListener('DOMContentLoaded', () => { 38 | const nav = document.querySelector('nav'); 39 | 40 | document.querySelector('nav .zust-menu-btn').addEventListener('click', () => { 41 | if (!nav.classList.contains('zust-expanded')) { 42 | nav.classList.add('zust-expanded'); 43 | nav.querySelector('.zust-menu').classList.replace('zust-menu', 'zust-close') 44 | } else { 45 | nav.classList.remove('zust-expanded'); 46 | nav.querySelector('.zust-close').classList.replace('zust-close', 'zust-menu') 47 | } 48 | }) 49 | }) 50 | 51 | mixin footer 52 | footer.site-footer 53 | p Designed and Developed by #[a(href='https://github.com/sarsamurmu' rel='noopener' zust-tooltip='Follow him on GitHub 😀' zust-tooltip-position='top' zust-tooltip-type='primary' target='_blank') Sarsa Murmu]. 54 | p. 55 | Code available under the #[a(href='https://github.com/sarsamurmu/zusty/blob/master/LICENSE.md' rel='noopener' target='_blank') MIT License], 56 | website under #[a(href='https://creativecommons.org/licenses/by-nc-sa/4.0/' rel='noopener' target='_blank') CC BY-NC-SA 4.0]. 57 | 58 | mixin updateBanner 59 | .updateBanner.zust-hidden: span Version 1.2.0 is out now. Check out #[a(href='https://github.com/sarsamurmu/zusty/releases/tag/1.2.0' rel='noopener' target='_blank') Release Notes]. 60 | 61 | script. 62 | window.addEventListener('DOMContentLoaded', () => { 63 | if (Date.now() < Date.parse('2020-5-5')) document.querySelector('.updateBanner').classList.remove('zust-hidden'); 64 | }) 65 | -------------------------------------------------------------------------------- /pages/tocopy/resources/jsfiddle.svg: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /pages/src/docs/form/textarea.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Textarea 3 | --- 4 | 5 | # Textarea 6 | A simple textarea. 7 | 8 | --- 9 | 10 | 11 | ## Structure 12 | ```html {snippet} 13 | 14 | ``` 15 | --- 16 | 17 | 18 | ## Rows and columns 19 | You can set a `textarea`{.tag}'s rows and columns by adding attribute `rows`{.attr} and `cols`{.attr}. 20 | 21 | ```html {snippet} 22 | 23 | ``` 24 | --- 25 | 26 | 27 | ## Colors 28 | It supports all theme colors. 29 | 30 | ```html {snippet} 31 | 32 | ``` 33 | --- 34 | 35 | 36 | ## Readonly 37 | You can make a `textarea`{.tag} readonly by adding attribute `readonly`{.attr}. 38 | 39 | ```html {snippet} 40 | 41 | ``` 42 | --- 43 | 44 | 45 | ## Disabled 46 | Want to make a textarea disabled? Just add attribute `disabled`{.attr}. 47 | 48 | ```html {snippet} 49 | 50 | ``` 51 | --- 52 | 53 | 54 | ## Transparent 55 | Textarea can be transparent. Add class `zust-transparent`{.class}. 56 | 57 | ```html {snippet} 58 | 59 | ``` 60 | --- 61 | 62 | 63 | ## Resize 64 | You can control the ability of resizing of a `textarea`{.tag}. Add class `zust-v-resize`{.class} for only resizable vertically and/or add class `zust-h-resize`{.class} for only resizable horizontally. 65 | 66 | If you want to completely disable the ability of resizing, then add class `zust-unresizable`{.class}. 67 | 68 | ```html {snippet} 69 | 70 | 71 | 72 | ``` 73 | --- 74 | 75 | 76 | ## Responsive size 77 | You can also make an textarea responsive by placing it inside of `zust-form-el`{.class} and adding class `zust-responsive`{.class} to `zust-form-el`{.class}. 78 | 79 | ```html {snippet} 80 |81 | 82 |
83 | ``` 84 | 85 | ::: link 86 | Using responsive size is recommended over naked textarea, though it needs extra code but it is much more better than regular textarea. 87 | ::: 88 | --- 89 | 90 | 91 | ## Fullwidth 92 | Make a textarea fullwidth by adding class `zust-fullwidth`{.class} to `zust-form-el`{.class}. 93 | 94 | ```html {snippet} 95 |96 | 97 |
98 | ``` 99 | -------------------------------------------------------------------------------- /pages/src/stylesheets/imports/editor/theme.scss: -------------------------------------------------------------------------------- 1 | [zust-theme="light"] { 2 | --editor-bg-clr: #f3f5f6; 3 | --editor-txt-clr: var(--body-text-color); 4 | --linenumber-txt-clr: rgba(57, 70, 78, 0.2); 5 | --cursor-clr: #158df6; 6 | --lint-tooltip-bg-clr: #FFF; 7 | --lint-tooltip-txt-clr: rgba(57, 70, 78, 0.8); 8 | --lint-mark-error-clr: #ff4f68; 9 | --lint-mark-warning-clr: #f7ed7e; 10 | --hints-bg-clr: hsla(0, 0%, 100%, 0.95); 11 | --hints-border-clr: #e4e7e9; 12 | --hint-txt-clr: rgba(57, 70, 78, 0.8); 13 | --hint-active-bg-clr: hsla(209, 100%, 50%, 0.1); 14 | --hint-active-txt-clr: hsl(209, 100%, 50%); 15 | 16 | /* Code */ 17 | --code-header: blue; 18 | --code-quote: #36ac3b; 19 | --code-negative: #ff4d4d; 20 | --code-positive: #36ac3b; 21 | --code-keyword: #a151d2; 22 | --code-number: #ed6e55; 23 | --code-def: #e38800; 24 | --code-operator: #ef70c1; 25 | --code-variable-2: #2795ee; 26 | --code-variable-3: #249d7f; 27 | --code-comment: #abb8c6; 28 | --code-string: #2AAB51; 29 | --code-string-2: #ed5c65; 30 | --code-meta: #a0a1a7; 31 | --code-builtin: #f18c16; 32 | --code-tag: #2795ee; 33 | --code-bracket: #39464e; 34 | --code-attribute: #f18c16; 35 | --code-hr: #999; 36 | --code-link: #2795ee; 37 | --code-function: #8d44eb; 38 | 39 | --code-error-bg-clr: #ed5c65; 40 | --code-error-txt-clr: #fff; 41 | 42 | --selected-highlight-clr: rgba(57, 70, 78, 0.15); 43 | --matching-clr: #158df6; 44 | --active-line-bg-clr: rgba(57, 70, 78, 0.027); 45 | --active-line-gutter-txt-clr: rgba(57, 70, 78, 0.5); 46 | } 47 | 48 | [zust-theme="dark"] { 49 | --editor-bg-clr: #1b2b34; //#1F262E; 50 | --editor-txt-clr: var(--body-text-color); 51 | --linenumber-txt-clr: #4c5157; 52 | --cursor-clr: #f7ed7e; 53 | --lint-tooltip-bg-clr: #1c2128; 54 | --lint-tooltip-txt-clr: #cfd0d2; 55 | --lint-mark-error-clr: #ff4f68; 56 | --lint-mark-warning-clr: #f7ed7e; 57 | --hints-bg-clr: rgba(28, 33, 40, 0.95); 58 | --hints-border-clr: #2d333b; 59 | --hint-txt-clr: #cfd0d2; 60 | --hint-active-bg-clr: #0084ff; 61 | --hint-active-txt-clr: #fff; 62 | 63 | /* Code */ 64 | --code-header: blue; 65 | --code-quote: #36ac3b; 66 | --code-negative: #ff4d4d; 67 | --code-positive: #36ac3b; 68 | --code-keyword: #b896ed; 69 | --code-number: #c594c5; 70 | --code-def: #f99157; 71 | --code-operator: #ef70c1; 72 | --code-variable-2: #ec5f67; 73 | --code-variable-3: #249d7f; 74 | --code-comment: #65737e; 75 | --code-string: #fac863; 76 | --code-string-2: #ed5c65; 77 | --code-meta: #4e6a87; 78 | --code-builtin: #f8b068; 79 | --code-tag: #ff4f68; 80 | --code-bracket: #cfd0d2; 81 | --code-attribute: #f8b068; 82 | --code-hr: #999; 83 | --code-link: #2795ee; 84 | --code-function: #99c794; 85 | 86 | --code-error-bg-clr: #ed5c65; 87 | --code-error-txt-clr: #fff; 88 | 89 | --selected-highlight-clr: hsla(0, 0%, 100%, 0.15); 90 | --matching-clr: #2196f3; 91 | --active-line-bg-clr: hsla(0, 0%, 100%, 0.05); 92 | --active-line-gutter-txt-clr: #8e9195; 93 | } 94 | -------------------------------------------------------------------------------- /pages/src/docs/general/getting-started.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Getting Started 3 | --- 4 | 5 | # Getting Started 6 | You can simply start using Zusty CSS, either using npm, CDN or by downloading it. 7 | 8 | ## npm 9 | You can simply install it via npm 10 | ```bash 11 | npm i zusty 12 | ``` 13 | Then in ``{.tag}, add this to top of your CSS Files. 14 | ```html {nolaunch} 15 | 16 | ``` 17 | --- 18 | 19 | 20 | ## Using CDN 21 | Add this to top of your all CSS files in ``{.tag} 22 | ```html {nolaunch} 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | ``` 31 | --- 32 | 33 | 34 | ## Downloading CSS file 35 | 1\. Download the unminified or minified CSS. 36 | 37 | 38 | 39 | 2\. Save it. 40 | 41 | 3\. Then include the CSS in your HTML's ``{.tag}. 42 | ```html {nolaunch} 43 | 44 | 45 | ``` 46 | --- 47 | 48 | 49 | ## Starter template 50 | This is the starter template that you can use to get started right away. 51 | ```html {nolaunch} 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 |
29 | With image
30 |
35 | With both
36 |
39 |
51 | Large chip
52 |
55 |
60 | Small chip
61 |
64 |
76 | One
77 |
80 |
91 | Three
92 |
95 |
103 | Five
104 |
108 | Six
109 |
112 |
116 | Seven
117 |
121 | Eight
122 |
125 |
136 | Ten
137 |
140 | ' +
13 | escapeHtml(tokens[idx].content).replace(/{(.*?)}\((.*?)\)/g, (m, g1, g2, o, s) => `${g2}`) +
14 | '';
15 | };
16 |
17 | md.renderer.rules.fence = function(tokens, idx, options, env, slf) {
18 | var token = tokens[idx],
19 | info = token.info ? unescapeAll(token.info).trim() : '',
20 | langName = '',
21 | highlighted, i, tmpAttrs, tmpToken, type = 'codeblock';
22 |
23 | if (info) {
24 | langName = info.split(/\s+/g)[0];
25 | }
26 |
27 | if (options.highlight) {
28 | highlighted = options.highlight(token.content, langName) || escapeHtml(token.content)
29 | } else {
30 | highlighted = escapeHtml(token.content)
31 | }
32 |
33 | if (highlighted.indexOf(' { ${token.content} })()`)()
55 | }
56 |
57 | highlighted = highlighted
58 | .replace(/{{(.*?):(.*?)}}/g, (m, g1, g2, o, s) => `${g2}`)
59 | .replace(/(?:\s+)?hidCode{{((.|\s)*?)}}(?:\s+)?/g, '')
60 | .replace(/noRender{{((.|\s)*?)}}/g, (_, offset) => offset)
61 | ;
62 |
63 | if (token.attrs && token.attrs.flat().includes('snippet')) {
64 | token.attrs.shift();
65 | tmpToken.attrs.shift();
66 |
67 | return `
68 |
69 |
70 | ${
71 | token.content
72 | .replace(/{{(.*?):(.*?)}}/g, (m, g1, g2, o, s) => g2)
73 | .replace(/(?:\s+)?hidCode{{((.|\s)*?)}}(?:\s+)?/g, (_, offset) => offset)
74 | .replace(/(?:\s+)?noRender{{((.|\s)*?)}}(?:\s+)?/g, '')
75 | }
76 |
77 |
78 |
79 | ${highlighted}
80 |
81 |
82 |
83 | `.replace(/(<(pre|script|style|textarea)[^]+?<\/\2)|(^|>)\s+|\s+(?=<|$)/g, '$1$3')
84 | }
85 |
86 | return `
87 |
88 |
89 | ${highlighted}
90 |
91 |
92 | `.replace(/(<(pre|script|style|textarea)[^]+?<\/\2)|(^|>)\s+|\s+(?=<|$)/g, '$1$3')
93 | }
94 |
95 | const containers = ['primary', 'success', 'warning', 'error', 'link'];
96 |
97 | containers.forEach((key) => {
98 | md.use(require('markdown-it-container'), key, {
99 | validate(params) {
100 | return params.includes(key)
101 | },
102 | render(tokens, idx) {
103 | var m = tokens[idx].info.trim().match(new RegExp(`^${key}\\s+(.*?)$`));
104 |
105 | if (tokens[idx].nesting === 1) {
106 | return m !== null ? `${m[1]}
` : ``
107 | } else {
108 | return '\n';
109 | }
110 | }
111 | })
112 | });
113 | }
114 |
--------------------------------------------------------------------------------