Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#73271218] Style doctype icons #27

Merged
merged 6 commits into from
Jul 25, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion css/gengo.css

Large diffs are not rendered by default.

Binary file added images/doctype/file_check.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_check_@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_def.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_def_@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_doc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_doc_@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_ggl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_ggl_@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_gls.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_gls_@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_grp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_grp_@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_odt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_odt_@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_pdf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_pdf_@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_ppt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_ppt_@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_rtf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_rtf_@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_txt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_txt_@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_xls.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_xls_@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_yt.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/doctype/file_yt_@2x.png
38 changes: 38 additions & 0 deletions liquid/_data/doctype.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
- class: doctype-def
name: file

- class: doctype-txt
name: text

- class: doctype-doc
name: word

- class: doctype-xls
name: exel

- class: doctype-rtf
name: rtf

- class: doctype-ppt
name: ppt

- class: doctype-pdf
name: pdf

- class: doctype-odt
name: odt

- class: doctype-yt
name: youtube

- class: doctype-ggl
name: google

- class: doctype-check
name: check

- class: doctype-gls
name: glossary

- class: doctype-grp
name: group
15 changes: 15 additions & 0 deletions liquid/_includes/style/doctype-icons.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
<div class="box">
<h1 id="doctype-icons">Doctype Icons</h1>
<hr/>

<ul class="list-inline doctype">
{% for doctype in site.data.doctype %}
<li>
<i class="{{ doctype.class }}"></i>
<div class="text">{{ doctype.name }}</div>
</li>
{% endfor %}
</ul>
{% highlight html %}
{% for doctype in site.data.doctype %}
<!-- {{ doctype.name }} -->
<i class="{{ doctype.class }}"></i>{% endfor %}
{% endhighlight %}

</div>
8 changes: 4 additions & 4 deletions liquid/_includes/style/icons.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ <h1 id="icons">Icons</h1>
<ul class="list-inline icons">
{% for name in site.data.icons %}
<li>
<span class="icon-{{ name }}"></span>
<i class="icon-{{ name }}"></i>
<div class="text">{{ name }}</div>
</li>
{% endfor %}
</ul>

{% highlight html %}
<span class="icon-user"></span>
<span class="icon-email"></span>
<span class="icon-settings"></span>
<i class="icon-user"></i>
<i class="icon-email"></i>
<i class="icon-settings"></i>
{% endhighlight %}

</div>
68 changes: 68 additions & 0 deletions scss/_doctype-icons.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
$doctype-path : "../images/doctype";

@mixin get-image($path, $ext: "png", $w: auto, $h: auto) {
$at1x-path: "#{$path}.#{$ext}";
$at2x-path: "#{$path}_@2x.#{$ext}";

@include img-retina("#{$at1x-path}", "#{$at2x-path}", $w, $h);
width: $w;
height: $h;
background-repeat: no-repeat;
}

[class^="doctype-"],
[class*=" doctype-"] {
display: inline-block;
}

.doctype-def {
@include get-image("#{$doctype-path}/file_def", "png", 20px, 25px);
}

.doctype-txt {
@include get-image("#{$doctype-path}/file_txt", "png", 20px, 25px);
}

.doctype-doc {
@include get-image("#{$doctype-path}/file_doc", "png", 20px, 25px);
}

.doctype-xls {
@include get-image("#{$doctype-path}/file_xls", "png", 20px, 25px);
}

.doctype-rtf {
@include get-image("#{$doctype-path}/file_rtf", "png", 20px, 25px);
}

.doctype-ppt {
@include get-image("#{$doctype-path}/file_ppt", "png", 20px, 25px);
}

.doctype-pdf {
@include get-image("#{$doctype-path}/file_pdf", "png", 20px, 25px);
}

.doctype-odt {
@include get-image("#{$doctype-path}/file_odt", "png", 20px, 25px);
}

.doctype-yt {
@include get-image("#{$doctype-path}/file_yt", "png", 20px, 25px);
}

.doctype-ggl {
@include get-image("#{$doctype-path}/file_ggl", "png", 20px, 25px);
}

.doctype-check {
@include get-image("#{$doctype-path}/file_check", "png", 20px, 25px);
}

.doctype-gls {
@include get-image("#{$doctype-path}/file_gls", "png", 20px, 25px);
}

.doctype-grp {
@include get-image("#{$doctype-path}/file_grp", "png", 28px, 33px);
}
2 changes: 2 additions & 0 deletions scss/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
$bootstrap-sass-asset-helper: (twbs-font-path("") != unquote('twbs-font-path("")')) !default;

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed to add this to use @include img-retina(....) 😟 🔫

//
// Variables
// --------------------------------------------------
Expand Down
5 changes: 5 additions & 0 deletions scss/docs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@

// Icons
.icons,
.doctype,
.favicons {
margin-left: -32px;

Expand Down Expand Up @@ -153,6 +154,10 @@
.text { margin-top: 12px; }
}

.doctype {
li { padding: 24px 0 16px; }
}

// Favicons
.favicons {
li {
Expand Down
1 change: 1 addition & 0 deletions scss/gengo.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
@import "buttons";
@import "button-groups";
@import "icons";
@import "doctype-icons";
@import "navs";
@import "forms";
@import "dropdowns";
Expand Down