diff --git a/SassBuilder-master/CreateBuilderConfig.py b/SassBuilder-master/CreateBuilderConfig.py new file mode 100644 index 0000000..d73ca58 --- /dev/null +++ b/SassBuilder-master/CreateBuilderConfig.py @@ -0,0 +1,36 @@ +import sublime, sublime_plugin + +import os + +skeleton = '''{ + "project_path": "/path/to/scss", + "output_path": "/path/to/css", + "options": { + "cache": true, + "debug": true, + "line-comments": true, + "line-numbers": true, + "style": "nested" + } +}''' + +class SassBuilderCreateCommand(sublime_plugin.WindowCommand): + + def run(self, paths=[]): + if len(paths) != 0: + for path in paths: + if os.path.isdir(path): + filename = os.path.join(path, '.sassbuilder-config.json') + + with open(filename, 'w+') as f: + f.write(skeleton) + + view = self.window.open_file(filename) + view.set_syntax_file('Packages/Javascript/JSON.tmLanguage') + else: + view = self.window.new_file() + view.settings().set('default_dir', self.window.folders()[0]) + view.set_syntax_file('Packages/Javascript/JSON.tmLanguage') + view.set_name('.sassbuilder-config') + + view.run_command('insert_snippet', {'contents': skeleton}) diff --git a/SassBuilder-master/Default (Linux).sublime-keymap b/SassBuilder-master/Default (Linux).sublime-keymap new file mode 100644 index 0000000..d814197 --- /dev/null +++ b/SassBuilder-master/Default (Linux).sublime-keymap @@ -0,0 +1,5 @@ +[ + { + "keys": ["ctrl+b", "ctrl+s"], "command": "sass_builder_create" + } +] \ No newline at end of file diff --git a/SassBuilder-master/Default (OSX).sublime-keymap b/SassBuilder-master/Default (OSX).sublime-keymap new file mode 100644 index 0000000..800696b --- /dev/null +++ b/SassBuilder-master/Default (OSX).sublime-keymap @@ -0,0 +1,5 @@ +[ + { + "keys": ["super+b", "super+s"], "command": "sass_builder_create" + } +] \ No newline at end of file diff --git a/SassBuilder-master/Default (Windows).sublime-keymap b/SassBuilder-master/Default (Windows).sublime-keymap new file mode 100644 index 0000000..d814197 --- /dev/null +++ b/SassBuilder-master/Default (Windows).sublime-keymap @@ -0,0 +1,5 @@ +[ + { + "keys": ["ctrl+b", "ctrl+s"], "command": "sass_builder_create" + } +] \ No newline at end of file diff --git a/SassBuilder-master/Main.sublime-menu b/SassBuilder-master/Main.sublime-menu new file mode 100644 index 0000000..ba576a0 --- /dev/null +++ b/SassBuilder-master/Main.sublime-menu @@ -0,0 +1,12 @@ +[ + { + "id": "tools", + "caption": "Tools", + "children": [ + { + "caption": "Sass Builder Config", + "command": "sass_builder_create" + } + ] + } +] \ No newline at end of file diff --git a/SassBuilder-master/README.md b/SassBuilder-master/README.md new file mode 100644 index 0000000..d11064e --- /dev/null +++ b/SassBuilder-master/README.md @@ -0,0 +1,80 @@ +Sass Builder +============ + +Sass Builder is a SASS compiler that reads a config file (.sassbuilder-config) stored +in a sass/scss source folder. It is a JSON file that sets .css output folder and SASS +flags [cache, style, debug, line numbers, line comments]. + +The plugin works on post save of a .sass/.scss file in Sublime Text. + +UPDATED! +======== +This has been resting on the side burner for quite some time and it has finally +received the attention it needed! This has finally been updated to support Sublime +Text 3 and it also works with Python 3. + +There was an issue with the `grep` command being called if the system didn't have it +available. This has been corrected to search for `grep` first and run a pure pythonic +method if it's not found in the system's `PATH`. + +I have a small method for this [which.py][w] that mimics the Linux command `which`. + +The `.sassbuilder-config` has been changed to `.sassbuilder-config.json` to remove +the error Sublime Text 3 generates. `project_path` has be added to this to allow for +scanning in the entire project path when partials are saved. + + +* Automatically runs on save. +* Create .sassbuilder-config files with ease + * Tools->Sass Builder Config + * Ctrl+B + Ctrl+S keystroke + * Right-click a folder or folders in the side bar. + +The .sassbuilder-config file +============================ +```json +{ + "project_path": "/project/path", + "output_path": "/project/path/css", + "options": { + "cache": true, + "debug": false, + "line-comments": true, + "line-numbers": true, + "style": "nested" + } +} +``` + +[w]: https://gist.github.com/bnlucas/a23105c69132ab9e5fe9 + +Install with Sublime Package Control +============================ +1. Add this repo using "Package Control: Add Repository" https://github.com/bnlucas/SassBuilder +2. You can then add this package using Package Control as usual. Find "Package Control: Add Package" and search for "Sass Builder" + + +Known Issues on Mac +============================ +For some users, you may receive this error: +``` +b'/bin/sh: sass: command not found\n' +``` +This is because: +> 'There is a breakage or removal of environment variable functionality in launchd.conf for users of OS X 10.10 (Yosemite) and above.' + +-Source https://support.enthought.com/hc/en-us/articles/204469160-How-do-I-set-PYTHONPATH-and-other-environment-variables-for-Canopy- + +You can either follow the instructions to add the path to your executable to your PYTHONPATH as detailed in the link above or follow these steps: + +1. Install the "PackageResourceViewer" package to sublime using Package Control, then open this plugin within sublime. +2. Edit SassBuilder.py line 113 changing +``` +sass = 'sass --update \'{0}\':\'{1}\' --stop-on-error --trace {2} ' \ + '--style {3}' +``` +to +``` +sass = '/usr/local/bin/sass --update \'{0}\':\'{1}\' --stop-on-error --trace {2} ' \ + '--style {3}' +``` diff --git a/SassBuilder-master/SassBuilder.py b/SassBuilder-master/SassBuilder.py new file mode 100644 index 0000000..a2bfab7 --- /dev/null +++ b/SassBuilder-master/SassBuilder.py @@ -0,0 +1,164 @@ +import sublime, sublime_plugin + +import codecs +import json +import os +import re + +from functools import partial +from threading import Thread +from subprocess import PIPE, Popen + + +SASS_EXTENSIONS = ('.scss', '.sass') + + +def which(executable): + for path in os.environ['PATH'].split(os.pathsep): + path = path.strip('"') + + fpath = os.path.join(path, executable) + + if os.path.isfile(fpath) and os.access(fpath, os.X_OK): + return fpath + + if os.name == 'nt' and not executable.endswith('.exe'): + return which('{}.exe'.format(executable)) + + return None + + +def path_info(path): + root = os.path.dirname(path) + name = os.path.splitext(os.path.basename(path))[0] + extn = os.path.splitext(path)[1] + + return {'root': root, 'name': name, 'extn': extn, 'path': path} + + +def find_files(pattern, path): + pattern = re.compile(pattern) + found = [] + path = os.path.realpath(path) + + for root, dirnames, files in os.walk(path): + for fname in files: + if fname.endswith(SASS_EXTENSIONS): + with codecs.open(os.path.join(root, fname), 'r', "utf-8") as f: + if any(pattern.search(line) for line in f): + found.append(os.path.join(root, fname)) + break + + return found + + +def grep_files(pattern, path): + path = os.path.realpath(path) + grep = '''grep -E "{}" * -lr'''.format(pattern) + + proc = Popen(grep, shell=True, cwd=path, stdout=PIPE, stderr=PIPE) + + out, err = proc.communicate() + + if err: + print(err) + sublime.error_message('SassBuilder: Hit \'ctrl+`\' to see errors.') + + if not out: + return None + + out = out.decode('utf8') + found = [] + for f in out.split(): + if f.endswith(SASS_EXTENSIONS): + found.append(os.path.join(path, f)) + + return found + + +def get_partial_files(info, project_path): + pattern = '''@import.*{}'''.format(info['name'][1:]) + + if which('grep'): + return grep_files(pattern, project_path) + + return find_files(pattern, project_path) + + +def get_files(info, project_path): + if info['name'].startswith('_'): + return get_partial_files(info, project_path) + return [info['path']] + + +def load_settings(project_path): + try: + with open(os.sep.join([project_path, '.sassbuilder-config.json']), 'r') as f: + data = f.read() + return json.loads(data) + except: + return None + + +def compile_sass(files, settings): + compiled_files = [] + for f in files: + info = path_info(f) + + srcp = os.path.join(info['root'], settings['output_path']) + name = '.'.join([info['name'], 'css']) + + path = os.path.join(srcp, name) + + sass = 'sass --update \'{0}\':\'{1}\' --stop-on-error --trace {2} ' \ + '--style {3}' + + rules = [] + + if not settings['options']['cache']: + rules.append('--no-cache') + + if settings['options']['debug']: + rules.append('--debug-info') + + if settings['options']['line-comments']: + rules.append('--line-comments') + + if settings['options']['line-numbers']: + rules.append('--line-numbers') + + rules = ' '.join(rules) + + sass = sass.format(info['path'], path, rules, + settings['options']['style']) + + sass = Popen(sass, shell=True, cwd=info['root'], stdout=PIPE, stderr=PIPE) + + out, err = sass.communicate() + if out: + compiled_files.append(name) + + if err: + print(err) + sublime.error_message('SassBuilder: Hit \'ctrl+`\' to see errors.') + return + + print('{0} has been compiled.'.format(', '.join(compiled_files))) + + +class SassBuilderCommand(sublime_plugin.EventListener): + + def on_post_save(self, view): + info = path_info(view.file_name()) + settings = load_settings(info['root']) + + if not settings: + return None + + if info['extn'] in SASS_EXTENSIONS: + print('SassBuilder started.') + files = get_files(info, settings['project_path']) + + #t = Thread(target=compile_sass, args=(files, settings)) + #t.start() + compile_sass(files, settings) diff --git a/SassBuilder-master/Side Bar.sublime-menu b/SassBuilder-master/Side Bar.sublime-menu new file mode 100644 index 0000000..2b8b29f --- /dev/null +++ b/SassBuilder-master/Side Bar.sublime-menu @@ -0,0 +1,7 @@ +[ + { "caption": "-" }, + { + "caption": "Sass Builder Config", + "command": "sass_builder_create", "args": { "paths": [] } + } +] \ No newline at end of file diff --git a/in-class-exercises/test.scss b/in-class-exercises/test.scss new file mode 100644 index 0000000..e69de29 diff --git a/landing-page/.sassbuilder-config b/landing-page/.sassbuilder-config new file mode 100644 index 0000000..54b2449 --- /dev/null +++ b/landing-page/.sassbuilder-config @@ -0,0 +1,11 @@ +{ + "project_path": "/landing-page", + "output_path": "/landing-page/css", + "options": { + "cache": true, + "debug": false, + "line-comments": true, + "line-numbers": true, + "style": "nested" + } +} \ No newline at end of file diff --git a/landing-page/_h1.scss b/landing-page/_h1.scss new file mode 100644 index 0000000..e32c590 --- /dev/null +++ b/landing-page/_h1.scss @@ -0,0 +1,17 @@ +$h1-purple:#46156b; + +.container-1 { + display:flex; + flex-wrap:wrap; + justify-content:center; + padding-top:50px; +} + +h1 { + font-family: 'Questrial', sans-serif; + color: $h1-purple; + letter-spacing: 1px; + font-size: 44px; + justify-content:center; + align-self:flex-end; +} \ No newline at end of file diff --git a/landing-page/_images.scss b/landing-page/_images.scss new file mode 100644 index 0000000..0b9f2ce --- /dev/null +++ b/landing-page/_images.scss @@ -0,0 +1,28 @@ +$x-small: 768px; +$small: 769px; +$small-max: 992px; +$medium: 993px; +$medium-max: 1225px; +$large: 1226px; + +.container-2 { + display:flex; + justify-content:center; + img { + width:40%; + height:40%; + } +} + + + +.lipstick { + width: 12%; + margin-top:-200px; + @media screen and (max-width: $x-small) { + display: none; + } + @media screen and (min-width: $small) and (max-width: $small-max) { + display: none; + } +} \ No newline at end of file diff --git a/landing-page/_input.scss b/landing-page/_input.scss new file mode 100644 index 0000000..ac3bdd5 --- /dev/null +++ b/landing-page/_input.scss @@ -0,0 +1,19 @@ +form{ + display:flex; + input { + font-family:'EB Garamond', serif; + font-size:20px; + border: 5px solid #d24131; + border-radius: 25px; + padding:10px 15px 10px 15px; + margin-top:10px; + margin-left:75px; + margin-right:75px; + } + } + + .container-4 { + display:flex; + align-items:flex-start; + justify-content:center; + } \ No newline at end of file diff --git a/landing-page/index.html b/landing-page/index.html new file mode 100644 index 0000000..3208551 --- /dev/null +++ b/landing-page/index.html @@ -0,0 +1,32 @@ + + + + + + Tarte Landing Page + + + + + +
+
+

tarte

+
+ +
+ lip paint swatches +
+
+

Enter your phone number and get a free lipstick now!

+
+
+ tarte lip paint +
+ +
+ tarte lip paint +
+
+ + \ No newline at end of file diff --git a/landing-page/layout/font.png b/landing-page/layout/font.png new file mode 100644 index 0000000..ed9c74c Binary files /dev/null and b/landing-page/layout/font.png differ diff --git a/landing-page/layout/framwork.psd b/landing-page/layout/framwork.psd new file mode 100644 index 0000000..e6039e2 Binary files /dev/null and b/landing-page/layout/framwork.psd differ diff --git a/landing-page/layout/lip-pant.jpg b/landing-page/layout/lip-pant.jpg new file mode 100644 index 0000000..f45e142 Binary files /dev/null and b/landing-page/layout/lip-pant.jpg differ diff --git a/landing-page/layout/lip.psd b/landing-page/layout/lip.psd new file mode 100644 index 0000000..bce123e Binary files /dev/null and b/landing-page/layout/lip.psd differ diff --git a/landing-page/layout/swatch-1.jpg b/landing-page/layout/swatch-1.jpg new file mode 100644 index 0000000..cf33db1 Binary files /dev/null and b/landing-page/layout/swatch-1.jpg differ diff --git a/landing-page/layout/swatch-2.png b/landing-page/layout/swatch-2.png new file mode 100644 index 0000000..1f84575 Binary files /dev/null and b/landing-page/layout/swatch-2.png differ diff --git a/landing-page/layout/swatch-3.jpg b/landing-page/layout/swatch-3.jpg new file mode 100644 index 0000000..d197689 Binary files /dev/null and b/landing-page/layout/swatch-3.jpg differ diff --git a/landing-page/layout/swatch-4.jpg b/landing-page/layout/swatch-4.jpg new file mode 100644 index 0000000..eb5da99 Binary files /dev/null and b/landing-page/layout/swatch-4.jpg differ diff --git a/landing-page/layout/swatches.png b/landing-page/layout/swatches.png new file mode 100644 index 0000000..9f32c00 Binary files /dev/null and b/landing-page/layout/swatches.png differ diff --git a/landing-page/layout/swatches.psd b/landing-page/layout/swatches.psd new file mode 100644 index 0000000..a46d7a5 Binary files /dev/null and b/landing-page/layout/swatches.psd differ diff --git a/landing-page/layout/swatchess.png b/landing-page/layout/swatchess.png new file mode 100644 index 0000000..fd6a4d6 Binary files /dev/null and b/landing-page/layout/swatchess.png differ diff --git a/landing-page/layout/texture.jpg b/landing-page/layout/texture.jpg new file mode 100644 index 0000000..8a8c642 Binary files /dev/null and b/landing-page/layout/texture.jpg differ diff --git a/landing-page/lipstick-2.png b/landing-page/lipstick-2.png new file mode 100644 index 0000000..dfe24e4 Binary files /dev/null and b/landing-page/lipstick-2.png differ diff --git a/landing-page/lipstick.png b/landing-page/lipstick.png new file mode 100644 index 0000000..9fb49fe Binary files /dev/null and b/landing-page/lipstick.png differ diff --git a/landing-page/main.css b/landing-page/main.css new file mode 100644 index 0000000..e28248a --- /dev/null +++ b/landing-page/main.css @@ -0,0 +1,85 @@ +.container-1 { + display: flex; + flex-wrap: wrap; + justify-content: center; + padding-top: 50px; } + +h1 { + font-family: 'Questrial', sans-serif; + color: #46156b; + letter-spacing: 1px; + font-size: 44px; + justify-content: center; + align-self: flex-end; } + +form { + display: flex; } + form input { + font-family: 'EB Garamond', serif; + font-size: 20px; + border: 5px solid #d24131; + border-radius: 25px; + padding: 10px 15px 10px 15px; + margin-top: 10px; + margin-left: 75px; + margin-right: 75px; } + +.container-4 { + display: flex; + align-items: flex-start; + justify-content: center; } + +.container-2 { + display: flex; + justify-content: center; } + .container-2 img { + width: 40%; + height: 40%; } + +.lipstick { + width: 12%; + margin-top: -200px; } + @media screen and (max-width: 768px) { + .lipstick { + display: none; } } + @media screen and (min-width: 769px) and (max-width: 992px) { + .lipstick { + display: none; } } + +html { + height: 100vh; } + +.main { + background-color: #eaeaea; + height: 100vh; } + +body { + margin: 0 auto; + border-right: 5px solid #46156b; + border-left: 5px solid #46156b; + background-color: #784e98; + width: 80%; } + @media screen and (max-width: 768px) { + body { + width: 100%; } } + @media screen and (min-width: 769px) and (max-width: 992px) { + body { + width: 85%; } } + +p { + font-family: 'Dawning of a New Day', script; + font-size: 30px; + width: 40%; + text-align: center; } + @media screen and (max-width: 768px) { + p { + width: 60%; } } + @media screen and (min-width: 769px) and (max-width: 992px) { + p { + width: 70%; } } + +.container-3 { + display: flex; + justify-content: center; } + +/*# sourceMappingURL=main.css.map */ diff --git a/landing-page/main.css.map b/landing-page/main.css.map new file mode 100644 index 0000000..00d15f4 --- /dev/null +++ b/landing-page/main.css.map @@ -0,0 +1,7 @@ +{ +"version": 3, +"mappings": "AAEA,YAAa;EACZ,OAAO,EAAC,IAAI;EACZ,SAAS,EAAC,IAAI;EACd,eAAe,EAAC,MAAM;EACtB,WAAW,EAAC,IAAI;;AAGjB,EAAG;EACF,WAAW,EAAE,uBAAuB;EACpC,KAAK,EAXK,OAAO;EAYjB,cAAc,EAAE,GAAG;EACnB,SAAS,EAAE,IAAI;EACf,eAAe,EAAC,MAAM;EACtB,UAAU,EAAC,QAAQ;;ACfpB,IAAI;EACH,OAAO,EAAC,IAAI;EACT,UAAM;IACJ,WAAW,EAAC,oBAAoB;IAChC,SAAS,EAAC,IAAI;IACd,MAAM,EAAE,iBAAiB;IACzB,aAAa,EAAE,IAAI;IACnB,OAAO,EAAC,mBAAmB;IAC3B,UAAU,EAAC,IAAI;IACf,WAAW,EAAC,IAAI;IAChB,YAAY,EAAC,IAAI;;AAIrB,YAAa;EACZ,OAAO,EAAC,IAAI;EACZ,WAAW,EAAC,UAAU;EACtB,eAAe,EAAC,MAAM;;ACVzB,YAAa;EACZ,OAAO,EAAC,IAAI;EACZ,eAAe,EAAC,MAAM;EACrB,gBAAI;IACH,KAAK,EAAC,GAAG;IACT,MAAM,EAAC,GAAG;;AAMb,SAAU;EACT,KAAK,EAAE,GAAG;EACV,UAAU,EAAC,MAAM;EAChB,oCAAwC;IAH1C,SAAU;MAIJ,OAAO,EAAE,IAAI;EAEf,2DAAkE;IANtE,SAAU;MAOJ,OAAO,EAAE,IAAI;;ACnBnB,IAAK;EACH,MAAM,EAAE,KAAK;;AAGf,KAAM;EACL,gBAAgB,EAAC,OAAO;EACxB,MAAM,EAAE,KAAK;;AAGd,IAAK;EACJ,MAAM,EAAC,MAAM;EACb,YAAY,EAAC,iBAAoB;EACjC,WAAW,EAAC,iBAAoB;EAEhC,gBAAgB,EADJ,OAAwC;EAGpD,KAAK,EAAC,GAAG;EACR,oCAAwC;IAR1C,IAAK;MASC,KAAK,EAAC,IAAI;EAEZ,2DAAkE;IAXtE,IAAK;MAYC,KAAK,EAAC,GAAG;;AAKf,CAAE;EACD,WAAW,EAAE,8BAA8B;EAC3C,SAAS,EAAC,IAAI;EACd,KAAK,EAAC,GAAG;EACT,UAAU,EAAC,MAAM;EAChB,oCAAwC;IAL1C,CAAE;MAMI,KAAK,EAAC,GAAG;EAEX,2DAAkE;IARtE,CAAE;MASI,KAAK,EAAC,GAAG;;AAIf,YAAa;EACZ,OAAO,EAAC,IAAI;EACZ,eAAe,EAAC,MAAM", +"sources": ["_h1.scss","_input.scss","_images.scss","main.scss"], +"names": [], +"file": "main.css" +} diff --git a/landing-page/main.scss b/landing-page/main.scss new file mode 100644 index 0000000..5546f99 --- /dev/null +++ b/landing-page/main.scss @@ -0,0 +1,50 @@ +@import 'h1'; +@import 'input'; +@import 'images'; + + + +html { + height: 100vh; +} + +.main { + background-color:#eaeaea; + height: 100vh; +} + +body { + margin:0 auto; + border-right:5px solid $h1-purple; + border-left:5px solid $h1-purple; + $h1-purple: desaturate(lighten($h1-purple, 20%),35%); + background-color:$h1-purple; + + width:80%; + @media screen and (max-width: $x-small) { + width:100%; + } + @media screen and (min-width: $small) and (max-width: $small-max) { + width:85%; + } + +} + +p { + font-family: 'Dawning of a New Day', script; + font-size:30px; + width:40%; + text-align:center; + @media screen and (max-width: $x-small) { + width:60%; + } + @media screen and (min-width: $small) and (max-width: $small-max) { + width:70%; + } +} + +.container-3 { + display:flex; + justify-content:center; +} + diff --git a/landing-page/swatches.png b/landing-page/swatches.png new file mode 100644 index 0000000..0a260b7 Binary files /dev/null and b/landing-page/swatches.png differ