diff --git a/app/assets/images/layout/forum-bg-pattern.png b/app/assets/images/layout/forum-bg-pattern.png deleted file mode 100644 index 9b0f171..0000000 Binary files a/app/assets/images/layout/forum-bg-pattern.png and /dev/null differ diff --git a/app/assets/images/layout/forum-bg-pattern@2x.png b/app/assets/images/layout/forum-bg-pattern@2x.png deleted file mode 100644 index cad04a3..0000000 Binary files a/app/assets/images/layout/forum-bg-pattern@2x.png and /dev/null differ diff --git a/app/assets/images/layout/background.jpg b/app/assets/images/themes/default/layout/background.jpg similarity index 100% rename from app/assets/images/layout/background.jpg rename to app/assets/images/themes/default/layout/background.jpg diff --git a/app/assets/images/layout/body-background-full.png b/app/assets/images/themes/default/layout/body-background-full.png similarity index 100% rename from app/assets/images/layout/body-background-full.png rename to app/assets/images/themes/default/layout/body-background-full.png diff --git a/app/assets/images/layout/body-background.jpg b/app/assets/images/themes/default/layout/body-background.jpg similarity index 100% rename from app/assets/images/layout/body-background.jpg rename to app/assets/images/themes/default/layout/body-background.jpg diff --git a/app/assets/images/layout/body-background.png b/app/assets/images/themes/default/layout/body-background.png similarity index 100% rename from app/assets/images/layout/body-background.png rename to app/assets/images/themes/default/layout/body-background.png diff --git a/app/assets/images/layout/drop-menu-background.png b/app/assets/images/themes/default/layout/drop-menu-background.png similarity index 100% rename from app/assets/images/layout/drop-menu-background.png rename to app/assets/images/themes/default/layout/drop-menu-background.png diff --git a/app/assets/images/layout/flash-background.png b/app/assets/images/themes/default/layout/flash-background.png similarity index 100% rename from app/assets/images/layout/flash-background.png rename to app/assets/images/themes/default/layout/flash-background.png diff --git a/app/assets/images/layout/flash-error-background.png b/app/assets/images/themes/default/layout/flash-error-background.png similarity index 100% rename from app/assets/images/layout/flash-error-background.png rename to app/assets/images/themes/default/layout/flash-error-background.png diff --git a/app/assets/images/layout/flash-error-icon.png b/app/assets/images/themes/default/layout/flash-error-icon.png similarity index 100% rename from app/assets/images/layout/flash-error-icon.png rename to app/assets/images/themes/default/layout/flash-error-icon.png diff --git a/app/assets/images/layout/flash-notice-background.png b/app/assets/images/themes/default/layout/flash-notice-background.png similarity index 100% rename from app/assets/images/layout/flash-notice-background.png rename to app/assets/images/themes/default/layout/flash-notice-background.png diff --git a/app/assets/images/layout/flash-notice-icon.png b/app/assets/images/themes/default/layout/flash-notice-icon.png similarity index 100% rename from app/assets/images/layout/flash-notice-icon.png rename to app/assets/images/themes/default/layout/flash-notice-icon.png diff --git a/app/assets/images/layout/footer-background.png b/app/assets/images/themes/default/layout/footer-background.png similarity index 100% rename from app/assets/images/layout/footer-background.png rename to app/assets/images/themes/default/layout/footer-background.png diff --git a/app/assets/images/layout/forum-category-highlight.png b/app/assets/images/themes/default/layout/forum-category-highlight.png similarity index 100% rename from app/assets/images/layout/forum-category-highlight.png rename to app/assets/images/themes/default/layout/forum-category-highlight.png diff --git a/app/assets/images/layout/forum-category.png b/app/assets/images/themes/default/layout/forum-category.png similarity index 100% rename from app/assets/images/layout/forum-category.png rename to app/assets/images/themes/default/layout/forum-category.png diff --git a/app/assets/images/layout/nav-background.png b/app/assets/images/themes/default/layout/nav-background.png similarity index 100% rename from app/assets/images/layout/nav-background.png rename to app/assets/images/themes/default/layout/nav-background.png diff --git a/app/assets/images/layout/sidebar-shadow.png b/app/assets/images/themes/default/layout/sidebar-shadow.png similarity index 100% rename from app/assets/images/layout/sidebar-shadow.png rename to app/assets/images/themes/default/layout/sidebar-shadow.png diff --git a/app/assets/images/logo-icon.png b/app/assets/images/themes/default/logo-icon.png similarity index 100% rename from app/assets/images/logo-icon.png rename to app/assets/images/themes/default/logo-icon.png diff --git a/app/assets/images/logo.png b/app/assets/images/themes/default/logo.png similarity index 100% rename from app/assets/images/logo.png rename to app/assets/images/themes/default/logo.png diff --git a/app/assets/images/themes/flat/logo-icon.png b/app/assets/images/themes/flat/logo-icon.png new file mode 100644 index 0000000..dcd3211 Binary files /dev/null and b/app/assets/images/themes/flat/logo-icon.png differ diff --git a/app/assets/images/themes/flat/logo.png b/app/assets/images/themes/flat/logo.png new file mode 100644 index 0000000..d8fca08 Binary files /dev/null and b/app/assets/images/themes/flat/logo.png differ diff --git a/app/assets/stylesheets/_variables.scss b/app/assets/stylesheets/themes/default/_variables.scss similarity index 96% rename from app/assets/stylesheets/_variables.scss rename to app/assets/stylesheets/themes/default/_variables.scss index 1fc06c9..f5c2fb4 100644 --- a/app/assets/stylesheets/_variables.scss +++ b/app/assets/stylesheets/themes/default/_variables.scss @@ -1,3 +1,10 @@ +/* + Theme Path +*/ + +$theme-name: 'default'; +$theme-path: "themes/#{$theme-name}"; + /* Neat Overrides */ diff --git a/app/assets/stylesheets/components/_breadcrumbs.scss b/app/assets/stylesheets/themes/default/components/_breadcrumbs.scss similarity index 100% rename from app/assets/stylesheets/components/_breadcrumbs.scss rename to app/assets/stylesheets/themes/default/components/_breadcrumbs.scss diff --git a/app/assets/stylesheets/components/_comments.scss b/app/assets/stylesheets/themes/default/components/_comments.scss similarity index 100% rename from app/assets/stylesheets/components/_comments.scss rename to app/assets/stylesheets/themes/default/components/_comments.scss diff --git a/app/assets/stylesheets/components/_flashes.scss b/app/assets/stylesheets/themes/default/components/_flashes.scss similarity index 81% rename from app/assets/stylesheets/components/_flashes.scss rename to app/assets/stylesheets/themes/default/components/_flashes.scss index 846d567..088fe35 100644 --- a/app/assets/stylesheets/components/_flashes.scss +++ b/app/assets/stylesheets/themes/default/components/_flashes.scss @@ -75,7 +75,7 @@ div#errors { top: 0; .message { - background: image-url('layout/flash-notice-background.png'); + background: image-url("#{theme-path}/layout/flash-notice-background.png"); position: relative; width: 730px; height: 60px; @@ -89,7 +89,7 @@ div#errors { z-index: 2; &:before { - background: image-url('layout/flash-notice-icon.png'); + background: image-url("#{theme-path}/layout/flash-notice-icon.png"); content: ''; display: block; width: 30px; @@ -102,10 +102,10 @@ div#errors { &.warning, &.error, &.alert { - background: image-url('layout/flash-error-background.png'); + background: image-url("#{theme-path}/layout/flash-error-background.png"); &:before { - background: image-url('layout/flash-error-icon.png'); + background: image-url("#{theme-path}/layout/flash-error-icon.png"); } } } diff --git a/app/assets/stylesheets/components/_forms.scss b/app/assets/stylesheets/themes/default/components/_forms.scss similarity index 100% rename from app/assets/stylesheets/components/_forms.scss rename to app/assets/stylesheets/themes/default/components/_forms.scss diff --git a/app/assets/stylesheets/components/_gather.scss b/app/assets/stylesheets/themes/default/components/_gather.scss similarity index 100% rename from app/assets/stylesheets/components/_gather.scss rename to app/assets/stylesheets/themes/default/components/_gather.scss diff --git a/app/assets/stylesheets/components/_lists.scss b/app/assets/stylesheets/themes/default/components/_lists.scss similarity index 100% rename from app/assets/stylesheets/components/_lists.scss rename to app/assets/stylesheets/themes/default/components/_lists.scss diff --git a/app/assets/stylesheets/components/_pagination.scss b/app/assets/stylesheets/themes/default/components/_pagination.scss similarity index 100% rename from app/assets/stylesheets/components/_pagination.scss rename to app/assets/stylesheets/themes/default/components/_pagination.scss diff --git a/app/assets/stylesheets/components/_shoutbox.scss b/app/assets/stylesheets/themes/default/components/_shoutbox.scss similarity index 100% rename from app/assets/stylesheets/components/_shoutbox.scss rename to app/assets/stylesheets/themes/default/components/_shoutbox.scss diff --git a/app/assets/stylesheets/components/_tables.scss b/app/assets/stylesheets/themes/default/components/_tables.scss similarity index 100% rename from app/assets/stylesheets/components/_tables.scss rename to app/assets/stylesheets/themes/default/components/_tables.scss diff --git a/app/assets/stylesheets/components/_tabs.scss b/app/assets/stylesheets/themes/default/components/_tabs.scss similarity index 100% rename from app/assets/stylesheets/components/_tabs.scss rename to app/assets/stylesheets/themes/default/components/_tabs.scss diff --git a/app/assets/stylesheets/layout/_body.scss b/app/assets/stylesheets/themes/default/layout/_body.scss similarity index 86% rename from app/assets/stylesheets/layout/_body.scss rename to app/assets/stylesheets/themes/default/layout/_body.scss index 56c78a0..5cb8079 100644 --- a/app/assets/stylesheets/layout/_body.scss +++ b/app/assets/stylesheets/themes/default/layout/_body.scss @@ -20,7 +20,7 @@ body#tinymce { min-height: 100%; background: { color: $blue; - image: image-url('layout/background.jpg'); + image: image-url("#{$theme-path}/layout/background.jpg"); position: top center; repeat: no-repeat; } @@ -39,11 +39,11 @@ body#tinymce { box-shadow: $content-shadow; margin-top: -35px; padding: 10px $container-padding $container-padding $container-padding; - background: image-url('layout/body-background.png') top center repeat-y; + background: image-url("#{$theme-path}/layout/body-background.png") top center repeat-y; &.full { padding-top: 40px; - background-image: image-url('layout/body-background-full.png'); + background-image: image-url("#{$theme-path}/layout/body-background-full.png"); } &.no-body { diff --git a/app/assets/stylesheets/layout/_footer.scss b/app/assets/stylesheets/themes/default/layout/_footer.scss similarity index 90% rename from app/assets/stylesheets/layout/_footer.scss rename to app/assets/stylesheets/themes/default/layout/_footer.scss index 5d89a77..49a86a7 100644 --- a/app/assets/stylesheets/layout/_footer.scss +++ b/app/assets/stylesheets/themes/default/layout/_footer.scss @@ -1,7 +1,7 @@ footer.footer { $footer-link-color: #5a5a5a; - background: image-url('layout/footer-background.png'); + background: image-url("#{$theme-path}/layout/footer-background.png"); height: 155px; max-height: 155px; diff --git a/app/assets/stylesheets/layout/_hacks.scss b/app/assets/stylesheets/themes/default/layout/_hacks.scss similarity index 100% rename from app/assets/stylesheets/layout/_hacks.scss rename to app/assets/stylesheets/themes/default/layout/_hacks.scss diff --git a/app/assets/stylesheets/layout/_header.scss b/app/assets/stylesheets/themes/default/layout/_header.scss similarity index 100% rename from app/assets/stylesheets/layout/_header.scss rename to app/assets/stylesheets/themes/default/layout/_header.scss diff --git a/app/assets/stylesheets/layout/_helpers.scss b/app/assets/stylesheets/themes/default/layout/_helpers.scss similarity index 100% rename from app/assets/stylesheets/layout/_helpers.scss rename to app/assets/stylesheets/themes/default/layout/_helpers.scss diff --git a/app/assets/stylesheets/layout/_navigation.scss b/app/assets/stylesheets/themes/default/layout/_navigation.scss similarity index 94% rename from app/assets/stylesheets/layout/_navigation.scss rename to app/assets/stylesheets/themes/default/layout/_navigation.scss index 7b7ff1a..85fdbf1 100644 --- a/app/assets/stylesheets/layout/_navigation.scss +++ b/app/assets/stylesheets/themes/default/layout/_navigation.scss @@ -9,7 +9,7 @@ $navigation-height: 50px; font-family: $header-font-family; height: $navigation-height; margin-top: -50px; - background: image-url('layout/nav-background.png') top center repeat-x; + background: image-url("#{$theme-path}/layout/nav-background.png") top center repeat-x; height: 100px; position: relative; z-index: 25; @@ -128,7 +128,7 @@ ul.navigation { position: relative; ul { - background: image-url('layout/drop-menu-background.png') top center repeat-y; + background: image-url("#{$theme-path}/layout/drop-menu-background.png") top center repeat-y; width: 176px; position: absolute; box-shadow: $content-shadow; diff --git a/app/assets/stylesheets/layout/_sidebar.scss b/app/assets/stylesheets/themes/default/layout/_sidebar.scss similarity index 96% rename from app/assets/stylesheets/layout/_sidebar.scss rename to app/assets/stylesheets/themes/default/layout/_sidebar.scss index 8781730..7a39ef8 100644 --- a/app/assets/stylesheets/layout/_sidebar.scss +++ b/app/assets/stylesheets/themes/default/layout/_sidebar.scss @@ -13,7 +13,7 @@ position: absolute; width: 265px; height: 75px; - background: image-url('layout/sidebar-shadow.png') top center no-repeat; + background: image-url("#{$theme-path}/layout/sidebar-shadow.png") top center no-repeat; top: 0; right: -20px; } diff --git a/app/assets/stylesheets/layout/_typography.scss b/app/assets/stylesheets/themes/default/layout/_typography.scss similarity index 100% rename from app/assets/stylesheets/layout/_typography.scss rename to app/assets/stylesheets/themes/default/layout/_typography.scss diff --git a/app/assets/stylesheets/mixins/_buttons.scss b/app/assets/stylesheets/themes/default/mixins/_buttons.scss similarity index 100% rename from app/assets/stylesheets/mixins/_buttons.scss rename to app/assets/stylesheets/themes/default/mixins/_buttons.scss diff --git a/app/assets/stylesheets/mixins/_flashes.scss b/app/assets/stylesheets/themes/default/mixins/_flashes.scss similarity index 100% rename from app/assets/stylesheets/mixins/_flashes.scss rename to app/assets/stylesheets/themes/default/mixins/_flashes.scss diff --git a/app/assets/stylesheets/pages/_bans.scss b/app/assets/stylesheets/themes/default/pages/_bans.scss similarity index 100% rename from app/assets/stylesheets/pages/_bans.scss rename to app/assets/stylesheets/themes/default/pages/_bans.scss diff --git a/app/assets/stylesheets/pages/_categories.scss b/app/assets/stylesheets/themes/default/pages/_categories.scss similarity index 100% rename from app/assets/stylesheets/pages/_categories.scss rename to app/assets/stylesheets/themes/default/pages/_categories.scss diff --git a/app/assets/stylesheets/pages/_contests.scss b/app/assets/stylesheets/themes/default/pages/_contests.scss similarity index 100% rename from app/assets/stylesheets/pages/_contests.scss rename to app/assets/stylesheets/themes/default/pages/_contests.scss diff --git a/app/assets/stylesheets/pages/_files.scss b/app/assets/stylesheets/themes/default/pages/_files.scss similarity index 100% rename from app/assets/stylesheets/pages/_files.scss rename to app/assets/stylesheets/themes/default/pages/_files.scss diff --git a/app/assets/stylesheets/pages/_forums.scss b/app/assets/stylesheets/themes/default/pages/_forums.scss similarity index 96% rename from app/assets/stylesheets/pages/_forums.scss rename to app/assets/stylesheets/themes/default/pages/_forums.scss index 330a67d..14b1ff2 100644 --- a/app/assets/stylesheets/pages/_forums.scss +++ b/app/assets/stylesheets/themes/default/pages/_forums.scss @@ -77,13 +77,13 @@ div#categories { width: 10%; background: { - image: image-url('layout/forum-category.png'); + image: image-url("#{$theme-path}/layout/forum-category.png"); position: center center; repeat: no-repeat; } &.updated { - background-image: image-url('layout/forum-category-highlight.png'); + background-image: image-url("#{$theme-path}/layout/forum-category-highlight.png"); } } diff --git a/app/assets/stylesheets/pages/_groups.scss b/app/assets/stylesheets/themes/default/pages/_groups.scss similarity index 100% rename from app/assets/stylesheets/pages/_groups.scss rename to app/assets/stylesheets/themes/default/pages/_groups.scss diff --git a/app/assets/stylesheets/pages/_issues.scss b/app/assets/stylesheets/themes/default/pages/_issues.scss similarity index 100% rename from app/assets/stylesheets/pages/_issues.scss rename to app/assets/stylesheets/themes/default/pages/_issues.scss diff --git a/app/assets/stylesheets/pages/_matches.scss b/app/assets/stylesheets/themes/default/pages/_matches.scss similarity index 100% rename from app/assets/stylesheets/pages/_matches.scss rename to app/assets/stylesheets/themes/default/pages/_matches.scss diff --git a/app/assets/stylesheets/pages/_news.scss b/app/assets/stylesheets/themes/default/pages/_news.scss similarity index 100% rename from app/assets/stylesheets/pages/_news.scss rename to app/assets/stylesheets/themes/default/pages/_news.scss diff --git a/app/assets/stylesheets/pages/_polls.scss b/app/assets/stylesheets/themes/default/pages/_polls.scss similarity index 100% rename from app/assets/stylesheets/pages/_polls.scss rename to app/assets/stylesheets/themes/default/pages/_polls.scss diff --git a/app/assets/stylesheets/pages/_servers.scss b/app/assets/stylesheets/themes/default/pages/_servers.scss similarity index 100% rename from app/assets/stylesheets/pages/_servers.scss rename to app/assets/stylesheets/themes/default/pages/_servers.scss diff --git a/app/assets/stylesheets/pages/_teams.scss b/app/assets/stylesheets/themes/default/pages/_teams.scss similarity index 100% rename from app/assets/stylesheets/pages/_teams.scss rename to app/assets/stylesheets/themes/default/pages/_teams.scss diff --git a/app/assets/stylesheets/pages/_users.scss b/app/assets/stylesheets/themes/default/pages/_users.scss similarity index 100% rename from app/assets/stylesheets/pages/_users.scss rename to app/assets/stylesheets/themes/default/pages/_users.scss diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/themes/default/theme.css.scss similarity index 100% rename from app/assets/stylesheets/application.css.scss rename to app/assets/stylesheets/themes/default/theme.css.scss diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index e471fee..69152be 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -9,6 +9,14 @@ module ApplicationHelper end end + def active_theme + 'default' + end + + def theme_stylesheet_link_tag + stylesheet_link_tag "themes/#{active_theme}/theme" + end + def namelink model, length = nil return if model.nil? model = case model.class.to_s diff --git a/app/views/application/_navigation.html.erb b/app/views/application/_navigation.html.erb index ade922e..61cc218 100644 --- a/app/views/application/_navigation.html.erb +++ b/app/views/application/_navigation.html.erb @@ -1,7 +1,7 @@