• 大小: 24.18MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-22
  • 语言: Html/CSS
  • 标签: Nifty  Admin  html  

资源简介

Nifty Admin提供了丰富的模版组件,虽然基于Bootstrap,体积上略显臃肿,但功能非常强劲,界面上的设计感更是专业十足,可基本满足所有的后台需求

资源截图

代码片段和文件信息

from subprocess import call
import os
import json


BUILDER_PATH = os.path.dirname(os.path.abspath(__file__))
ROOT_PATH = os.path.join(BUILDER_PATH ‘..‘)
FONTS_FOLDER_PATH = os.path.join(ROOT_PATH ‘fonts‘)
CSS_FOLDER_PATH = os.path.join(ROOT_PATH ‘css‘)
SCSS_FOLDER_PATH = os.path.join(ROOT_PATH ‘scss‘)
LESS_FOLDER_PATH = os.path.join(ROOT_PATH ‘less‘)


def main():
  generate_font_files()

  data = get_build_data()

  rename_svg_glyph_names(data)
  generate_scss(data)
  generate_less(data)
  generate_cheatsheet(data)
  generate_component_json(data)
  generate_composer_json(data)
  generate_bower_json(data)


def generate_font_files():
  print “Generate Fonts“
  cmd = “fontforge -script %s/scripts/generate_font.py“ % (BUILDER_PATH)
  call(cmd shell=True)


def rename_svg_glyph_names(data):
  # hacky and slow (but safe) way to rename glyph-name attributes
  svg_path = os.path.join(FONTS_FOLDER_PATH ‘ionicons.svg‘)
  svg_file = open(svg_path ‘r+‘)
  svg_text = svg_file.read()
  svg_file.seek(0)

  for ionicon in data[‘icons‘]:
    # uniF2CA
    org_name = ‘uni%s‘ % (ionicon[‘code‘].replace(‘0x‘ ‘‘).upper())
    ion_name = ‘ion-%s‘ % (ionicon[‘name‘])
    svg_text = svg_text.replace(org_name ion_name)

  svg_file.write(svg_text)
  svg_file.close()


def generate_less(data):
  print “Generate LESS“
  font_name = data[‘name‘]
  font_version = data[‘version‘]
  css_prefix = data[‘prefix‘]
  variables_file_path = os.path.join(LESS_FOLDER_PATH ‘_ionicons-variables.less‘)
  icons_file_path = os.path.join(LESS_FOLDER_PATH ‘_ionicons-icons.less‘)

  d = []
  d.append(‘/*!‘);
  d.append(‘Ionicons v%s‘ % (font_version) );
  d.append(‘Created by Ben Sperry for the Ionic framework http://ionicons.com/‘);
  d.append(‘https://twitter.com/benjsperry  https://twitter.com/ionicframework‘);
  d.append(‘MIT License: https://github.com/driftyco/ionicons‘);
  d.append(‘*/‘);
  d.append(‘// Ionicons Variables‘)
  d.append(‘// --------------------------\n‘)
  d.append(‘@ionicons-font-path: “../fonts“;‘)
  d.append(‘@ionicons-font-family: “%s“;‘ % (font_name) )
  d.append(‘@ionicons-version: “%s“;‘ % (font_version) )
  d.append(‘@ionicons-prefix: %s;‘ % (css_prefix) )
  d.append(‘‘)
  for ionicon in data[‘icons‘]:
    chr_code = ionicon[‘code‘].replace(‘0x‘ ‘\\‘)
    d.append(‘@ionicon-var-%s: “%s“;‘ % (ionicon[‘name‘] chr_code) )
  f = open(variables_file_path ‘w‘)
  f.write( ‘\n‘.join(d) )
  f.close()

  d = []
  d.append(‘// Ionicons Icons‘)
  d.append(‘// --------------------------\n‘)

  group = [ ‘.%s‘ % (data[‘name‘].lower()) ]
  for ionicon in data[‘icons‘]:
    group.append(‘.@{ionicons-prefix}%s:before‘ % (ionicon[‘name‘]) )

  d.append( ‘\n‘.join(group) )

  d.append(‘{‘)
  d.append(‘  &:extend(.ion);‘)
  d.append(‘}‘)

  for ionicon in data[‘icons‘]:
    chr_code = ionicon[‘code‘].replace(‘0x‘ ‘\\‘)
    d.append(‘.@{ionicons-prefix}%s:before { content: @ionicon-var-%s; }‘ % (ionicon[‘name‘] ionicon[‘name‘]) )

  f = open(icons_file_path ‘w‘)

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2016-08-25 18:54  nifty\
     目录           0  2016-06-21 07:35  nifty\demo\
     文件      112924  2016-06-16 08:27  nifty\demo\charts.html
     目录           0  2016-06-21 07:34  nifty\demo\css\
     目录           0  2016-06-21 07:34  nifty\demo\css-preprocessors\
     目录           0  2016-06-21 07:34  nifty\demo\css-preprocessors\less\
     目录           0  2016-06-21 07:34  nifty\demo\css-preprocessors\less\nifty\
     文件         969  2016-06-14 10:48  nifty\demo\css-preprocessors\less\nifty.less
     文件        3720  2016-06-19 23:52  nifty\demo\css-preprocessors\less\nifty\_animations.less
     文件       11144  2016-06-15 22:56  nifty\demo\css-preprocessors\less\nifty\_aside.less
     文件       72165  2016-06-14 09:31  nifty\demo\css-preprocessors\less\nifty\_bs-overwrite.less
     文件       62318  2016-06-16 04:10  nifty\demo\css-preprocessors\less\nifty\_extras.less
     文件         953  2016-06-09 11:41  nifty\demo\css-preprocessors\less\nifty\_footer.less
     文件        8352  2016-05-31 11:46  nifty\demo\css-preprocessors\less\nifty\_helper-classes.less
     文件       13001  2016-06-16 04:15  nifty\demo\css-preprocessors\less\nifty\_layout.less
     文件       22785  2016-06-19 23:47  nifty\demo\css-preprocessors\less\nifty\_mainnav.less
     文件        7688  2016-06-16 05:50  nifty\demo\css-preprocessors\less\nifty\_navbar.less
     目录           0  2016-06-21 07:34  nifty\demo\css-preprocessors\less\themes\
     目录           0  2016-06-21 07:34  nifty\demo\css-preprocessors\less\themes\type-a\
     文件        2072  2016-06-14 23:02  nifty\demo\css-preprocessors\less\themes\type-a\theme-coffee.less
     文件        2073  2016-06-14 23:13  nifty\demo\css-preprocessors\less\themes\type-a\theme-dark.less
     文件        2069  2016-06-14 23:13  nifty\demo\css-preprocessors\less\themes\type-a\theme-dust.less
     文件        2033  2016-06-14 23:13  nifty\demo\css-preprocessors\less\themes\type-a\theme-light.less
     文件        2073  2016-06-14 23:13  nifty\demo\css-preprocessors\less\themes\type-a\theme-lime.less
     文件        2081  2016-06-14 23:14  nifty\demo\css-preprocessors\less\themes\type-a\theme-mint.less
     文件        2092  2016-06-14 23:14  nifty\demo\css-preprocessors\less\themes\type-a\theme-navy.less
     文件        2073  2016-06-14 23:14  nifty\demo\css-preprocessors\less\themes\type-a\theme-ocean.less
     文件        2073  2016-06-14 23:15  nifty\demo\css-preprocessors\less\themes\type-a\theme-prickly-pear.less
     文件        2080  2016-06-14 23:15  nifty\demo\css-preprocessors\less\themes\type-a\theme-purple.less
     文件        2080  2016-06-14 23:15  nifty\demo\css-preprocessors\less\themes\type-a\theme-well-red.less
     文件        2098  2016-06-14 23:15  nifty\demo\css-preprocessors\less\themes\type-a\theme-yellow.less
............此处省略2198个文件信息

评论

共有 条评论