Skip to content

Set default less and css to new default name #54

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

Merged
merged 3 commits into from
Nov 4, 2016
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
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ LDFLAGS += -X "github.com/go-gitea/gitea/modules/setting.BuildGitHash=$(shell gi

DATA_FILES := $(shell find conf | sed 's/ /\\ /g')
LESS_FILES := $(wildcard public/less/gogs.less public/less/_*.less)
GENERATED := modules/bindata/bindata.go public/css/gogs.css
GENERATED := modules/bindata/bindata.go public/css/index.css

TAGS = ""
BUILD_FLAGS = "-v"
Expand All @@ -15,7 +15,7 @@ GOVET = go tool vet -composites=false -methods=false -structtags=false

.PHONY: build pack release bindata clean

.IGNORE: public/css/gogs.css
.IGNORE: public/css/index.css

all: build

Expand Down Expand Up @@ -53,9 +53,9 @@ bindata: modules/bindata/bindata.go
modules/bindata/bindata.go: $(DATA_FILES)
go-bindata -o=$@ -ignore="\\.DS_Store|README.md|TRANSLATORS" -pkg=bindata conf/...

less: public/css/gogs.css
less: public/css/index.css

public/css/gogs.css: $(LESS_FILES)
public/css/index.css: $(LESS_FILES)
lessc $< $@

clean:
Expand Down
16 changes: 8 additions & 8 deletions public/config.codekit
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0
},
"\/css\/gogs.css": {
"\/css\/index.css": {
"fileType": 16,
"ignore": 1,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/css\/gogs.css",
"inputAbbreviatedPath": "\/css\/index.css",
"outputAbbreviatedPath": "No Output Path",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0
Expand Down Expand Up @@ -128,11 +128,11 @@
"outputPathIsSetByUser": 0,
"processed": 1
},
"\/js\/gogs.js": {
"\/js\/index.js": {
"fileType": 64,
"ignore": 1,
"ignoreWasSetByUser": 1,
"inputAbbreviatedPath": "\/js\/gogs.js",
"inputAbbreviatedPath": "\/js\/index.js",
"outputAbbreviatedPath": "\/js\/min\/gogs-min.js",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0,
Expand Down Expand Up @@ -421,16 +421,16 @@
"strictMath": 0,
"strictUnits": 0
},
"\/less\/gogs.less": {
"\/less\/index.less": {
"allowInsecureImports": 0,
"createSourceMap": 0,
"disableJavascript": 0,
"fileType": 1,
"ieCompatibility": 1,
"ignore": 0,
"ignoreWasSetByUser": 1,
"inputAbbreviatedPath": "\/less\/gogs.less",
"outputAbbreviatedPath": "\/css\/gogs.css",
"inputAbbreviatedPath": "\/less\/index.less",
"outputAbbreviatedPath": "\/css\/index.css",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 1,
"outputStyle": 0,
Expand Down Expand Up @@ -1258,4 +1258,4 @@
"websiteRelativeRoot": ""
},
"settingsFileVersion": "2"
}
}
51 changes: 21 additions & 30 deletions public/css/gogs.css → public/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,18 @@ pre.wrap,
code.wrap {
Copy link
Member

Choose a reason for hiding this comment

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

Unrelated changes for that PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

But there are css changes, you just renamed the less file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tboerger was my fault, If you see on PR gogs/gogs#3786, don't have empty lines on css, I don't know why, my npm display that less version is 2.7.1, but on my terminal was using 1.4.2. Now I solved this and generated correct css files, with no empty files and with !important as defined on less.

white-space: pre-wrap;
/* CSS 3 */

word-break: break-word;
}
.dont-break-out {
/* These are technically the same, but use both */

overflow-wrap: break-word;
word-wrap: break-word;
-ms-word-break: break-all;
/* This is the dangerous one in WebKit, as it breaks things wherever */

word-break: break-all;
/* Instead use this non-standard one: */

word-break: break-word;
/* Adds a hyphen where the word breaks, if supported (No Blink) */

-ms-hyphens: auto;
-moz-hyphens: auto;
-webkit-hyphens: auto;
Expand Down Expand Up @@ -817,7 +812,7 @@ footer .ui.language .menu {
border: solid 1px #ccc;
border-bottom-color: #bbb;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #bbbbbb;
box-shadow: inset 0 -1px 0 #bbb;
}
.markdown:not(code) input[type="checkbox"] {
vertical-align: middle !important;
Expand Down Expand Up @@ -888,7 +883,7 @@ footer .ui.language .menu {
}
.install form label {
text-align: right;
width: 320px;
width: 320px !important;
}
.install form input {
width: 35% !important;
Expand All @@ -897,7 +892,7 @@ footer .ui.language .menu {
text-align: left;
}
.install form .field .help {
margin-left: 335px;
margin-left: 335px !important;
}
.install form .field.optional .title {
margin-left: 38%;
Expand Down Expand Up @@ -932,18 +927,18 @@ footer .ui.language .menu {
text-align: center;
}
#create-page-form form .header {
padding-left: 280px;
padding-left: 280px !important;
}
#create-page-form form .inline.field > label {
text-align: right;
width: 250px;
width: 250px !important;
word-wrap: break-word;
}
#create-page-form form .help {
margin-left: 265px;
margin-left: 265px !important;
}
#create-page-form form .optional .title {
margin-left: 250px;
margin-left: 250px !important;
}
#create-page-form form input,
#create-page-form form textarea {
Expand All @@ -969,30 +964,30 @@ footer .ui.language .menu {
.user.reset.password form .header,
.user.signin form .header,
.user.signup form .header {
padding-left: 280px;
padding-left: 280px !important;
}
.user.activate form .inline.field > label,
.user.forgot.password form .inline.field > label,
.user.reset.password form .inline.field > label,
.user.signin form .inline.field > label,
.user.signup form .inline.field > label {
text-align: right;
width: 250px;
width: 250px !important;
word-wrap: break-word;
}
.user.activate form .help,
.user.forgot.password form .help,
.user.reset.password form .help,
.user.signin form .help,
.user.signup form .help {
margin-left: 265px;
margin-left: 265px !important;
}
.user.activate form .optional .title,
.user.forgot.password form .optional .title,
.user.reset.password form .optional .title,
.user.signin form .optional .title,
.user.signup form .optional .title {
margin-left: 250px;
margin-left: 250px !important;
}
.user.activate form input,
.user.forgot.password form input,
Expand Down Expand Up @@ -1026,7 +1021,7 @@ footer .ui.language .menu {
.user.reset.password form .inline.field > label,
.user.signin form .inline.field > label,
.user.signup form .inline.field > label {
width: 200px;
width: 200px !important;
}
.repository.new.repo form,
.repository.new.migrate form,
Expand All @@ -1042,24 +1037,24 @@ footer .ui.language .menu {
.repository.new.repo form .header,
.repository.new.migrate form .header,
.repository.new.fork form .header {
padding-left: 280px;
padding-left: 280px !important;
}
.repository.new.repo form .inline.field > label,
.repository.new.migrate form .inline.field > label,
.repository.new.fork form .inline.field > label {
text-align: right;
width: 250px;
width: 250px !important;
word-wrap: break-word;
}
.repository.new.repo form .help,
.repository.new.migrate form .help,
.repository.new.fork form .help {
margin-left: 265px;
margin-left: 265px !important;
}
.repository.new.repo form .optional .title,
.repository.new.migrate form .optional .title,
.repository.new.fork form .optional .title {
margin-left: 250px;
margin-left: 250px !important;
}
.repository.new.repo form input,
.repository.new.migrate form input,
Expand Down Expand Up @@ -1094,7 +1089,7 @@ footer .ui.language .menu {
width: 50%!important;
}
.repository.new.repo .ui.form #auto-init {
margin-left: 265px;
margin-left: 265px !important;
}
.new.webhook form .help {
margin-left: 25px;
Expand Down Expand Up @@ -2340,18 +2335,14 @@ footer .ui.language .menu {
}
.settings .hook.list .item a {
/* These are technically the same, but use both */

overflow-wrap: break-word;
word-wrap: break-word;
-ms-word-break: break-all;
/* This is the dangerous one in WebKit, as it breaks things wherever */

word-break: break-all;
/* Instead use this non-standard one: */

word-break: break-word;
/* Adds a hyphen where the word breaks, if supported (No Blink) */

-ms-hyphens: auto;
-moz-hyphens: auto;
-webkit-hyphens: auto;
Expand Down Expand Up @@ -2550,18 +2541,18 @@ footer .ui.language .menu {
text-align: center;
}
.organization.new.org form .header {
padding-left: 280px;
padding-left: 280px !important;
}
.organization.new.org form .inline.field > label {
text-align: right;
width: 250px;
width: 250px !important;
word-wrap: break-word;
}
.organization.new.org form .help {
margin-left: 265px;
margin-left: 265px !important;
}
.organization.new.org form .optional .title {
margin-left: 250px;
margin-left: 250px !important;
}
.organization.new.org form input,
.organization.new.org form textarea {
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions templates/base/head.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@

<!-- Stylesheet -->
<link rel="stylesheet" href="{{AppSubUrl}}/css/semantic-2.2.1.min.css">
<link rel="stylesheet" href="{{AppSubUrl}}/css/gogs.css?v={{MD5 AppVer}}">
<link rel="stylesheet" href="{{AppSubUrl}}/css/index.css?v={{MD5 AppVer}}">

<!-- JavaScript -->
<script src="{{AppSubUrl}}/js/semantic-2.2.1.min.js"></script>
<script src="{{AppSubUrl}}/js/gogs.js?v={{MD5 AppVer}}"></script>
<script src="{{AppSubUrl}}/js/index.js?v={{MD5 AppVer}}"></script>

<title>{{if .Title}}{{.Title}} - {{end}}{{AppName}}</title>

Expand Down